{
  "schemaVersion": 1,
  "contract": "kungfu-buildchain-v4-stage-capsule-qualification",
  "capsuleAuthority": "architecture/v4-stage-capsule-contract.json",
  "storeAuthority": "architecture/v4-stage-capsule-store-contract.json",
  "checkpointAuthority": "architecture/v4-platform-stage-checkpoints.json",
  "resumeAuthority": "architecture/v4-stage-capsule-resume-planner.json",
  "implementation": "packages/core/v4-stage-capsule-qualification.js",
  "rehearsal": "scripts/v4-stage-capsule-qualification.mjs",
  "mode": "shadow-only",
  "productionAuthority": "v3",
  "campaign": {
    "platforms": ["linux-x64", "macos-arm64", "windows-x64"],
    "processRuns": ["seed", "resume"],
    "consumers": ["buildchain"],
    "requiredComparisons": [
      "artifact-manifest-root",
      "content-root",
      "campaign-profile-root",
      "planner-decision",
      "retained-byte-cost",
      "restore-overhead",
      "rollback"
    ]
  },
  "publicConsumerDogfood": {
    "callerWorkflow": ".github/workflows/v4-public-consumer-dogfood.yml",
    "reusableWorkflow": "kungfu-systems/buildchain/.github/workflows/v4-stage-capsule-canary.yml",
    "validationRef": "4178776bf635d0738cb1917e449076d64883218c",
    "invocation": "workflow_call",
    "runtimeBinding": "job.workflow_sha",
    "consumerSourceBinding": "github.sha",
    "configPath": ".buildchain/buildchain.toml",
    "executableStages": ["install", "build", "verify"],
    "dependencies": {
      "install": [],
      "build": ["install"],
      "verify": ["build"]
    },
    "excludedStages": {
      "version-state": "source-mutation",
      "publish": "provider-mutation"
    },
    "runners": ["ubuntu-24.04", "macos-15", "windows-2025"],
    "consumerOrchestrationCopied": false,
    "relativeOrSelfInvocationAllowed": false,
    "directQualificationInvocationAllowed": false,
    "candidateBranchOverrideAllowed": false,
    "recursionRecovery": "public-train-ref-only"
  },
  "faultCampaign": [
    "corrupt",
    "cross-platform",
    "cross-stage",
    "expired",
    "missing",
    "partial",
    "policy-drift",
    "root-mismatch",
    "source-drift",
    "stale-writer",
    "toolchain-drift"
  ],
  "qualification": {
    "freshAndResumedRootsMustMatch": true,
    "falseReuseMaximum": 0,
    "falseRebuildMaximum": 0,
    "allFaultsMustPass": true,
    "threePlatformAggregateRequired": true,
    "fiveNativeTerminalChildrenRequired": true,
    "protectedDeliveryMustBeDrained": true
  },
  "rollback": {
    "switch": "stage-capsule-mode=v3",
    "migrationRequired": false,
    "retainedStateDestroyed": false
  },
  "authority": {
    "providerEffects": false,
    "productionWrites": false,
    "productionReuse": false,
    "releaseEffects": false,
    "credentials": false,
    "aws": false,
    "selfHostedRunners": false,
    "ambientEnvironment": false,
    "ambientClock": false,
    "v3BehaviorChange": false
  },
  "budgets": {
    "qualificationImplementations": 1,
    "canonicalQualificationRoots": 1,
    "providerSdkImports": 0,
    "productionStageSkippingChanges": 0,
    "productionWriteAuthorityChanges": 0,
    "v3ConsumerBehaviorChanges": 0,
    "publicConsumerDogfoodWorkflows": 1
  }
}
