{
  "repo": "tidb-management-service",
  "full_name": "tidbcloud/tidb-management-service",
  "status": "scan_complete",
  "scan_started_at": "2026-03-25T07:30:00Z",
  "scan_completed_at": "2026-03-27T09:20:00Z",
  "expected_binaries": [
    {
      "name": "tempo-proxy",
      "path": "tempo-proxy/cmd/tempo-proxy/main.go",
      "status": "completed",
      "role": "primary_service"
    },
    {
      "name": "regional_proxy",
      "path": "serverless-global-service/cmd/regional_proxy/main.go",
      "status": "completed",
      "role": "primary_service"
    },
    {
      "name": "tidb-mgmt-service",
      "path": "tidb-mgmt-service/cmd/tidb-mgmt-service/main.go",
      "status": "completed",
      "role": "primary_service"
    },
    {
      "name": "tidb-mgmt-portal",
      "path": "tidb-mgmt-portal/cmd/tidb-mgmt-portal/main.go",
      "status": "completed",
      "role": "primary_service"
    },
    {
      "name": "serverless-global-service",
      "path": "serverless-global-service/cmd/serverless-global-service/main.go",
      "status": "completed",
      "role": "primary_service"
    },
    {
      "name": "dedicated-global-service",
      "path": "dedicated-global-service/cmd/dedicated-global-service/main.go",
      "status": "completed",
      "role": "primary_service"
    },
    {
      "name": "nextgen-global-service",
      "path": "nextgen-global-service/cmd/nextgen-global-service/main.go",
      "status": "completed",
      "role": "primary_service"
    }
  ],
  "scanned_binaries": [
    {
      "name": "tempo-proxy",
      "output_file": "tempo-proxy-cmd-tempo-proxy"
    },
    {
      "name": "regional_proxy",
      "output_file": "serverless-global-service-cmd-regional_proxy"
    },
    {
      "name": "tidb-mgmt-service",
      "output_file": "tidb-mgmt-service-cmd-tidb-mgmt-service"
    },
    {
      "name": "tidb-mgmt-portal",
      "output_file": "tidb-mgmt-portal-cmd-tidb-mgmt-portal"
    },
    {
      "name": "serverless-global-service",
      "output_file": "serverless-global-service-cmd-serverless-global-service"
    },
    {
      "name": "dedicated-global-service",
      "output_file": "dedicated-global-service-cmd-dedicated-global-service"
    },
    {
      "name": "nextgen-global-service",
      "output_file": "nextgen-global-service-cmd-nextgen-global-service"
    }
  ],
  "skipped_binaries": [],
  "files_generated": [
    "interfaces/tempo-proxy-cmd-tempo-proxy.json",
    "service-mapping/tempo-proxy-cmd-tempo-proxy.json",
    "interfaces/serverless-global-service-cmd-regional_proxy.json",
    "service-mapping/serverless-global-service-cmd-regional_proxy.json",
    "interfaces/tidb-mgmt-service-cmd-tidb-mgmt-service.json",
    "service-mapping/tidb-mgmt-service-cmd-tidb-mgmt-service.json",
    "interfaces/tidb-mgmt-portal-cmd-tidb-mgmt-portal.json",
    "service-mapping/tidb-mgmt-portal-cmd-tidb-mgmt-portal.json",
    "interfaces/serverless-global-service-cmd-serverless-global-service.json",
    "service-mapping/serverless-global-service-cmd-serverless-global-service.json",
    "interfaces/dedicated-global-service-cmd-dedicated-global-service.json",
    "service-mapping/dedicated-global-service-cmd-dedicated-global-service.json",
    "interfaces/nextgen-global-service-cmd-nextgen-global-service.json",
    "service-mapping/nextgen-global-service-cmd-nextgen-global-service.json"
  ],
  "review_status": "pending_review",
  "review_participants": [
    "opencode",
    "kimi",
    "codex"
  ],
  "review_cycles": 4,
  "review_completed_at": "2026-03-25T11:50:00Z",
  "codex_rescan_at": "2026-03-30T23:50:00+08:00",
  "codex_rescan_verdict": "scan_complete",
  "codex_rescan_note": "Fresh codex rescan rebuilt seven primary-service binaries against source entrypoints while also diffing against the previous approved output as a recall set. The repo outputs are now schema-aligned and coverage-aligned for the documented runtime scope: lifecycle/runtime surfaces were added for startup, workflow, eventbus, reverse proxy, worker, and pprof paths, dedicated-global-service was flattened from legacy aggregate dependencies into canonical method keys, tempo-proxy now records cfg.Server.ForwardMethods as a registration-time condition on the exposed CoreService surface, tidb-mgmt-portal is now documented as a long-running HTTP OpenAPI gateway with all dedicated, serverless, nextgen, and zero first-hop portal edges into tidb-mgmt-service, tidb-mgmt-service now carries package-qualified OpenAPI mapping keys so portal-root traversal can preserve API-family identity while continuing into backend method dependencies, and the backend graph has been deepened for representative dedicated/serverless/nextgen cluster CRUD roots instead of leaving those package-qualified OpenAPI methods as empty aliases. This round further deepened the backend graph for dedicated pause/resume/reset flows, serverless batch/claim/takeover flows, and nextgen restore/backup/export roots so portal-root traversal no longer stops at those high-value OpenAPI methods. This round also deepened nextgen backup, public connection, private-link, CA-download, and root-password roots, plus the serverless root-password flow, so more portal-facing TiDB lifecycle methods now have explicit downstream control-plane edges. This round further deepened dedicated private-endpoint and CMEK roots, plus nextgen log-redaction, dual-layer encryption, and CMEK roots, so more security and network configuration entrypoints now carry explicit downstream control-plane edges. This round further deepened dedicated region, network-container, maintenance, and tidb-node-group roots plus nextgen region roots, replacing another large block of still-empty package-qualified OpenAPI keys with source-backed downstream edges into dedicated-global-service, nextgen-global-service, account-service, and the local maintenance service. This round further deepened dedicated node/quota/private-link and dedicated/nextgen audit-log roots, plus serverless provider roots and nextgen cloud-provider-info, while intentionally leaving nextgen EstimatePrice unresolved because the source still panics as not implemented. This round also filled the zero-instance OpenAPI roots by tracing AllocateZeroInstance and GetZeroInstance through serverlessClusterSvc into the concrete serverless-global password-reset and list-cluster calls. This round finished the remaining schema-drift cleanup by renaming dedicated CMEK access-principal handling to the real ShowCmekAccessIamPrincipal method, dropping the nonexistent dedicated verify handler, and replacing the legacy nextgen RcuQuotaService keys with the actual QuotaService.ListQuotas root that fans into nextgen-global-service. The latest root-call-graph-driven cleanup also rewired account helper targets back to the real AccountAPIService.GetOrgByID RPC, filled serverless-global-service CloudProviderService.List and SqlUserService.ChangeSqlUserPasswd with source-backed leaf dependencies, filled nextgen-global-service RegionService.ListRegions, RegionService.ListCloudProviders, and RcuQuotaService.ListOrgRcuQuotas with concrete MySQL leaves, filled dedicated-global-service ClusterService.CreateCluster/DeleteCluster/PauseCluster/ResumeCluster plus RegionService.ListCloudProviders/SelectRegionByOrgId, normalized serverless-global-service ServerlessService.Create/Delete/Update into source-backed method-level billing/workflow/regional/spend-limit dependencies, rewired the RestoreTidb path from the nonexistent dataflow BackupService.GetBackup target to the real BackupInternalService.GetBackup method, filled dedicated-global-service ClusterService.ScaleCluster/ScaleClusterWithMultiComponent plus CustomerManagedEncryptionService.GetCmekAccessIamPrincipal, and finally expanded the local MaintenanceService.Get/List/Update window/task roots so they now terminate on explicit account-service timezone lookups and concrete MySQL leaves instead of empty local placeholders.",
  "codex_rescan_findings": [
    "Re-scan from the binary entrypoint, not from existing KB output, because old approved results may still contain mixed schemas.",
    "Capture startup and runtime side effects in registration functions, not only proto registrations.",
    "Do not overuse Always for conditions; include flag, config, mode, and branch predicates such as grpc-server-only, DynamicConfig.Enable, and method forwarding configuration.",
    "Use previous approved outputs as a recall set to diff method coverage, but only keep old entries after source-based revalidation.",
    "Reject legacy aggregate service-mapping files until they are rebuilt into canonical method-level dependencies.",
    "For HTTP gateway binaries, method identity must be package-qualified when the same service and method names are reused across multiple API families."
  ],
  "scan_progress": "7/7",
  "statistics": {
    "total_binaries": 7,
    "total_services": 99,
    "total_methods": 732,
    "output_files": 14
  },
  "fixes_applied": {
    "round_1": [
      "HTTP target_interface format",
      "Interface completeness (6→40 services)",
      "CoreService missing"
    ],
    "round_2": [
      "6 nextgen services added",
      "4 target_interface fixed",
      "2 schema unified",
      "6 HTTP paths completed"
    ],
    "round_3": [
      "5 target_interface corrections (RegionService.Register, ClusterService.DeleteCluster, RegionService.RegisterRegion, VpcService.CreateVpcPeering, VpcService.ListVpcPeerings)"
    ],
    "round_4": [
      "Added lifecycle/runtime interfaces and dependency entries for all six primary-service binaries",
      "Flattened dedicated-global-service legacy aggregate mapping into canonical method keys while preserving old evidence in legacy_summary",
      "Normalized serverless-global-service and dedicated-global-service interface schemas to the canonical services[] layout",
      "Aligned interface and mapping coverage to zero missing method keys across 603 documented methods",
      "Recorded tempo-proxy ForwardMethods registration gating and tidb-mgmt-service reverse-proxy side effects"
    ],
    "round_5": [
      "Promoted tidb-mgmt-portal from admin_cli to primary_service after confirming it runs as a long-lived Gin + grpc-gateway HTTP gateway",
      "Added complete portal OpenAPI method inventory for dedicated, serverless, nextgen, and zero entry surfaces plus lifecycle methods",
      "Recorded portal first-hop HTTP-to-gRPC gateway edges into tidb-mgmt-service using package-qualified method keys to avoid cross-family collisions",
      "Added package-qualified backend OpenAPI keys in tidb-mgmt-service and filled representative list-method downstream edges for dedicated, serverless, and nextgen roots"
    ],
    "round_6": [
      "Replaced package-qualified placeholder aliases with source-backed backend dependencies for dedicated/serverless/nextgen cluster CRUD roots",
      "Separated API-family-specific edges that had previously collapsed under generic ClusterService method keys, especially for Get/Delete/Update flows",
      "Extended backend graph coverage to include global control-plane calls and account relation/project checks that are visible from OpenAPI handlers"
    ],
    "round_7": [
      "Filled source-backed package-qualified dependencies for dedicated PauseCluster, ResumeCluster, and ResetRootPassword",
      "Filled source-backed package-qualified dependencies for serverless BatchCreateClusters, BatchGetClusters, ClaimClusterFromZero, and TakeoverClusterFromPool",
      "Filled source-backed package-qualified dependencies for nextgen restore-status, classic-backup validation, backup, and export OpenAPI roots"
    ],
    "round_8": [
      "Filled source-backed package-qualified dependencies for nextgen ResetRootPassword, CreateTidbBackup, ListTidbBackups, DeleteTidbBackup, GetBackupSetting, UpdateBackupSetting, ListBackupPolicies, and GetCaCertificateDownloadUrl",
      "Filled source-backed package-qualified dependencies for nextgen PublicConnectionSetting and PrivateLinkConnection OpenAPI roots",
      "Filled the serverless ChangeRootPassword OpenAPI root with its SQL-user control-plane dependency"
    ],
    "round_9": [
      "Filled source-backed package-qualified dependencies for dedicated PrivateEndpointConnectionService roots and dedicated log-redaction policy roots",
      "Filled source-backed package-qualified dependencies for nextgen log-redaction policy and dual-layer encryption roots",
      "Filled source-backed package-qualified dependencies for dedicated and nextgen CMEK roots where matching source implementations exist"
    ],
    "round_10": [
      "Filled source-backed package-qualified dependencies for dedicated RegionService, NetworkContainerService, MaintenanceService, and TidbNodeGroupService roots",
      "Filled source-backed package-qualified dependencies for nextgen RegionService roots",
      "Preserved the legacy nextgen RcuQuotaService OpenAPI keys as unresolved because current source only exposes a ListQuotas handler, avoiding fabricated edges"
    ],
    "round_11": [
      "Filled source-backed package-qualified dependencies for dedicated node-instance, node-quota, private-link-service, and database-audit-log roots",
      "Filled source-backed package-qualified dependencies for nextgen database-audit-log roots and TidbService.GetCloudProviderInfo",
      "Filled source-backed package-qualified dependencies for serverless ListRegions and recorded ListCloudProviders as an in-process delegation to ListRegions",
      "Left nextgen EstimatePrice unresolved because the current source is panic(\"not implemented\")"
    ],
    "round_12": [
      "Filled source-backed package-qualified dependencies for zero AllocateZeroInstance and GetZeroInstance by tracing through serverlessClusterSvc",
      "Deferred dedicated CMEK access-principal cleanup because the current source only exposed ShowCmekAccessIamPrincipal and no matching verify handler",
      "Deferred nextgen quota OpenAPI cleanup because current source only exposed ListQuotas, which required schema correction rather than fabricated edges"
    ],
    "round_13": [
      "Corrected dedicated CMEK OpenAPI schema from the legacy Get/Verify naming to the source-backed ShowCmekAccessIamPrincipal method and removed the nonexistent verify root",
      "Replaced legacy nextgen RcuQuotaService OpenAPI keys with the actual QuotaService.ListQuotas root and mapped it to nextgen-global-service.RcuQuotaService.ListOrgRcuQuotas",
      "Reduced the remaining unresolved package-qualified OpenAPI surface to the single source-unimplemented nextgen EstimatePrice root"
    ],
    "round_14": [
      "Rewired account helper targets from AccountAPIService.GetTenantThirdPartyAccountProviders to the real AccountAPIService.GetOrgByID RPC so cross-repo traversal can resolve concrete account nodes",
      "Filled serverless-global-service CloudProviderService.List and SqlUserService.ChangeSqlUserPasswd with source-backed MySQL/KMS/cluster-proxy leaves",
      "Filled nextgen-global-service RegionService.ListRegions, RegionService.ListCloudProviders, and RcuQuotaService.ListOrgRcuQuotas with source-backed MySQL leaves"
    ],
    "round_15": [
      "Filled dedicated-global-service ClusterService.CreateCluster with source-backed account, billing, workflow-engine, MySQL, and KMS dependencies",
      "Filled dedicated-global-service ClusterService.DeleteCluster, PauseCluster, and ResumeCluster with source-backed workflow-engine and MySQL dependencies",
      "Filled dedicated-global-service RegionService.ListCloudProviders and RegionService.SelectRegionByOrgId with source-backed MySQL leaves"
    ],
    "round_16": [
      "Normalized serverless-global-service ServerlessService.Create into source-backed billing, workflow-engine, spend-limit, and MySQL dependencies",
      "Normalized serverless-global-service ServerlessService.Delete into source-backed regional inspection, workflow-engine, and MySQL dependencies",
      "Normalized serverless-global-service ServerlessService.Update into source-backed regional inspection, billing, spend-limit, workflow-engine, and MySQL dependencies"
    ],
    "round_17": [
      "Rewired TidbService.RestoreTidb dataflow target from the nonexistent BackupService.GetBackup key to the real BackupInternalService.GetBackup method",
      "Removed a cross-repo target-resolution blocker on the restore path so portal-root traversal can land on a concrete dataflow backup node"
    ],
    "round_18": [
      "Filled dedicated-global-service ClusterService.ScaleCluster and ClusterService.ScaleClusterWithMultiComponent with source-backed workflow-engine and MySQL dependencies",
      "Filled dedicated-global-service CustomerManagedEncryptionService.GetCmekAccessIamPrincipal with source-backed account-service, regional-server, and MySQL dependencies",
      "Removed the last remaining high-value dedicated-global-service placeholder roots from the portal traversal path"
    ],
    "round_19": [
      "Filled local MaintenanceService.Get/List/Update window roots with source-backed account-service timezone lookups and MySQL leaves",
      "Filled local MaintenanceService.Create/Get/List/Update task roots with source-backed MySQL leaves for tasks and executions",
      "Reduced the remaining high-value root-call-graph blocker inside tidb-management-service to the source-unimplemented nextgen EstimatePrice path"
    ],
    "round_20": [
      "Canonicalized serverless-global-service spend-limit edges from the deployment object alias serverless-svc to the real repo tidbcloud/serverless-service and its concrete ServerlessServerlessBillingService methods",
      "Changed those spend-limit edges from generic internal_client placeholders to source-backed grpc_unary calls through the real adapterimpl/cli gRPC client",
      "Aligned the serverless-service spend-limit subtree with concrete billing HTTP roots so cross-repo root-call-graph traversal no longer stops on abstract BillingService helper names"
    ],
    "round_21": [
      "Canonicalized dedicated-global-service and nextgen-global-service TiDB-group edges to the real cluster-service-ng method keys TiDBClusterService.ListTiDBGroups and TiDBClusterService.GetTiDBGroup",
      "Confirmed that those cluster-service-ng TiDB-group roots terminate on local cluster/tidbgroup repository reads plus workflow-state overlays instead of crossing into another repo",
      "Reduced another pair of outward root-call-graph branches from alias-level remote calls into precise local leaves suitable for minimal deployment-model compression"
    ],
    "round_22": [
      "Replaced the stale tidb-mgmt-service CreateServerlessCluster account-svc CheckPermission edge with the real source-backed account RPC branches GetUserByEmail, GetOpenAPIAccess, GetOrCreateSystemUser, and GetUserByID used by fillUserInfo()",
      "Replaced the stale tempo-proxy account-svc allow-list placeholder with the real account RPCs ListOrgsAdvance and GetOrgByID that back allow-list cache prefetch and cache-miss org lookups",
      "Canonicalized the remaining serverless-global cluster-proxy password edge to clusterproxy CentralService.ChangePasswordByClusterID, removed the last unqualified dedicated-global TiDB-group alias, and normalized every remaining tidb-management-service account edge onto AccountAPIService.* keys so node identity no longer splits during graph compression"
    ]
  }
}
