{
  "repo": "tidbcloud/escalation-base",
  "binary": "autoshift-server",
  "binary_path": "support-autoshift/cmd/autoshift-server/main.go",
  "surface_kind": "worker_service",
  "type": "worker_service",
  "extensions": {
    "notes": [
      "Fresh codex rescan restored autoshift-server as a real long-running service. It exposes no HTTP or gRPC surface; the runtime contract is its background periodic sync loop that rewrites Jira role actors based on configured shifts.",
      "This binary was wrongly skipped as a CLI tool before. The Cobra wrapper only boots config and DI; the actual workload is the service manager and AutoshiftService loop."
    ]
  },
  "services": [
    {
      "name": "AutoshiftLifecycle",
      "package": "support-autoshift/cmd/autoshift-server/main.go",
      "methods": [
        {
          "name": "LoadConfig",
          "name_key": "AutoshiftLifecycle.LoadConfig",
          "input": "--config path",
          "output": "root config loaded",
          "type": "local"
        },
        {
          "name": "SetupDeps",
          "name_key": "AutoshiftLifecycle.SetupDeps",
          "input": "RootConfig",
          "output": "logger, service manager, jira clients, and shift manager initialized",
          "type": "local"
        },
        {
          "name": "RunServices",
          "name_key": "AutoshiftLifecycle.RunServices",
          "input": "service.Manager",
          "output": "runnable services started",
          "type": "local"
        },
        {
          "name": "StopServices",
          "name_key": "AutoshiftLifecycle.StopServices",
          "input": "service.Manager",
          "output": "runnable services stopped",
          "type": "local"
        }
      ]
    },
    {
      "name": "AutoshiftService",
      "package": "support-autoshift/pkg/service/autoshift",
      "methods": [
        {
          "name": "Run",
          "name_key": "AutoshiftService.Run",
          "input": "context",
          "output": "periodic shift-sync loop running",
          "type": "local"
        },
        {
          "name": "SyncShifts",
          "name_key": "AutoshiftService.SyncShifts",
          "input": "current time and configured roles/shifts",
          "output": "Jira role actors synchronized to current shifts",
          "type": "local"
        }
      ]
    }
  ]
}
