@kungfu-tech/buildchain 4.1.0-alpha.0 → 4.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/AGENTS.md +30 -41
  2. package/CONTRIBUTING.md +6 -7
  3. package/architecture/action-taxonomy.json +5 -21
  4. package/architecture/agent-change-map.md +74 -56
  5. package/architecture/build-orchestration.json +8 -1
  6. package/architecture/ci-lane-change-budget.json +179 -69
  7. package/architecture/floating-consumer-policy.json +7 -17
  8. package/architecture/internal-capabilities.json +58 -72
  9. package/architecture/maintainability-debt.json +138 -52
  10. package/architecture/maintainability-policy.json +6 -15
  11. package/architecture/promotion-job-topology.json +39 -20
  12. package/architecture/release-topology.json +26 -37
  13. package/architecture/runtime-entry.json +26 -0
  14. package/architecture/runtime-resume-lineage.json +23 -0
  15. package/architecture/stage-capsule-qualification.json +2 -2
  16. package/architecture/universal-workflow-bootstrap.json +10 -25
  17. package/architecture/universal-workflow-capability-policy.json +61 -0
  18. package/architecture/universal-workflow-fault-campaign.json +18 -24
  19. package/architecture/workflow-taxonomy.json +0 -11
  20. package/contracts/fixtures/{v4-runtime-ref-resume-authority-v1 → runtime-resume-lineage-v2}/scenario.json +2 -3
  21. package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +2 -2
  22. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  23. package/contracts/promotion-invocation-v1.schema.json +0 -44
  24. package/contracts/promotion-request-v1.schema.json +0 -39
  25. package/contracts/runtime-resume-lineage-v2.schema.json +182 -0
  26. package/dist/site/buildchain-contract.json +472 -361
  27. package/dist/site/buildchain-site.json +99 -99
  28. package/dist/site/capability-registry.json +3 -3
  29. package/dist/site/cli-registry.json +4 -4
  30. package/dist/site/controller-registry.json +94 -78
  31. package/dist/site/kfd-claims.json +224 -343
  32. package/dist/site/kfd-upstream-aggregate.json +1 -1
  33. package/dist/site/manual-registry.json +15 -15
  34. package/dist/site/node-api-registry.json +239 -354
  35. package/dist/site/page-registry.json +80 -80
  36. package/dist/site/public-surface-audit.json +203 -254
  37. package/dist/site/publication-authority-registry.json +1 -24
  38. package/dist/site/publication-registry.json +4 -4
  39. package/dist/site/release-provenance.json +1 -1
  40. package/dist/site/site-manifest.json +19 -19
  41. package/dist/site/workflow-registry.json +197 -357
  42. package/docs/MAP.md +3 -3
  43. package/docs/auditable-demo.md +4 -4
  44. package/docs/cli-reference.md +2 -2
  45. package/docs/code-organization.md +5 -4
  46. package/docs/controller-evidence.md +2 -2
  47. package/docs/dev-alpha-candidate-patrol.md +5 -5
  48. package/docs/dev-delivery-warrant.md +14 -24
  49. package/docs/engineering-housekeeper.md +3 -3
  50. package/docs/github-artifact-attestation.md +9 -12
  51. package/docs/github-governance-authority.md +4 -4
  52. package/docs/node-api-reference.md +153 -167
  53. package/docs/publication-artifacts.md +3 -4
  54. package/docs/publication-authority.md +2 -2
  55. package/docs/release-candidate.md +21 -27
  56. package/docs/release-governance.md +10 -10
  57. package/docs/release-promotion-request.md +11 -18
  58. package/docs/release-propagation.md +5 -6
  59. package/docs/release-tail-provider-plane.md +2 -3
  60. package/docs/reusable-build-surface.md +13 -7
  61. package/docs/runtime-entry.md +122 -0
  62. package/docs/runtime-train-validation.md +30 -41
  63. package/docs/v4-publication-rehearsal.md +5 -5
  64. package/docs/v4-stage-capsule.md +9 -10
  65. package/docs/web-surface-deployments.md +16 -20
  66. package/docs/workflow-catalog.md +0 -1
  67. package/package.json +6 -6
  68. package/packages/core/adoption/commands/init-repo.mjs +2 -2
  69. package/packages/core/adoption/cross-platform-adopter-qualification.js +2 -13
  70. package/packages/core/adoption/qualification/actions.js +3 -5
  71. package/packages/core/adoption/qualification/admission.js +2 -3
  72. package/packages/core/build/artifact/attestation.js +0 -1
  73. package/packages/core/build/artifact/contracts.js +1 -4
  74. package/packages/core/build/artifact/store.js +6 -5
  75. package/packages/core/build/artifact-signing.js +4 -10
  76. package/packages/core/build/binary/actions.js +15 -9
  77. package/packages/core/build/binary-publication-dispatch.js +2 -6
  78. package/packages/core/build/demo/action-context.js +2 -11
  79. package/packages/core/build/demo/binary-action.js +8 -10
  80. package/packages/core/build/gate/controller.js +0 -2
  81. package/packages/core/build/github-attestation/action.js +2 -7
  82. package/packages/core/build/github-attestation/admission.js +0 -8
  83. package/packages/core/build/github-attestation/transaction.js +1 -2
  84. package/packages/core/build/lifecycle/stage-action.js +2 -0
  85. package/packages/core/build/lifecycle/stage.js +6 -3
  86. package/packages/core/build/macos-credential-island/dmg-assembly.js +0 -2
  87. package/packages/core/build/macos-credential-island/lib.js +2 -6
  88. package/packages/core/build/plan/action-context.js +0 -7
  89. package/packages/core/build/plan/action.js +7 -11
  90. package/packages/core/build/plan/admission.js +6 -73
  91. package/packages/core/build/plan/configuration.js +1 -1
  92. package/packages/core/build/plan/environment.js +1 -1
  93. package/packages/core/build/plan/identity.js +1 -5
  94. package/packages/core/build/plan/resolve.js +7 -1
  95. package/packages/core/build/recovery/checkpoint.js +158 -0
  96. package/packages/core/build/recovery/transaction.js +51 -0
  97. package/packages/core/build/signing/authority-actions.js +2 -11
  98. package/packages/core/build/signing/control.js +0 -5
  99. package/packages/core/build/signing/controller-transaction.js +0 -1
  100. package/packages/core/build/signing/delegation.js +2 -4
  101. package/packages/core/build/signing/dispatch.js +10 -56
  102. package/packages/core/build/signing/intake.js +0 -4
  103. package/packages/core/build/signing/prepare.js +1 -1
  104. package/packages/core/build/signing/request.js +3 -8
  105. package/packages/core/build/source/checkout-action.js +6 -10
  106. package/packages/core/build/source/controller.js +1 -4
  107. package/packages/core/build/source/lifecycle.js +3 -13
  108. package/packages/core/build/stage-capsule/actions.js +3 -13
  109. package/packages/core/build/stage-capsule/campaign/resume.js +10 -5
  110. package/packages/core/build/stage-capsule/rehearsal/verify.js +3 -4
  111. package/packages/core/build/stage-capsule-resume-planner.js +0 -1
  112. package/packages/core/build/summary/aggregation.js +5 -5
  113. package/packages/core/build/summary/finalization.js +1 -1
  114. package/packages/core/build/verification/actions.js +3 -12
  115. package/packages/core/build/verification/runner.js +22 -20
  116. package/packages/core/consumer/floating-consumer-evidence.js +3 -21
  117. package/packages/core/consumer/floating-consumer-policy.js +2 -93
  118. package/packages/core/consumer/floating-consumer-release-passport.js +1 -34
  119. package/packages/core/consumer/policy-admission.js +1 -3
  120. package/packages/core/contracts/buildchain-contract.js +12 -146
  121. package/packages/core/contracts/workflow-yaml-contract.js +11 -1
  122. package/packages/core/dev-delivery/candidate/admission.js +3 -4
  123. package/packages/core/dev-delivery/candidate/coordinates.js +0 -8
  124. package/packages/core/dev-delivery/commands/dev-delivery-request.sh +5 -13
  125. package/packages/core/dev-delivery/commands/dev-delivery-source-proof-reuse.mjs +0 -3
  126. package/packages/core/dev-delivery/dev-delivery-contract-surface.js +4 -52
  127. package/packages/core/dev-delivery/dev-delivery-execution-transfer.js +2 -15
  128. package/packages/core/dev-delivery/native/action-context.js +4 -32
  129. package/packages/core/dev-delivery/native/provider-boundary.js +0 -2
  130. package/packages/core/dev-delivery/native/transactions.js +1 -2
  131. package/packages/core/dev-delivery/queue/reconciliation-action.js +6 -10
  132. package/packages/core/dev-delivery/source-proof/predicates.js +0 -6
  133. package/packages/core/dev-delivery/source-proof/reuse.js +0 -2
  134. package/packages/core/dev-delivery/source-proof/seal.js +0 -2
  135. package/packages/core/governance/alpha-candidate/action.js +1 -10
  136. package/packages/core/governance/audit/actions.js +1 -3
  137. package/packages/core/governance/audit/collection.js +1 -3
  138. package/packages/core/governance/audit/identity.js +3 -31
  139. package/packages/core/governance/audit/transactions.js +2 -4
  140. package/packages/core/governance/buildchain-publication-authority.js +0 -1
  141. package/packages/core/governance/commands/audit-github-governance.mjs +3 -2
  142. package/packages/core/governance/github-governance-authority.js +0 -5
  143. package/packages/core/governance/receipt-admission.js +0 -15
  144. package/packages/core/index.js +1 -1
  145. package/packages/core/observability/controller/identity.js +4 -5
  146. package/packages/core/observability/controller-evidence.js +5 -10
  147. package/packages/core/paper/commands/paper.mjs +6 -6
  148. package/packages/core/paper/operations/plans.js +2 -2
  149. package/packages/core/paper/operations/provisioning-validation.js +1 -1
  150. package/packages/core/paper/operations/scaffold-workflows.js +29 -12
  151. package/packages/core/paper/operations/scaffold.js +97 -69
  152. package/packages/core/paper/paper-agent-entry.js +0 -11
  153. package/packages/core/paper/paper-runtime-channels.js +21 -66
  154. package/packages/core/paper/paper-scaffold-content.js +1 -1
  155. package/packages/core/paper/paper.js +9 -5
  156. package/packages/core/paper/publication/candidate.js +0 -9
  157. package/packages/core/paper/publication-controller.js +2 -4
  158. package/packages/core/providers/github/artifact-attestation.js +1 -1
  159. package/packages/core/publication/authority/actions.js +9 -8
  160. package/packages/core/publication/authority/admission.js +0 -11
  161. package/packages/core/publication/authority/assembly.js +2 -7
  162. package/packages/core/publication/authority/control-plane.js +2 -2
  163. package/packages/core/publication/authority/governance.js +2 -9
  164. package/packages/core/publication/authority/request.js +7 -2
  165. package/packages/core/publication/authority/verification.js +3 -18
  166. package/packages/core/publication/binary/action.js +5 -7
  167. package/packages/core/publication/candidate/qualification-action.js +1 -6
  168. package/packages/core/publication/candidate/stage-capsules.js +1 -1
  169. package/packages/core/publication/npm/preview-action.js +9 -15
  170. package/packages/core/publication/oci/preview-actions.js +1 -10
  171. package/packages/core/publication/publication-artifact-candidate.js +2 -2
  172. package/packages/core/publication/publication-authority.js +2 -2
  173. package/packages/core/publication/publication-rehearsal-projection.js +3 -3
  174. package/packages/core/publication/settlement/actions.js +2 -11
  175. package/packages/core/release/binary/coordinates-action.js +0 -13
  176. package/packages/core/release/binary/coordinates.js +2 -19
  177. package/packages/core/release/commands/promotion-channel-router.mjs +12 -56
  178. package/packages/core/release/commands/resume-from-candidate-run.mjs +2 -3
  179. package/packages/core/release/dev-alpha-active-release-train.js +0 -5
  180. package/packages/core/release/line/action.js +2 -13
  181. package/packages/core/release/next-development/actions.js +2 -5
  182. package/packages/core/release/passport/consumer-validation.js +1 -28
  183. package/packages/core/release/promote-candidate/development-source.js +7 -8
  184. package/packages/core/release/promotion/actions.js +7 -38
  185. package/packages/core/release/promotion/admission.js +3 -50
  186. package/packages/core/release/promotion/candidate.js +2 -4
  187. package/packages/core/release/promotion/channel.js +13 -101
  188. package/packages/core/release/promotion/qualification-action.js +2 -13
  189. package/packages/core/release/promotion/routing.js +16 -81
  190. package/packages/core/release/promotion/selection.js +1 -9
  191. package/packages/core/release/promotion-request.js +1 -40
  192. package/packages/core/release/qualification/actions.js +0 -8
  193. package/packages/core/release/qualification/public-build.js +1 -1
  194. package/packages/core/release/recovery/candidate.js +15 -21
  195. package/packages/core/release/recovery/capsules.js +2 -10
  196. package/packages/core/release/recovery/lineage.js +305 -0
  197. package/packages/core/release/recovery/provenance.js +1 -2
  198. package/packages/core/release/recovery/publication.js +4 -14
  199. package/packages/core/release/recovery/readback.js +19 -32
  200. package/packages/core/release/recovery/runtime.js +4 -95
  201. package/packages/core/release/release-candidate-recovery.js +4 -9
  202. package/packages/core/release/release-candidate.js +2 -5
  203. package/packages/core/release/reseal/actions.js +3 -22
  204. package/packages/core/release/reseal/admission.js +0 -2
  205. package/packages/core/release/reseal/finalize-platform.js +0 -2
  206. package/packages/core/release/tail-reseal-github.js +1 -2
  207. package/packages/core/release/tail-reseal-receipt.js +0 -1
  208. package/packages/core/release/tail-reseal.js +2 -20
  209. package/packages/core/release/version-state.js +16 -13
  210. package/packages/core/runtime/buildchain-domain.wasm +0 -0
  211. package/packages/core/runtime/checkout-identity.js +0 -13
  212. package/packages/core/runtime/domain-wasm-artifact.js +2 -2
  213. package/packages/core/runtime/entry/actions.js +121 -0
  214. package/packages/core/runtime/entry/activation.js +86 -0
  215. package/packages/core/runtime/entry/github.js +55 -0
  216. package/packages/core/runtime/entry/recovery.js +37 -0
  217. package/packages/core/runtime/entry/selection.js +110 -0
  218. package/packages/core/web/controller.js +1 -1
  219. package/packages/core/web/publication-admission-action.js +1 -8
  220. package/packages/core/web/web-surface-publication-candidate.js +2 -5
  221. package/packages/core/workflow/admission/actions.js +6 -26
  222. package/packages/core/workflow/admission/recovery.js +3 -43
  223. package/packages/core/workflow/admission/transactions.js +8 -24
  224. package/packages/core/workflow/commands/buildchain-cli-help.mjs +1 -1
  225. package/packages/core/workflow/commands/universal-workflow-engine.mjs +2 -7
  226. package/packages/core/workflow/dogfood/actions.js +0 -17
  227. package/packages/core/workflow/engine/action.js +0 -5
  228. package/packages/core/workflow/engine/conformance.js +1 -1
  229. package/packages/core/workflow/engine/execution.js +2 -6
  230. package/packages/core/workflow/engine/identity.js +1 -6
  231. package/packages/core/workflow/engine/release-environment.js +11 -35
  232. package/packages/core/workflow/engine/release-promotion.js +2 -2
  233. package/packages/core/workflow/settlement/actions.js +0 -12
  234. package/packages/core/workflow/universal-self-dogfood.js +2 -16
  235. package/packages/core/workflow/universal-workflow-bootstrap.js +16 -241
  236. package/packages/core/workflow/workflow-taxonomy.mjs +2 -2
  237. package/scripts/check-dev-delivery-actions.mjs +17 -8
  238. package/scripts/check-floating-consumer-policy-contract.mjs +6 -6
  239. package/scripts/check-inventory.mjs +1 -10
  240. package/scripts/check-public-dogfood-contract.mjs +34 -21
  241. package/scripts/check-release-topology.mjs +2 -6
  242. package/scripts/check-runtime-entry.mjs +133 -0
  243. package/scripts/check-universal-workflow-bootstrap.mjs +45 -281
  244. package/scripts/check-workflows.sh +0 -7
  245. package/scripts/generate-bootstrap-admission.mjs +1 -1
  246. package/scripts/generate-channel-promotion-workflow.mjs +4 -4
  247. package/scripts/inventory/binary.mjs +4 -4
  248. package/scripts/inventory/promotion.mjs +5 -3
  249. package/scripts/runtime-source-boundaries.mjs +70 -0
  250. package/scripts/site-capability-metadata.mjs +2 -2
  251. package/scripts/workflow-action-graph.mjs +5 -18
  252. package/scripts/workflow-self-reference.mjs +20 -0
  253. package/templates/native-dev-delivery.yml +4 -4
  254. package/templates/universal-buildchain-bootstrap.yml +12 -2
  255. package/architecture/runtime-ref-resume-authority.json +0 -64
  256. package/architecture/universal-workflow-train-admission.json +0 -76
  257. package/contracts/v4-runtime-ref-resume-authority-v1.schema.json +0 -235
  258. package/docs/v4-runtime-ref-resume-authority.md +0 -69
  259. package/packages/core/consumer/channel-selection.js +0 -211
  260. package/packages/core/consumer/commands/buildchain-channel-router.mjs +0 -81
  261. package/packages/core/consumer/invocation-selector.js +0 -4
  262. package/packages/core/consumer/runtime-ref-resume-authority.js +0 -621
  263. package/packages/core/consumer/workflow-definition-authority.js +0 -64
  264. package/packages/core/contracts/runtime-contract-action.js +0 -48
  265. package/packages/core/release/commands/promotion-identity-resolver.mjs +0 -77
  266. package/packages/core/release/commands/verify-promotion-router-binding.sh +0 -36
  267. package/packages/core/release/promotion/identities.js +0 -56
  268. package/packages/core/release/runtime-override-authorization.js +0 -242
  269. package/packages/core/runtime/commands/runtime-ref-core.mjs +0 -171
  270. package/packages/core/runtime/provider-closure.js +0 -60
  271. package/packages/core/runtime/runtime-selection-action.js +0 -34
  272. package/packages/core/runtime/runtime-selection.js +0 -136
  273. package/packages/core/runtime/workflow-runtime.js +0 -11
  274. package/packages/core/workflow/admission/review.js +0 -188
  275. package/packages/core/workflow/commands/universal-workflow-backflow.mjs +0 -26
  276. package/packages/core/workflow/installation.js +0 -33
  277. package/packages/core/workflow/settlement/backflow.js +0 -187
  278. package/scripts/generate-bootstrap-recovery.mjs +0 -94
  279. package/templates/bootstrap-recovery/actions/build/source/admit/action.yml +0 -17
  280. package/templates/bootstrap-recovery/actions/build/source/admit/dist/index.js +0 -63
  281. package/templates/bootstrap-recovery/actions/runtime/dependencies/install/action.yml +0 -18
  282. package/templates/bootstrap-recovery/actions/runtime/dependencies/install/dist/index.js +0 -63
  283. package/templates/bootstrap-recovery/actions/runtime/environment/prepare/action.yml +0 -21
  284. package/templates/bootstrap-recovery/actions/workflow/admission/inspect/action.yml +0 -27
  285. package/templates/bootstrap-recovery/actions/workflow/admission/inspect/dist/index.js +0 -64
  286. package/templates/bootstrap-recovery/actions/workflow/admission/review/action.yml +0 -15
  287. package/templates/bootstrap-recovery/actions/workflow/admission/review/dist/index.js +0 -65
  288. package/templates/bootstrap-recovery/actions/workflow/recovery/admit/action.yml +0 -47
  289. package/templates/bootstrap-recovery/actions/workflow/recovery/execute/action.yml +0 -48
  290. package/templates/bootstrap-recovery/actions/workflow/recovery/settle/action.yml +0 -54
  291. package/templates/bootstrap-recovery/actions/workflow/settlement/seal/action.yml +0 -17
  292. package/templates/bootstrap-recovery/actions/workflow/settlement/seal/dist/index.js +0 -65
  293. package/templates/bootstrap-recovery/manifest.json +0 -68
  294. package/templates/bootstrap-recovery/package.json +0 -9
  295. package/templates/universal-buildchain-bootstrap-recovery.yml +0 -115
@@ -12,6 +12,7 @@ const parse = (value) => (value ? JSON.parse(value) : undefined);
12
12
  function context(core, env) {
13
13
  const request = publicationAuthorityRequest(
14
14
  JSON.parse(core.getInput("request-json", { required: true })),
15
+ JSON.parse(env.BUILDCHAIN_RUNTIME_SELECTION),
15
16
  );
16
17
  return {
17
18
  request: { ...request, callerRepository: env.GITHUB_REPOSITORY },
@@ -22,12 +23,16 @@ function context(core, env) {
22
23
  export function inspectPublicationAuthorityAction(core, env) {
23
24
  admitPublicationAuthorityRequest(context(core, env).request);
24
25
  }
25
- export function verifyPublicationGovernanceAction(core, env) {
26
+ export function verifyPublicationGovernanceAction(
27
+ core,
28
+ env,
29
+ { verify = verifyLivePublicationGovernance } = {},
30
+ ) {
26
31
  const { request, workspace, runtimeRoot } = context(core, env);
27
- return verifyLivePublicationGovernance({
32
+ return verify({
28
33
  repository: request.evidenceRepository || env.GITHUB_REPOSITORY,
29
34
  targetRef: request.targetRef,
30
- runtimeSha: request.buildchainRef,
35
+ runtimeSha: request.runtimeSha,
31
36
  runtimeRoot,
32
37
  outputRoot: path.join(workspace, ".buildchain/publication-authority"),
33
38
  token: core.getInput("token", { required: true }),
@@ -43,11 +48,7 @@ export function locateAuthorityControllerAction(core, env) {
43
48
  }
44
49
  export async function qualifyAuthorityConsumerGateAction(core, env) {
45
50
  const { request, workspace, runtimeRoot } = context(core, env);
46
- verifyCheckoutIdentity({
47
- directory: runtimeRoot,
48
- sha: request.buildchainRef,
49
- label: "Consumer Gate authority",
50
- });
51
+
51
52
  const subjectRoot = path.join(
52
53
  workspace,
53
54
  ".buildchain/publication-consumer-source",
@@ -1,11 +1,5 @@
1
1
  import { requireValue } from "../../runtime/action-process.mjs";
2
2
 
3
- export function requireImmutableAuthority(request) {
4
- requireValue(
5
- /^[0-9a-f]{40}$/i.test(request.buildchainRef || ""),
6
- "Publication authority requires an exact 40-character GitHub commit SHA",
7
- );
8
- }
9
3
  export function requireSealedInputs(request) {
10
4
  const names = [
11
5
  "admissionJson",
@@ -21,10 +15,6 @@ export function requireSealedInputs(request) {
21
15
  );
22
16
  }
23
17
  export function requireManagedInputs(request) {
24
- requireValue(
25
- request.buildchainRepository === "kungfu-systems/buildchain",
26
- "Automatic publication admission requires the canonical Buildchain authority repository",
27
- );
28
18
  requireValue(
29
19
  /^[0-9a-f]{40}$/i.test(request.sourceSha),
30
20
  "Automatic publication admission requires an exact source SHA",
@@ -107,7 +97,6 @@ export function requireManagedInputs(request) {
107
97
 
108
98
  export function admitPublicationAuthorityRequest(request) {
109
99
  if (request.dryRun) return;
110
- requireImmutableAuthority(request);
111
100
  if (request.autoAdmission) requireManagedInputs(request);
112
101
  else requireSealedInputs(request);
113
102
  }
@@ -7,16 +7,11 @@ import { sealManagedPublicationAdmission } from "./seal.js";
7
7
  import { readGitHubSourceTree } from "../../providers/github/commits.js";
8
8
  import { auditPublicationControlPlane } from "../../governance/publication/audit.js";
9
9
  import { publicationControlPlaneRequest } from "./control-plane.js";
10
- import { verifyCheckoutIdentity } from "../../runtime/checkout-identity.js";
11
10
  export async function assemblePublicationAdmission(
12
11
  { request, workspace, runtimeRoot, runner, token, governanceToken, apiUrl },
13
12
  { audit = auditPublicationControlPlane, tree = readGitHubSourceTree } = {},
14
13
  ) {
15
- verifyCheckoutIdentity({
16
- directory: runtimeRoot,
17
- sha: request.buildchainRef,
18
- label: "Publication authority",
19
- });
14
+
20
15
  const outputRoot = path.join(
21
16
  workspace,
22
17
  ".buildchain/publication-authority/auto",
@@ -58,7 +53,7 @@ export async function assemblePublicationAdmission(
58
53
  repository: request.evidenceRepository,
59
54
  sourceSha: request.sourceSha,
60
55
  sourceTreeSha,
61
- runtimeSha: request.buildchainRef,
56
+ runtimeSha: request.runtimeSha,
62
57
  publicationVersion: request.publicationVersion,
63
58
  });
64
59
  const bundle = sealManagedPublicationAdmission({
@@ -11,10 +11,10 @@ export function publicationControlPlaneRequest(request) {
11
11
  candidate = kind === "release-candidate";
12
12
  return {
13
13
  repository: request.evidenceRepository,
14
- workflowRepository: request.buildchainRepository,
14
+ workflowRepository: request.runtimeRepository,
15
15
  branch: request.targetRef,
16
16
  sourceSha: request.sourceSha,
17
- workflowRef: request.buildchainRef,
17
+ workflowRef: request.runtimeSha,
18
18
  publisherWorkflowPath: request.publisherWorkflowPath,
19
19
  requiredStatusCheck: request.requiredStatusCheck || "",
20
20
  workflowPath: request.authorityWorkflowPath || defaults[kind],
@@ -5,23 +5,17 @@ import {
5
5
  BUILDCHAIN_GITHUB_GOVERNANCE_AUTHORITY,
6
6
  verifyGithubGovernanceReceipt,
7
7
  } from "../../governance/github-governance-authority.js";
8
- import { verifyCheckoutIdentity } from "../../runtime/checkout-identity.js";
9
8
  export function verifyLivePublicationGovernance(
10
- { repository, targetRef, runtimeSha, runtimeRoot, outputRoot, token },
9
+ { repository, targetRef, runtimeSha, outputRoot, token },
11
10
  collect = collectGithubGovernanceAudit,
12
11
  ) {
13
12
  if (!repository || !targetRef || !token)
14
13
  throw new Error(
15
14
  "Live GitHub governance verification requires an exact repository, target ref and scoped credential",
16
15
  );
17
- verifyCheckoutIdentity({
18
- directory: runtimeRoot,
19
- sha: runtimeSha,
20
- label: "Governance verifier",
21
- });
16
+
22
17
  fs.mkdirSync(outputRoot, { recursive: true });
23
18
  const audit = collect({
24
- root: runtimeRoot,
25
19
  token,
26
20
  organization: repository.split("/")[0],
27
21
  repository,
@@ -51,7 +45,6 @@ export function verifyLivePublicationGovernance(
51
45
  expectedRepository: repository,
52
46
  expectedTargetRef: targetRef,
53
47
  expectedPolicyRoot: BUILDCHAIN_GITHUB_GOVERNANCE_AUTHORITY.policyRoot,
54
- expectedVerifierSourceRevision: runtimeSha,
55
48
  });
56
49
  fs.writeFileSync(
57
50
  path.join(outputRoot, "github-governance-receipt.json"),
@@ -1,10 +1,15 @@
1
- export function publicationAuthorityRequest(input) {
2
- return Object.fromEntries(
1
+ export function publicationAuthorityRequest(input, selectedRuntime) {
2
+ const request = Object.fromEntries(
3
3
  Object.entries(input).map(([key, value]) => [
4
4
  key.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase()),
5
5
  value,
6
6
  ]),
7
7
  );
8
+ return {
9
+ ...request,
10
+ runtimeRepository: selectedRuntime.repository,
11
+ runtimeSha: selectedRuntime.sha,
12
+ };
8
13
  }
9
14
  export function requireAuthorityValue(value, label) {
10
15
  if (value === undefined || value === null || value === "")
@@ -1,7 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { verifyPublicationAdmission } from "../publication-authority.js";
4
- import { verifyCheckoutIdentity } from "../../runtime/checkout-identity.js";
5
4
  import { readGitHubSourceTree } from "../../providers/github/commits.js";
6
5
  import { publicationVerificationEvidence } from "./verification-evidence.js";
7
6
  export async function verifySealedAdmission(
@@ -18,13 +17,8 @@ export async function verifySealedAdmission(
18
17
  expected,
19
18
  usedNonces,
20
19
  },
21
- { tree = readGitHubSourceTree, verifyCheckout = verifyCheckoutIdentity } = {},
20
+ { tree = readGitHubSourceTree } = {},
22
21
  ) {
23
- verifyCheckout({
24
- directory: runtimeRoot,
25
- sha: request.buildchainRef,
26
- label: "Authority runtime",
27
- });
28
22
  const sourceTreeSha = await tree({
29
23
  repository: admission.repository,
30
24
  sourceSha: admission.sourceSha,
@@ -35,7 +29,7 @@ export async function verifySealedAdmission(
35
29
  kind: request.autoAdmissionKind,
36
30
  evidenceRoot: path.join(workspace, ".buildchain/publication-evidence"),
37
31
  sourceTreeSha,
38
- runtimeSha: request.buildchainRef,
32
+ runtimeSha: request.runtimeSha,
39
33
  admission,
40
34
  gateAggregate,
41
35
  });
@@ -53,22 +47,13 @@ export async function verifySealedAdmission(
53
47
  expected,
54
48
  usedNonces,
55
49
  });
56
- validateCapabilityBinding(capability, request, request.buildchainRef);
50
+ validateCapabilityBinding(capability, request);
57
51
  return { capability, gateAggregate: publicationEvidence.gateAggregate };
58
52
  }
59
53
  export function validateCapabilityBinding(
60
54
  capability,
61
55
  request,
62
- actualRuntimeSha,
63
56
  ) {
64
- if (
65
- request.autoAdmissionKind !== "binary-release-assets" &&
66
- capability.runtimeSha !== actualRuntimeSha
67
- ) {
68
- throw new Error(
69
- `authority runtime checkout mismatch: expected ${capability.runtimeSha}, got ${actualRuntimeSha}`,
70
- );
71
- }
72
57
  if (capability.version !== request.publicationVersion) {
73
58
  throw new Error(
74
59
  `authority publication version mismatch: planned ${request.publicationVersion || "<empty>"}, capability ${capability.version || "<empty>"}`,
@@ -1,16 +1,14 @@
1
1
  import path from "node:path";
2
- import { verifySourceRuntimeCheckouts } from "../../runtime/checkout-identity.js";
3
- import { installationRoot } from "../../runtime/installation-root.js";
2
+ import { verifyCheckoutIdentity } from "../../runtime/checkout-identity.js";
4
3
  import { releaseAssetClient } from "../../providers/github/release-assets.js";
5
4
  import { publishBinaryAssets } from "./transaction.js";
6
5
  export async function publishBinaryAssetsAction(core, env) {
7
6
  const workspace = path.resolve(env.GITHUB_WORKSPACE),
8
7
  sourceSha = core.getInput("source-sha", { required: true });
9
- verifySourceRuntimeCheckouts({
10
- sourceDirectory: workspace,
11
- sourceSha,
12
- runtimeDirectory: installationRoot(import.meta.url),
13
- runtimeSha: core.getInput("runtime-sha", { required: true }),
8
+ verifyCheckoutIdentity({
9
+ directory: workspace,
10
+ sha: sourceSha,
11
+ label: "Publication source",
14
12
  });
15
13
  const client = releaseAssetClient(env.GITHUB_REPOSITORY, {
16
14
  token: core.getInput("token", { required: true }),
@@ -1,6 +1,5 @@
1
1
  import path from "node:path";
2
2
  import { installationRoot } from "../../runtime/installation-root.js";
3
- import { verifyCheckoutIdentity } from "../../runtime/checkout-identity.js";
4
3
  import { qualifyPublicationCandidate } from "./qualification.js";
5
4
  export async function qualifyPublicationCandidateAction(core, env) {
6
5
  const input = JSON.parse(core.getInput("request-json", { required: true }));
@@ -10,11 +9,7 @@ export async function qualifyPublicationCandidateAction(core, env) {
10
9
  throw new Error(
11
10
  "Publication working directory escapes its admitted source",
12
11
  );
13
- verifyCheckoutIdentity({
14
- directory: installationRoot(import.meta.url),
15
- sha: core.getInput("runtime-sha", { required: true }),
16
- label: "Publication runtime",
17
- });
12
+
18
13
  const request = {
19
14
  cwd,
20
15
  env,
@@ -8,7 +8,7 @@ import {
8
8
  stageCapsuleRoot,
9
9
  validateStageCapsule,
10
10
  } from "../../build/stage-capsule.js";
11
- import { runtimeResumeDocumentRoot } from "../../consumer/runtime-ref-resume-authority.js";
11
+ import { runtimeResumeDocumentRoot } from "../../release/recovery/lineage.js";
12
12
  import { createDomainPublicationQualificationReceipt } from "../publication-qualification.js";
13
13
 
14
14
  const readJsonFile = (file) => JSON.parse(fs.readFileSync(file, "utf8"));
@@ -1,6 +1,4 @@
1
- import fs from "node:fs";
2
1
  import path from "node:path";
3
- import { installationRoot } from "../../runtime/installation-root.js";
4
2
  import { verifyRepository } from "../../build/verification/repository.js";
5
3
  import { npmPublishDryRun } from "./preview.js";
6
4
  export function previewNpmPublication(
@@ -10,20 +8,16 @@ export function previewNpmPublication(
10
8
  if (runCheck) verify({ workspace, env });
11
9
  return preview({ cwd: workspace, env });
12
10
  }
13
- export function previewNpmPublicationAction(core, env) {
11
+ export function previewNpmPublicationAction(core, env, dependencies) {
14
12
  const workspace = path.resolve(env.GITHUB_WORKSPACE);
15
- if (
16
- fs.realpathSync(installationRoot(import.meta.url)) !==
17
- fs.realpathSync(workspace)
18
- )
19
- throw new Error(
20
- "npm preview requires the checked-out source implementation",
21
- );
22
- const result = previewNpmPublication({
23
- workspace,
24
- runCheck: core.getBooleanInput("run-check"),
25
- env,
26
- });
13
+ const result = previewNpmPublication(
14
+ {
15
+ workspace,
16
+ runCheck: core.getBooleanInput("run-check"),
17
+ env,
18
+ },
19
+ dependencies,
20
+ );
27
21
  core.info(
28
22
  `npm preview qualified: ${result.package.name}@${result.package.version}; ${result.pack.entryCount} package entries`,
29
23
  );
@@ -1,20 +1,11 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { releaseAssetClient } from "../../providers/github/release-assets.js";
4
- import { installationRoot } from "../../runtime/installation-root.js";
5
- import { sourceSha } from "../../build/standalone/identity.js";
6
4
  import { admitComposePreview } from "./preview-admission.js";
7
5
  import { applyComposePreview } from "./preview-transaction.js";
8
6
  import { createComposePreviewRegistry } from "./preview-registry.js";
9
7
  function inputs(core, env) {
10
- const sha = core.getInput("workflow-sha", { required: true });
11
- if (
12
- !/^[0-9a-f]{40}$/.test(sha) ||
13
- sourceSha(installationRoot(import.meta.url)) !== sha
14
- )
15
- throw new Error(
16
- "Compose preview runtime differs from its exact called workflow",
17
- );
8
+
18
9
  return {
19
10
  request: {
20
11
  workspace: path.resolve(env.GITHUB_WORKSPACE),
@@ -65,7 +65,7 @@ export function createPublicationArtifactCandidate({
65
65
  const normalizedRepository = requiredString(repository, "repository");
66
66
  const normalizedSourceSha = normalizeGitSha(sourceSha, "sourceSha");
67
67
  const normalizedSourceTreeSha = normalizeGitSha(sourceTreeSha, "sourceTreeSha");
68
- const normalizedRuntimeSha = normalizeGitSha(runtimeSha, "runtimeSha");
68
+ const normalizedRuntimeSha = runtimeSha;
69
69
  if (manifest?.contract !== MANIFEST_CONTRACT) throw new Error("publication artifact manifest contract mismatch");
70
70
  if (passport?.contract !== PASSPORT_CONTRACT || passport.status !== "passed") {
71
71
  throw new Error("publication artifact passport is not qualifying");
@@ -82,7 +82,7 @@ export function createPublicationArtifactCandidate({
82
82
  }
83
83
  const controllerValidation = validateControllerReceipt(controllerReceipt, {
84
84
  expectedSourceSha: normalizedSourceSha,
85
- expectedRuntimeSha: normalizedRuntimeSha,
85
+
86
86
  });
87
87
  if (!controllerValidation.ok || !controllerValidation.qualifying) {
88
88
  throw new Error(`publication artifact controller receipt did not qualify: ${controllerValidation.issues.join("; ")}`);
@@ -502,7 +502,7 @@ function validatePublicationEvidence(publicationEvidence, admission) {
502
502
  const controllerReceipt = evidence.controllerReceipt;
503
503
  const controllerValidation = validateControllerReceipt(controllerReceipt, {
504
504
  expectedSourceSha: admission.sourceSha,
505
- expectedRuntimeSha: admission.runtimeSha,
505
+
506
506
  });
507
507
  if (!controllerValidation.ok || !controllerValidation.qualifying) {
508
508
  throw new Error(`binary distribution controller receipt did not qualify: ${controllerValidation.issues.join("; ")}`);
@@ -662,7 +662,7 @@ function validatePublicationEvidence(publicationEvidence, admission) {
662
662
  const controllerReceipt = publicationEvidence.controllerReceipt;
663
663
  const controllerValidation = validateControllerReceipt(controllerReceipt, {
664
664
  expectedSourceSha: passport.source?.headSha || "",
665
- expectedRuntimeSha: passport.buildchain?.sha || "",
665
+
666
666
  });
667
667
  if (!controllerValidation.ok || !controllerValidation.qualifying) {
668
668
  throw new Error(`controller receipt did not qualify: ${controllerValidation.issues.join("; ")}`);
@@ -98,7 +98,7 @@ export function mergePublicationRehearsalAgentInstructions(current = "") {
98
98
 
99
99
  export function publicationRehearsalWorkflow(buildchainRef) {
100
100
  const ref = String(buildchainRef || "").trim();
101
- if (!ref)
102
- throw new Error("publication rehearsal workflow requires a Buildchain ref");
103
- return `name: Publication Rehearsal\n\non:\n workflow_dispatch:\n inputs:\n capsule-path:\n description: "Source-bound v4 publication rehearsal capsule"\n required: true\n default: ".buildchain/publication-rehearsal/capsule.json"\n candidate-root:\n description: "Repository-relative candidate root"\n required: true\n default: ".buildchain/publication-rehearsal/candidate"\n\npermissions:\n contents: read\n\njobs:\n rehearsal:\n uses: kungfu-systems/buildchain/.github/workflows/public-release-tail.yml@${ref}\n with:\n buildchain-ref: ${ref}\n rehearsal-capsule-path: \${{ inputs.capsule-path }}\n candidate-root: \${{ inputs.candidate-root }}\n rehearsal-mode: simulate\n state-path: ".buildchain/publication-rehearsal/state.json"\n rehearsal-evidence-path: ".buildchain/publication-rehearsal/evidence.json"\n`;
101
+ if (!/^v4(?:-alpha)?$/u.test(ref))
102
+ throw new Error("publication rehearsal workflow requires a floating public entry");
103
+ return `name: Publication Rehearsal\n\non:\n workflow_dispatch:\n inputs:\n capsule-path:\n description: "Source-bound v4 publication rehearsal capsule"\n required: true\n default: ".buildchain/publication-rehearsal/capsule.json"\n candidate-root:\n description: "Repository-relative candidate root"\n required: true\n default: ".buildchain/publication-rehearsal/candidate"\n\npermissions:\n contents: read\n\njobs:\n rehearsal:\n uses: kungfu-systems/buildchain/.github/workflows/public-release-tail.yml@${ref}\n with:\n rehearsal-capsule-path: \${{ inputs.capsule-path }}\n candidate-root: \${{ inputs.candidate-root }}\n rehearsal-mode: simulate\n state-path: ".buildchain/publication-rehearsal/state.json"\n rehearsal-evidence-path: ".buildchain/publication-rehearsal/evidence.json"\n`;
104
104
  }
@@ -1,7 +1,6 @@
1
1
  import path from "node:path";
2
2
  import fs from "node:fs";
3
3
  import { installationRoot } from "../../runtime/installation-root.js";
4
- import { verifyCheckoutIdentity } from "../../runtime/checkout-identity.js";
5
4
  import { releaseAssetClient } from "../../providers/github/release-assets.js";
6
5
  import {
7
6
  settlePublication,
@@ -11,16 +10,8 @@ import {
11
10
  function input(core, env) {
12
11
  const runtimeRoot = installationRoot(import.meta.url),
13
12
  workspace = path.resolve(env.GITHUB_WORKSPACE);
14
- if (
15
- fs.realpathSync(runtimeRoot) !==
16
- fs.realpathSync(path.join(workspace, ".buildchain/runtime"))
17
- )
18
- throw new Error("Settlement must execute the admitted runtime");
19
- verifyCheckoutIdentity({
20
- directory: runtimeRoot,
21
- sha: core.getInput("runtime-sha", { required: true }),
22
- label: "Publication settlement runtime",
23
- });
13
+
14
+
24
15
  return {
25
16
  repository: env.GITHUB_REPOSITORY,
26
17
  candidateSha: core.getInput("candidate-sha", { required: true }),
@@ -1,24 +1,11 @@
1
1
  import { getOctokit } from "@actions/github";
2
- import { command } from "../../runtime/action-process.mjs";
3
- import { installationRoot } from "../../runtime/installation-root.js";
4
2
  import { resolveBinaryPublicationCoordinates } from "./coordinates.js";
5
3
  export async function resolveBinaryPublicationAction(core, env) {
6
4
  const request = JSON.parse(core.getInput("request-json", { required: true }));
7
- const executingSha = command(
8
- "git",
9
- ["-C", installationRoot(import.meta.url), "rev-parse", "HEAD"],
10
- { stdio: "pipe" },
11
- ).trim();
12
- if (executingSha !== env.GITHUB_SHA)
13
- throw new Error(
14
- "Binary publication coordinator must execute exact workflow source bytes",
15
- );
16
5
  const values = await resolveBinaryPublicationCoordinates({
17
6
  repository: env.GITHUB_REPOSITORY,
18
7
  runId: request["evidence-run-id"],
19
8
  tag: request["release-tag"],
20
- runtime: request["buildchain-ref"],
21
- workflowSha: env.GITHUB_SHA,
22
9
  github: getOctokit(core.getInput("token", { required: true })),
23
10
  });
24
11
  for (const [key, value] of Object.entries(values)) core.setOutput(key, value);
@@ -2,10 +2,7 @@ import { requireValue } from "../../runtime/action-process.mjs";
2
2
  export function validateBinaryPublicationSelection({
3
3
  runId,
4
4
  tag,
5
- runtime,
6
- workflowSha,
7
5
  }) {
8
- runtime = (runtime || "").toLowerCase();
9
6
  requireValue(
10
7
  /^[1-9][0-9]*$/u.test(runId),
11
8
  "Binary release publication requires an exact evidence run id",
@@ -15,19 +12,10 @@ export function validateBinaryPublicationSelection({
15
12
  match,
16
13
  "Binary release publication requires an exact semver tag",
17
14
  );
18
- requireValue(
19
- /^[0-9a-f]{40}$/u.test(runtime),
20
- "buildchain-ref must be an exact commit SHA",
21
- );
22
- requireValue(
23
- runtime === (workflowSha || "").toLowerCase(),
24
- "buildchain-ref must equal the exact workflow source SHA",
25
- );
26
15
  return {
27
16
  runId,
28
17
  tag,
29
- runtime,
30
- targetRef: `${match[3] ? "alpha" : "release"}/v${match[1]}/v${match[1]}.${match[2]}`,
18
+ targetRef: `${match[3] ? "alpha" : "release"}/v${match[1]}/v${match[1]}.${match[2]}`,
31
19
  };
32
20
  }
33
21
 
@@ -35,16 +23,12 @@ export async function resolveBinaryPublicationCoordinates({
35
23
  repository,
36
24
  runId,
37
25
  tag,
38
- runtime,
39
- workflowSha,
40
26
  github,
41
27
  }) {
42
28
  const selected = validateBinaryPublicationSelection({
43
29
  runId,
44
30
  tag,
45
- runtime,
46
- workflowSha,
47
- });
31
+ });
48
32
  const [owner, repo] = repository.split("/");
49
33
  const first = await github.rest.repos.getCommit({
50
34
  owner,
@@ -66,7 +50,6 @@ export async function resolveBinaryPublicationCoordinates({
66
50
  );
67
51
  await github.rest.repos.getReleaseByTag({ owner, repo, tag: selected.tag });
68
52
  return {
69
- "buildchain-ref": selected.runtime,
70
53
  "evidence-run-id": selected.runId,
71
54
  "release-tag": selected.tag,
72
55
  "source-sha": first.data.sha,
@@ -1,62 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from "node:fs";
3
- import path from "node:path";
4
- import { fileURLToPath } from "node:url";
3
+ import { parseArgs } from "node:util";
5
4
  import { resolvePromotionChannel } from "../promotion/channel.js";
6
- function parseArgs(argv) {
7
- const values = {};
8
- for (let index = 0; index < argv.length; index += 1) {
9
- const token = argv[index];
10
- if (!token.startsWith("--")) throw new Error(`unexpected argument: ${token}`);
11
- const value = argv[index + 1];
12
- if (value === undefined || value.startsWith("--")) throw new Error(`missing value for ${token}`);
13
- values[token.slice(2)] = value;
14
- index += 1;
15
- }
16
- return values;
17
- }
18
-
19
- function readPackageVersion(cwd) {
20
- return JSON.parse(fs.readFileSync(path.join(cwd, "package.json"), "utf8")).version;
21
- }
22
5
 
23
- function writeOutputs(file, result) {
24
- const outputs = {
25
- "target-ref": result.targetRef, "publication-channel": result.publicationChannel,
26
- "router-ref": result.routerRef, "router-sha": result.routerSha,
27
- channel: result.channel,
28
- major: String(result.major),
29
- "shell-ref": result.shellRef,
30
- "runtime-ref": result.runtimeRef,
31
- "override-used": String(result.overrideUsed),
32
- "selection-source": result.selectionSource,
33
- reason: result.reason,
34
- };
35
- fs.appendFileSync(file, Object.entries(outputs).map(([key, value]) => `${key}=${value}\n`).join(""));
36
- }
37
-
38
- function main() {
39
- const args = parseArgs(process.argv.slice(2));
40
- const cwd = path.resolve(args.cwd || process.cwd());
41
- const result = resolvePromotionChannel({
42
- requestedChannel: args.channel,
43
- requestedRef: args["buildchain-ref"],
44
- publicationChannel: args["publication-channel"],
45
- targetRef: args["target-ref"],
46
- routerRef: args["router-ref"],
47
- routerSha: args["router-sha"],
48
- packageVersion: readPackageVersion(cwd),
49
- });
50
- if (process.env.GITHUB_OUTPUT) writeOutputs(process.env.GITHUB_OUTPUT, result);
6
+ try {
7
+ const { values } = parseArgs({ options: {
8
+ "target-ref": { type: "string" },
9
+ "publication-channel": { type: "string" },
10
+ }});
11
+ const result = resolvePromotionChannel({ targetRef: values["target-ref"], publicationChannel: values["publication-channel"] });
12
+ if (process.env.GITHUB_OUTPUT) fs.appendFileSync(process.env.GITHUB_OUTPUT,
13
+ Object.entries({ "target-ref": result.targetRef, "publication-channel": result.publicationChannel, channel: result.channel }).map(([k,v]) => `${k}=${v}\n`).join(""));
51
14
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
52
- }
53
-
54
- const isMain = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
55
- if (isMain) {
56
- try {
57
- main();
58
- } catch (error) {
59
- console.error(`promotion-channel-router: ${error.message}`);
60
- process.exitCode = 1;
61
- }
15
+ } catch (error) {
16
+ console.error(`promotion-channel-router: ${error.message}`);
17
+ process.exitCode = 1;
62
18
  }
@@ -16,7 +16,7 @@ export async function resumeFromCandidateRunCli() {
16
16
  try {
17
17
  const result = await resumeFromCandidateRun({
18
18
  token: env("GITHUB_TOKEN"), apiUrl: env("GITHUB_API_URL", "https://api.github.com"), recoveryRunId: env("GITHUB_RUN_ID"), recoveryRunAttempt: env("GITHUB_RUN_ATTEMPT", "1"),
19
- authorizationPath: path.resolve(".buildchain/release-candidate/runtime-authorization.json"), authorizationJson: env("BUILDCHAIN_RUNTIME_AUTHORIZATION_JSON"), authorizationRoot: env("BUILDCHAIN_RUNTIME_AUTHORIZATION_ROOT"),
19
+
20
20
  repository: requiredEnv("BUILDCHAIN_RESUME_CANDIDATE_REPOSITORY"),
21
21
  targetRepository: env("GITHUB_REPOSITORY"),
22
22
  candidateRunId: requiredEnv("BUILDCHAIN_RESUME_CANDIDATE_RUN_ID"),
@@ -27,7 +27,6 @@ export async function resumeFromCandidateRunCli() {
27
27
  targetSha: requiredEnv("BUILDCHAIN_RESUME_TARGET_SHA"),
28
28
  expectedSourceTree: env("BUILDCHAIN_RESUME_EXPECTED_SOURCE_TREE"),
29
29
  expectedCandidateRoot: env("BUILDCHAIN_RESUME_EXPECTED_CANDIDATE_ROOT"),
30
- candidateRuntimeSha: requiredEnv("BUILDCHAIN_RESUME_EXPECTED_CANDIDATE_RUNTIME_SHA"),
31
30
  runtimeSha: requiredEnv("BUILDCHAIN_RESUME_RUNTIME_SHA"),
32
31
  transactionId: env("BUILDCHAIN_RESUME_TRANSACTION_ID"), rematerializeOnResume: env("BUILDCHAIN_PUBLISH_REMATERIALIZE_ON_RESUME") === "true",
33
32
  artifactName: env("BUILDCHAIN_ARTIFACT_NAME"),
@@ -61,7 +60,7 @@ export async function resumeFromCandidateRunCli() {
61
60
  "release-candidate-stage-capsules-path": result.paths.stageCapsules,
62
61
  "release-candidate-publication-qualification-path": result.paths.publicationQualification,
63
62
  "v4-runtime-resume-evidence-path": result.paths.runtimeResumeEvidence,
64
- "v4-runtime-resume-finalize-command": result.paths.runtimeResumeEvidence ? "node .buildchain/runtime/promotion-shell/packages/core/release/commands/resume-from-candidate-run.mjs finalize" : "",
63
+ "v4-runtime-resume-finalize-command": result.paths.runtimeResumeEvidence ? "node .buildchain/runtime/packages/core/release/commands/resume-from-candidate-run.mjs finalize" : "",
65
64
  "release-candidate-root": result.candidateRoot,
66
65
  "release-candidate-artifact-root": result.artifactRoot,
67
66
  "publish-sealed-bundle-root": result.paths.sealedBundleRoot,
@@ -211,11 +211,6 @@ export function reconcileActiveReleaseTrain({
211
211
  "alpha-base-drift",
212
212
  "the Alpha base moved after the Release Cut and requires explicit supersession or repair",
213
213
  ],
214
- [
215
- buildchainRuntimeSha !== cut.buildchainRuntimeSha,
216
- "runtime-drift",
217
- "the Buildchain runtime moved after the Release Cut and requires explicit supersession or repair",
218
- ],
219
214
  ];
220
215
  const failure = checks.find(([failed]) => failed);
221
216
  if (failure) {
@@ -1,7 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { installationRoot } from "../../runtime/installation-root.js";
4
- import { verifyCheckoutIdentity } from "../../runtime/checkout-identity.js";
5
4
  import { createGitHubCliApi } from "../../providers/github-cli-api.js";
6
5
  import { pullRequestProvider } from "../../providers/github/pull-requests.js";
7
6
  import { normalizeLineBootstrapRequest } from "./request.js";
@@ -13,18 +12,8 @@ export async function lineBootstrapAction(core, env) {
13
12
  ),
14
13
  sourceRoot = path.resolve(env.GITHUB_WORKSPACE),
15
14
  runtimeRoot = installationRoot(import.meta.url);
16
- if (
17
- fs.realpathSync(runtimeRoot) !==
18
- fs.realpathSync(path.join(sourceRoot, ".buildchain/workflow-shell"))
19
- )
20
- throw new Error(
21
- "Release line action requires its defining workflow implementation",
22
- );
23
- verifyCheckoutIdentity({
24
- directory: runtimeRoot,
25
- sha: core.getInput("workflow-sha", { required: true }),
26
- label: "Release line workflow",
27
- });
15
+
16
+
28
17
  const token = core.getInput("token", { required: request.apply }),
29
18
  repository = env.GITHUB_REPOSITORY;
30
19
  const providers = request.apply