{
  "repo": "tidbcloud/dataflow-service",
  "binary": "dataflow",
  "binary_path": "cmd/dataflow/main.go",
  "coverage": {
    "status": "partial",
    "covered_services": [
      "ConnectorService",
      "ImportInnerService",
      "BackupInternalService",
      "BackupConsoleService",
      "AdminBackupService",
      "ConsoleBackupService",
      "SinkEndpointService",
      "OpsInternalService"
    ],
    "covered_method_count": 154,
    "interface_method_count": 192
  },
  "dependencies": {
    "ConnectorService.ListConnectors": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Count and page biz changefeeds for the TiDB cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "bizChangefeedControllerImpl.ListConnectors -> BizChangefeedModelImpl.ListBizChangefeeds -> bizChangefeedRepo.Count/List"
            },
            {
              "operation": "SELECT",
              "trigger": "Load matching kernel changefeeds to enrich runtime status",
              "conditions": [
                "When the page contains biz changefeeds"
              ],
              "implementation": "BizChangefeedModelImpl.listKernelChangefeeds -> changefeedModelRegionalImpl.ListChangefeeds -> changefeedRepo.List"
            }
          ]
        }
      },
      "services": []
    },
    "ConnectorService.GetConnector": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the biz changefeed by ID",
              "conditions": [
                "Always"
              ],
              "implementation": "bizChangefeedControllerImpl.GetConnector -> BizChangefeedModelImpl.GetBizChangefeed -> bizChangefeedRepo.Load"
            },
            {
              "operation": "SELECT",
              "trigger": "Load the corresponding kernel changefeed to fill runtime fields",
              "conditions": [
                "After the biz changefeed row is found"
              ],
              "implementation": "BizChangefeedModelImpl.queryKernelChangefeed -> changefeedModelRegionalImpl.QueryChangefeed -> changefeedRepo.Get"
            }
          ]
        }
      },
      "services": []
    },
    "ConnectorService.GetClusterTCU": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List all biz changefeeds for the upstream TiDB cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "BizChangefeedModelImpl.GetClusterBizChangefeedRCU -> bizChangefeedRepo.List"
            },
            {
              "operation": "SELECT",
              "trigger": "Load specification metadata so each changefeed can be converted into RCU",
              "conditions": [
                "Only when at least one biz changefeed exists"
              ],
              "implementation": "BizChangefeedModelImpl.GetClusterBizChangefeedRCU -> machineManager.ListSpecifications"
            }
          ]
        }
      },
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when at least one biz changefeed exists"
          ],
          "operations": [
            {
              "operation": "Resolve cluster infra provider",
              "trigger": "Pick the correct specification set for the TiDB cluster",
              "conditions": [
                "Only when at least one biz changefeed exists"
              ],
              "implementation": "BizChangefeedModelImpl.GetClusterBizChangefeedRCU -> coreCli.GetAvailableClusterByID"
            }
          ]
        }
      ]
    },
    "ConnectorService.GetClusterTCUForAdmin": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Same implementation as ConnectorService.GetClusterTCU"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Delegate to the normal GetClusterTCU path",
              "conditions": [
                "Always"
              ],
              "implementation": "bizChangefeedControllerImpl.GetClusterTCUForAdmin -> bizChangefeedControllerImpl.GetClusterTCU"
            }
          ]
        }
      },
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Same implementation as ConnectorService.GetClusterTCU"
          ],
          "operations": [
            {
              "operation": "Reuse GetClusterTCU dependency chain",
              "trigger": "Admin path does not add new downstream calls",
              "conditions": [
                "Always"
              ],
              "implementation": "bizChangefeedControllerImpl.GetClusterTCUForAdmin -> bizChangefeedControllerImpl.GetClusterTCU"
            }
          ]
        }
      ]
    },
    "ConnectorService.DescribeAdminProfile": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Resolve region and cloud provider",
              "trigger": "Build the TiCDC role lookup request",
              "conditions": [
                "Always"
              ],
              "implementation": "BizChangefeedModelImpl.DescribeAdminProfile -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /api/v1/ticdcClusterRole",
          "operation_type": "http_get",
          "conditions": [
            "After core cluster lookup succeeds"
          ],
          "operations": [
            {
              "operation": "Fetch TiCDC role identity",
              "trigger": "Return AWS/GCP account information for the admin profile",
              "conditions": [
                "After core cluster lookup succeeds"
              ],
              "implementation": "BizChangefeedModelImpl.DescribeAdminProfile -> cdcClusterModel.GetRole -> ticdcClusterCli.GetTiCDCClusterRole"
            }
          ]
        }
      ]
    },
    "ConnectorService.DescribeSchemaTable": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "After local table-filter syntax validation succeeds"
          ],
          "operations": [
            {
              "operation": "Resolve tenant, region, and cloud provider",
              "trigger": "Build the regional VerifyTable request",
              "conditions": [
                "After local table-filter syntax validation succeeds"
              ],
              "implementation": "changefeedModelRegionalImpl.DescribeSchemaTable -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterConfidentialInfo",
          "operation_type": "grpc_unary",
          "conditions": [
            "After core cluster lookup succeeds"
          ],
          "operations": [
            {
              "operation": "Load encrypted cloud_admin password",
              "trigger": "Authenticate the regional VerifyTable request",
              "conditions": [
                "After core cluster lookup succeeds"
              ],
              "implementation": "changefeedModelRegionalImpl.DescribeSchemaTable -> coreCli.GetClusterConfidentialInfo"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /api/v1/verifyTable",
          "operation_type": "http_post",
          "conditions": [
            "After local filter validation, cluster lookup, and cloud_admin credential retrieval all succeed"
          ],
          "operations": [
            {
              "operation": "Verify table filters against the upstream cluster",
              "trigger": "Produce eligible and ineligible table lists",
              "conditions": [
                "After local filter validation, cluster lookup, and cloud_admin credential retrieval all succeed"
              ],
              "implementation": "changefeedModelRegionalImpl.DescribeSchemaTable -> preCheckCli.VerifyTable"
            }
          ]
        },
        {
          "name": "tidb-cluster-proxy",
          "target_interface": "GetPDSafepoint",
          "operation_type": "internal_client",
          "conditions": [
            "After the upstream cluster lookup succeeds"
          ],
          "operations": [
            {
              "operation": "Read PD GC safepoint",
              "trigger": "Return the lower bound for valid start-ts selection",
              "conditions": [
                "After the upstream cluster lookup succeeds"
              ],
              "implementation": "changefeedModelRegionalImpl.getGcSafePoint -> clusterproxy.BuildClusterProxyV2 -> proxy.GetPDSafepoint"
            }
          ]
        }
      ]
    },
    "ConnectorService.ScaleChangefeed": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Biz status must allow scaling and the target specification must differ"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the biz changefeed before scale validation",
              "conditions": [
                "Always"
              ],
              "implementation": "BizChangefeedModelImpl.ScaleBizChangefeed -> bizChangefeedRepo.Load"
            },
            {
              "operation": "UPDATE",
              "trigger": "Persist the new specification code and operation status",
              "conditions": [
                "After status check and specification lookup both succeed"
              ],
              "implementation": "BizChangefeedModelImpl.updateBizChangefeedEntityForScale -> bizChangefeedRepo.Update"
            }
          ]
        }
      },
      "services": [
        {
          "name": "workflow-engine",
          "target_interface": "RunDagWithTags",
          "operation_type": "workflow_submit",
          "conditions": [
            "After the scale transaction updates the biz changefeed row"
          ],
          "operations": [
            {
              "operation": "Submit scale workflow",
              "trigger": "Kick off asynchronous TiCDC resource scaling",
              "conditions": [
                "After the scale transaction updates the biz changefeed row"
              ],
              "implementation": "BizChangefeedModelImpl.createBizChangefeedWorkflow(workflow.DagScaleBizChangefeed)"
            }
          ]
        }
      ]
    },
    "ConnectorService.CalChangefeedFee": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the requested specification metadata",
              "conditions": [
                "Always"
              ],
              "implementation": "BizChangefeedModelImpl.CalBizChangefeedFee -> machineManager.Query"
            }
          ]
        }
      },
      "services": [
        {
          "name": "billing-service",
          "target_interface": "CalFee",
          "operation_type": "internal_client",
          "conditions": [
            "After specification metadata lookup succeeds"
          ],
          "operations": [
            {
              "operation": "Calculate fee",
              "trigger": "Convert RCU count and requested duration into billable cost",
              "conditions": [
                "After specification metadata lookup succeeds"
              ],
              "implementation": "BizChangefeedModelImpl.CalBizChangefeedFee -> billingHandler.CalFee"
            }
          ]
        }
      ]
    },
    "ConnectorService.StartConnector": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Biz changefeed status must allow resume"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the biz changefeed and persist resumed operation status",
              "conditions": [
                "Always load; update only after resume status precheck passes"
              ],
              "implementation": "BizChangefeedModelImpl.ResumeBizChangefeed -> bizChangefeedRepo.Load/Update"
            },
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the kernel changefeed and mirror feed state",
              "conditions": [
                "After biz status precheck passes"
              ],
              "implementation": "BizChangefeedModelImpl.resumeKernelChangefeed -> changefeedModelRegionalImpl.QueryChangefeed/ResumeChangefeed -> changefeedRepo.Get/Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /ticdc-service/api/v1/changefeeds/{changefeed_id}:resume",
          "operation_type": "http_post",
          "conditions": [
            "After the biz row is updated and the kernel changefeed is not already normal"
          ],
          "operations": [
            {
              "operation": "Resume regional changefeed",
              "trigger": "Bring the kernel changefeed back to running state",
              "conditions": [
                "After the biz row is updated and the kernel changefeed is not already normal"
              ],
              "implementation": "changefeedModelRegionalImpl.resumeChangefeedByRegional -> changefeedCli.ResumeChangefeed"
            }
          ]
        }
      ]
    },
    "ConnectorService.StopConnector": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Biz changefeed status must allow pause"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the biz changefeed and persist paused operation status",
              "conditions": [
                "Always load; update only after pause status precheck passes"
              ],
              "implementation": "BizChangefeedModelImpl.PauseBizChangefeed -> bizChangefeedRepo.Load/Update"
            },
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the kernel changefeed and mirror feed state",
              "conditions": [
                "After biz status precheck passes"
              ],
              "implementation": "BizChangefeedModelImpl.pauseKernelChangefeed -> changefeedModelRegionalImpl.QueryChangefeed/PauseChangefeed -> changefeedRepo.Get/Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /ticdc-service/api/v1/changefeeds/{changefeed_id}:pause",
          "operation_type": "http_post",
          "conditions": [
            "After the biz row is updated and the kernel changefeed is not already stopped or failed"
          ],
          "operations": [
            {
              "operation": "Pause regional changefeed",
              "trigger": "Stop the kernel changefeed after local status transition",
              "conditions": [
                "After the biz row is updated and the kernel changefeed is not already stopped or failed"
              ],
              "implementation": "changefeedModelRegionalImpl.pauseChangefeedByRegional -> changefeedCli.PauseChangefeed"
            }
          ]
        }
      ]
    },
    "ConnectorService.CreateConnector": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Upstream cluster checks, specification lookup, import guard, quota guard, and downstream precheck must all pass"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Check changefeed quota for the TiDB cluster",
              "conditions": [
                "After upstream cluster lookup succeeds"
              ],
              "implementation": "BizChangefeedModelImpl.checkBizChangefeedQuota -> bizChangefeedRepo.List"
            },
            {
              "operation": "INSERT",
              "trigger": "Persist the new biz changefeed row",
              "conditions": [
                "After all create-time prechecks succeed"
              ],
              "implementation": "BizChangefeedModelImpl.CreateBizChangefeed -> bizChangefeedRepo.Create"
            },
            {
              "operation": "INSERT",
              "trigger": "Create sink endpoint usage when private link is selected",
              "conditions": [
                "After the biz changefeed row is inserted and PrivateLinkEndpointID != 0"
              ],
              "implementation": "BizChangefeedModelImpl.createSinkEndpointUsageIfNeeded -> sinkEndpointModel.CreateSinkEndpointUsage"
            }
          ]
        }
      },
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterAccessPoints",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only for MySQL downstreams with an explicit endpoint"
          ],
          "operations": [
            {
              "operation": "Load upstream access points",
              "trigger": "Reject self-replication before the create request reaches bizChangefeedControllerImpl",
              "conditions": [
                "Only for MySQL downstreams with an explicit endpoint"
              ],
              "implementation": "changefeedControllerProxy.mustNotReplicate2Itself -> coreCli.GetClusterAccessPoints"
            }
          ]
        },
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "After connector type is recognized"
          ],
          "operations": [
            {
              "operation": "Resolve the upstream TiDB cluster",
              "trigger": "Build deploy-type, downstream validation, and create-time precheck context",
              "conditions": [
                "After connector type is recognized"
              ],
              "implementation": "bizChangefeedControllerImpl.CreateConnector -> coreCli.GetAvailableClusterByID"
            },
            {
              "operation": "Reload the upstream cluster inside the model",
              "trigger": "Run create-time upstream checks and derive tenant/project metadata for the biz row",
              "conditions": [
                "After controller-level parsing and validation succeed"
              ],
              "implementation": "BizChangefeedModelImpl.CreateBizChangefeed -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "import-service",
          "target_interface": "ImportService.List",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when the create request is not a migration flow"
          ],
          "operations": [
            {
              "operation": "List running imports",
              "trigger": "Block changefeed creation while import jobs are preparing/importing/canceling",
              "conditions": [
                "Only when the create request is not a migration flow"
              ],
              "implementation": "BizChangefeedModelImpl.checkRunningImports -> importCli.List"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "connector-specific downstream probe",
          "operation_type": "network_probe",
          "conditions": [
            "Only when the create request is not a migration flow"
          ],
          "operations": [
            {
              "operation": "Test downstream connectivity",
              "trigger": "Validate the downstream endpoint before persisting the biz changefeed",
              "conditions": [
                "Only when the create request is not a migration flow"
              ],
              "implementation": "BizChangefeedModelImpl.checkDownstream -> downstreamAdaptor.TestConnection"
            },
            {
              "operation": "Precheck downstream changefeed parameters",
              "trigger": "Validate sink-specific semantics after connectivity succeeds",
              "conditions": [
                "Only when the create request is not a migration flow"
              ],
              "implementation": "BizChangefeedModelImpl.checkDownstream -> downstreamAdaptor.PreCheckChangefeedParameters"
            }
          ]
        },
        {
          "name": "config-center",
          "target_interface": "GetComponentImage",
          "operation_type": "grpc_unary",
          "conditions": [
            "When ListConnectorEnabledFeatures runs on a new-arch create flow without an existing shared TiCDC cluster"
          ],
          "operations": [
            {
              "operation": "Resolve the new TiCDC cluster image tag",
              "trigger": "Validate downstream parameters against the actual TiCDC version that would be provisioned",
              "conditions": [
                "When ListConnectorEnabledFeatures runs on a new-arch create flow without an existing shared TiCDC cluster"
              ],
              "implementation": "bizChangefeedControllerImpl.getTiCDCClusterVersionForNewChangefeed -> cdcClusterModel.GetNewClusterVersion -> configManager.GetNewClusterImage"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /api/v1/ticdcClusters/{id}",
          "operation_type": "http_get",
          "conditions": [
            "When ListConnectorEnabledFeatures discovers an existing shared new-kernel TiCDC cluster"
          ],
          "operations": [
            {
              "operation": "Get existing shared TiCDC cluster version",
              "trigger": "Reuse the real image tag for feature-gate validation",
              "conditions": [
                "When ListConnectorEnabledFeatures discovers an existing shared new-kernel TiCDC cluster"
              ],
              "implementation": "bizChangefeedControllerImpl.getExistingSharedTiCDCClusterVersion -> cdcClusterModel.GetExistingClusterVersion -> ticdcClusterCli.GetTiCDCCluster"
            }
          ]
        },
        {
          "name": "workflow-engine",
          "target_interface": "RunDagWithTags",
          "operation_type": "workflow_submit",
          "conditions": [
            "After the create transaction inserts the biz row"
          ],
          "operations": [
            {
              "operation": "Submit create workflow",
              "trigger": "Provision asynchronous TiCDC resources for the new changefeed",
              "conditions": [
                "After the create transaction inserts the biz row"
              ],
              "implementation": "BizChangefeedModelImpl.createBizChangefeedWorkflow(workflow.DagCreateBizChangefeed)"
            }
          ]
        }
      ]
    },
    "ConnectorService.EditConnector": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Kernel changefeed must already be stopped and downstream type must stay unchanged"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the biz changefeed and its kernel changefeed before edit validation",
              "conditions": [
                "Always"
              ],
              "implementation": "BizChangefeedModelImpl.EditBizChangefeed -> bizChangefeedRepo.Load + queryKernelChangefeed"
            },
            {
              "operation": "UPDATE",
              "trigger": "Persist edited name/downstream params",
              "conditions": [
                "After kernel-stop check, downstream-type equality check, and biz status check all pass"
              ],
              "implementation": "BizChangefeedModelImpl.updateBizChangefeedEntityForEdit -> bizChangefeedRepo.Update"
            },
            {
              "operation": "SELECT",
              "trigger": "Load TiCDC cluster metadata for version discovery and regional update",
              "conditions": [
                "After the biz changefeed row and kernel row are loaded"
              ],
              "implementation": "changefeedControllerProxy.EditConnector/getTiCDCVersionByChangefeed + changefeedModelRegionalImpl.ModifyChangefeedConfig -> ticdcClusterRepo.Load"
            }
          ]
        }
      },
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterAccessPoints",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only for MySQL downstreams with an explicit endpoint"
          ],
          "operations": [
            {
              "operation": "Load upstream access points",
              "trigger": "Reject self-replication before the edit request reaches bizChangefeedControllerImpl",
              "conditions": [
                "Only for MySQL downstreams with an explicit endpoint"
              ],
              "implementation": "changefeedControllerProxy.mustNotReplicate2Itself -> coreCli.GetClusterAccessPoints"
            }
          ]
        },
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "After edit prechecks pass"
          ],
          "operations": [
            {
              "operation": "Load upstream TiDB cluster metadata",
              "trigger": "Assemble the kernel changefeed config patch against the correct cluster version",
              "conditions": [
                "After edit prechecks pass"
              ],
              "implementation": "BizChangefeedModelImpl.EditBizChangefeed -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "config-center",
          "target_interface": "GetClusterConfigurationFile",
          "operation_type": "grpc_unary",
          "conditions": [
            "After the model starts patching the kernel changefeed config"
          ],
          "operations": [
            {
              "operation": "Read current changefeed config and URI config",
              "trigger": "Merge user edits with stored config-center defaults",
              "conditions": [
                "After the model starts patching the kernel changefeed config"
              ],
              "implementation": "changefeedModelRegionalImpl.assembleKernelChangefeedConfig -> changefeedConfigManager.Get -> configCenterGrpcCli.GetClusterConfigurationFile"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET/PUT /ticdc-service/api/v1/changefeeds/{changefeed_id}",
          "operation_type": "http_client",
          "conditions": [
            "After local edit validation and config-center reads both succeed"
          ],
          "operations": [
            {
              "operation": "Fetch current kernel changefeed",
              "trigger": "Load the current regional replica config before patching",
              "conditions": [
                "After local edit validation and config-center reads both succeed"
              ],
              "implementation": "changefeedModelRegionalImpl.getChangefeedFromRegional -> changefeedCli.GetChangefeed"
            },
            {
              "operation": "Push updated sink URI and replica config",
              "trigger": "Apply the merged edit to the regional TiCDC changefeed",
              "conditions": [
                "After current regional config is fetched and merged"
              ],
              "implementation": "changefeedModelRegionalImpl.modifyChangefeedConfigByRegional -> changefeedCli.UpdateChangefeed"
            }
          ]
        }
      ]
    },
    "ConnectorService.DeleteConnector": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Biz changefeed status must allow delete"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the biz changefeed and mark it deleting",
              "conditions": [
                "Always load; update only after delete status precheck passes"
              ],
              "implementation": "BizChangefeedModelImpl.DeleteBizChangefeed -> bizChangefeedRepo.Load/Update"
            },
            {
              "operation": "SELECT/DELETE",
              "trigger": "Drop sink endpoint usage when the changefeed was using private link",
              "conditions": [
                "Only when BizPLEndpointID != 0"
              ],
              "implementation": "BizChangefeedModelImpl.deleteSinkEndpointUsageIfNeeded -> sinkEndpointModel.DeleteSinkEndpointUsage"
            }
          ]
        }
      },
      "services": [
        {
          "name": "workflow-engine",
          "target_interface": "RunDagWithTags",
          "operation_type": "workflow_submit",
          "conditions": [
            "After the delete transaction updates the biz row"
          ],
          "operations": [
            {
              "operation": "Submit delete workflow",
              "trigger": "Tear down asynchronous TiCDC resources",
              "conditions": [
                "After the delete transaction updates the biz row"
              ],
              "implementation": "BizChangefeedModelImpl.createBizChangefeedWorkflow(workflow.DagDeleteBizChangefeed)"
            }
          ]
        }
      ]
    },
    "ConnectorService.TestConnector": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterAccessPoints",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only for MySQL downstreams with an explicit endpoint"
          ],
          "operations": [
            {
              "operation": "Load upstream access points",
              "trigger": "Reject self-replication before testing downstream connectivity",
              "conditions": [
                "Only for MySQL downstreams with an explicit endpoint"
              ],
              "implementation": "changefeedControllerProxy.mustNotReplicate2Itself -> coreCli.GetClusterAccessPoints"
            }
          ]
        },
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "After downstream params are parsed successfully"
          ],
          "operations": [
            {
              "operation": "Resolve the upstream TiDB cluster",
              "trigger": "Run connector-type-specific downstream connectivity tests",
              "conditions": [
                "After downstream params are parsed successfully"
              ],
              "implementation": "BizChangefeedModelImpl.TestBizChangefeed -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "connector-specific downstream probe",
          "operation_type": "network_probe",
          "conditions": [
            "After upstream cluster lookup succeeds"
          ],
          "operations": [
            {
              "operation": "Test downstream connectivity",
              "trigger": "Validate the supplied connector target without persisting anything",
              "conditions": [
                "After upstream cluster lookup succeeds"
              ],
              "implementation": "BizChangefeedModelImpl.TestBizChangefeed -> downstreamAdaptor.TestConnection"
            }
          ]
        }
      ]
    },
    "ConnectorService.CreatePrivateLink": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "The registered ConnectorService server does not override this method in cmd/dataflow.",
        "Runtime behavior falls back to UnimplementedConnectorServiceServer.CreatePrivateLink and returns gRPC Unimplemented."
      ]
    },
    "ConnectorService.GetPrivateLink": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "The registered ConnectorService server does not override this method in cmd/dataflow.",
        "Runtime behavior falls back to UnimplementedConnectorServiceServer.GetPrivateLink and returns gRPC Unimplemented."
      ]
    },
    "ConnectorService.GetPrivateLinkAuthInfo": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "The registered ConnectorService server does not override this method in cmd/dataflow.",
        "Runtime behavior falls back to UnimplementedConnectorServiceServer.GetPrivateLinkAuthInfo and returns gRPC Unimplemented."
      ]
    },
    "ConnectorService.GeneratePrivateLinkAdvertisedPatternGroup": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "The registered ConnectorService server does not override this method in cmd/dataflow.",
        "Runtime behavior falls back to UnimplementedConnectorServiceServer.GeneratePrivateLinkAdvertisedPatternGroup and returns gRPC Unimplemented."
      ]
    },
    "ConnectorService.GetPrivateLinkAvailableZones": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "The registered ConnectorService server does not override this method in cmd/dataflow.",
        "Runtime behavior falls back to UnimplementedConnectorServiceServer.GetPrivateLinkAvailableZones and returns gRPC Unimplemented."
      ]
    },
    "ConnectorService.ListConnectorEnabledFeatures": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Existing-changefeed path loads persisted state; new-changefeed path inspects shared cluster inventory"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the biz changefeed and its kernel mapping for edit-time version discovery",
              "conditions": [
                "Only when req.ConnectorId is provided"
              ],
              "implementation": "bizChangefeedControllerImpl.getTiCDCVersionByChangefeed -> BizChangefeedModelImpl.GetBizChangefeed -> bizChangefeedRepo.Load + queryKernelChangefeed"
            },
            {
              "operation": "SELECT",
              "trigger": "Load existing TiCDC cluster rows when checking for a shared cluster",
              "conditions": [
                "Only when req.ConnectorId is absent and deploy type is shared"
              ],
              "implementation": "bizChangefeedControllerImpl.getExistingSharedTiCDCClusterVersion -> cdcClusterModel.List -> ticdcClusterRepo.List"
            },
            {
              "operation": "SELECT",
              "trigger": "Load the chosen TiCDC cluster row before reading its real image tag",
              "conditions": [
                "Only when an existing shared/new-kernel TiCDC cluster is found or edit-time version discovery reaches GetExistingClusterVersion"
              ],
              "implementation": "clusterModelRegionalImpl.GetExistingClusterVersion -> ticdcClusterRepo.Load"
            }
          ]
        }
      },
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when req.ConnectorId is absent"
          ],
          "operations": [
            {
              "operation": "Resolve upstream cluster metadata",
              "trigger": "Choose shared-vs-dedicated deploy type and derive the version lookup path for a new changefeed",
              "conditions": [
                "Only when req.ConnectorId is absent"
              ],
              "implementation": "bizChangefeedControllerImpl.getTiCDCClusterVersionForNewChangefeed -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /api/v1/ticdcClusters/{id}",
          "operation_type": "http_get",
          "conditions": [
            "Only when an existing new-kernel TiCDC cluster must reveal its real tag"
          ],
          "operations": [
            {
              "operation": "Fetch the current TiCDC cluster image tag",
              "trigger": "Resolve enabled features against the actual runtime version instead of the placeholder entity version",
              "conditions": [
                "Only when an existing new-kernel TiCDC cluster must reveal its real tag"
              ],
              "implementation": "clusterModelRegionalImpl.GetExistingClusterVersion -> ticdcClusterCli.GetTiCDCCluster"
            }
          ]
        },
        {
          "name": "config-center",
          "target_interface": "GetComponentImage",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when no reusable shared cluster exists and new-kernel provisioning is enabled"
          ],
          "operations": [
            {
              "operation": "Resolve the image tag for a would-be new TiCDC cluster",
              "trigger": "Return the right feature set for a new changefeed path",
              "conditions": [
                "Only when no reusable shared cluster exists and new-kernel provisioning is enabled"
              ],
              "implementation": "clusterModelRegionalImpl.GetNewClusterVersion -> configManager.GetNewClusterImage"
            }
          ]
        }
      ]
    },
    "ConnectorService.GetChangefeedDetail": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the biz changefeed and its kernel changefeed mapping",
              "conditions": [
                "Always"
              ],
              "implementation": "BizChangefeedModelImpl.GetChangefeedDetail -> bizChangefeedRepo.Load + queryKernelChangefeed"
            },
            {
              "operation": "SELECT",
              "trigger": "Load the TiCDC cluster row backing the kernel changefeed",
              "conditions": [
                "After kernel changefeed lookup succeeds"
              ],
              "implementation": "changefeedModelRegionalImpl.GetChangefeedDetail -> ticdcClusterRepo.Load"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /ticdc-service/api/v1/changefeeds/{changefeed_id}",
          "operation_type": "http_get",
          "conditions": [
            "After the biz changefeed and TiCDC cluster rows are resolved"
          ],
          "operations": [
            {
              "operation": "Fetch current kernel changefeed payload",
              "trigger": "Return the detailed regional changefeed config as a Struct",
              "conditions": [
                "After the biz changefeed and TiCDC cluster rows are resolved"
              ],
              "implementation": "changefeedModelRegionalImpl.GetChangefeedDetail -> changefeedCli.GetChangefeed"
            }
          ]
        }
      ]
    },
    "ConnectorService.GetTiCDCCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the biz changefeed and its kernel changefeed mapping",
              "conditions": [
                "Always"
              ],
              "implementation": "BizChangefeedModelImpl.GetTiCDCCluster -> bizChangefeedRepo.Load + queryKernelChangefeed"
            },
            {
              "operation": "SELECT",
              "trigger": "Load the TiCDC cluster row backing the kernel changefeed",
              "conditions": [
                "After kernel changefeed lookup succeeds"
              ],
              "implementation": "changefeedModelRegionalImpl.GetTiCDCCluster -> ticdcClusterRepo.Load"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /api/v1/ticdcClusters/{id}",
          "operation_type": "http_get",
          "conditions": [
            "After the biz changefeed and TiCDC cluster rows are resolved"
          ],
          "operations": [
            {
              "operation": "Fetch current TiCDC cluster payload",
              "trigger": "Return the TiCDC cluster backing this changefeed as a Struct",
              "conditions": [
                "After the biz changefeed and TiCDC cluster rows are resolved"
              ],
              "implementation": "changefeedModelRegionalImpl.GetTiCDCCluster -> cdcClusterCli.GetTiCDCCluster"
            }
          ]
        }
      ]
    },
    "ConnectorService.ListTiCDCClusters": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Resolve tenant, region, and cloud provider",
              "trigger": "Build the regional list-clusters request",
              "conditions": [
                "Always"
              ],
              "implementation": "bizChangefeedControllerImpl.ListTiCDCClusters -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /api/v1/ticdcClusters",
          "operation_type": "http_get",
          "conditions": [
            "After upstream cluster lookup succeeds"
          ],
          "operations": [
            {
              "operation": "List TiCDC clusters for the TiDB cluster",
              "trigger": "Return available TiCDC clusters as a Struct",
              "conditions": [
                "After upstream cluster lookup succeeds"
              ],
              "implementation": "changefeedModelRegionalImpl.ListTiCDCClusters -> cdcClusterCli.ListTiCDCClusters"
            }
          ]
        }
      ]
    },
    "SinkEndpointService.CreateSinkEndpoint": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Check duplicate endpoint name",
              "conditions": [
                "Always"
              ],
              "implementation": "sinkEndpointImpl.preCheckCreateSinkEndpointReq -> validateEndpointName -> bizPLEndpointRepo.List"
            },
            {
              "operation": "SELECT",
              "trigger": "Check endpoint count per service/VPC",
              "conditions": [
                "Always"
              ],
              "implementation": "sinkEndpointImpl.preCheckCreateSinkEndpointReq -> validateEndpointService -> bizPLEndpointRepo.List"
            },
            {
              "operation": "SELECT",
              "trigger": "Check root-domain conflicts",
              "conditions": [
                "Only when RootDomainName is non-empty after normalization"
              ],
              "implementation": "sinkEndpointImpl.preCheckCreateSinkEndpointReq -> validateRootDomainName -> bizPLEndpointRepo.List"
            },
            {
              "operation": "INSERT",
              "trigger": "Persist the sink endpoint row",
              "conditions": [
                "After all local and regional prechecks succeed"
              ],
              "implementation": "sinkEndpointImpl.doCreateSinkEndpoint -> bizPLEndpointRepo.Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /api/v1/privateLinks:validateAvailabilityZones",
          "operation_type": "http_post",
          "conditions": [
            "After local name/service/domain validations succeed"
          ],
          "operations": [
            {
              "operation": "Validate endpoint availability zones",
              "trigger": "Reject unsupported zone selections before the DB insert",
              "conditions": [
                "After local name/service/domain validations succeed"
              ],
              "implementation": "sinkEndpointImpl.preCheckCreateSinkEndpointReq -> cli.ValidateEndpointAvailabilityZones"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /api/v1/privateLinks",
          "operation_type": "http_post",
          "conditions": [
            "After the sink endpoint row is saved inside the transaction"
          ],
          "operations": [
            {
              "operation": "Create regional sink endpoint if needed",
              "trigger": "Provision the TiCDC-side private-link endpoint",
              "conditions": [
                "After the sink endpoint row is saved inside the transaction"
              ],
              "implementation": "sinkEndpointImpl.createRegionalEndpointIfNotExists -> cli.CreateTiCDCPrivateLink"
            }
          ]
        }
      ]
    },
    "SinkEndpointService.ListSinkEndpoints": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List sink endpoint rows under the tenant/project/provider/region filter",
              "conditions": [
                "Always"
              ],
              "implementation": "sinkEndpointImpl.ListSinkEndpoint -> bizPLEndpointRepo.List"
            },
            {
              "operation": "SELECT",
              "trigger": "Load usage rows for each returned endpoint",
              "conditions": [
                "For each returned endpoint"
              ],
              "implementation": "sinkEndpointImpl.getSinkEndpointUsageInfo -> bizPLEndpointUsageRepo.List"
            }
          ]
        }
      },
      "services": []
    },
    "SinkEndpointService.GetSinkEndpoint": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the sink endpoint row by ID",
              "conditions": [
                "Always"
              ],
              "implementation": "sinkEndpointControllerImpl.GetSinkEndpoint -> sinkEndpointModel.QuerySinkEndpoint -> bizPLEndpointRepo.Load"
            },
            {
              "operation": "SELECT",
              "trigger": "Load endpoint usage rows",
              "conditions": [
                "After the endpoint row is found"
              ],
              "implementation": "sinkEndpointImpl.getSinkEndpointUsageInfo -> bizPLEndpointUsageRepo.List"
            }
          ]
        }
      },
      "services": []
    },
    "SinkEndpointService.DeleteSinkEndpoint": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Tenant/project ownership must match and the endpoint must have no active usages"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the sink endpoint row for ownership validation",
              "conditions": [
                "Always"
              ],
              "implementation": "sinkEndpointControllerImpl.DeleteSinkEndpoint -> sinkEndpointModel.QuerySinkEndpoint -> bizPLEndpointRepo.Load"
            },
            {
              "operation": "SELECT",
              "trigger": "Check existing endpoint usages before delete",
              "conditions": [
                "After ownership validation succeeds"
              ],
              "implementation": "sinkEndpointImpl.preCheckDeleteSinkEndpointReq -> bizPLEndpointUsageRepo.List"
            },
            {
              "operation": "UPDATE",
              "trigger": "Mark the endpoint deleting",
              "conditions": [
                "After precheckDeleteSinkEndpointReq succeeds and the endpoint row still exists"
              ],
              "implementation": "sinkEndpointImpl.doDeleteSinkEndpoint -> bizPLEndpointRepo.Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "DELETE /api/v1/privateLinks/{id}",
          "operation_type": "http_delete",
          "conditions": [
            "After the local endpoint row is marked deleting"
          ],
          "operations": [
            {
              "operation": "Delete regional sink endpoint if it exists",
              "trigger": "Tear down the TiCDC-side private-link endpoint",
              "conditions": [
                "After the local endpoint row is marked deleting"
              ],
              "implementation": "sinkEndpointImpl.deleteRegionalEndpointIfExists -> cli.DeleteTiCDCPrivateLink"
            }
          ]
        }
      ]
    },
    "SinkEndpointService.ListSinkAvailabilityZones": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /api/v1/privateLinks/availableZones",
          "operation_type": "http_get",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "List available zones",
              "trigger": "Return valid sink-endpoint availability zones for the tenant/project/region",
              "conditions": [
                "Always"
              ],
              "implementation": "sinkEndpointImpl.GetAvailabilityZones -> cli.GetAvailableZones"
            }
          ]
        }
      ]
    },
    "SinkEndpointService.GenerateSinkAdvertisedListener": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when the generated root domain is non-empty"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Check root-domain conflicts against existing endpoints",
              "conditions": [
                "Only when the generated root domain is non-empty"
              ],
              "implementation": "sinkEndpointImpl.GenerateSinkAdvertisedListener -> validateRootDomainName -> bizPLEndpointRepo.List"
            }
          ]
        }
      },
      "services": []
    },
    "SinkEndpointService.ValidateSinkAdvertisedListenerDomain": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when RootDomainName is non-empty after trimming the trailing dot"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Check whether the custom root domain conflicts with an existing endpoint",
              "conditions": [
                "Only when RootDomainName is non-empty after trimming the trailing dot"
              ],
              "implementation": "sinkEndpointImpl.ValidateSinkAdvertisedListenerDomain -> validateRootDomainName -> bizPLEndpointRepo.List"
            }
          ]
        }
      },
      "services": []
    },
    "SinkEndpointService.GetSinkEndpointAuthInfo": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /api/v1/privateLinks/authInfo",
          "operation_type": "http_get",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load private-link auth info",
              "trigger": "Return network/account/principal identifiers needed by the sink endpoint user",
              "conditions": [
                "Always"
              ],
              "implementation": "sinkEndpointImpl.GetSinkEndpointAuthInfo -> cli.GetPrivateLinkAuthInfo"
            }
          ]
        }
      ]
    },
    "OpsInternalService.ApplyConfigChanges": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Changefeed-cluster path loads persisted TiCDC objects; TiCDC-cluster path updates status rows"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the TiCDC changefeed entity for CHANGEFEED_CLUSTER requests",
              "conditions": [
                "Only when req.ClusterType == CHANGEFEED_CLUSTER"
              ],
              "implementation": "opsInnerControllerImpl.applyChangefeedConfig -> ticdcChangefeedModel.QueryChangefeed -> changefeedRepo.Get"
            },
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Pause and later resume the TiCDC changefeed when the kernel feed is not already stopped",
              "conditions": [
                "Only when req.ClusterType == CHANGEFEED_CLUSTER and KernelMetrics.FeedState != stopped"
              ],
              "implementation": "opsInnerControllerImpl.applyTiCDCChangefeedConfig -> ticdcChangefeedModel.PauseChangefeed/ResumeChangefeed -> changefeedRepo.Load/Save"
            },
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the TiCDC cluster entity and mark it upgrading for TICDC_CLUSTER requests",
              "conditions": [
                "Only when req.ClusterType == TICDC_CLUSTER"
              ],
              "implementation": "clusterModelRegionalImpl.ApplyConfig -> ticdcClusterRepo.Load/Save"
            },
            {
              "operation": "SELECT",
              "trigger": "Load biz changefeed and kernel changefeed rows when applying config back to a biz changefeed",
              "conditions": [
                "Only when req.ClusterType == CHANGEFEED_CLUSTER and BusinessType == changefeed"
              ],
              "implementation": "opsInnerControllerImpl.updateTiCDCChangefeed -> BizChangefeedModelImpl.EditBizChangefeedForOps -> bizChangefeedRepo.Load + queryKernelChangefeed"
            }
          ]
        }
      },
      "services": [
        {
          "name": "config-center",
          "target_interface": "UpdateClusterMeta",
          "operation_type": "grpc_unary",
          "conditions": [
            "For all supported cluster types, but the payload differs by branch"
          ],
          "operations": [
            {
              "operation": "Update config for TIDB_DEDICATED_CLUSTER",
              "trigger": "Persist backup/restore/old-TiCDC config changes",
              "conditions": [
                "Only when req.ClusterType == TIDB_DEDICATED_CLUSTER"
              ],
              "implementation": "opsInnerControllerImpl.applyTiDBClusterTypeConfigChanges -> configManager.UpdateConfigVersion -> configCenterGrpcCli.UpdateClusterMeta"
            },
            {
              "operation": "Update TiCDC cluster config",
              "trigger": "Persist TiCDC cluster custom params before pushing them to regional",
              "conditions": [
                "Only when req.ClusterType == TICDC_CLUSTER"
              ],
              "implementation": "opsInnerControllerImpl.applyTiCDCClusterConfig -> ticdcClusterConfigManager.Update -> configCenterGrpcCli.UpdateClusterMeta"
            },
            {
              "operation": "Update changefeed config or sink-uri config",
              "trigger": "Persist changefeed custom params before patching the running changefeed",
              "conditions": [
                "Only when req.ClusterType == CHANGEFEED_CLUSTER"
              ],
              "implementation": "opsInnerControllerImpl.updateChangefeedConfig -> changefeedConfigManager.Update -> configCenterGrpcCli.UpdateClusterMeta"
            }
          ]
        },
        {
          "name": "config-center",
          "target_interface": "GetClusterConfigurationFile",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when req.ClusterType == TICDC_CLUSTER or CHANGEFEED_CLUSTER reaches kernel patching"
          ],
          "operations": [
            {
              "operation": "Read TiCDC cluster config",
              "trigger": "Build the regional UpdateTiCDCClusterConfig request",
              "conditions": [
                "Only when req.ClusterType == TICDC_CLUSTER"
              ],
              "implementation": "clusterModelRegionalImpl.ApplyConfig -> ticdcClusterConfigManager.Get -> configCenterGrpcCli.GetClusterConfigurationFile"
            },
            {
              "operation": "Read changefeed config + URI config",
              "trigger": "Merge persisted changefeed config back into the kernel patch flow",
              "conditions": [
                "Only when req.ClusterType == CHANGEFEED_CLUSTER and updateTiCDCChangefeed reaches biz-changefeed patching"
              ],
              "implementation": "changefeedModelRegionalImpl.assembleKernelChangefeedConfig -> changefeedConfigManager.Get -> configCenterGrpcCli.GetClusterConfigurationFile"
            }
          ]
        },
        {
          "name": "regional-ticdc-service",
          "target_interface": "mixed TiCDC config endpoints",
          "operation_type": "http_client",
          "conditions": [
            "Branch-specific"
          ],
          "operations": [
            {
              "operation": "Update TiCDC cluster config",
              "trigger": "Push TICDC_CLUSTER config changes to regional",
              "conditions": [
                "Only when req.ClusterType == TICDC_CLUSTER"
              ],
              "implementation": "clusterModelRegionalImpl.updateConfigRegionalTiCDCCluster -> ticdcClusterCli.UpdateTiCDCClusterConfig"
            },
            {
              "operation": "Pause/resume regional changefeed if needed",
              "trigger": "Create a safe window for CHANGEFEED_CLUSTER config application",
              "conditions": [
                "Only when req.ClusterType == CHANGEFEED_CLUSTER and KernelMetrics.FeedState != stopped"
              ],
              "implementation": "opsInnerControllerImpl.applyTiCDCChangefeedConfig -> ticdcChangefeedModel.PauseChangefeed/ResumeChangefeed -> changefeedCli.PauseChangefeed/ResumeChangefeed"
            },
            {
              "operation": "Fetch and update regional changefeed config",
              "trigger": "Apply the merged CHANGEFEED_CLUSTER config to TiCDC",
              "conditions": [
                "Only when req.ClusterType == CHANGEFEED_CLUSTER"
              ],
              "implementation": "changefeedModelRegionalImpl.getChangefeedFromRegional/modifyChangefeedConfigByRegional -> changefeedCli.GetChangefeed/UpdateChangefeed"
            }
          ]
        },
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when CHANGEFEED_CLUSTER config updates a biz changefeed through EditBizChangefeedForOps"
          ],
          "operations": [
            {
              "operation": "Resolve upstream TiDB cluster metadata",
              "trigger": "Rebuild the kernel changefeed config with the correct cluster context",
              "conditions": [
                "Only when CHANGEFEED_CLUSTER config updates a biz changefeed through EditBizChangefeedForOps"
              ],
              "implementation": "BizChangefeedModelImpl.EditBizChangefeedForOps -> coreCli.GetAvailableClusterByID"
            }
          ]
        }
      ]
    },
    "OpsInternalService.UpdateTiCDCClusterStorage": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the TiCDC cluster row",
              "conditions": [
                "Always"
              ],
              "implementation": "clusterModelRegionalImpl.UpdateStorage -> ticdcClusterRepo.Load"
            },
            {
              "operation": "SELECT",
              "trigger": "Load the current instance-type defaults",
              "conditions": [
                "Always"
              ],
              "implementation": "clusterModelRegionalImpl.UpdateStorage -> instanceTypeModel.GetCDCInstanceType"
            },
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Persist the custom storage override",
              "conditions": [
                "Only when at least one of size/iops/throughput is non-zero"
              ],
              "implementation": "clusterModelRegionalImpl.updateStorage -> ticdcCustomStorageRepo.Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "PATCH /api/v1/ticdcClusters/{id}/storage",
          "operation_type": "http_patch",
          "conditions": [
            "Only when at least one of size/iops/throughput is non-zero"
          ],
          "operations": [
            {
              "operation": "Update TiCDC cluster storage",
              "trigger": "Push the custom storage override to the regional cluster",
              "conditions": [
                "Only when at least one of size/iops/throughput is non-zero"
              ],
              "implementation": "clusterModelRegionalImpl.updateStorage -> ticdcClusterCli.UpdateTiCDCClusterStorage"
            }
          ]
        }
      ]
    },
    "OpsInternalService.ListInternalChangefeeds": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List biz changefeeds under the TiDB cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "opsInnerControllerImpl.listTiCDCChangefeeds -> bizChangefeedModel.ListBizChangefeeds -> bizChangefeedRepo.Count/List"
            },
            {
              "operation": "SELECT",
              "trigger": "List TiCDC cluster rows under the TiDB cluster",
              "conditions": [
                "Only when there are biz changefeeds"
              ],
              "implementation": "opsInnerControllerImpl.listTiCDCChangefeeds -> ticdcClusterModel.List -> ticdcClusterRepo.List"
            },
            {
              "operation": "SELECT",
              "trigger": "List kernel changefeeds under those TiCDC clusters",
              "conditions": [
                "Only when TiCDC cluster rows exist"
              ],
              "implementation": "opsInnerControllerImpl.assembleTiCDCChangefeeds -> ticdcChangefeedModel.ListChangefeeds -> changefeedRepo.List/Count"
            }
          ]
        }
      },
      "services": []
    },
    "OpsInternalService.GetInternalChangefeed": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Query the TiCDC changefeed row with preloaded TiCDC cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "opsInnerControllerImpl.getTiCDCChangefeed -> ticdcChangefeedModel.QueryChangefeed -> changefeedRepo.Get"
            },
            {
              "operation": "SELECT",
              "trigger": "Load the biz changefeed display metadata",
              "conditions": [
                "Only when BusinessType == changefeed"
              ],
              "implementation": "opsInnerControllerImpl.getTiCDCChangefeed -> bizChangefeedModel.GetBizChangefeed -> bizChangefeedRepo.Load"
            }
          ]
        }
      },
      "services": []
    },
    "OpsInternalService.RestartChangefeed": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Verify the TiCDC changefeed exists before restart",
              "conditions": [
                "Always"
              ],
              "implementation": "opsInnerControllerImpl.RestartChangefeed -> ticdcChangefeedModel.QueryChangefeed -> changefeedRepo.Get"
            },
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Pause then resume the TiCDC changefeed locally",
              "conditions": [
                "After existence check succeeds"
              ],
              "implementation": "opsInnerControllerImpl.restartTiCDCChangefeed -> ticdcChangefeedModel.PauseChangefeed/ResumeChangefeed -> changefeedRepo.Load/Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /ticdc-service/api/v1/changefeeds/{changefeed_id}:pause + :resume",
          "operation_type": "http_client",
          "conditions": [
            "After existence check succeeds"
          ],
          "operations": [
            {
              "operation": "Pause then resume regional changefeed",
              "trigger": "Force a kernel-level restart",
              "conditions": [
                "After existence check succeeds"
              ],
              "implementation": "opsInnerControllerImpl.restartTiCDCChangefeed -> changefeedCli.PauseChangefeed/ResumeChangefeed"
            }
          ]
        }
      ]
    },
    "OpsInternalService.PauseChangefeed": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Verify the TiCDC changefeed exists before pausing",
              "conditions": [
                "Always"
              ],
              "implementation": "opsInnerControllerImpl.PauseChangefeed -> ticdcChangefeedModel.QueryChangefeed -> changefeedRepo.Get"
            },
            {
              "operation": "UPDATE",
              "trigger": "Persist stopped kernel state locally",
              "conditions": [
                "After existence check succeeds and the changefeed is not already stopped/failed"
              ],
              "implementation": "changefeedModelRegionalImpl.PauseChangefeed -> changefeedRepo.Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /ticdc-service/api/v1/changefeeds/{changefeed_id}:pause",
          "operation_type": "http_post",
          "conditions": [
            "After existence check succeeds and the changefeed is not already stopped/failed"
          ],
          "operations": [
            {
              "operation": "Pause regional changefeed",
              "trigger": "Stop the running TiCDC changefeed",
              "conditions": [
                "After existence check succeeds and the changefeed is not already stopped/failed"
              ],
              "implementation": "changefeedModelRegionalImpl.pauseChangefeedByRegional -> changefeedCli.PauseChangefeed"
            }
          ]
        }
      ]
    },
    "OpsInternalService.ResumeChangefeed": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Verify the TiCDC changefeed exists before resuming",
              "conditions": [
                "Always"
              ],
              "implementation": "opsInnerControllerImpl.ResumeChangefeed -> ticdcChangefeedModel.QueryChangefeed -> changefeedRepo.Get"
            },
            {
              "operation": "UPDATE",
              "trigger": "Persist normal kernel state locally",
              "conditions": [
                "After existence check succeeds and the changefeed is not already normal"
              ],
              "implementation": "changefeedModelRegionalImpl.ResumeChangefeed -> changefeedRepo.Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /ticdc-service/api/v1/changefeeds/{changefeed_id}:resume",
          "operation_type": "http_post",
          "conditions": [
            "After existence check succeeds and the changefeed is not already normal"
          ],
          "operations": [
            {
              "operation": "Resume regional changefeed",
              "trigger": "Restart the paused TiCDC changefeed",
              "conditions": [
                "After existence check succeeds and the changefeed is not already normal"
              ],
              "implementation": "changefeedModelRegionalImpl.resumeChangefeedByRegional -> changefeedCli.ResumeChangefeed"
            }
          ]
        }
      ]
    },
    "OpsInternalService.GetInternalTiCDCCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the TiCDC cluster row",
              "conditions": [
                "Always"
              ],
              "implementation": "opsInnerControllerImpl.GetInternalTiCDCCluster -> ticdcClusterModel.Query -> ticdcClusterRepo.Get"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "GET /api/v1/ticdcClusters/{id}",
          "operation_type": "http_get",
          "conditions": [
            "Only when the TiCDC cluster is marked IsRegional"
          ],
          "operations": [
            {
              "operation": "Fetch regional cluster payload",
              "trigger": "Fill operatorVersion for three-layer deployments",
              "conditions": [
                "Only when the TiCDC cluster is marked IsRegional"
              ],
              "implementation": "opsInnerControllerImpl.addInternalDeploymentInfo -> ticdcClusterCli.GetTiCDCCluster"
            }
          ]
        }
      ]
    },
    "OpsInternalService.RestartTiCDCCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the TiCDC cluster row before restart",
              "conditions": [
                "Always"
              ],
              "implementation": "clusterModelRegionalImpl.Restart -> ticdcClusterRepo.Load"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /api/v1/ticdcClusters/{id}:restart",
          "operation_type": "http_post",
          "conditions": [
            "After the TiCDC cluster row is loaded"
          ],
          "operations": [
            {
              "operation": "Restart regional TiCDC cluster",
              "trigger": "Bounce the backing TiCDC deployment",
              "conditions": [
                "After the TiCDC cluster row is loaded"
              ],
              "implementation": "clusterModelRegionalImpl.Restart -> ticdcClusterCli.RestartTiCDCCluster"
            }
          ]
        }
      ]
    },
    "OpsInternalService.PauseClusterChangefeeds": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "ClusterId must be non-zero; each page is processed sequentially"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Page through biz changefeeds under the TiDB cluster",
              "conditions": [
                "ClusterId != 0"
              ],
              "implementation": "opsInnerControllerImpl.pauseClusterBizChangefeeds -> bizChangefeedModel.ListBizChangefeeds -> bizChangefeedRepo.Count/List"
            },
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Pause each biz changefeed that is not already failed or stopped",
              "conditions": [
                "For each listed biz changefeed whose status is neither failed nor stopped"
              ],
              "implementation": "opsInnerControllerImpl.pauseClusterBizChangefeeds -> bizChangefeedModel.PauseBizChangefeed -> bizChangefeedRepo.Load/Update + queryKernelChangefeed + changefeedRepo.Save"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-ticdc-service",
          "target_interface": "POST /ticdc-service/api/v1/changefeeds/{changefeed_id}:pause",
          "operation_type": "http_post",
          "conditions": [
            "For each listed biz changefeed whose kernel feed is not already stopped or failed"
          ],
          "operations": [
            {
              "operation": "Pause each regional changefeed",
              "trigger": "Stop all runnable cluster changefeeds one by one",
              "conditions": [
                "For each listed biz changefeed whose kernel feed is not already stopped or failed"
              ],
              "implementation": "BizChangefeedModelImpl.pauseKernelChangefeed -> changefeedCli.PauseChangefeed"
            }
          ]
        }
      ]
    },
    "Backup.ListBackupOfCluster": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after project/page validation and before any backup-openapi method delegates into the in-process console backup controller"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership and deploy-tier metadata",
              "trigger": "Validate org/project ownership and reject dev-tier clusters",
              "conditions": [
                "Always before backup-openapi delegation"
              ],
              "implementation": "BaseService.CheckOrgIDAndProjectIDByClusterID -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "notes": [
        "Then delegates in-process to ConsoleBackupService.List to enumerate backups inside the same binary."
      ]
    },
    "Backup.GetBackupOfCluster": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after project/page validation and before any backup-openapi method delegates into the in-process console backup controller"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership and deploy-tier metadata",
              "trigger": "Validate org/project ownership and reject dev-tier clusters",
              "conditions": [
                "Always before backup-openapi delegation"
              ],
              "implementation": "BaseService.CheckOrgIDAndProjectIDByClusterID -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "notes": [
        "Then delegates in-process to ConsoleBackupService.List with BackupId filtering to materialize the single backup view."
      ]
    },
    "Backup.CreateBackup": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after project/page validation and before any backup-openapi method delegates into the in-process console backup controller"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership and deploy-tier metadata",
              "trigger": "Validate org/project ownership and reject dev-tier clusters",
              "conditions": [
                "Always before backup-openapi delegation"
              ],
              "implementation": "BaseService.CheckOrgIDAndProjectIDByClusterID -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "notes": [
        "Then delegates in-process to ConsoleBackupService.CreateBackupSchedule after name/description validation succeeds."
      ]
    },
    "Backup.DeleteBackup": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after project/page validation and before any backup-openapi method delegates into the in-process console backup controller"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership and deploy-tier metadata",
              "trigger": "Validate org/project ownership and reject dev-tier clusters",
              "conditions": [
                "Always before backup-openapi delegation"
              ],
              "implementation": "BaseService.CheckOrgIDAndProjectIDByClusterID -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "notes": [
        "Then delegates in-process to ConsoleBackupService.Delete after ownership and backup identifiers are validated."
      ]
    },
    "Restore.ListRestoreOfProject": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when ListRestoreOfProject needs metadata for restore target clusters"
          ],
          "operations": [
            {
              "operation": "Batch load restoring clusters",
              "trigger": "Populate restore target cluster names and statuses in the response",
              "conditions": [
                "Only when listResp contains non-zero RestoreClusterID values"
              ],
              "implementation": "restoreControllerImpl.queryRestoringClusters -> coreCli.ListClusters"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after page/project validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List restore rows for the project",
              "conditions": [
                "Always after request validation succeeds"
              ],
              "implementation": "restoreControllerImpl.ListRestoreOfProject -> restoreRouter.List"
            }
          ]
        }
      }
    },
    "Restore.GetRestore": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Branch-specific"
          ],
          "operations": [
            {
              "operation": "Load the restore target cluster",
              "trigger": "Populate the cluster block in the GetRestore response",
              "conditions": [
                "Only when QueryRestoreRespV2.RestoreClusterID != 0"
              ],
              "implementation": "restoreControllerImpl.convertGetRestoreResp -> coreCli.GetAnyClusterByID"
            },
            {
              "operation": "Load the backup source cluster",
              "trigger": "Derive region and component defaults for CreateRestore",
              "conditions": [
                "Always after snapshot backup lookup succeeds"
              ],
              "implementation": "restoreControllerImpl.CreateRestore -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after project validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the restore row for the requested restore ID",
              "conditions": [
                "Always after request validation succeeds"
              ],
              "implementation": "restoreControllerImpl.GetRestore -> restoreRouter.Query"
            }
          ]
        }
      }
    },
    "Restore.CreateRestore": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Branch-specific"
          ],
          "operations": [
            {
              "operation": "Load the restore target cluster",
              "trigger": "Populate the cluster block in the GetRestore response",
              "conditions": [
                "Only when QueryRestoreRespV2.RestoreClusterID != 0"
              ],
              "implementation": "restoreControllerImpl.convertGetRestoreResp -> coreCli.GetAnyClusterByID"
            },
            {
              "operation": "Load the backup source cluster",
              "trigger": "Derive region and component defaults for CreateRestore",
              "conditions": [
                "Always after snapshot backup lookup succeeds"
              ],
              "implementation": "restoreControllerImpl.CreateRestore -> coreCli.GetAnyClusterByID"
            }
          ]
        },
        {
          "name": "workflow-engine",
          "target_interface": "CreateRestore workflow submission",
          "operation_type": "workflow_submit",
          "conditions": [
            "After backup lookup and backup-source cluster lookup both succeed"
          ],
          "operations": [
            {
              "operation": "Submit restore workflow",
              "trigger": "Start the asynchronous restore workflow and return restoreID + clusterID",
              "conditions": [
                "Always after createRestoreReq is assembled"
              ],
              "implementation": "restoreControllerImpl.CreateRestore -> restoreRouter.Create"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always before workflow submission"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the snapshot backup row referenced by BackupId",
              "conditions": [
                "Always when CreateRestore starts"
              ],
              "implementation": "restoreControllerImpl.CreateRestore -> snapshotBackupModel.Query"
            }
          ]
        }
      }
    },
    "PremiumMigrationService.CreatePremiumMigration": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever validateCluster or audit-log helpers need the target TiDB cluster"
          ],
          "operations": [
            {
              "operation": "Load target cluster metadata",
              "trigger": "Resolve the cluster, org, and region from tidb_id",
              "conditions": [
                "Whenever the request carries a tidb_id that must be resolved"
              ],
              "implementation": "PremiumDMService.validateCluster / ImportIntoService.recordAuditLog* -> MgmtSvcGrpcClient.ListClusters"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only after cluster lookup, whitelist checks, password encryption, and request conversion succeed"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Persist the premium DM task row",
              "conditions": [
                "Only after CreateV1beta1TaskReqToDMTask succeeds"
              ],
              "implementation": "PremiumDMService.CreatePremiumMigration -> db.GetDB().Create"
            }
          ]
        }
      }
    },
    "PremiumMigrationService.GetPremiumMigration": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the premium DM task by cluster and migration ID",
              "conditions": [
                "Always"
              ],
              "implementation": "PremiumDMService.GetPremiumMigration -> premiumDMDAO.GetTask"
            }
          ]
        }
      }
    },
    "PremiumMigrationService.ListPremiumMigrations": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after pager normalization succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/COUNT",
              "trigger": "List and count premium DM tasks for the cluster",
              "conditions": [
                "Always after filter + pager assembly"
              ],
              "implementation": "PremiumDMService.ListPremiumMigrations -> premiumDMDAO.ListTasks + CountTasks"
            }
          ]
        }
      }
    },
    "PremiumMigrationService.DeletePremiumMigration": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever validateCluster or audit-log helpers need the target TiDB cluster"
          ],
          "operations": [
            {
              "operation": "Load target cluster metadata",
              "trigger": "Resolve the cluster, org, and region from tidb_id",
              "conditions": [
                "Whenever the request carries a tidb_id that must be resolved"
              ],
              "implementation": "PremiumDMService.validateCluster / ImportIntoService.recordAuditLog* -> MgmtSvcGrpcClient.ListClusters"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only after target cluster lookup succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE/SELECT",
              "trigger": "Load the task, mark it deleting, and reload the latest state",
              "conditions": [
                "Only when the task is not already deleted/deleting"
              ],
              "implementation": "PremiumDMService.DeletePremiumMigration -> premiumDMDAO.GetTask / UpdateTask / GetTask"
            }
          ]
        }
      }
    },
    "PremiumMigrationService.PausePremiumMigration": {
      "services": [
        {
          "name": "regional-dm-proxy",
          "target_interface": "StopPremiumDMTask",
          "operation_type": "http_or_grpc_proxy",
          "conditions": [
            "Only after the DB transaction has loaded a running premium DM task and updated its stage to stopped"
          ],
          "operations": [
            {
              "operation": "Stop the running premium DM task",
              "trigger": "Propagate PausePremiumMigration to the regional DM control plane",
              "conditions": [
                "Only when task.Stage == running"
              ],
              "implementation": "PremiumDMService.PausePremiumMigration -> premium_dm.NewPremiumDMProxy(...).StopPremiumDMTask"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only inside the transaction that guards state transitions"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the task and move stage from running to stopped",
              "conditions": [
                "Only when task.Stage == running"
              ],
              "implementation": "PremiumDMService.PausePremiumMigration -> premiumDMDAO.GetTask / UpdateTask"
            }
          ]
        }
      }
    },
    "PremiumMigrationService.ResumePremiumMigration": {
      "services": [
        {
          "name": "regional-dm-proxy",
          "target_interface": "StartPremiumDMTask",
          "operation_type": "http_or_grpc_proxy",
          "conditions": [
            "Only after the DB transaction has loaded a stopped/failed premium DM task and updated its stage to running"
          ],
          "operations": [
            {
              "operation": "Restart the premium DM task",
              "trigger": "Propagate ResumePremiumMigration to the regional DM control plane",
              "conditions": [
                "Only when task.Stage in {stopped, failed}"
              ],
              "implementation": "PremiumDMService.ResumePremiumMigration -> premium_dm.NewPremiumDMProxy(...).StartPremiumDMTask"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only inside the transaction that guards state transitions"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the task and move stage from stopped/failed to running",
              "conditions": [
                "Only when task.Stage in {stopped, failed}"
              ],
              "implementation": "PremiumDMService.ResumePremiumMigration -> premiumDMDAO.GetTask / UpdateTask"
            }
          ]
        }
      }
    },
    "PremiumMigrationService.CreatePremiumMigrationPrecheck": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "No dedicated implementation exists in premium_dm.go; the method body is commented out and runtime falls back to the embedded UnimplementedPremiumMigrationServiceServer stub."
      ]
    },
    "PremiumMigrationService.PremiumMigrationCancelPrecheck": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "No dedicated implementation exists in premium_dm.go; the method body is commented out and runtime falls back to the embedded UnimplementedPremiumMigrationServiceServer stub."
      ]
    },
    "PremiumMigrationService.PremiumMigrationGetPrecheck": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "No dedicated implementation exists in premium_dm.go; the method body is commented out and runtime falls back to the embedded UnimplementedPremiumMigrationServiceServer stub."
      ]
    },
    "PremiumMigrationService.GetPremiumMigrationSourceTables": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetPublicKey + AgentService.ExecSQLOnDMSource",
          "operation_type": "grpc_unary",
          "conditions": [
            "Within retry.Do; the loop only retries when the regional agent reports pem_changed"
          ],
          "operations": [
            {
              "operation": "Fetch agent public key",
              "trigger": "Encrypt source DB credentials before the DM-source SQL call",
              "conditions": [
                "Before each ExecSQLOnDMSource attempt"
              ],
              "implementation": "PremiumDMService.execSQLOnSource -> agentCli.GetPublicKey"
            },
            {
              "operation": "Execute SQL on the source database",
              "trigger": "Probe source connectivity or enumerate source tables",
              "conditions": [
                "After encrypting the DM source password with the fetched PEM"
              ],
              "implementation": "PremiumDMService.execSQLOnSource -> agentCli.ExecSQLOnDMSource"
            }
          ]
        }
      ]
    },
    "PremiumMigrationService.ValidatePremiumMigrationSourceConn": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetPublicKey + AgentService.ExecSQLOnDMSource",
          "operation_type": "grpc_unary",
          "conditions": [
            "Within retry.Do; the loop only retries when the regional agent reports pem_changed"
          ],
          "operations": [
            {
              "operation": "Fetch agent public key",
              "trigger": "Encrypt source DB credentials before the DM-source SQL call",
              "conditions": [
                "Before each ExecSQLOnDMSource attempt"
              ],
              "implementation": "PremiumDMService.execSQLOnSource -> agentCli.GetPublicKey"
            },
            {
              "operation": "Execute SQL on the source database",
              "trigger": "Probe source connectivity or enumerate source tables",
              "conditions": [
                "After encrypting the DM source password with the fetched PEM"
              ],
              "implementation": "PremiumDMService.execSQLOnSource -> agentCli.ExecSQLOnDMSource"
            }
          ]
        }
      ]
    },
    "PremiumMigrationService.ValidatePremiumMigrationMigrationTargetConn": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetPublicKey + AgentService.ExecuteSQL",
          "operation_type": "grpc_unary",
          "conditions": [
            "Within retry.Do; the loop only retries when the regional agent reports pem_changed"
          ],
          "operations": [
            {
              "operation": "Fetch agent public key",
              "trigger": "Encrypt target DB credentials before the target-cluster SQL call",
              "conditions": [
                "Before each ExecuteSQL attempt"
              ],
              "implementation": "PremiumDMService.ValidatePremiumMigrationMigrationTargetConn -> agentCli.GetPublicKey"
            },
            {
              "operation": "Execute SQL on the target TiDB cluster",
              "trigger": "Validate the premium migration target database connection with SELECT 1",
              "conditions": [
                "After encrypting the target password with the fetched PEM"
              ],
              "implementation": "PremiumDMService.ValidatePremiumMigrationMigrationTargetConn -> agentCli.ExecuteSQL"
            }
          ]
        }
      ]
    },
    "PremiumMigrationService.GetSupportedSources": {
      "infrastructure": {},
      "services": [],
      "notes": [
        "Returns a static in-memory list with MySQL/public connectivity only; no external service or database call is made."
      ]
    },
    "AdminImportService.ListImports": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByIDAndExcludeStatuses",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever an admin import request must translate cluster metadata into org/project/region context"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Resolve project, tenant, and region fields from the cluster ID",
              "conditions": [
                "Always before request conversion or list filtering"
              ],
              "implementation": "importadmin.Service.ListImports / convertCreateImportRequest -> grpcli.GetClusterByIDAndExcludeStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after the in-process console ImportService.List call returns import IDs"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load each import row to enrich timestamps and creation details",
              "conditions": [
                "Once per returned import item"
              ],
              "implementation": "importadmin.Service.ListImports -> dbutil.GetImportByID"
            }
          ]
        }
      },
      "notes": [
        "The actual list RPC is delegated in-process to ConsoleImportService.List; this mapping records the external cluster lookup plus the per-item DB enrichment that the admin facade adds on top."
      ]
    },
    "AdminImportService.GetImport": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the import row before delegating to the in-process console ImportService.Get path",
              "conditions": [
                "Always"
              ],
              "implementation": "importadmin.Service.GetImport -> dbutil.GetImportByID"
            }
          ]
        }
      },
      "notes": [
        "Then delegates in-process to ConsoleImportService.Get with the org/project metadata loaded from the DB row."
      ]
    },
    "AdminImportService.CancelImport": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the import row to recover tenant/project metadata before cancellation",
              "conditions": [
                "Always"
              ],
              "implementation": "importadmin.Service.CancelImport -> dbutil.GetImportByID"
            }
          ]
        }
      },
      "notes": [
        "Then delegates in-process to ConsoleImportService.Cancel with the recovered org/project metadata."
      ]
    },
    "AdminImportService.CreateImport": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByIDAndExcludeStatuses",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever an admin import request must translate cluster metadata into org/project/region context"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Resolve project, tenant, and region fields from the cluster ID",
              "conditions": [
                "Always before request conversion or list filtering"
              ],
              "implementation": "importadmin.Service.ListImports / convertCreateImportRequest -> grpcli.GetClusterByIDAndExcludeStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when ValidateOnly is false and the create path reaches import persistence"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Reload the created import row after the in-process console ImportService.Create call returns an ID",
              "conditions": [
                "Only when ValidateOnly is false"
              ],
              "implementation": "importadmin.Service.CreateImport -> dbutil.GetImportByID"
            }
          ]
        }
      },
      "notes": [
        "When ValidateOnly=true, the method stays inside the same binary and runs validateImport only. When ValidateOnly=false, it converts the request, delegates in-process to ConsoleImportService.Create, reloads the created import row from MySQL, and then delegates in-process again to ConsoleImportService.Get for the final response."
      ]
    },
    "ImportIntoService.CreateImportIntoTask": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever validateCluster or audit-log helpers need the target TiDB cluster"
          ],
          "operations": [
            {
              "operation": "Load target cluster metadata",
              "trigger": "Resolve the cluster, org, and region from tidb_id",
              "conditions": [
                "Whenever the request carries a tidb_id that must be resolved"
              ],
              "implementation": "PremiumDMService.validateCluster / ImportIntoService.recordAuditLog* -> MgmtSvcGrpcClient.ListClusters"
            }
          ]
        },
        {
          "name": "audit-log",
          "target_interface": "Submit",
          "operation_type": "event_submit",
          "conditions": [
            "Always in the deferred audit-log path after CreateImportIntoTask returns"
          ],
          "operations": [
            {
              "operation": "Submit import-created audit event",
              "trigger": "Emit AWS / OSS / Azure import audit logs with cluster metadata and sanitized source URI",
              "conditions": [
                "Always after recordAuditLogForImport resolves the target cluster"
              ],
              "implementation": "ImportIntoService.recordAuditLogForImport -> auditlog.NewEvent(...).Submit"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after request parsing, source URI conversion, CSV config marshaling, and wildcard expansion succeed"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Persist the import-into task row with preparing status and per-table wildcard state",
              "conditions": [
                "Always before the deferred audit log runs"
              ],
              "implementation": "ImportIntoService.CreateImportIntoTask -> db.GetDB().Create"
            }
          ]
        }
      }
    },
    "ImportIntoService.ListImportIntoTasks": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "COUNT/SELECT",
              "trigger": "List import-into tasks for the cluster with q/status filters and page-token pagination",
              "conditions": [
                "Always inside the transaction"
              ],
              "implementation": "ImportIntoService.ListImportIntoTasks -> tx.Model(...).Count + Scan"
            }
          ]
        }
      }
    },
    "ImportIntoService.GetImportIntoTask": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the import-into task row by cluster and import ID",
              "conditions": [
                "Always inside the transaction"
              ],
              "implementation": "ImportIntoService.GetImportIntoTask -> tx.Model(...).First"
            }
          ]
        }
      }
    },
    "ImportIntoService.CancelImportIntoTask": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever validateCluster or audit-log helpers need the target TiDB cluster"
          ],
          "operations": [
            {
              "operation": "Load target cluster metadata",
              "trigger": "Resolve the cluster, org, and region from tidb_id",
              "conditions": [
                "Whenever the request carries a tidb_id that must be resolved"
              ],
              "implementation": "PremiumDMService.validateCluster / ImportIntoService.recordAuditLog* -> MgmtSvcGrpcClient.ListClusters"
            }
          ]
        },
        {
          "name": "audit-log",
          "target_interface": "Submit",
          "operation_type": "event_submit",
          "conditions": [
            "Always in the deferred audit-log path after CancelImportIntoTask returns"
          ],
          "operations": [
            {
              "operation": "Submit import-canceled audit event",
              "trigger": "Emit the canceled-import audit event with cluster metadata and sanitized source URI",
              "conditions": [
                "Only when recordAuditLogForCancelImport can reload the task and cluster metadata"
              ],
              "implementation": "ImportIntoService.recordAuditLogForCancelImport -> auditlog.NewEvent(...).Submit"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "UPDATE",
              "trigger": "Move eligible preparing/importing/scaling tasks into canceling state",
              "conditions": [
                "Only when status in {preparing, importing, scaling_up}"
              ],
              "implementation": "ImportIntoService.CancelImportIntoTask -> tx.Model(...).Update(\"status\", canceling)"
            }
          ]
        }
      }
    },
    "ImportIntoService.CheckImportSource": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetImportFiles",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only after the source URI is normalized and wildcard table metadata has been expanded"
          ],
          "operations": [
            {
              "operation": "Enumerate source files",
              "trigger": "Validate that each wildcard resolves to importable files and return discovered table metadata",
              "conditions": [
                "Always after ToSourceURI succeeds"
              ],
              "implementation": "ImportIntoService.CheckImportSource -> agentCli.GetImportFiles"
            }
          ]
        },
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when the source type is OSS and ToSourceURI needs to derive the correct endpoint for the target cluster"
          ],
          "operations": [
            {
              "operation": "Load cluster cloud/region metadata",
              "trigger": "Choose OSS internal vs public endpoint while normalizing the source URI",
              "conditions": [
                "Only when ToSourceURI -> getAliOssRegionAndEndpoint runs"
              ],
              "implementation": "ToSourceURI/getAliOssRegionAndEndpoint -> MgmtSvcGrpcClient.ListClusters"
            }
          ]
        }
      ]
    },
    "ImportIntoService.CheckDatabaseConnectivity": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetPublicKey + AgentService.ExecuteSQL",
          "operation_type": "grpc_unary",
          "conditions": [
            "Within retry.Do; the loop only retries when the regional agent reports pem_changed"
          ],
          "operations": [
            {
              "operation": "Fetch agent public key",
              "trigger": "Encrypt the database password before SQL connectivity checks",
              "conditions": [
                "Before each ExecuteSQL attempt"
              ],
              "implementation": "ImportIntoService.CheckDatabaseConnectivity -> agentCli.GetPublicKey"
            },
            {
              "operation": "Execute SELECT 1",
              "trigger": "Validate target database connectivity",
              "conditions": [
                "After encrypting the password with the fetched PEM"
              ],
              "implementation": "ImportIntoService.CheckDatabaseConnectivity -> agentCli.ExecuteSQL"
            }
          ]
        }
      ]
    },
    "ImportIntoService.CheckImportSourceConnection": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-dataflow-agent",
          "target_interface": "source-access check RPC",
          "operation_type": "grpc_unary",
          "conditions": [
            "Branch-specific by import source type"
          ],
          "operations": [
            {
              "operation": "Validate cloud-storage credentials",
              "trigger": "Check S3 / OSS / Azure Blob access for the provided source definition",
              "conditions": [
                "Source-specific branches"
              ],
              "implementation": "ImportIntoService.CheckImportSourceConnection -> agentCli.CheckS3Access / CheckOSSAccess / CheckAzblobAccess"
            }
          ]
        },
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when the source type is OSS and the endpoint must be derived from cluster cloud/region metadata"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata for OSS endpoint resolution",
              "trigger": "Decide whether to use the internal or public OSS endpoint",
              "conditions": [
                "Only when getAliOssRegionAndEndpoint runs"
              ],
              "implementation": "ImportIntoService.CheckImportSourceConnection -> getAliOssRegionAndEndpoint -> MgmtSvcGrpcClient.ListClusters"
            }
          ]
        }
      ]
    },
    "DPFeatureService.GetEnabledDPFeaturesForCluster": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when req.ClusterId != 0"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Validate org/project ownership for cluster-scoped feature evaluation",
              "conditions": [
                "Only when req.ClusterId != 0"
              ],
              "implementation": "dpFeatureService.GetEnabledDPFeaturesForCluster -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "notes": [
        "When req.ClusterId == 0, the method returns project-scoped feature switches only. When PiTR is present, it also runs an in-process backupModel.CanClusterEnableLogBackup filter before returning the final feature list."
      ]
    },
    "ChangefeedInstanceTypeService.List": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List available changefeed instance types through the biz-changefeed model",
              "conditions": [
                "Always"
              ],
              "implementation": "changefeedInstanceTypeControllerImpl.List -> changefeedModel.ListChangefeedInstanceTypes"
            }
          ]
        }
      }
    },
    "ConnProfileService.CreateConnProfile": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterWithDataplaneByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever conn-profile validation or feature gating needs cluster + dataplane metadata"
          ],
          "operations": [
            {
              "operation": "Load cluster and dataplane metadata",
              "trigger": "Validate project ownership, cluster availability, and DM prerequisites",
              "conditions": [
                "Always before conn-profile business logic runs"
              ],
              "implementation": "connProfileService.checkUser/checkUserAndCluster/commonCheck -> grpcli.GetClusterWithDataplaneByID"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.ResolveVpcPeeringHost",
          "operation_type": "network_probe",
          "conditions": [
            "Only when the caller supplies a hostname instead of a literal IP and conn_method needs VPC-peering validation"
          ],
          "operations": [
            {
              "operation": "Resolve host to IPs from the dataplane side",
              "trigger": "Verify whether the host belongs to a peering network before allowing direct/VPC-peering modes",
              "conditions": [
                "Only in checkVpcPeering for hostname inputs"
              ],
              "implementation": "connProfileService.vpcPeeringAddr2IPs -> commondm.VpcPeeringHost2IP"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.CheckDBConnectivity",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only after connectivity mode validation, optional VPC-peering checks, and TLS parameter validation succeed"
          ],
          "operations": [
            {
              "operation": "Check remote database connectivity",
              "trigger": "Probe the user-supplied host or private-link DNS with the provided credentials",
              "conditions": [
                "Only after the connection target is derived from conn_method"
              ],
              "implementation": "connProfileService.CreateConnProfile / ValidateRemoteDBConnectivity / ValidateClusterConnectivity -> agentClient.CheckDBConnectivity"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Branch-specific"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Reuse an existing private-link endpoint if one already exists for the same network and service name",
              "conditions": [
                "Only when conn_method == private_link"
              ],
              "implementation": "connProfileService.CreateConnProfile -> connprofile.GetAvailablePrivateLink"
            },
            {
              "operation": "INSERT",
              "trigger": "Persist the encrypted connection profile",
              "conditions": [
                "Only after DB connectivity succeeds and the password is encrypted"
              ],
              "implementation": "connProfileService.CreateConnProfile -> userCtx.Create"
            }
          ]
        }
      }
    },
    "ConnProfileService.GetIPWhiteList": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterWithDataplaneByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever conn-profile validation or feature gating needs cluster + dataplane metadata"
          ],
          "operations": [
            {
              "operation": "Load cluster and dataplane metadata",
              "trigger": "Validate project ownership, cluster availability, and DM prerequisites",
              "conditions": [
                "Always before conn-profile business logic runs"
              ],
              "implementation": "connProfileService.checkUser/checkUserAndCluster/commonCheck -> grpcli.GetClusterWithDataplaneByID"
            }
          ]
        }
      ],
      "notes": [
        "Then derives the response in-process from common.GetNetworkByCluster: VPC-peering returns the network CIDR, while direct-connect returns external ingress IPs."
      ]
    },
    "ConnProfileService.CreatePrivateLinkEndpoint": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterWithDataplaneByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever conn-profile validation or feature gating needs cluster + dataplane metadata"
          ],
          "operations": [
            {
              "operation": "Load cluster and dataplane metadata",
              "trigger": "Validate project ownership, cluster availability, and DM prerequisites",
              "conditions": [
                "Always before conn-profile business logic runs"
              ],
              "implementation": "connProfileService.checkUser/checkUserAndCluster/commonCheck -> grpcli.GetClusterWithDataplaneByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when the cluster is available and the provider supports private-link style endpoints"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Look for a non-failed existing private-link endpoint with the same network + service-name tuple",
              "conditions": [
                "Always before creating a new endpoint"
              ],
              "implementation": "connProfileService.CreatePrivateLinkEndpoint -> connprofile.GetNonFailedNonDeletedPLEndpoint"
            },
            {
              "operation": "INSERT",
              "trigger": "Persist a new private-link endpoint request when no reusable endpoint exists",
              "conditions": [
                "Only when no reusable endpoint record is found"
              ],
              "implementation": "connProfileService.CreatePrivateLinkEndpoint -> userCtx.CreatePLEndpoint"
            }
          ]
        }
      }
    },
    "ConnProfileService.GetPrivateLinkEndpoint": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterWithDataplaneByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever conn-profile validation or feature gating needs cluster + dataplane metadata"
          ],
          "operations": [
            {
              "operation": "Load cluster and dataplane metadata",
              "trigger": "Validate project ownership, cluster availability, and DM prerequisites",
              "conditions": [
                "Always before conn-profile business logic runs"
              ],
              "implementation": "connProfileService.checkUser/checkUserAndCluster/commonCheck -> grpcli.GetClusterWithDataplaneByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the private-link endpoint row by ID",
              "conditions": [
                "Always"
              ],
              "implementation": "connProfileService.GetPrivateLinkEndpoint -> connprofile.GetPLEndpointByID"
            }
          ]
        }
      }
    },
    "ConnProfileService.ValidateRemoteDBConnectivity": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterWithDataplaneByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever conn-profile validation or feature gating needs cluster + dataplane metadata"
          ],
          "operations": [
            {
              "operation": "Load cluster and dataplane metadata",
              "trigger": "Validate project ownership, cluster availability, and DM prerequisites",
              "conditions": [
                "Always before conn-profile business logic runs"
              ],
              "implementation": "connProfileService.checkUser/checkUserAndCluster/commonCheck -> grpcli.GetClusterWithDataplaneByID"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.ResolveVpcPeeringHost",
          "operation_type": "network_probe",
          "conditions": [
            "Only when the caller supplies a hostname instead of a literal IP and conn_method needs VPC-peering validation"
          ],
          "operations": [
            {
              "operation": "Resolve host to IPs from the dataplane side",
              "trigger": "Verify whether the host belongs to a peering network before allowing direct/VPC-peering modes",
              "conditions": [
                "Only in checkVpcPeering for hostname inputs"
              ],
              "implementation": "connProfileService.vpcPeeringAddr2IPs -> commondm.VpcPeeringHost2IP"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.CheckDBConnectivity",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only after connectivity mode validation, optional VPC-peering checks, and TLS parameter validation succeed"
          ],
          "operations": [
            {
              "operation": "Check remote database connectivity",
              "trigger": "Probe the user-supplied host or private-link DNS with the provided credentials",
              "conditions": [
                "Only after the connection target is derived from conn_method"
              ],
              "implementation": "connProfileService.CreateConnProfile / ValidateRemoteDBConnectivity / ValidateClusterConnectivity -> agentClient.CheckDBConnectivity"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "No database write occurs; only connectivity validation is performed"
          ],
          "operations": []
        }
      },
      "notes": [
        "Private-link mode resolves the regional DNS from an existing endpoint record before probing; direct and VPC-peering modes additionally verify whether the supplied host resolves into a peering network."
      ]
    },
    "ConnProfileService.ValidateClusterConnectivity": {
      "infrastructure": {},
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterWithDataplaneByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Whenever conn-profile validation or feature gating needs cluster + dataplane metadata"
          ],
          "operations": [
            {
              "operation": "Load cluster and dataplane metadata",
              "trigger": "Validate project ownership, cluster availability, and DM prerequisites",
              "conditions": [
                "Always before conn-profile business logic runs"
              ],
              "implementation": "connProfileService.checkUser/checkUserAndCluster/commonCheck -> grpcli.GetClusterWithDataplaneByID"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetTiDBServerSecret",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when ValidateClusterConnectivity sees TLS enabled for the org/project pair"
          ],
          "operations": [
            {
              "operation": "Load TiDB server CA bundle",
              "trigger": "Fetch the cluster server secret so the internal TiDB connectivity probe can use SSL",
              "conditions": [
                "Only when tlsConfig.IsEnableTLS(...) returns true"
              ],
              "implementation": "connProfileService.ValidateClusterConnectivity -> agentClient.GetTiDBServerSecret"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.CheckDBConnectivity",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only after connectivity mode validation, optional VPC-peering checks, and TLS parameter validation succeed"
          ],
          "operations": [
            {
              "operation": "Check remote database connectivity",
              "trigger": "Probe the user-supplied host or private-link DNS with the provided credentials",
              "conditions": [
                "Only after the connection target is derived from conn_method"
              ],
              "implementation": "connProfileService.CreateConnProfile / ValidateRemoteDBConnectivity / ValidateClusterConnectivity -> agentClient.CheckDBConnectivity"
            }
          ]
        }
      ],
      "notes": [
        "The TiDB service host is derived in-process from infra-api naming helpers; connectivity is then checked against the in-cluster TiDB service endpoint on port 4000."
      ]
    },
    "ImportInnerService.Create": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByIDAndExcludeStatuses",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before the inner caller can impersonate the cluster creator"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Verify that ctx cluster/project/org values match the target cluster before building an inner caller",
              "conditions": [
                "Always in userCtxWithAuth"
              ],
              "implementation": "importInnerService.Create -> userCtxWithAuth -> grpcli.GetClusterByIDAndExcludeStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when the cluster ownership check succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the cluster creator and resolve the creator's org-scoped user identity",
              "conditions": [
                "After cluster tenant/project validation succeeds"
              ],
              "implementation": "userCtxWithAuth -> accountdb.GetUserByID / accountdb.GetUserInOrg"
            }
          ]
        }
      },
      "notes": [
        "After inner auth succeeds, the method delegates in-process to ConsoleImportService.Create and therefore inherits that method's downstream create/import dependencies."
      ]
    },
    "ImportInnerService.Get": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByIDAndExcludeStatuses",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before inner caller impersonation"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Verify the inner request's cluster/project/org tuple before delegating",
              "conditions": [
                "Always in userCtxWithAuth"
              ],
              "implementation": "importInnerService.Get -> userCtxWithAuth -> grpcli.GetClusterByIDAndExcludeStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster ownership validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Resolve the cluster creator to an org-scoped user identity",
              "conditions": [
                "After cluster tenant/project validation succeeds"
              ],
              "implementation": "userCtxWithAuth -> accountdb.GetUserByID / accountdb.GetUserInOrg"
            }
          ]
        }
      },
      "notes": [
        "After inner auth succeeds, the method delegates in-process to ConsoleImportService.Get and inherits that method's import lookup and optional infra-api progress refresh path."
      ]
    },
    "ImportInnerService.Cancel": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByIDAndExcludeStatuses",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before inner caller impersonation"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Verify the target cluster belongs to the request org/project",
              "conditions": [
                "Always in userCtxWithAuth"
              ],
              "implementation": "importInnerService.Cancel -> userCtxWithAuth -> grpcli.GetClusterByIDAndExcludeStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster ownership validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Resolve the cluster creator to an org-scoped user identity",
              "conditions": [
                "After cluster tenant/project validation succeeds"
              ],
              "implementation": "userCtxWithAuth -> accountdb.GetUserByID / accountdb.GetUserInOrg"
            }
          ]
        }
      },
      "notes": [
        "After inner auth succeeds, the method delegates in-process to ConsoleImportService.Cancel and inherits that method's import cancellation path."
      ]
    },
    "ImportInnerService.GetS3BucketRegion": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "This method injects an empty inner caller and then delegates in-process to ConsoleImportService.GetS3BucketRegion; it does not perform the cluster/org/project auth dance used by the other inner import methods."
      ]
    },
    "ImportInnerService.Validate": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByIDAndExcludeStatuses",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before inner caller impersonation"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Verify the inner request's cluster/project/org tuple before delegating",
              "conditions": [
                "Always in userCtxWithAuth"
              ],
              "implementation": "importInnerService.Validate -> userCtxWithAuth -> grpcli.GetClusterByIDAndExcludeStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster ownership validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Resolve the cluster creator to an org-scoped user identity",
              "conditions": [
                "After cluster tenant/project validation succeeds"
              ],
              "implementation": "userCtxWithAuth -> accountdb.GetUserByID / accountdb.GetUserInOrg"
            }
          ]
        }
      },
      "notes": [
        "After inner auth succeeds, the method delegates in-process to ConsoleImportService.Validate and inherits that method's request validation, lightning-template merge, and source-access/precheck flow."
      ]
    },
    "ImportInnerService.Exit": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByIDAndExcludeStatuses",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before inner caller impersonation"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Verify the target cluster belongs to the request org/project before delegating",
              "conditions": [
                "Always in userCtxWithAuth"
              ],
              "implementation": "importInnerService.Exit -> userCtxWithAuth -> grpcli.GetClusterByIDAndExcludeStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster ownership validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Resolve the cluster creator to an org-scoped user identity",
              "conditions": [
                "After cluster tenant/project validation succeeds"
              ],
              "implementation": "userCtxWithAuth -> accountdb.GetUserByID / accountdb.GetUserInOrg"
            }
          ]
        }
      },
      "notes": [
        "After inner auth succeeds, the method delegates in-process to ConsoleImportService.Exit and inherits that method's import exit flow."
      ]
    },
    "ImportInnerService.List": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByIDAndExcludeStatuses",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Reject inner list requests whose org/project does not match the target cluster",
              "conditions": [
                "Always before listing imports"
              ],
              "implementation": "importInnerService.List -> grpcli.GetClusterByIDAndExcludeStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster ownership validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List and page import entities for the target cluster",
              "conditions": [
                "After pager normalization and optional status conversion"
              ],
              "implementation": "importInnerService.List -> pimport.ListImport"
            }
          ]
        }
      }
    },
    "BackupConsoleService.ModifyBackupSetting": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when current backup settings can be loaded and validation passes"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Read the current setting, compute changed dimensions, and persist PITR/region/auto-backup modifications",
              "conditions": [
                "After checkModifyBackupSettingParams succeeds and the request is not rejected for simultaneous incompatible changes"
              ],
              "implementation": "backupControllerV2Impl.ModifyBackupSetting -> backupSettingModel.QueryBackupSettingForAPI / ModifyPitBackupSetting / ModifyRegionSetting / ModifyAutoBackupSetting"
            }
          ]
        }
      },
      "notes": [
        "Dry-run requests still go through change calculation but skip the audit-log side effect."
      ]
    },
    "BackupConsoleService.QueryBackupSetting": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load current backup setting state and region configuration for the cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "backupControllerV2Impl.QueryBackupSetting -> backupSettingModel.QueryBackupSettingForAPI"
            }
          ]
        }
      },
      "notes": [
        "ErrCodeBackupSettingIsNotReady is intentionally downgraded to an empty response instead of surfacing an error."
      ]
    },
    "BackupConsoleService.ListRestores": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List restore rows for the tenant/project/backup-cluster scope",
              "conditions": [
                "Always after pager construction"
              ],
              "implementation": "backupControllerV2Impl.ListRestores -> restoreRouter.List"
            }
          ]
        }
      }
    },
    "BackupConsoleService.GetBackupExportProfile": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the backup row and then resolve the export profile for that backup",
              "conditions": [
                "Always"
              ],
              "implementation": "backupControllerV2Impl.checkGetBackupExportProfileReq -> backupRepo.Load; backupControllerV2Impl.GetBackupExportProfile -> backupExportModel.GetBackupExportProfile"
            }
          ]
        }
      }
    },
    "BackupConsoleService.CreateBackupExport": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when the backup row belongs to the request org/project and is completed but not cleaned up"
          ],
          "operations": [
            {
              "operation": "SELECT/INSERT",
              "trigger": "Validate the backup row and create the export row in a transaction",
              "conditions": [
                "After checkCreateBackupExportReqIsValid succeeds"
              ],
              "implementation": "backupControllerV2Impl.checkCreateBackupExportReqIsValid -> backupRepo.Load; backupControllerV2Impl.CreateBackupExport -> backupExportModel.CreateBackupExport"
            }
          ]
        }
      }
    },
    "BackupConsoleService.CancelBackupExport": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when the export row matches org/project/cluster/backup and IsCancellable() returns true"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the export row and mark the export canceled inside a transaction",
              "conditions": [
                "After checkCancelBackupExportReqIsValid succeeds"
              ],
              "implementation": "backupControllerV2Impl.checkCancelBackupExportReqIsValid -> backupExportRepo.Load; backupControllerV2Impl.CancelBackupExport -> backupExportModel.CancelBackupExport"
            }
          ]
        }
      }
    },
    "BackupConsoleService.ListBackupExports": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Count and list backup exports for the org/project/cluster scope ordered by created_at DESC",
              "conditions": [
                "Always"
              ],
              "implementation": "backupControllerV2Impl.ListBackupExports -> backupExportRepo.CountByFilter / ListByFilter"
            }
          ]
        }
      }
    },
    "BackupInternalService.CreateFinalBackup": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Create the final backup record for the cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupInnerController.CreateFinalBackup -> snapshotBackupModel.CreateFinalBackup"
            }
          ]
        }
      }
    },
    "BackupInternalService.DeleteDeletedClusterBackups": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "List all backups of the deleted cluster and mark each one deleted asynchronously",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupInnerController.DeleteDeletedClusterBackups -> snapshotBackupModel.List / AsyncDelete"
            }
          ]
        }
      }
    },
    "BackupInternalService.DeleteAllManualBackups": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "List deleted dedicated clusters for the tenant",
              "trigger": "Find cluster IDs whose manual backups should be marked deleted",
              "conditions": [
                "Always before iterating backup cleanup"
              ],
              "implementation": "BackupInnerController.DeleteAllManualBackups -> coreCli.ListClusters"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when the tenant has deleted clusters"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "List backups of each deleted cluster and async-delete only non-auto backups",
              "conditions": [
                "Per cluster returned by core-svc"
              ],
              "implementation": "BackupInnerController.markBackupsAsDeleted -> snapshotBackupModel.List / AsyncDelete"
            }
          ]
        }
      }
    },
    "BackupInternalService.DeleteAllBackups": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when req.OrgId != 0"
          ],
          "operations": [
            {
              "operation": "List deleted clusters for the tenant",
              "trigger": "Build the cluster ID set whose backups should be deleted",
              "conditions": [
                "Only when req.OrgId != 0"
              ],
              "implementation": "BackupInnerController.DeleteAllBackups -> grpcli.ListClusters"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After the deleted-cluster list succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "List all backups under the deleted cluster set and async-delete them",
              "conditions": [
                "After clusterIDs are collected"
              ],
              "implementation": "BackupInnerController.DeleteAllBackups -> snapshotBackupModel.List / AsyncDelete"
            }
          ]
        }
      }
    },
    "BackupInternalService.ListRestoreOfProject": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "cmd/dataflow registers BackupInternalService from the proto surface, but this binary does not provide a concrete ListRestoreOfProject override in app/controllers/inner/backup.go; the runtime therefore falls back to the generated unimplemented handler for this method."
      ]
    },
    "BackupInternalService.GetRestore": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Query the restore row by restore ID and convert it into the inner response",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupInnerController.GetRestore -> restoreRouter.Query"
            }
          ]
        }
      }
    },
    "BackupInternalService.Restore": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when req.RestoreMode == RESTORE_MODE_SNAPSHOT"
          ],
          "operations": [
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Create the restore workflow record for the target cluster",
              "conditions": [
                "Only when the request is snapshot restore"
              ],
              "implementation": "BackupInnerController.Restore -> restoreRouter.Create"
            }
          ]
        }
      }
    },
    "BackupInternalService.GetBackup": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after the backup_id filter is constructed"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "table": "backups",
              "trigger": "Load the backup row and its preloaded backup_schedule before building the internal backup response",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupInnerController.GetBackup -> snapshotBackupModel.Query -> backupRepo.Load(ctx, backupID)"
            },
            {
              "operation": "SELECT",
              "table": "buckets",
              "trigger": "Load every bucket referenced by BucketSettingSnapshot so the response can return bucket names and regions",
              "conditions": [
                "Only after parseBackupStoragePath succeeds and for each bucket listed in backup.BackupEntity.BucketSettingSnapshot.Buckets"
              ],
              "implementation": "BackupInnerController.GetBackup -> bucketModelProxy.GetBucket -> bucketRepo.Load(ctx, bucketID)"
            }
          ]
        }
      }
    },
    "BackupInternalService.GrantAccessBackupBucket": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when CloudProvider == AWS"
          ],
          "operations": [
            {
              "operation": "UPDATE",
              "trigger": "Grant the supplied cloud identity access to the backup bucket",
              "conditions": [
                "Only when CloudProvider == AWS"
              ],
              "implementation": "BackupInnerController.GrantAccessBackupBucket -> bucketModelProxy.GrantAccessToBucket"
            }
          ]
        }
      }
    },
    "BackupInternalService.RevokeAccessBackupBucket": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when CloudProvider == AWS"
          ],
          "operations": [
            {
              "operation": "UPDATE",
              "trigger": "Revoke the supplied cloud identity from the backup bucket",
              "conditions": [
                "Only when CloudProvider == AWS"
              ],
              "implementation": "BackupInnerController.RevokeAccessBackupBucket -> bucketModelProxy.RevokeAccessToBucket"
            }
          ]
        }
      }
    },
    "AdminBackupService.ListBackups": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when the request scopes to a concrete cluster_id instead of all clusters in the project"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Verify the cluster belongs to the project and the caller org before listing backups",
              "conditions": [
                "Only when cluster_id != 0"
              ],
              "implementation": "BackupControllerImpl.checkClusterPermission -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After project permission and optional cluster permission succeed"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List paged backup rows under the project or cluster scope",
              "conditions": [
                "After pager normalization"
              ],
              "implementation": "BackupControllerImpl.ListBackups -> snapshotBackupModel.List"
            }
          ]
        }
      }
    },
    "AdminBackupService.GetBackupExportProfile": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only after the backup resource permission check succeeds"
          ],
          "operations": [
            {
              "operation": "Load cluster cloud-provider metadata",
              "trigger": "Reject unsupported cloud providers before returning an export profile",
              "conditions": [
                "After backupRepo.Load confirms tenant ownership"
              ],
              "implementation": "BackupControllerImpl.GetBackupExportProfile -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the backup row and then resolve the export profile for that backup",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupControllerImpl.checkBackupResourcePermission -> backupRepo.Load; BackupControllerImpl.GetBackupExportProfile -> backupExportModel.GetBackupExportProfile"
            }
          ]
        }
      }
    },
    "AdminBackupService.CreateBackupExport": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when the backup belongs to the caller org and is completed but not cleaned up"
          ],
          "operations": [
            {
              "operation": "SELECT/INSERT/SELECT",
              "trigger": "Load backup and bucket metadata, create the export row in a transaction, then reload the created export for the response",
              "conditions": [
                "After request validation and destination-url validation succeed"
              ],
              "implementation": "BackupControllerImpl.validateBackupExportRequest -> backupRepo.Load; createBackupExportConfig -> bucketRepo.Load; CreateBackupExport -> backupExportModel.CreateBackupExport -> GetBackupExport -> backupExportRepo.Load"
            }
          ]
        }
      }
    },
    "AdminBackupService.ListBackupExports": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After backup resource permission succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Count and list export rows for the backup ordered by created_at DESC",
              "conditions": [
                "After pager normalization"
              ],
              "implementation": "BackupControllerImpl.ListBackupExports -> backupRepo.Load / backupExportRepo.CountByFilter / backupExportRepo.ListByFilter"
            }
          ]
        }
      }
    },
    "AdminBackupService.GetBackupExport": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After backup resource permission succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the export row and verify it belongs to the requested backup",
              "conditions": [
                "After backup id and export id both parse successfully"
              ],
              "implementation": "BackupControllerImpl.GetBackupExport -> backupRepo.Load / backupExportRepo.Load"
            }
          ]
        }
      }
    },
    "AdminBackupService.CancelBackupExport": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After backup resource permission succeeds and the export belongs to that backup"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the export row and cancel it inside a transaction",
              "conditions": [
                "After backup id and export id both parse successfully"
              ],
              "implementation": "BackupControllerImpl.CancelBackupExport -> backupRepo.Load / backupExportRepo.Load / backupExportModel.CancelBackupExport"
            }
          ]
        }
      }
    },
    "AdminBackupService.CreateBackup": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Validate cluster access before converting scope and launching backup creation",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupControllerImpl.validateClusterAccess -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster access and backup-scope conversion succeed"
          ],
          "operations": [
            {
              "operation": "INSERT/SELECT",
              "trigger": "Launch async backup creation and then poll/list the created backup row for the response",
              "conditions": [
                "After AsyncCreate returns or the fallback waitForCreatedBackupID loop starts"
              ],
              "implementation": "BackupControllerImpl.CreateBackup -> backupCreateRouter.AsyncCreate / waitForCreatedBackupID -> snapshotBackupModel.List"
            }
          ]
        }
      }
    },
    "AdminBackupService.GetBackup": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the backup entity for permission checking and then list the enriched backup row for the response",
              "conditions": [
                "After backup_id parses successfully"
              ],
              "implementation": "BackupControllerImpl.GetBackup -> backupRepo.Load / snapshotBackupModel.List"
            }
          ]
        }
      }
    },
    "AdminBackupService.DeleteBackup": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only after backup resource permission succeeds"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata for billing action check",
              "trigger": "Construct the dedicated-backup billing resource before deletion",
              "conditions": [
                "Only during doBillingActionCheckForBackupDeletion"
              ],
              "implementation": "BackupControllerImpl.doBillingActionCheckForBackupDeletion -> coreCli.GetAnyClusterByID"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "ActionCheck",
          "operation_type": "internal_client",
          "conditions": [
            "Only after the cluster lookup for billing succeeds"
          ],
          "operations": [
            {
              "operation": "Check whether backup deletion is billable/allowed",
              "trigger": "Block delete requests when billing denies the action",
              "conditions": [
                "Only during doBillingActionCheckForBackupDeletion"
              ],
              "implementation": "BackupControllerImpl.doBillingActionCheckForBackupDeletion -> billingHandler.ActionCheck"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After backup resource permission and billing action check both succeed"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the backup row, mark it deleted asynchronously, then reload backup schedule metadata for audit logging",
              "conditions": [
                "Delete path only"
              ],
              "implementation": "BackupControllerImpl.DeleteBackup -> backupRepo.Load / snapshotBackupModel.AsyncDelete / snapshotBackupModel.Query"
            }
          ]
        }
      }
    },
    "AdminBackupService.GetBackupOptions": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Validate cluster access before querying region options",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupControllerImpl.validateClusterAccess -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster access succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load backup region options and cluster-region metadata",
              "conditions": [
                "After cluster access succeeds"
              ],
              "implementation": "BackupControllerImpl.GetBackupOptions -> backupSettingModel.QueryBackupRegionOptions"
            }
          ]
        }
      }
    },
    "AdminBackupService.ModifyBackupSetting": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Validate cluster access before changing backup settings",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupControllerImpl.validateClusterAccess -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when parameter validation succeeds and the request is not rejected for conflicting change dimensions"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Read current settings, then modify PITR and/or region settings inside the transaction",
              "conditions": [
                "After validateModifyBackupSettingParams and calculateBackupSettingChangeInfo succeed"
              ],
              "implementation": "BackupControllerImpl.ModifyBackupSetting -> backupSettingModel.QueryBackupSettingForAPI / modifyPitrSetting / modifyDualRegionSetting"
            }
          ]
        }
      },
      "notes": [
        "The controller records an audit log after the transaction and may query the settings again to capture the post-change state."
      ]
    },
    "AdminBackupService.GetBackupSetting": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Validate cluster access before querying current backup settings",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupControllerImpl.validateClusterAccess -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster access succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load current backup setting state for the cluster",
              "conditions": [
                "After cluster access succeeds"
              ],
              "implementation": "BackupControllerImpl.GetBackupSetting -> backupSettingModel.QueryBackupSettingForAPI"
            }
          ]
        }
      }
    },
    "AdminBackupService.GetBackupPITRTimeRanges": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Validate cluster access before querying PITR time ranges",
              "conditions": [
                "Always"
              ],
              "implementation": "BackupControllerImpl.validateClusterAccess -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster access succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List PITR time ranges for the cluster",
              "conditions": [
                "After cluster access succeeds"
              ],
              "implementation": "BackupControllerImpl.GetBackupPITRTimeRanges -> pitBackupModel.ListPiTRTimeRanges"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.List": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when req.ClusterId != 0"
          ],
          "operations": [
            {
              "operation": "Load cluster ownership metadata",
              "trigger": "Reject list requests whose org/project do not match the target cluster",
              "conditions": [
                "Only when req.ClusterId != 0"
              ],
              "implementation": "backupService.List -> backupControllerImpl.checkClusterPermission -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After optional cluster permission check and dev-tier rejection succeed"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List backup rows for the org/project/cluster scope",
              "conditions": [
                "After grpcli.GetAnyClusterByID confirms the cluster is not dev-tier"
              ],
              "implementation": "backupService.List -> container.Global().BackupController.List -> snapshotBackupModel.List"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.ListLogBackups": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster permission check succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load log-backup rows for the cluster and paginate them in-process",
              "conditions": [
                "After checkUserClusterPermission succeeds"
              ],
              "implementation": "backupService.ListLogBackups -> userCtx.GetLogBackupsByCluster"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.GetBackupOptions": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Query backup region and bucket options for the cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.GetBackupOptions -> BackupController.GetBackupOptions -> backupSettingModel.QueryBackupRegionOptions"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.ModifyBackupSetting": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "cmd/dataflow registers BackupServiceServer from internal/service/backup.go, and that concrete server does not override ModifyBackupSetting. The runtime therefore serves the generated unimplemented handler for this proto method."
      ]
    },
    "ConsoleBackupService.GetBackupSetting": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "cmd/dataflow registers BackupServiceServer from internal/service/backup.go, and that concrete server does not override GetBackupSetting. The runtime therefore serves the generated unimplemented handler for this proto method."
      ]
    },
    "ConsoleBackupService.CreateBackupSchedule": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before create-time dev-tier rejection"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Reject serverless/dev-tier clusters before backup creation",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.CreateBackupSchedule -> grpcli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After dev-tier rejection and project/cluster permission checks succeed"
          ],
          "operations": [
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Launch async backup creation and emit audit-log details for auto-backup changes",
              "conditions": [
                "After BackupController.CreateBackupSchedule starts the async create path"
              ],
              "implementation": "backupService.CreateBackupSchedule -> BackupController.CreateBackupSchedule -> backupCreateRouter.AsyncCreate"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.GetAutoSetting": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "cmd/dataflow registers BackupServiceServer from internal/service/backup.go, and that concrete server does not override GetAutoSetting. The runtime therefore serves the generated unimplemented handler for this proto method."
      ]
    },
    "ConsoleBackupService.Delete": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only for billing action check after backup permission succeeds"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Construct the dedicated-backup billing resource before deletion",
              "conditions": [
                "Only during doBillingActionCheckForBackupDeletion"
              ],
              "implementation": "backupService.Delete -> BackupController.Delete -> doBillingActionCheckForBackupDeletion -> coreCli.GetAnyClusterByID"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "ActionCheck",
          "operation_type": "internal_client",
          "conditions": [
            "Only after backup permission succeeds and the cluster lookup for billing succeeds"
          ],
          "operations": [
            {
              "operation": "Check whether deletion is billable/allowed",
              "trigger": "Block delete when billing denies the action",
              "conditions": [
                "Only during doBillingActionCheckForBackupDeletion"
              ],
              "implementation": "backupService.Delete -> BackupController.Delete -> billingHandler.ActionCheck"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After dev-tier rejection, backup permission, and billing action check all succeed"
          ],
          "operations": [
            {
              "operation": "UPDATE/SELECT",
              "trigger": "Mark the backup deleted asynchronously and reload metadata for audit logging",
              "conditions": [
                "Delete path only"
              ],
              "implementation": "backupService.Delete -> BackupController.Delete -> snapshotBackupModel.AsyncDelete / snapshotBackupModel.Query"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.Restore": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before dev-tier rejection; snapshot restores also perform backup-permission cluster checks"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Reject dev-tier restores and validate snapshot/PITR restore ownership",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.Restore -> grpcli.GetAnyClusterByID; BackupController.Restore -> checkBackupPermission/checkClusterPermission"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After restore-mode validation and dev-tier rejection succeed"
          ],
          "operations": [
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Create the restore workflow row for snapshot or PITR restore",
              "conditions": [
                "After BackupController.Restore builds CreateRestoreReqV2"
              ],
              "implementation": "backupService.Restore -> BackupController.Restore -> restoreRouter.Create"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.ListPiTRTimeRanges": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List PITR time ranges for the cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.ListPiTRTimeRanges -> BackupController.ListPiTRTimeRanges / pitBackupModel.ListPiTRTimeRanges"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.GetRestoreProgress": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before dev-tier rejection"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Reject dev-tier restore-progress requests",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.GetRestoreProgress -> grpcli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After dev-tier rejection and permission checks succeed"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the restore row and, when workflow metrics exist, query restore progress details",
              "conditions": [
                "Always load restore row; detailed progress only when restore.KernelMetrics != nil"
              ],
              "implementation": "backupService.GetRestoreProgress -> userCtx.GetRestoreByCluster; optional BackupController.GetRestoreProgress -> restoreRouter.Query"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.ListRecycleBinClusters": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List recycle-bin clusters for the tenant/project scope",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.ListRecycleBinClusters -> BackupController.ListRecycleBinClusters -> snapshotBackupModel.ListRecycleBinClusters"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.ListRecycleBinClustersV2": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List recycle-bin clusters with project/name/region/time filters",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.ListRecycleBinClustersV2 -> BackupController.ListRecycleBinClustersV2 -> snapshotBackupModel.ListRecycleBinClustersV2"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.GetRecycleBinCluster": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Verify the cluster belongs to the org/project and has DeletedAt set",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.GetRecycleBinCluster -> BackupController.checkClusterPermission -> coreCli.GetAnyClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {}
    },
    "ConsoleBackupService.DeleteDeletedClusterAndBackups": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAnyClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always before billing action check"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Verify cluster ownership and construct the billing resource for bulk deletion",
              "conditions": [
                "Always"
              ],
              "implementation": "backupService.DeleteDeletedClusterAndBackups -> BackupController.checkClusterPermission / doBillingActionCheckForBackupDeletion -> coreCli.GetAnyClusterByID"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "ActionCheck",
          "operation_type": "internal_client",
          "conditions": [
            "Only after cluster permission succeeds"
          ],
          "operations": [
            {
              "operation": "Check whether bulk deletion is billable/allowed",
              "trigger": "Block recycle-bin cleanup when billing denies the action",
              "conditions": [
                "Only during doBillingActionCheckForBackupDeletion with backupID=0"
              ],
              "implementation": "backupService.DeleteDeletedClusterAndBackups -> BackupController.doBillingActionCheckForBackupDeletion -> billingHandler.ActionCheck"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster permission and billing action check both succeed"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "List all backups of the deleted cluster and async-delete each one",
              "conditions": [
                "After cluster permission and billing action check both succeed"
              ],
              "implementation": "backupService.DeleteDeletedClusterAndBackups -> BackupController.DeleteDeletedClusterAndBackups -> snapshotBackupModel.List / AsyncDelete"
            }
          ]
        }
      }
    },
    "ConsoleBackupService.ListServerlessRestores": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "The concrete backupService override intentionally returns 'serverless backup is no longer supported by dataflow service'; there is no downstream service or storage access."
      ]
    },
    "ConsoleBackupService.ListServerlessPiTRTimeRanges": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "The concrete backupService override intentionally returns 'serverless backup is no longer supported by dataflow service'; there is no downstream service or storage access."
      ]
    },
    "ConsoleImportService.Precheck": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster and common.GetClusterNetworkAgentById"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and availability",
              "trigger": "Validate ownership and derive namespace/provider for the target-cluster agent request",
              "conditions": [
                "Always"
              ],
              "implementation": "userImport.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID; common.GetClusterNetworkAgentById"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.PrecheckImportJob",
          "operation_type": "grpc_unary",
          "conditions": [
            "After cluster permission and cloud-admin password generation succeed"
          ],
          "operations": [
            {
              "operation": "Run import precheck on the target cluster",
              "trigger": "Return target tables, error message, and file/table counts",
              "conditions": [
                "After common.GetClusterNetworkAgentById succeeds"
              ],
              "implementation": "importService.Precheck -> agentClient.PrecheckImportJob"
            }
          ]
        }
      ],
      "infrastructure": {}
    },
    "ConsoleImportService.Create": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckClusterStatus and audit-log recording"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and status",
              "trigger": "Reject non-normal clusters and derive region/tenant context",
              "conditions": [
                "Always"
              ],
              "implementation": "bizutils.CheckClusterStatus -> grpcli.GetClusterByID; recordAuditLogForImport -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation and import entity construction succeed"
          ],
          "operations": [
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Pre-create target tables for local import and persist the new import row",
              "conditions": [
                "CreateTargetTable only when LocalImportCfg != nil; CreateImport always after validation succeeds"
              ],
              "implementation": "importService.Create -> userCtx.CreateTargetTable / userCtx.CreateImport"
            }
          ]
        }
      }
    },
    "ConsoleImportService.Get": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after cluster ownership validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the import row and optional cluster metadata; optionally refresh importing progress from infra-api",
              "conditions": [
                "Always load import row; infra-api refresh only when imp.Status == Importing"
              ],
              "implementation": "importService.Get -> userCtx.GetImport / GetImportTask; optional regionalResourceAPI.GetImport"
            }
          ]
        }
      }
    },
    "ConsoleImportService.List": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after cluster ownership validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Page import rows for the cluster and optional status filters",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.List -> userCtx.ListImport -> ListImport / dbutil.ListImport*"
            }
          ]
        }
      }
    },
    "ConsoleImportService.Cancel": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster ownership validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the import row, validate cancelable status, and persist Status=Canceling",
              "conditions": [
                "Always; no wait loop because waitCanceled=false in this exposed path"
              ],
              "implementation": "importService.Cancel -> userCtx.CancelImport -> GetImportTask / Import.Update"
            }
          ]
        }
      }
    },
    "ConsoleImportService.Exit": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "This method is intentionally a no-op compatibility shim and returns an empty response without touching storage or downstream services."
      ]
    },
    "ConsoleImportService.GetDataIngestionProfile": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Validate org/project/cluster access before loading ingestion profile",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.GetDataIngestionProfile -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster permission check succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the cluster-scoped ingestion profile",
              "conditions": [
                "Always after permission check"
              ],
              "implementation": "importService.GetDataIngestionProfile -> clusterModel.User(...).GetDataIngestionProfile"
            }
          ]
        }
      }
    },
    "ConsoleImportService.GetS3BucketRegion": {
      "services": [],
      "infrastructure": {
        "aws_s3": {
          "conditions": [
            "Always after the S3 URL parses successfully"
          ],
          "operations": [
            {
              "operation": "GetBucketRegion",
              "trigger": "Resolve the bucket region from the supplied S3 URL",
              "conditions": [
                "Always after s3.NewS3URL succeeds"
              ],
              "implementation": "importService.GetS3BucketRegion -> s3url.GetBucketRegion"
            }
          ]
        }
      }
    },
    "ConsoleImportService.Validate": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster and lightning template resolution"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and availability",
              "trigger": "Validate org/project access and resolve cluster config for validation",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.Validate -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID; mergeLightningTemplConfig -> GetLightningConfigTemplate -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {},
      "notes": [
        "After request shaping and optional lightning-template merge, the heavy validation work runs in-process via userCtx.ValidateImport."
      ]
    },
    "ConsoleImportService.ApplyTableFilters": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "cmd/dataflow registers ImportServiceServer from internal/service/import.go, and that concrete server does not override ApplyTableFilters. The runtime therefore serves the generated unimplemented handler for this proto method."
      ]
    },
    "ConsoleImportService.GetSchemasMeta": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "The concrete importService override returns 'get schemas meta is not implemented' and does not touch storage or downstream services."
      ]
    },
    "ConsoleImportService.Preview": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "The concrete importService override returns 'preview is not implemented' and does not touch storage or downstream services."
      ]
    },
    "ConsoleImportService.PreviewCsvFile": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Validate org/project/cluster access before previewing a CSV file",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.PreviewCsvFile -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.PreviewCsvFile",
          "operation_type": "grpc_unary",
          "conditions": [
            "After cluster permission check succeeds"
          ],
          "operations": [
            {
              "operation": "Preview CSV file content from the dataplane side",
              "trigger": "Return preview rows and inferred schema",
              "conditions": [
                "After userCtx.PreviewCsvFile resolves the regional agent client"
              ],
              "implementation": "importService.PreviewCsvFile -> userCtx.PreviewCsvFile -> agentClient.PreviewCsvFile"
            }
          ]
        }
      ],
      "infrastructure": {}
    },
    "ConsoleImportService.GenerateUploadUrl": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Validate org/project/cluster access before generating a local-upload target",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.GenerateUploadUrl -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "aws_s3": {
          "conditions": [
            "After file-size validation and region resolution succeed"
          ],
          "operations": [
            {
              "operation": "Create presigned PUT URL",
              "trigger": "Prepare an upload stub target in the local import bucket",
              "conditions": [
                "Always after region defaulting/override"
              ],
              "implementation": "importService.GenerateUploadUrl -> s3.CreateClientWithAssumeRole -> PutObjectRequest.Presign"
            }
          ]
        }
      }
    },
    "ConsoleImportService.PreviewLocal": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Validate org/project/cluster access before previewing a local file",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.PreviewLocal -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "aws_s3": {
          "conditions": [
            "After CSV config validation and preview file mapping construction succeed"
          ],
          "operations": [
            {
              "operation": "Read uploaded local file content for preview",
              "trigger": "Preview the first N rows from the staged local file in the local import bucket",
              "conditions": [
                "Always after bucketNaming.GenBucketUrl() is derived"
              ],
              "implementation": "importService.PreviewLocal -> LocalImportPreviewer.Preview"
            }
          ]
        }
      }
    },
    "ConsoleImportService.ListDataTypes": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "This method returns the built-in default import data type list from in-process constants only."
      ]
    },
    "ConsoleImportService.GetTableColumns": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Validate org/project/cluster access before querying target table columns",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.GetTableColumns -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetTableColumns",
          "operation_type": "grpc_unary",
          "conditions": [
            "After cluster permission check and cloud-admin password generation succeed"
          ],
          "operations": [
            {
              "operation": "Query target table columns from the dataplane side",
              "trigger": "Return target table schema for import validation and preview alignment",
              "conditions": [
                "After userCtx.GetTableColumns resolves the agent client"
              ],
              "implementation": "importService.GetTableColumns -> userCtx.GetTableColumns -> agentClient.GetTableColumns"
            }
          ]
        }
      ],
      "infrastructure": {}
    },
    "ConsoleImportService.GetClusterTables": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster and common.GetClusterNetworkAgentById"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Validate org/project access and derive namespace/provider for the agent request",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.GetClusterTables -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID; common.GetClusterNetworkAgentById"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetClusterTables",
          "operation_type": "grpc_unary",
          "conditions": [
            "After cluster permission and cloud-admin password generation succeed"
          ],
          "operations": [
            {
              "operation": "List schemas/tables from the target cluster",
              "trigger": "Return selectable import target tables",
              "conditions": [
                "After common.GetClusterNetworkAgentById succeeds"
              ],
              "implementation": "importService.GetClusterTables -> agentClient.GetClusterTables"
            }
          ]
        }
      ],
      "infrastructure": {}
    },
    "ConsoleImportService.ValidateTargetTableEmpty": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Validate org/project/cluster access before checking the target table",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.ValidateTargetTableEmpty -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "The emptiness check itself is delegated to the import model/agent path and does not add direct SQL writes in this service layer"
          ],
          "operations": []
        }
      },
      "notes": [
        "After permission checks, the actual table-empty verification runs in-process via userCtx.CheckIsTableEmpty."
      ]
    },
    "ConsoleImportService.SearchImportFiles": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through CheckIdAndCluster"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Validate org/project/cluster access before scanning source files",
              "conditions": [
                "Always"
              ],
              "implementation": "importService.SearchImportFiles -> userCtx.CheckIdAndCluster -> bizutils.CheckCluster -> grpcli.GetClusterByID"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.SearchImportFiles",
          "operation_type": "grpc_unary",
          "conditions": [
            "After custom-file validation and cluster permission succeed"
          ],
          "operations": [
            {
              "operation": "Scan source URIs and match them to target tables",
              "trigger": "Return validated source-to-target mappings",
              "conditions": [
                "After userCtx.SearchImportFiles resolves the agent client"
              ],
              "implementation": "importService.SearchImportFiles -> userCtx.SearchImportFiles -> agentClient.SearchImportFiles"
            }
          ]
        }
      ],
      "infrastructure": {}
    },
    "DMService.GetSupportedSources": {
      "services": [],
      "infrastructure": {},
      "notes": [
        "This method returns the in-process commondm supported-source table only."
      ]
    },
    "DMService.ListJobSpecs": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List DM job specification rows",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.ListJobSpecs -> dm.ListJobSpecs"
            }
          ]
        }
      }
    },
    "DMService.PrecheckJob": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through checkBasic"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and feature availability",
              "trigger": "Validate project ownership, cluster existence, and DM feature enablement before precheck creation",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.checkBasic -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After conn-profile shape validation and TLS parameter validation succeed"
          ],
          "operations": [
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Create the precheck job row, then update it to failed if the async worker panics",
              "conditions": [
                "Create always after validation; panic recovery update only in the async goroutine failure path"
              ],
              "implementation": "dmService.PrecheckJob -> userCtx.CreatePrecheck / userCtx.GetPrecheckByID / userCtx.UpdatePrecheck"
            }
          ]
        }
      },
      "notes": [
        "The heavy validation work runs asynchronously in userCtx.PrecheckWorker after the precheck row is created."
      ]
    },
    "DMService.CreateJob": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through checkBasic and audit-log recording"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and feature availability",
              "trigger": "Validate project ownership, cluster availability, and DM feature enablement before job creation",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.checkBasic -> grpcli.GetClusterByID; recordAuditLogForCreateJob -> grpcli.GetClusterByIDAndStatuses"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After conn-profile, job-spec, quota, and precheck validation all succeed"
          ],
          "operations": [
            {
              "operation": "SELECT/INSERT/UPDATE",
              "trigger": "Load source conn profiles, job spec, precheck row, and active-job quota context, then persist the new DM job",
              "conditions": [
                "Always after request validation succeeds"
              ],
              "implementation": "dmService.CreateJob -> connprofile.GetConnProfileByIDs / dm.GetJobSpecByID / dm.GetPrecheckByID / dm.GetActiveDFJobByTenant / userCtx.Create"
            }
          ]
        }
      }
    },
    "DMService.GetJob": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After checkJob and maintenance guard succeed"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the DF job, DM job, job spec, source conn profiles, optional unfinished modification, and precomputed task-stage context",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.GetJob -> checkJob / getDMJob -> dm.GetDFJobByID / GetDMJobByID / GetJobSpecByID / GetDMJobSources / connprofile.MustGetConnProfileByID / GetUnfinishedJobModification"
            }
          ]
        }
      },
      "notes": [
        "After local state is assembled, getDMJob also queries the regional DM OpenAPI task status to fill subtask stages."
      ]
    },
    "DMService.ListJobs": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through checkBasic"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and feature availability",
              "trigger": "Validate project ownership and DM feature enablement before listing jobs",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.checkBasic -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List DM jobs for the cluster and enrich each listed job via getDMJob",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.ListJobs -> dm.ListDFJobsOfDM; per item getDMJob -> dm.GetDMJobByID / GetJobSpecByID / GetDMJobSources / connprofile.MustGetConnProfileByID"
            }
          ]
        }
      }
    },
    "DMService.UpdateJob": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After checkJob succeeds, phase is not deleting, and maintenance guard passes"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the DF job and update its display name",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.UpdateJob -> checkJob / dm.UpdateDFJobName"
            }
          ]
        }
      }
    },
    "DMService.DeleteJob": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After checkJob and maintenance guard succeed"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the DF job, mark Phase=Deleting, and publish the deletion event",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.DeleteJob -> checkJob / dm.UpdateDFJobPhase / dm.PublishEvent"
            }
          ]
        }
      }
    },
    "DMService.OperateJob": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when checkJob succeeds, Phase==Created, and maintenance guard passes"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the DF job and persist pause/resume operation state through the DM model",
              "conditions": [
                "Only for Pause or Resume operations on created jobs"
              ],
              "implementation": "dmService.OperateJob -> checkJob / param.userCtx.OperateDMJob"
            }
          ]
        }
      }
    },
    "DMService.GetSourceTables": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through checkBasic and common.GetClusterNetworkAgentById"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and feature availability",
              "trigger": "Validate project ownership and resolve dataplane namespace/network",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.checkBasic -> grpcli.GetClusterByID; common.GetClusterNetworkAgentById"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.GetSourceTables",
          "operation_type": "grpc_unary",
          "conditions": [
            "After host/private-link resolution and TLS parameter validation succeed"
          ],
          "operations": [
            {
              "operation": "List source tables from the remote upstream database",
              "trigger": "Return source-table inventory for DM prechecks and UI selection",
              "conditions": [
                "After private-link DNS resolution or direct host selection completes"
              ],
              "implementation": "dmService.GetSourceTables -> agentClient.GetSourceTables"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when ConnMethod == PrivateLink"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the private-link endpoint DNS name before probing source tables",
              "conditions": [
                "Only for PrivateLink source connections"
              ],
              "implementation": "dmService.GetSourceTables -> connprofile.GetAvailablePrivateLink"
            }
          ]
        }
      }
    },
    "DMService.CancelPrecheck": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through checkBasic"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and feature availability",
              "trigger": "Validate project ownership and DM feature enablement before canceling precheck",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.checkBasic -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the precheck row, verify cluster match and running status, then mark it canceled",
              "conditions": [
                "Only when precheck status is Running"
              ],
              "implementation": "dmService.CancelPrecheck -> userCtx.GetPrecheckByID / dm.CancelPrecheck"
            }
          ]
        }
      }
    },
    "DMService.GetPrecheck": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through checkBasic"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and feature availability",
              "trigger": "Validate project ownership and DM feature enablement before reading precheck details",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.checkBasic -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the precheck row and all precheck items, then aggregate status counters",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.GetPrecheck -> userCtx.GetPrecheckByID / dm.GetPrecheckItemsByJobID"
            }
          ]
        }
      }
    },
    "DMService.GetQuota": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through checkBasic"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and feature availability",
              "trigger": "Validate project ownership before reading tenant quota usage",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.checkBasic -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "List active DM jobs for the tenant to compute usage",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.GetQuota -> dm.GetActiveDFJobByTenant"
            }
          ]
        }
      },
      "notes": [
        "The quota limit itself comes from in-process feature configuration via feature.GetTenantQuota."
      ]
    },
    "DMService.GetCost": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always through checkBasic"
          ],
          "operations": [
            {
              "operation": "Load cluster provider and region metadata",
              "trigger": "Derive per-node pricing context for the requested DM job spec",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.checkBasic -> grpcli.GetClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the requested job spec to compute cost",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.GetCost -> dm.GetJobSpecByID"
            }
          ]
        }
      },
      "notes": [
        "The price lookup itself is in-process via commondm.GetNodeRCUPrice; no external billing RPC is issued here."
      ]
    },
    "DMService.ScaleUpDownJob": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After checkJob succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the DF job and persist the requested spec modification",
              "conditions": [
                "Always"
              ],
              "implementation": "dmService.ScaleUpDownJob -> checkJob / model.ModifyJob"
            }
          ]
        }
      }
    },
    "DumplingService.CreateDumplingTask": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after the request object is non-nil"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and ownership",
              "trigger": "Reject missing or mismatched cluster/project/org before creating the dumpling task",
              "conditions": [
                "Always"
              ],
              "implementation": "dumplingController.CreateDumplingTask -> dumplingModel.Create -> coreGrpcClient.GetAvailableClusterByID"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After cluster ownership validation and object-store validation succeed"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Persist the new dumpling task with encrypted source/object-store secrets",
              "conditions": [
                "Always after object store kind is supported and secret encryption succeeds"
              ],
              "implementation": "dumplingController.CreateDumplingTask -> dumplingModel.createDumplingTask -> dumplingRepo.Create"
            }
          ]
        }
      },
      "notes": [
        "Password and object-store secrets are encrypted in-process before persistence; this request path does not call the actual dump executor."
      ]
    },
    "DumplingService.GetDumplingTask": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the dumpling task row and materialize its API response",
              "conditions": [
                "Always"
              ],
              "implementation": "dumplingController.GetDumplingTask -> dumplingModel.GetByID -> dumplingRepo.GetByTaskID"
            }
          ]
        }
      }
    },
    "DumplingService.CancelDumplingTask": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the dumpling task row and mark it Cancelling for the background worker to observe",
              "conditions": [
                "Always"
              ],
              "implementation": "dumplingController.CancelDumplingTask -> dumplingModel.Cancel -> dumplingRepo.GetByTaskID / dumplingRepo.Update"
            }
          ]
        }
      }
    },
    "ReplayService.CreateReplay": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation and protobuf-to-domain conversion succeed"
          ],
          "operations": [
            {
              "operation": "INSERT/SELECT",
              "trigger": "Persist the replay row, then reload it to return a normalized replay payload",
              "conditions": [
                "Create after password encryption succeeds; Get immediately after create succeeds"
              ],
              "implementation": "replayInnerController.CreateReplay -> replayModel.Create / replayModel.Get -> replayRepo.Create / replayRepo.Load"
            }
          ]
        }
      },
      "notes": [
        "This method only records desired replay state in MySQL. Regional replay creation is performed later by the replay operator and worker paths, not in the RPC itself."
      ]
    },
    "ReplayService.ListReplays": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After org_id and optional cluster_id parse successfully"
          ],
          "operations": [
            {
              "operation": "COUNT/SELECT",
              "trigger": "Page replay rows for the tenant and optional target cluster filter",
              "conditions": [
                "Always after request IDs parse; PageSize defaults to 20 when omitted"
              ],
              "implementation": "replayInnerController.ListReplays -> replayModel.List -> replayRepo.Count / replayRepo.ListWithPager"
            }
          ]
        }
      }
    },
    "ReplayService.GetReplay": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After replay_id parses successfully"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the replay row by ID and convert it back to protobuf form",
              "conditions": [
                "Always"
              ],
              "implementation": "replayInnerController.GetReplay -> replayModel.Get -> replayRepo.Load"
            }
          ]
        }
      }
    },
    "ReplayService.UpdateReplay": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation and protobuf-to-domain conversion succeed"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the replay row, verify it is editable, merge updates, and persist the new config",
              "conditions": [
                "Only when CurrentState is Pending, Paused, or Deployed"
              ],
              "implementation": "replayInnerController.UpdateReplay -> replayModel.Update -> replayRepo.Load / replayRepo.Save"
            }
          ]
        }
      }
    },
    "ReplayService.DeleteReplay": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After replay_id parses successfully"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the replay row, validate delete is allowed, and mark DesiredState=Delete with DeletingAt set",
              "conditions": [
                "Skipped as a no-op when CurrentState is already Deleted or Deleting; otherwise only when the status matrix allows ReplayActionDelete"
              ],
              "implementation": "replayInnerController.DeleteReplay -> replayModel.Delete -> replayRepo.Load / replayRepo.Save"
            }
          ]
        }
      },
      "notes": [
        "The RPC does not issue a regional delete directly; it only marks the row for asynchronous worker-side deletion."
      ]
    },
    "ReplayService.StartReplay": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After replay_id parses successfully"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the replay row, validate resume is allowed, and set DesiredState=Active with StartingAt",
              "conditions": [
                "Only when the status matrix allows ReplayActionActivate"
              ],
              "implementation": "replayInnerController.StartReplay -> replayModel.Resume -> replayRepo.Load / replayRepo.Save"
            }
          ]
        }
      },
      "notes": [
        "The actual regional StartReplay call is deferred to the replay operator loop after this RPC updates desired state."
      ]
    },
    "ReplayService.StopReplay": {
      "services": [],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After replay_id parses successfully"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the replay row, validate pause is allowed, and set DesiredState=Pause with PausingAt",
              "conditions": [
                "Only when the status matrix allows ReplayActionPause"
              ],
              "implementation": "replayInnerController.StopReplay -> replayModel.Pause -> replayRepo.Load / replayRepo.Save"
            }
          ]
        }
      },
      "notes": [
        "The RPC itself only persists the desired pause state; the later replay worker is responsible for calling the regional StopReplay API."
      ]
    },
    "Import.ListImportTasks": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after project permission validation succeeds"
          ],
          "operations": [
            {
              "operation": "Load cluster deploy type and ownership metadata",
              "trigger": "Choose between dedicated MySQL-backed import listing and serverless import listing",
              "conditions": [
                "Always"
              ],
              "implementation": "openapi.import.ListImportTasks -> mgmtSvcGrpcClient.GetClusterByID"
            }
          ]
        },
        {
          "name": "serverless-service",
          "target_interface": "ImportService.ListImports",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when cluster.DeployType == DEPLOY_TYPE_SERVERLESS and request project matches cluster project"
          ],
          "operations": [
            {
              "operation": "ListImports",
              "trigger": "Return serverless import jobs through the openapi adapter",
              "conditions": [
                "After checkPermission succeeds"
              ],
              "implementation": "openapi.import.ListServerlessImports -> serverlessSvcGrpcClient.ListImports"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster.DeployType != DEPLOY_TYPE_SERVERLESS"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Page dedicated import rows for the project and cluster",
              "conditions": [
                "Always after cluster lookup succeeds"
              ],
              "implementation": "openapi.import.ListImportTasks -> userImportModel.ListImport"
            }
          ]
        }
      }
    },
    "Import.GetImportTask": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after project permission validation succeeds"
          ],
          "operations": [
            {
              "operation": "Load cluster deploy type and ownership metadata",
              "trigger": "Choose between dedicated and serverless import lookup",
              "conditions": [
                "Always"
              ],
              "implementation": "openapi.import.GetImportTask -> mgmtSvcGrpcClient.GetClusterByID"
            }
          ]
        },
        {
          "name": "serverless-service",
          "target_interface": "ImportService.GetImport",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when cluster.DeployType == DEPLOY_TYPE_SERVERLESS and request project matches cluster project"
          ],
          "operations": [
            {
              "operation": "GetImport",
              "trigger": "Load the serverless import job by CompatibleId",
              "conditions": [
                "After checkPermission succeeds"
              ],
              "implementation": "openapi.import.GetServerlessImport -> serverlessSvcGrpcClient.GetImport"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster.DeployType != DEPLOY_TYPE_SERVERLESS"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the dedicated import row by org/project/cluster/import identifiers",
              "conditions": [
                "Always after cluster lookup succeeds"
              ],
              "implementation": "openapi.import.GetImportTask -> userImportModel.GetImport"
            }
          ]
        }
      }
    },
    "Import.GetImportTaskRoleInfo": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after project permission validation succeeds"
          ],
          "operations": [
            {
              "operation": "Load cluster deploy type and ownership metadata",
              "trigger": "Choose between dedicated cluster profile lookup and serverless ingestion profile lookup",
              "conditions": [
                "Always"
              ],
              "implementation": "openapi.import.GetImportTaskRoleInfo -> mgmtSvcGrpcClient.GetClusterByID"
            }
          ]
        },
        {
          "name": "serverless-service",
          "target_interface": "ImportService.GetDataIngestionProfile",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when cluster.DeployType == DEPLOY_TYPE_SERVERLESS and request project matches cluster project"
          ],
          "operations": [
            {
              "operation": "GetDataIngestionProfile",
              "trigger": "Load the serverless import role/account information for the cluster",
              "conditions": [
                "After checkPermission succeeds"
              ],
              "implementation": "openapi.import.GetDataIngestionProfile -> serverlessSvcGrpcClient.GetDataIngestionProfile"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster.DeployType != DEPLOY_TYPE_SERVERLESS"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the dedicated cluster ingestion profile from cluster storage",
              "conditions": [
                "Always after cluster lookup succeeds"
              ],
              "implementation": "openapi.import.GetImportTaskRoleInfo -> clusterModel.User(...).GetDataIngestionProfile"
            }
          ]
        }
      }
    },
    "Import.CreateImportTask": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after request and import-spec validation succeed"
          ],
          "operations": [
            {
              "operation": "Load cluster deploy type and tenant metadata",
              "trigger": "Choose between dedicated import creation and serverless import creation",
              "conditions": [
                "Always"
              ],
              "implementation": "openapi.import.CreateImportTask -> mgmtSvcGrpcClient.GetClusterByID"
            }
          ]
        },
        {
          "name": "serverless-service",
          "target_interface": "ImportService.CreateImport",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when cluster.DeployType == DEPLOY_TYPE_SERVERLESS and request project matches cluster project"
          ],
          "operations": [
            {
              "operation": "CreateImport",
              "trigger": "Submit the serverless import job after source/auth/target shaping completes",
              "conditions": [
                "After checkPermission succeeds and spec/source/format validation passes"
              ],
              "implementation": "openapi.import.CreateServerlessImport -> serverlessSvcGrpcClient.CreateImport"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster.DeployType != DEPLOY_TYPE_SERVERLESS"
          ],
          "operations": [
            {
              "operation": "SELECT/INSERT/UPDATE",
              "trigger": "Optionally load the upload stub, optionally pre-create target tables, validate the import, and persist the import row",
              "conditions": [
                "Stub lookup only when source type == LOCAL_FILE; target-table precreate only for matching tables in PreCreateTables; CreateImport always after ValidateImport and tweakImportEntityForCreate succeed"
              ],
              "implementation": "openapi.import.CreateImportTask -> stubManager.GetStubByID / importModel.CreateTargetTable / userImportModel.ValidateImport / userImportModel.CreateImport"
            }
          ]
        }
      },
      "notes": [
        "Dedicated-path validation and error translation run in-process before persistence; the serverless path instead delegates the whole create operation to serverless-service."
      ]
    },
    "Import.UpdateImportTask": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after request validation succeeds; only CANCEL is accepted"
          ],
          "operations": [
            {
              "operation": "Load cluster deploy type and ownership metadata",
              "trigger": "Choose whether cancel is applied through serverless-service or the dedicated import model",
              "conditions": [
                "Always"
              ],
              "implementation": "openapi.import.UpdateImportTask -> mgmtSvcGrpcClient.GetClusterByID"
            }
          ]
        },
        {
          "name": "serverless-service",
          "target_interface": "ImportService.CancelImport",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when cluster.DeployType == DEPLOY_TYPE_SERVERLESS and Action == CANCEL"
          ],
          "operations": [
            {
              "operation": "CancelImport",
              "trigger": "Cancel the serverless import job by CompatibleId",
              "conditions": [
                "After checkPermission succeeds"
              ],
              "implementation": "openapi.import.UpdateServerlessImport -> serverlessSvcGrpcClient.CancelImport"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when cluster.DeployType != DEPLOY_TYPE_SERVERLESS and Action == CANCEL"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the dedicated import row, validate cancelable status, and persist Status=Canceling",
              "conditions": [
                "Always after cluster lookup succeeds"
              ],
              "implementation": "openapi.import.UpdateImportTask -> userImportModel.CancelImport"
            }
          ]
        }
      }
    },
    "Import.UploadLocalFile": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after project permission validation succeeds"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata and dev-tier flag",
              "trigger": "Choose between direct dedicated upload preparation and the serverless upload flow",
              "conditions": [
                "Always"
              ],
              "implementation": "openapi.import.UploadLocalFile -> bizutils.GetCluster -> grpcli.GetClusterByID"
            }
          ]
        },
        {
          "name": "serverless-service",
          "target_interface": "ImportService.Upload",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when cluster.IsDevTier"
          ],
          "operations": [
            {
              "operation": "Upload",
              "trigger": "Request a presigned upload URL and compatible upload ID for serverless local-file imports",
              "conditions": [
                "After checkPermission succeeds"
              ],
              "implementation": "openapi.import.UploadLoadFileForServerless -> serverlessSvcGrpcClient.Upload"
            }
          ]
        }
      ],
      "infrastructure": {
        "aws_s3": {
          "conditions": [
            "Dedicated path always uses the region-specific local-file uploader; dev-tier path uses the presigned upload URL returned by serverless-service"
          ],
          "operations": [
            {
              "operation": "PrepareTargetFile/UploadData/PUT",
              "trigger": "Upload the gzipped payload to object storage before returning the upload stub ID",
              "conditions": [
                "Dedicated: after payload gzip reader creation and PrepareTargetFile succeed; DevTier: after serverlessSvcGrpcClient.Upload returns UploadUrl"
              ],
              "implementation": "openapi.import.UploadLocalFile -> LocalFileS3Uploader.PrepareTargetFile / UploadData; openapi.import.UploadLoadFileForServerless -> uploadFile -> HTTP PUT upload.UploadUrl"
            }
          ]
        },
        "mysql": {
          "conditions": [
            "Only when cluster.IsDevTier == false"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Persist the local-file upload stub metadata and expiration timestamp",
              "conditions": [
                "After object storage upload succeeds"
              ],
              "implementation": "openapi.import.UploadLocalFile -> stubManager.CreateStub"
            }
          ]
        }
      }
    },
    "Import.PreviewImportData": {
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after request validation and import-spec parsing succeed"
          ],
          "operations": [
            {
              "operation": "Load cluster deploy type and ownership metadata",
              "trigger": "Choose between dedicated preview logic and the serverless local preview RPC",
              "conditions": [
                "Always"
              ],
              "implementation": "openapi.import.PreviewImportData -> mgmtSvcGrpcClient.GetClusterByID"
            }
          ]
        },
        {
          "name": "serverless-service",
          "target_interface": "ImportService.PreviewLocal",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when cluster.DeployType == DEPLOY_TYPE_SERVERLESS and source type == LOCAL_FILE"
          ],
          "operations": [
            {
              "operation": "PreviewLocal",
              "trigger": "Run serverless-side preview for uploaded local-file data",
              "conditions": [
                "After checkPermission succeeds and source/format validation passes"
              ],
              "implementation": "openapi.import.PreviewServerlessImportData -> serverlessSvcGrpcClient.PreviewLocal"
            }
          ]
        },
        {
          "name": "regional-dataflow-agent",
          "target_interface": "AgentService.ExecSQLOnCluster",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only on the dedicated path after local preview yields a target table and target-table schema lookup is attempted"
          ],
          "operations": [
            {
              "operation": "ExecSQLOnCluster",
              "trigger": "Inspect target table schema with SHOW CREATE TABLE before shaping preview response columns",
              "conditions": [
                "Only when importModel.GetTableColumns is reached on the dedicated path"
              ],
              "implementation": "openapi.import.PreviewImportData -> importModel.GetTableColumns -> agentClient.ExecSQLOnCluster"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only on the dedicated path when source type == LOCAL_FILE"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the upload stub and validate its expiration before previewing the local file",
              "conditions": [
                "Only when req.Spec.Source.Type == LOCAL_FILE and cluster.DeployType != DEPLOY_TYPE_SERVERLESS"
              ],
              "implementation": "openapi.import.PreviewImportData -> stubManager.GetStubByID"
            }
          ]
        },
        "aws_s3": {
          "conditions": [
            "Only on the dedicated path when source type == LOCAL_FILE"
          ],
          "operations": [
            {
              "operation": "Read uploaded object",
              "trigger": "Preview the uploaded local file contents from the stored UploadedURL",
              "conditions": [
                "Only after stub lookup succeeds and source type remains LOCAL_FILE"
              ],
              "implementation": "openapi.import.PreviewImportData -> LocalImportPreviewer.Preview"
            }
          ]
        }
      },
      "notes": [
        "Dedicated preview is limited to LOCAL_FILE sources; S3 and GCS are rejected before any downstream preview call."
      ]
    },
    "ChangefeedService.ListChangefeeds": {
      "services": [
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Load cluster tenant/project metadata",
              "trigger": "Resolve org/project/cluster parameters for RBAC and internal connector listing",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.ListChangefeeds -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "tiinf-rbac",
          "target_interface": "AuthService.CheckIdentityPermission",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after incoming metadata contains exactly one OpenAPI API key"
          ],
          "operations": [
            {
              "operation": "CheckIdentityPermission",
              "trigger": "Verify the caller can list changefeeds on the resolved cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "rbacChecker.checkPermission -> rbacClient.CheckIdentityPermission"
            }
          ]
        },
        {
          "name": "regional-ticdc-control",
          "target_interface": "ChangefeedModel.ListChangefeeds",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after RBAC succeeds and the internal connector list is fetched"
          ],
          "operations": [
            {
              "operation": "ListChangefeeds",
              "trigger": "Augment each business changefeed with kernel TiCDC status and metadata",
              "conditions": [
                "Only when biz_changefeed rows exist"
              ],
              "implementation": "changefeedProxy.ListConnectors -> bizChangefeedModel.ListBizChangefeeds -> regionalKernelChangefeedModel.ListChangefeeds"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always after RBAC succeeds"
          ],
          "operations": [
            {
              "operation": "COUNT/SELECT",
              "trigger": "List business changefeed rows before enriching them with kernel status",
              "conditions": [
                "The OpenAPI adapter forces full-page internal listing first, then sorts and repaginates in-process"
              ],
              "implementation": "open.changefeed.ListChangefeeds -> connectorAPI.ListConnectors -> changefeedProxy.ListConnectors -> bizChangefeedModel.ListBizChangefeeds -> bizChangefeedRepo.Count / List"
            }
          ]
        }
      }
    },
    "ChangefeedService.GetChangefeed": {
      "services": [
        {
          "name": "tiinf-rbac",
          "target_interface": "AuthService.CheckIdentityPermission",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after connectorAPI.GetConnector succeeds and reveals cluster/org/project IDs"
          ],
          "operations": [
            {
              "operation": "CheckIdentityPermission",
              "trigger": "Verify the caller can read the selected changefeed",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.checkInternalConnector -> rbacChecker.checkPermission -> rbacClient.CheckIdentityPermission"
            }
          ]
        },
        {
          "name": "regional-ticdc-control",
          "target_interface": "ChangefeedModel.QueryChangefeed",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after the business changefeed row loads"
          ],
          "operations": [
            {
              "operation": "QueryChangefeed",
              "trigger": "Load the kernel TiCDC changefeed bound to the business changefeed and merge kernel state into the response",
              "conditions": [
                "Ignored only when the regional query returns ErrCodeRecordNotFound"
              ],
              "implementation": "open.changefeed.GetChangefeed -> connectorAPI.GetConnector -> bizChangefeedModel.GetBizChangefeed -> regionalKernelChangefeedModel.QueryChangefeed"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the business changefeed row before merging kernel metadata",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.GetChangefeed -> connectorAPI.GetConnector -> bizChangefeedModel.GetBizChangefeed -> bizChangefeedRepo.Load"
            }
          ]
        }
      }
    },
    "ChangefeedService.PauseChangefeed": {
      "services": [
        {
          "name": "tiinf-rbac",
          "target_interface": "AuthService.CheckIdentityPermission",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after connectorAPI.GetConnector succeeds and reveals cluster/org/project IDs"
          ],
          "operations": [
            {
              "operation": "CheckIdentityPermission",
              "trigger": "Verify the caller can pause the selected changefeed",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.checkInternalConnector -> rbacChecker.checkPermission -> rbacClient.CheckIdentityPermission"
            }
          ]
        },
        {
          "name": "regional-ticdc-control",
          "target_interface": "ChangefeedService.PauseChangefeed",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when the kernel changefeed exists and its FeedState is not already Stopped or Failed"
          ],
          "operations": [
            {
              "operation": "PauseChangefeed",
              "trigger": "Pause the kernel TiCDC changefeed after the business row is moved to the next operation status",
              "conditions": [
                "Inside the transaction after bizChangefeedRepo.Update and queryKernelChangefeed succeed"
              ],
              "implementation": "open.changefeed.PauseChangefeed -> connectorAPI.StopConnector -> bizChangefeedModel.PauseBizChangefeed -> kernelChangefeedModelFactory.GetModel().PauseChangefeed"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the business changefeed, validate pause is allowed, update its operation status, and load the kernel changefeed row",
              "conditions": [
                "Always; regional pause is skipped when the kernel feed is already stopped or failed"
              ],
              "implementation": "open.changefeed.PauseChangefeed -> connectorAPI.StopConnector -> bizChangefeedModel.PauseBizChangefeed -> bizChangefeedRepo.Load / Update; queryKernelChangefeed"
            }
          ]
        }
      }
    },
    "ChangefeedService.ResumeChangefeed": {
      "services": [
        {
          "name": "tiinf-rbac",
          "target_interface": "AuthService.CheckIdentityPermission",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after connectorAPI.GetConnector succeeds and reveals cluster/org/project IDs"
          ],
          "operations": [
            {
              "operation": "CheckIdentityPermission",
              "trigger": "Verify the caller can resume the selected changefeed",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.checkInternalConnector -> rbacChecker.checkPermission -> rbacClient.CheckIdentityPermission"
            }
          ]
        },
        {
          "name": "regional-ticdc-control",
          "target_interface": "ChangefeedService.ResumeChangefeed",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when the kernel changefeed exists and its FeedState is not already Normal"
          ],
          "operations": [
            {
              "operation": "ResumeChangefeed",
              "trigger": "Resume the kernel TiCDC changefeed after the business row is moved to the next operation status",
              "conditions": [
                "Inside the transaction after bizChangefeedRepo.Update and queryKernelChangefeed succeed"
              ],
              "implementation": "open.changefeed.ResumeChangefeed -> connectorAPI.StartConnector -> bizChangefeedModel.ResumeBizChangefeed -> kernelChangefeedModelFactory.GetModel().ResumeChangefeed"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the business changefeed, validate resume is allowed, update its operation status, and load the kernel changefeed row",
              "conditions": [
                "Always; regional resume is skipped when the kernel feed is already Normal"
              ],
              "implementation": "open.changefeed.ResumeChangefeed -> connectorAPI.StartConnector -> bizChangefeedModel.ResumeBizChangefeed -> bizChangefeedRepo.Load / Update; queryKernelChangefeed"
            }
          ]
        }
      }
    },
    "ChangefeedService.GetEventFilters": {
      "services": [
        {
          "name": "tiinf-rbac",
          "target_interface": "AuthService.CheckIdentityPermission",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after connectorAPI.GetConnector succeeds and reveals cluster/org/project IDs"
          ],
          "operations": [
            {
              "operation": "CheckIdentityPermission",
              "trigger": "Verify the caller can read event filters for the selected changefeed",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.checkInternalConnector -> rbacChecker.checkPermission -> rbacClient.CheckIdentityPermission"
            }
          ]
        },
        {
          "name": "regional-ticdc-control",
          "target_interface": "ChangefeedModel.QueryChangefeed",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after the business changefeed row loads"
          ],
          "operations": [
            {
              "operation": "QueryChangefeed",
              "trigger": "Load kernel TiCDC changefeed metadata that is merged into the internal connector request before filters are converted",
              "conditions": [
                "Ignored only when the regional query returns ErrCodeRecordNotFound"
              ],
              "implementation": "open.changefeed.GetEventFilters -> connectorAPI.GetConnector -> bizChangefeedModel.GetBizChangefeed -> regionalKernelChangefeedModel.QueryChangefeed"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the business changefeed row whose stored connector request contains the current filter rules",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.GetEventFilters -> connectorAPI.GetConnector -> bizChangefeedModel.GetBizChangefeed -> bizChangefeedRepo.Load"
            }
          ]
        }
      }
    },
    "ChangefeedService.SetEventFilters": {
      "services": [
        {
          "name": "tiinf-rbac",
          "target_interface": "AuthService.CheckIdentityPermission",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always after connectorAPI.GetConnector succeeds and reveals cluster/org/project IDs"
          ],
          "operations": [
            {
              "operation": "CheckIdentityPermission",
              "trigger": "Verify the caller can update event filters for the selected changefeed",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.checkInternalConnector -> rbacChecker.checkPermission -> rbacClient.CheckIdentityPermission"
            }
          ]
        },
        {
          "name": "core-svc",
          "target_interface": "ClusterService.GetAvailableClusterByID",
          "operation_type": "grpc_unary",
          "conditions": [
            "Always during internal EditConnector flow after current connector state loads"
          ],
          "operations": [
            {
              "operation": "Load cluster metadata",
              "trigger": "Resolve TiCDC cluster version and downstream validation context before editing the connector",
              "conditions": [
                "Always"
              ],
              "implementation": "open.changefeed.SetEventFilters -> connectorAPI.EditConnector -> bizChangefeedModel.EditBizChangefeed -> coreCli.GetAvailableClusterByID"
            }
          ]
        },
        {
          "name": "regional-ticdc-control",
          "target_interface": "ChangefeedService.ModifyChangefeedConfig",
          "operation_type": "grpc_unary",
          "conditions": [
            "Only when the kernel changefeed exists and its FeedState is Stopped or Failed"
          ],
          "operations": [
            {
              "operation": "ModifyChangefeedConfig",
              "trigger": "Apply the edited filter rules to the kernel TiCDC changefeed configuration",
              "conditions": [
                "After bizChangefeedEntity.DownstreamParams is updated and the downstream adaptor assembles the new kernel config"
              ],
              "implementation": "open.changefeed.SetEventFilters -> connectorAPI.EditConnector -> bizChangefeedModel.EditBizChangefeed -> kernelChangefeedModelFactory.GetModel().ModifyChangefeedConfig"
            }
          ]
        }
      ],
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Load the business changefeed and kernel changefeed rows, validate editability, and persist the updated downstream params before modifying kernel config",
              "conditions": [
                "Kernel feed must already be Stopped or Failed; unsupported connector types fail before persistence"
              ],
              "implementation": "open.changefeed.SetEventFilters -> connectorAPI.GetConnector / EditConnector -> bizChangefeedModel.GetBizChangefeed / EditBizChangefeed -> bizChangefeedRepo.Load / Update; queryKernelChangefeed"
            }
          ]
        }
      },
      "notes": [
        "Event-filter conversion itself is in-process via newConnectorEditRequest and does not invoke a separate downstream service until EditConnector reaches the internal biz-changefeed model."
      ]
    }
  },
  "notes": [
    "Fresh codex rebuild has replaced the legacy aggregate schema with a method-level mapping that now covers all 192 runtime methods exposed by cmd/dataflow.",
    "The final pass followed OpenAPI wrapper methods through their delegated internal controllers so adapter surfaces such as openapi Import and ChangefeedService record the real downstream services and persistence paths rather than stopping at in-binary forwarding helpers.",
    "ConnectorService.CreatePrivateLink/GetPrivateLink/GetPrivateLinkAuthInfo/GeneratePrivateLinkAdvertisedPatternGroup/GetPrivateLinkAvailableZones are still registered by the service definition, but cmd/dataflow does not override them and therefore serves the generated UnimplementedConnectorServiceServer stubs at runtime."
  ]
}
