@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
@@ -8,7 +8,7 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-09
11
+ last_reviewed: 2026-09-11
12
12
  ai_provenance:
13
13
  model_family: GPT-6
14
14
  product: Codex
@@ -185,11 +185,9 @@ floating ref, such as:
185
185
  ```yaml
186
186
  jobs:
187
187
  web:
188
- uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v3
188
+ uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v4
189
189
  with:
190
- buildchain-contract-lock-path: .buildchain/contract-lock.json
191
- buildchain-contract-compatibility-policy: major-compatible
192
- buildchain-contract-drift-issue-mode: compatible-and-breaking
190
+ contract-lock: .buildchain/contract-lock.json
193
191
  build-command: pnpm build
194
192
  artifact-path: dist
195
193
  ```
@@ -747,7 +745,7 @@ the standard PR review and promotion flow without copying bespoke glue:
747
745
  ```yaml
748
746
  jobs:
749
747
  web-surface:
750
- uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v3
748
+ uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v4
751
749
  with:
752
750
  build-command: npm run build
753
751
  verify-command: npm run check
@@ -760,40 +758,38 @@ The reusable workflow maps GitHub events to Buildchain web-surface semantics:
760
758
  | --- | --- |
761
759
  | `pull_request` opened / synchronized / reopened | validate, build, verify, and plan `preview` for `pr-N` |
762
760
  | `pull_request` closed | plan apply-mode cleanup for the `pr-N` preview alias and manifest |
763
- | `pull_request` closed for a matching release PR | verify the release intent and exact workflow-shell runtime, then wait for the protected `main` push; do not plan or apply production from `refs/pull/*/merge` |
761
+ | `pull_request` closed for a matching release PR | verify the release intent, then wait for the protected `main` push; do not plan or apply production from `refs/pull/*/merge` |
764
762
  | `push` to `main` | validate, build, verify, plan and apply `staging` from the merged `main` SHA, then optionally open a production release PR |
765
763
  | `push` to `main` from a matching release PR merge | validate the associated release PR, plan `production`, and enter the configured GitHub Environment gate from the protected mainline ref |
766
764
  | `workflow_dispatch` with `production-approved = true` | plan `production` and enter the configured GitHub Environment gate |
767
765
 
768
- The optional `buildchain-ref` input is empty by default. Empty keeps the
769
- web-surface run on the stable Buildchain runtime selected by the reusable
770
- workflow ref, normally `@v3`. A trusted maintainer can expose a
771
- `workflow_dispatch` input and pass it through for one-off train validation.
772
- See [`runtime-train-validation.md`](runtime-train-validation.md) for the shared
773
- train protocol and notification template:
766
+ The optional `runtime-ref` parameter selects a transient execution runtime.
767
+ An empty value uses the selected consumer contract lock or entry default.
768
+ All preparation goes through the shared [Runtime entry](runtime-entry.md).
769
+ A maintainer can expose a manual input for train validation or repair:
774
770
 
775
771
  ```yaml
776
772
  on:
777
773
  workflow_dispatch:
778
774
  inputs:
779
- buildchain-ref:
775
+ runtime-ref:
780
776
  description: "Temporary Buildchain runtime ref for trusted manual validation"
781
777
  required: false
782
778
  default: ""
783
779
 
784
780
  jobs:
785
781
  web-surface:
786
- uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v3
782
+ uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v4
787
783
  with:
788
- buildchain-ref: ${{ inputs.buildchain-ref || '' }}
784
+ runtime-ref: ${{ inputs.runtime-ref || '' }}
789
785
  build-command: pnpm run build
790
786
  verify-command: pnpm run check
791
787
  artifact-path: dist
792
788
  ```
793
789
 
794
- Only trusted `workflow_dispatch` runs by repository actors with write,
790
+ Only repository actors with write,
795
791
  maintain, or admin permission may use a non-empty runtime override. Train refs
796
- such as `train/v3/v3.0/site-source-of-truth` are temporary validation refs, not
792
+ such as `train/v4/v4.1/site-source-of-truth` are temporary validation refs, not
797
793
  stable production dependencies or pending merge targets. They may remain for a
798
794
  retention window after release as a fast-use and rollback channel, with old
799
795
  trains handled by periodic Buildchain cleanup. The web-surface deployment
@@ -811,7 +807,7 @@ permissions:
811
807
 
812
808
  jobs:
813
809
  web-surface:
814
- uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v3
810
+ uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v4
815
811
  with:
816
812
  build-command: pnpm run build
817
813
  verify-command: pnpm run check
@@ -905,7 +901,7 @@ For release-PR publishing, callers opt in explicitly:
905
901
  ```yaml
906
902
  jobs:
907
903
  web-surface:
908
- uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v3
904
+ uses: kungfu-systems/buildchain/.github/workflows/public-release-web.yml@v4
909
905
  with:
910
906
  build-command: npm run build
911
907
  verify-command: npm run check
@@ -38,7 +38,6 @@ Register ownership before adding a workflow. `pnpm run check:workflows` validate
38
38
  | [public-build-publication.yml](../.github/workflows/public-build-publication.yml) | build | reusable | active | Buildchain Publication Artifact |
39
39
  | [public-build-stage-capsule-canary.yml](../.github/workflows/public-build-stage-capsule-canary.yml) | build | reusable | active | V4 Stage Capsule Canary |
40
40
  | [public-ops-alpha-candidate-patrol.yml](../.github/workflows/public-ops-alpha-candidate-patrol.yml) | ops | reusable | active | Buildchain Dev to Alpha Candidate Patrol |
41
- | [public-ops-bootstrap-recovery.yml](../.github/workflows/public-ops-bootstrap-recovery.yml) | ops | reusable | active | Universal Buildchain Bootstrap Recovery |
42
41
  | [public-ops-bootstrap.yml](../.github/workflows/public-ops-bootstrap.yml) | ops | reusable | active | Buildchain Universal Bootstrap |
43
42
  | [public-ops-dev-auto-merge.yml](../.github/workflows/public-ops-dev-auto-merge.yml) | ops | reusable | active | Dev PR Auto Merge |
44
43
  | [public-ops-dev-qualification-patrol.yml](../.github/workflows/public-ops-dev-qualification-patrol.yml) | ops | reusable | active | Buildchain Dev Qualification Patrol |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "4.1.0-alpha.0",
3
+ "version": "4.1.0-alpha.2",
4
4
  "private": false,
5
5
  "description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
6
6
  "repository": "https://github.com/kungfu-systems/buildchain",
@@ -116,7 +116,7 @@
116
116
  "./package.json": "./package.json",
117
117
  "./oci-publication": "./packages/core/publication/oci-publication-bundle.js",
118
118
  "./floating-consumer-policy": "./packages/core/consumer/floating-consumer-policy.js",
119
- "./runtime-ref-resume-authority": "./packages/core/consumer/runtime-ref-resume-authority.js",
119
+ "./runtime-resume-lineage": "./packages/core/release/recovery/lineage.js",
120
120
  "./tail-reseal": "./packages/core/release/tail-reseal.js",
121
121
  "./tail-reseal-receipt": "./packages/core/release/tail-reseal-receipt.js",
122
122
  "./publication-rehearsal": "./packages/core/publication/publication-rehearsal.js",
@@ -155,10 +155,10 @@
155
155
  "scripts": {
156
156
  "precheck:static": "prettier --check architecture/decisions/0003-two-phase-delivery-warrant.md architecture/delivery-authority-parity.json contracts/dev-delivery-authority-v2.schema.json dist/site/schemas/dev-delivery-authority-v2.schema.json docs/dev-delivery-qualification-landing-adr.md packages/core/dev-delivery/dev-delivery-authority-candidate.js packages/core/dev-delivery/dev-delivery-authority-evidence.js packages/core/dev-delivery/dev-delivery-authority-landing.js packages/core/dev-delivery/dev-delivery-authority-observation.js packages/core/dev-delivery/dev-delivery-authority-qualification.js packages/core/dev-delivery/dev-delivery-authority-settlement.js packages/core/dev-delivery/dev-delivery-authority-state.js packages/core/dev-delivery/dev-delivery-execution-failure.js packages/core/dev-delivery/dev-delivery-execution-transfer.js packages/core/dev-delivery/dev-delivery-landing-readback.js packages/core/dev-delivery/dev-delivery-landing-terminal-evidence.js packages/core/dev-delivery/dev-delivery-landing-testing-port.js packages/core/dev-delivery/dev-delivery-native-execution.js packages/core/dev-delivery/dev-delivery-native-proof.js packages/core/dev-delivery/dev-delivery-process-boundary.js packages/core/dev-delivery/dev-delivery-warrant-qualification.js packages/core/dev-delivery/dev-delivery-warrant-state.js packages/core/dev-delivery/commands/dev-delivery-authority-command-adapters.mjs packages/core/dev-delivery/commands/dev-delivery-authority-provider.mjs packages/core/dev-delivery/commands/dev-delivery-authority.mjs packages/core/dev-delivery/native/execution.js packages/core/dev-delivery/commands/dev-delivery-process-boundary.mjs packages/core/dev-delivery/native/transactions.js packages/core/dev-delivery/commands/dev-delivery-two-phase.mjs packages/core/dev-delivery/commands/dev-delivery-warrant-options.mjs packages/core/dev-delivery/warrant/persistence.js templates/native-dev-delivery.yml",
157
157
  "operator:windows-jit": "bash packages/core/providers/commands/aws-windows-jit-operator.sh",
158
- "check": "pnpm run check:layout && pnpm run check:implementation-naming && pnpm run check:static && node scripts/check-ci-lane-change-budget.mjs && node scripts/check-public-dogfood-contract.mjs && node scripts/check-floating-consumer-policy-contract.mjs && node scripts/check-release-topology.mjs && node scripts/check-universal-workflow-bootstrap.mjs && pnpm run check:bridge && pnpm run check:contracts:rust && pnpm run check:wasm && node scripts/check-maintainability.mjs && node scripts/check-internal-architecture.mjs && node scripts/generate-agent-change-map.mjs && node scripts/check-inventory.mjs && node scripts/check-core-mechanism-inventory.mjs && node scripts/check-runtime-semantic-closure.mjs && node scripts/check-capability-parity-inventory.mjs && node scripts/check-release-tail-contract.mjs && node scripts/publication-rehearsal-fixture.mjs --check && node packages/core/governance/commands/architecture.mjs validate && node scripts/warrant-shadow-plan.mjs validate && pnpm run check:site && pnpm run check:workflows && pnpm run test:unit && pnpm run check:golden-path && node scripts/check-action-bundles.mjs",
159
- "check:static": "node scripts/check-javascript-syntax.mjs && node scripts/check-source-bindings.mjs && prettier --check architecture/*.json contracts/release-tail-provider-bindings-v1.schema.json contracts/v4-canonical-contracts-v1.schema.json contracts/v4-compatibility-facts-v1.schema.json contracts/v4-delivery-warrant-semantic-diff-report-v1.schema.json contracts/v4-delivery-warrant-trace-v1.schema.json contracts/v4-floating-consumer-policy-receipt-v1.schema.json contracts/v4-runtime-ref-resume-authority-v1.schema.json contracts/v4-tail-reseal-v1.schema.json contracts/v4-host-contract-v1.schema.json contracts/v4-provider-operation-journal-v1.schema.json contracts/v4-release-activation-shadow-v1.schema.json contracts/v4-stable-publication-fence-v1.schema.json contracts/v4-partial-mutation-recovery-v1.schema.json contracts/v4-stage-capsule-v1.schema.json contracts/v4-stage-capsule-store-v1.schema.json contracts/v4-stage-capsule-resume-v1.schema.json contracts/release-tail-capabilities-v1.schema.json contracts/fixtures/release-tail-capabilities-v1/*.json contracts/fixtures/v4-delivery-warrant-trace-v1/*.json contracts/fixtures/v4-floating-consumer-policy-v1/*.json contracts/fixtures/v4-runtime-ref-resume-authority-v1/*.json contracts/fixtures/v4-tail-reseal-v1/*.json contracts/fixtures/v4-compatibility-facts-v1/*.json contracts/fixtures/v4-provider-operation-journal-v1/*.json contracts/fixtures/v4-provider-readback-idempotency-v1/*.json contracts/fixtures/v4-release-activation-shadow-v1/*.json contracts/fixtures/v4-stable-publication-fence-v1/*.json contracts/fixtures/v4-partial-mutation-recovery-v1/*.json contracts/fixtures/v4-stage-capsule-v1/*.json contracts/fixtures/v4-stage-capsule-store-v1/*.json contracts/fixtures/v4-stage-capsule-resume-v1/*.json packages/core/contracts/command-registry.mjs packages/core/governance/cli/compatibility-facts.mjs packages/core/contracts/canonical-contracts.js packages/core/contracts/kungfu-temporal-fact.js packages/core/governance/buildchain-compatibility-fact.js packages/core/governance/buildchain-compatibility-authority.js packages/core/governance/buildchain-compatibility-proof.js packages/core/consumer/floating-consumer-evidence.js packages/core/consumer/floating-consumer-policy.js packages/core/consumer/floating-consumer-release-passport.js packages/core/consumer/runtime-ref-resume-authority.js packages/core/release/tail-reseal-contract.js packages/core/release/tail-reseal-github.js packages/core/release/tail-reseal-receipt.js packages/core/release/tail-reseal.js packages/core/consumer/runtime-selector-persistence.js packages/core/release/provider-operation-journal.js packages/core/release/provider-readback-idempotency.js packages/core/release/release-activation-shadow.js packages/core/release/stable-publication-fence.js packages/core/release/partial-mutation-recovery-qualification.js packages/core/build/stage-capsule.js packages/core/build/stage-capsule-store.js packages/core/build/stage-capsule-local-store.js packages/core/build/platform-stage-checkpoints.js packages/core/build/stage-capsule-resume-planner.js packages/core/build/stage-capsule-qualification.js packages/core/build/stage-capsule-qualification-campaign.js packages/core/dev-delivery/delivery-warrant-fixture-runner.js packages/core/dev-delivery/delivery-warrant-read-candidate.js packages/core/dev-delivery/delivery-warrant-semantic-diff-gate.js packages/core/dev-delivery/delivery-warrant-shadow-adapter.js packages/core/release/runtime-override-authorization.js scripts/check-core-mechanism-inventory.mjs scripts/check-runtime-semantic-closure.mjs scripts/check-release-tail-contract.mjs scripts/check-javascript-syntax.mjs scripts/check-maintainability.mjs packages/core/dev-delivery/commands/dev-pr-prequeue-guard.mjs scripts/check-public-dogfood-contract.mjs scripts/maintainability-metrics.mjs scripts/maintainability-domain-metrics.mjs scripts/maintainability-governance.mjs scripts/generate-agent-change-map.mjs scripts/public-reference.mjs scripts/site-reference-registry.mjs scripts/generate-public-reference.mjs packages/core/governance/commands/architecture.mjs packages/core/runtime/commands/bridge-bootstrap.mjs scripts/bridge-evidence.mjs packages/core/consumer/commands/consumer-policy.mjs packages/core/runtime/commands/host-adapter.mjs scripts/platform-stage-checkpoint-rehearsal.mjs scripts/stage-capsule-resume-rehearsal.mjs packages/core/build/commands/stage-capsule-qualification.mjs scripts/tail-reseal-macos-rehearsal.mjs packages/core/release/commands/tail-reseal.mjs scripts/warrant-shadow-plan.mjs scripts/verify-golden-path.mjs tests/authorize-promotion-runtime-override.test.mjs tests/command-registry.test.mjs tests/core-mechanism-inventory.test.mjs tests/release-tail-contract.test.mjs tests/maintainability.test.mjs tests/maintainability-governance.test.mjs tests/promotion-responsibilities.test.mjs tests/public-reference.test.mjs tests/architecture.test.mjs tests/bridge.test.mjs tests/canonical-contracts.test.mjs tests/delivery-warrant-fixture-runner.test.mjs tests/delivery-warrant-read-candidate.test.mjs tests/floating-consumer-policy.test.mjs tests/runtime-ref-resume-authority.test.mjs tests/runtime-semantic-closure.test.mjs tests/tail-reseal.test.mjs tests/tail-reseal-parity.test.mjs tests/compatibility-facts.test.mjs tests/platform-stage-checkpoints.test.mjs tests/provider-operation-journal.test.mjs tests/provider-readback-idempotency.test.mjs tests/public-dogfood-contract.test.mjs tests/release-activation-shadow.test.mjs tests/stable-publication-fence.test.mjs tests/partial-mutation-recovery-qualification.test.mjs tests/stage-capsule.test.mjs tests/stage-capsule-store.test.mjs tests/stage-capsule-resume-planner.test.mjs tests/stage-capsule-qualification.test.mjs tests/warrant-shadow-plan.test.mjs",
158
+ "check": "pnpm run check:layout && node scripts/check-runtime-entry.mjs && pnpm run check:implementation-naming && pnpm run check:static && node scripts/check-ci-lane-change-budget.mjs && node scripts/check-public-dogfood-contract.mjs && node scripts/check-floating-consumer-policy-contract.mjs && node scripts/check-release-topology.mjs && node scripts/check-universal-workflow-bootstrap.mjs && pnpm run check:bridge && pnpm run check:contracts:rust && pnpm run check:wasm && node scripts/check-maintainability.mjs && node scripts/check-internal-architecture.mjs && node scripts/generate-agent-change-map.mjs && node scripts/check-inventory.mjs && node scripts/check-core-mechanism-inventory.mjs && node scripts/check-runtime-semantic-closure.mjs && node scripts/check-capability-parity-inventory.mjs && node scripts/check-release-tail-contract.mjs && node scripts/publication-rehearsal-fixture.mjs --check && node packages/core/governance/commands/architecture.mjs validate && node scripts/warrant-shadow-plan.mjs validate && pnpm run check:site && pnpm run check:workflows && pnpm run test:unit && pnpm run check:golden-path && node scripts/check-action-bundles.mjs",
159
+ "check:static": "node scripts/check-javascript-syntax.mjs && node scripts/check-source-bindings.mjs && prettier --check architecture/*.json contracts/release-tail-provider-bindings-v1.schema.json contracts/v4-canonical-contracts-v1.schema.json contracts/v4-compatibility-facts-v1.schema.json contracts/v4-delivery-warrant-semantic-diff-report-v1.schema.json contracts/v4-delivery-warrant-trace-v1.schema.json contracts/v4-floating-consumer-policy-receipt-v1.schema.json contracts/runtime-resume-lineage-v2.schema.json contracts/v4-tail-reseal-v1.schema.json contracts/v4-host-contract-v1.schema.json contracts/v4-provider-operation-journal-v1.schema.json contracts/v4-release-activation-shadow-v1.schema.json contracts/v4-stable-publication-fence-v1.schema.json contracts/v4-partial-mutation-recovery-v1.schema.json contracts/v4-stage-capsule-v1.schema.json contracts/v4-stage-capsule-store-v1.schema.json contracts/v4-stage-capsule-resume-v1.schema.json contracts/release-tail-capabilities-v1.schema.json contracts/fixtures/release-tail-capabilities-v1/*.json contracts/fixtures/v4-delivery-warrant-trace-v1/*.json contracts/fixtures/v4-floating-consumer-policy-v1/*.json contracts/fixtures/runtime-resume-lineage-v2/*.json contracts/fixtures/v4-tail-reseal-v1/*.json contracts/fixtures/v4-compatibility-facts-v1/*.json contracts/fixtures/v4-provider-operation-journal-v1/*.json contracts/fixtures/v4-provider-readback-idempotency-v1/*.json contracts/fixtures/v4-release-activation-shadow-v1/*.json contracts/fixtures/v4-stable-publication-fence-v1/*.json contracts/fixtures/v4-partial-mutation-recovery-v1/*.json contracts/fixtures/v4-stage-capsule-v1/*.json contracts/fixtures/v4-stage-capsule-store-v1/*.json contracts/fixtures/v4-stage-capsule-resume-v1/*.json packages/core/contracts/command-registry.mjs packages/core/governance/cli/compatibility-facts.mjs packages/core/contracts/canonical-contracts.js packages/core/contracts/kungfu-temporal-fact.js packages/core/governance/buildchain-compatibility-fact.js packages/core/governance/buildchain-compatibility-authority.js packages/core/governance/buildchain-compatibility-proof.js packages/core/consumer/floating-consumer-evidence.js packages/core/consumer/floating-consumer-policy.js packages/core/consumer/floating-consumer-release-passport.js packages/core/release/recovery/lineage.js packages/core/release/tail-reseal-contract.js packages/core/release/tail-reseal-github.js packages/core/release/tail-reseal-receipt.js packages/core/release/tail-reseal.js packages/core/consumer/runtime-selector-persistence.js packages/core/release/provider-operation-journal.js packages/core/release/provider-readback-idempotency.js packages/core/release/release-activation-shadow.js packages/core/release/stable-publication-fence.js packages/core/release/partial-mutation-recovery-qualification.js packages/core/build/stage-capsule.js packages/core/build/stage-capsule-store.js packages/core/build/stage-capsule-local-store.js packages/core/build/platform-stage-checkpoints.js packages/core/build/stage-capsule-resume-planner.js packages/core/build/stage-capsule-qualification.js packages/core/build/stage-capsule-qualification-campaign.js packages/core/dev-delivery/delivery-warrant-fixture-runner.js packages/core/dev-delivery/delivery-warrant-read-candidate.js packages/core/dev-delivery/delivery-warrant-semantic-diff-gate.js packages/core/dev-delivery/delivery-warrant-shadow-adapter.js scripts/check-core-mechanism-inventory.mjs scripts/check-runtime-semantic-closure.mjs scripts/check-release-tail-contract.mjs scripts/check-javascript-syntax.mjs scripts/check-maintainability.mjs packages/core/dev-delivery/commands/dev-pr-prequeue-guard.mjs scripts/check-public-dogfood-contract.mjs scripts/maintainability-metrics.mjs scripts/maintainability-domain-metrics.mjs scripts/maintainability-governance.mjs scripts/generate-agent-change-map.mjs scripts/public-reference.mjs scripts/site-reference-registry.mjs scripts/generate-public-reference.mjs packages/core/governance/commands/architecture.mjs packages/core/runtime/commands/bridge-bootstrap.mjs scripts/bridge-evidence.mjs packages/core/consumer/commands/consumer-policy.mjs packages/core/runtime/commands/host-adapter.mjs scripts/platform-stage-checkpoint-rehearsal.mjs scripts/stage-capsule-resume-rehearsal.mjs packages/core/build/commands/stage-capsule-qualification.mjs scripts/tail-reseal-macos-rehearsal.mjs packages/core/release/commands/tail-reseal.mjs scripts/warrant-shadow-plan.mjs scripts/verify-golden-path.mjs tests/runtime-entry-provider.test.mjs tests/command-registry.test.mjs tests/core-mechanism-inventory.test.mjs tests/release-tail-contract.test.mjs tests/maintainability.test.mjs tests/maintainability-governance.test.mjs tests/promotion-responsibilities.test.mjs tests/public-reference.test.mjs tests/architecture.test.mjs tests/bridge.test.mjs tests/canonical-contracts.test.mjs tests/delivery-warrant-fixture-runner.test.mjs tests/delivery-warrant-read-candidate.test.mjs tests/floating-consumer-policy.test.mjs tests/runtime-resume-lineage.test.mjs tests/runtime-semantic-closure.test.mjs tests/tail-reseal.test.mjs tests/tail-reseal-parity.test.mjs tests/compatibility-facts.test.mjs tests/platform-stage-checkpoints.test.mjs tests/provider-operation-journal.test.mjs tests/provider-readback-idempotency.test.mjs tests/public-dogfood-contract.test.mjs tests/release-activation-shadow.test.mjs tests/stable-publication-fence.test.mjs tests/partial-mutation-recovery-qualification.test.mjs tests/stage-capsule.test.mjs tests/stage-capsule-store.test.mjs tests/stage-capsule-resume-planner.test.mjs tests/stage-capsule-qualification.test.mjs tests/warrant-shadow-plan.test.mjs",
160
160
  "check:bridge": "cargo fmt --manifest-path crates/buildchain-host-bridge/Cargo.toml -- --check && cargo clippy --locked --manifest-path crates/buildchain-host-bridge/Cargo.toml -- -D warnings && cargo test --locked --manifest-path crates/buildchain-host-bridge/Cargo.toml",
161
- "check:contracts": "pnpm run check:contracts:rust && node --test tests/canonical-contracts.test.mjs tests/delivery-warrant-fixture-runner.test.mjs tests/delivery-warrant-read-candidate.test.mjs tests/domain-wasm.test.mjs tests/floating-consumer-policy-contract.test.mjs tests/floating-consumer-policy.test.mjs tests/runtime-ref-resume-authority.test.mjs tests/tail-reseal.test.mjs tests/tail-reseal-parity.test.mjs tests/compatibility-facts.test.mjs tests/publication-rehearsal.test.mjs tests/platform-stage-checkpoints.test.mjs tests/provider-operation-journal.test.mjs tests/provider-readback-idempotency.test.mjs tests/public-dogfood-contract.test.mjs tests/release-activation-shadow.test.mjs tests/stable-publication-fence.test.mjs tests/partial-mutation-recovery-qualification.test.mjs tests/stage-capsule.test.mjs tests/stage-capsule-store.test.mjs tests/stage-capsule-resume-planner.test.mjs tests/stage-capsule-qualification.test.mjs",
161
+ "check:contracts": "pnpm run check:contracts:rust && node --test tests/canonical-contracts.test.mjs tests/delivery-warrant-fixture-runner.test.mjs tests/delivery-warrant-read-candidate.test.mjs tests/domain-wasm.test.mjs tests/floating-consumer-policy-contract.test.mjs tests/floating-consumer-policy.test.mjs tests/runtime-resume-lineage.test.mjs tests/tail-reseal.test.mjs tests/tail-reseal-parity.test.mjs tests/compatibility-facts.test.mjs tests/publication-rehearsal.test.mjs tests/platform-stage-checkpoints.test.mjs tests/provider-operation-journal.test.mjs tests/provider-readback-idempotency.test.mjs tests/public-dogfood-contract.test.mjs tests/release-activation-shadow.test.mjs tests/stable-publication-fence.test.mjs tests/partial-mutation-recovery-qualification.test.mjs tests/stage-capsule.test.mjs tests/stage-capsule-store.test.mjs tests/stage-capsule-resume-planner.test.mjs tests/stage-capsule-qualification.test.mjs",
162
162
  "build:wasm": "node scripts/build-domain-wasm.mjs",
163
163
  "check:wasm": "prettier --check packages/core/runtime/domain-wasm.js packages/core/runtime/domain-wasm-artifact.js scripts/build-domain-wasm.mjs scripts/tsup-action.config.mjs packages/core/contracts/action-inventory.js tests/domain-wasm.test.mjs && node scripts/build-domain-wasm.mjs --check",
164
164
  "check:workflows": "node scripts/check-workflow-taxonomy.mjs && bash scripts/check-workflows.sh",
@@ -178,7 +178,7 @@
178
178
  "bridge:run": "node packages/core/runtime/commands/bridge-bootstrap.mjs run",
179
179
  "bridge:evidence": "node scripts/bridge-evidence.mjs",
180
180
  "check:contracts:rust": "cargo fmt --manifest-path crates/buildchain-domain-contracts/Cargo.toml -- --check && cargo clippy --locked --manifest-path crates/buildchain-domain-contracts/Cargo.toml -- -D warnings && cargo test --locked --manifest-path crates/buildchain-domain-contracts/Cargo.toml",
181
- "generate:workflows": "node scripts/generate-workflow-taxonomy.mjs && node scripts/generate-bootstrap-recovery.mjs && node scripts/generate-bootstrap-admission.mjs",
181
+ "generate:workflows": "node scripts/generate-workflow-taxonomy.mjs && node scripts/generate-bootstrap-admission.mjs",
182
182
  "check:implementation-naming": "node scripts/check-implementation-naming.mjs",
183
183
  "check:layout": "node scripts/check-code-layout.mjs"
184
184
  },
@@ -339,7 +339,7 @@ name: Build
339
339
  on:
340
340
  workflow_dispatch:
341
341
  inputs:
342
- buildchain-ref:
342
+ runtime-ref:
343
343
  description: "Temporary Buildchain runtime ref for trusted manual validation"
344
344
  required: false
345
345
  default: ""
@@ -358,7 +358,7 @@ jobs:
358
358
  publication:
359
359
  uses: kungfu-systems/buildchain/.github/workflows/public-build-publication.yml@v4
360
360
  with:
361
- buildchain-ref: \${{ inputs.buildchain-ref || '' }}
361
+ runtime-ref: \${{ inputs.runtime-ref || '' }}
362
362
  toolchain-type: config
363
363
  verify-command: make check
364
364
  artifact-name: publication-artifact
@@ -43,11 +43,10 @@ function validateSourceBinding(binding) {
43
43
  "source binding",
44
44
  );
45
45
  if (
46
- !SHA.test(binding.runtimeSha || "") ||
47
46
  !SHA.test(binding.consumerSha || "") ||
48
47
  !ROOT.test(binding.inputRoot || "")
49
48
  )
50
- fail("report requires exact runtime, consumer and input roots");
49
+ fail("report requires exact consumer and input roots");
51
50
  }
52
51
 
53
52
  function validateExecutionEvidence(execution) {
@@ -171,25 +170,15 @@ export function qualifyCrossPlatformAdopters({ reports, consumers }) {
171
170
  fail(
172
171
  `platform matrix mismatch; missing=${missing.join(",") || "none"}; unexpected=${unexpected.join(",") || "none"}`,
173
172
  );
174
- const reference = normalized[0].sourceBinding;
175
- for (const report of normalized.slice(1)) {
176
- if (
177
- report.sourceBinding.runtimeSha !== reference.runtimeSha
178
- )
179
- fail("all platform reports must bind the same exact source and matrix");
180
- }
181
173
  for (const consumer of consumers) {
182
174
  const rows = normalized.filter(report => report.consumer === consumer);
183
- if (rows.some(report => !same(report.sourceBinding, rows[0].sourceBinding)))
175
+ if (rows.some(report => report.sourceBinding.consumerSha !== rows[0].sourceBinding.consumerSha || report.sourceBinding.inputRoot !== rows[0].sourceBinding.inputRoot))
184
176
  fail("each consumer must bind the same exact source and input on every platform");
185
177
  }
186
178
  const orderedReports = expectedKeys.map((key) => reportByKey.get(key));
187
179
  const body = {
188
180
  schemaVersion: 1,
189
181
  contract: CROSS_PLATFORM_ADOPTER_QUALIFICATION_CONTRACT,
190
- sourceBinding: {
191
- runtimeSha: reference.runtimeSha,
192
- },
193
182
  consumers: [...consumers],
194
183
  platforms: [...CROSS_PLATFORM_ADOPTER_PLATFORMS],
195
184
  reports: orderedReports.map(({ consumer, platform, reportRoot, sourceBinding }) => ({
@@ -17,7 +17,7 @@ function coordinates(core, env) {
17
17
  return {
18
18
  runtimeRoot: installationRoot(import.meta.url),
19
19
  consumerRoot: path.join(env.GITHUB_WORKSPACE, ".buildchain/consumer"),
20
- runtimeSha: core.getInput("workflow-sha", { required: true }),
20
+ runtimeSha: env.BUILDCHAIN_RUNTIME_SHA,
21
21
  };
22
22
  }
23
23
  export function selectAdopterAction(core, env) {
@@ -25,7 +25,7 @@ export function selectAdopterAction(core, env) {
25
25
  request: request(core),
26
26
  repository: env.GITHUB_REPOSITORY,
27
27
  sourceSha: env.GITHUB_SHA,
28
- runtimeSha: core.getInput("workflow-sha", { required: true }),
28
+ runtimeSha: env.BUILDCHAIN_RUNTIME_SHA,
29
29
  });
30
30
  for (const [key, value] of Object.entries(selected))
31
31
  core.setOutput(key, value);
@@ -46,9 +46,7 @@ export function admitAdopterPolicyAction(core, env) {
46
46
  inputPath: input["input-path"],
47
47
  invocationSourcePath:
48
48
  input["invocation-source-path"] ||
49
- (env.GITHUB_REPOSITORY === "kungfu-systems/buildchain"
50
- ? ".github/workflows/self-build-adopter-dogfood.yml"
51
- : ""),
49
+ env.GITHUB_WORKFLOW_REF?.split("@")[0].slice(env.GITHUB_REPOSITORY.length + 1),
52
50
  });
53
51
  for (const [key, value] of Object.entries(
54
52
  consumerPolicyOutputs(result, output),
@@ -21,8 +21,8 @@ export function selectAdopter({ request, repository, sourceSha, runtimeSha }) {
21
21
  if (!/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(request.consumer || ""))
22
22
  throw new Error("Adopter identity must be stable lowercase");
23
23
  const sha = String(request["consumer-ref"] || sourceSha).toLowerCase();
24
- if (!/^[0-9a-f]{40}$/.test(sha) || !/^[0-9a-f]{40}$/.test(runtimeSha || ""))
25
- throw new Error("Adopter requires exact consumer and runtime commits");
24
+ if (!/^[0-9a-f]{40}$/.test(sha))
25
+ throw new Error("Adopter requires an exact consumer commit");
26
26
  return { repository: request["consumer-repository"] || repository, sha };
27
27
  }
28
28
  export function verifyAdopterCheckouts(
@@ -30,7 +30,6 @@ export function verifyAdopterCheckouts(
30
30
  execute = command,
31
31
  ) {
32
32
  for (const [directory, sha] of [
33
- [runtimeRoot, runtimeSha],
34
33
  [consumerRoot, consumerSha],
35
34
  ]) {
36
35
  if (
@@ -98,7 +98,6 @@ export function createBuildAttestationService({
98
98
  );
99
99
  if (
100
100
  prepared.predicate?.plan_root !== plan.root ||
101
- prepared.predicate?.runtime?.sha !== plan.identity.sha ||
102
101
  prepared.platform?.id !== plan.build.attestation.platform
103
102
  )
104
103
  throw new Error("Attestation preparation belongs to another build");
@@ -44,7 +44,6 @@ export function verifyExecutionIdentity(result, plan, platform) {
44
44
  root !== rootOf(body) ||
45
45
  result.plan_root !== plan.root ||
46
46
  result.source_sha !== plan.source.sha ||
47
- result.runtime_sha !== plan.identity.sha ||
48
47
  result.platform !== platform.id ||
49
48
  JSON.stringify(result.run) !== JSON.stringify(plan.run)
50
49
  )
@@ -72,7 +71,6 @@ export function verifyManifest(file, root, plan, platform) {
72
71
  manifest.platform?.id !== platform.id ||
73
72
  manifest.git?.sha !== plan.source.sha ||
74
73
  manifest.git?.treeSha !== plan.source.tree_sha ||
75
- manifest.git?.runtimeSha !== plan.identity.sha ||
76
74
  manifest.git?.repository !== plan.run.repository
77
75
  ) {
78
76
  throw new Error(`Artifact manifest identity mismatch: ${platform.id}`);
@@ -142,8 +140,7 @@ export function verifyCredential(manifestFile, payloadRoot, plan, platform) {
142
140
  evidence[0].status !== "accepted" ||
143
141
  evidence[0].source?.repository !== plan.run.repository ||
144
142
  evidence[0].source?.sha !== plan.source.sha ||
145
- evidence[0].source?.treeSha !== plan.source.tree_sha ||
146
- evidence[0].buildchain?.runtimeSha !== plan.identity.sha
143
+ evidence[0].source?.treeSha !== plan.source.tree_sha
147
144
  )
148
145
  throw new Error("Credential evidence identity mismatch");
149
146
  return manifest;
@@ -72,7 +72,7 @@ export function createBuildArtifactStore({
72
72
  ) {
73
73
  const result = await client.downloadArtifact(ref.id, {
74
74
  path: target,
75
- expectedHash: ref.digest.replace(/^sha256:/u, ""),
75
+ expectedHash: `sha256:${ref.digest.replace(/^sha256:/u, "")}`,
76
76
  ...findOptions(repository, runId, token),
77
77
  });
78
78
  if (result.digestMismatch)
@@ -92,10 +92,11 @@ export function createBuildArtifactStore({
92
92
  ...findOptions(repository, runId, token),
93
93
  });
94
94
  const matches = artifacts.filter((item) => item.name === name);
95
- if (matches.length !== 1)
96
- throw new Error(
97
- `Expected one same-run artifact ${name}; found ${matches.length}`,
98
- );
95
+ if (matches.length !== 1) {
96
+ const error = new Error(`Expected one artifact ${name}; found ${matches.length}`);
97
+ error.code = matches.length === 0 ? "artifact-not-found" : "artifact-ambiguous";
98
+ throw error;
99
+ }
99
100
  const found = matches[0];
100
101
  if (!found.digest)
101
102
  throw new Error(`Artifact provider omitted digest: ${name}`);
@@ -268,7 +268,7 @@ export function createArtifactSigningRequest({
268
268
  runtime.repository || "kungfu-systems/buildchain",
269
269
  "runtime repository",
270
270
  ),
271
- sha: exactSourceSha(runtime.sha, "runtime SHA"),
271
+ sha: runtime.sha,
272
272
  },
273
273
  artifact: {
274
274
  id: nonEmptyString(artifact.id || artifact.path, "artifact id"),
@@ -398,10 +398,7 @@ export function createArtifactSigningReceipt({
398
398
  authority: {
399
399
  contract: ARTIFACT_SIGNING_AUTHORITY_CONTRACT,
400
400
  id: nonEmptyString(authority.id || request.authority.id, "authority id"),
401
- runtimeSha: exactSourceSha(
402
- authority.runtimeSha || request.runtime.sha,
403
- "authority runtime SHA",
404
- ),
401
+ runtimeSha: authority.runtimeSha || request.runtime.sha,
405
402
  },
406
403
  signature: { ...request.signature },
407
404
  ...(status === "passed"
@@ -443,17 +440,14 @@ export function validateArtifactSigningReceipt(receipt, { request } = {}) {
443
440
  }
444
441
  if (receipt.digest !== documentDigest(receipt))
445
442
  issues.push("receipt digest mismatch");
443
+
446
444
  if (request) {
447
445
  const requestCheck = validateArtifactSigningRequest(request);
448
446
  if (!requestCheck.ok) issues.push(...requestCheck.issues);
449
447
  if (receipt.requestDigest !== request.digest)
450
448
  issues.push("receipt request digest mismatch");
451
- if (stableJson(receipt.signature) !== stableJson(request.signature)) {
449
+ if (stableJson(receipt.signature) !== stableJson(request.signature))
452
450
  issues.push("receipt signature policy mismatch");
453
- }
454
- if (receipt.authority?.runtimeSha !== request.runtime.sha) {
455
- issues.push("receipt authority runtime mismatch");
456
- }
457
451
  }
458
452
  if (receipt.status === "passed") {
459
453
  exactDigest(receipt.result?.artifactDigest, "result artifact digest");
@@ -1,5 +1,3 @@
1
- import path from "node:path";
2
- import { installationRoot } from "../../runtime/installation-root.js";
3
1
  import { command } from "../../runtime/action-process.mjs";
4
2
  import { releaseAssetClient } from "../../providers/github/release-assets.js";
5
3
  import {
@@ -10,14 +8,14 @@ import {
10
8
  function sourceWorkspace(env) {
11
9
  const workspace = env.GITHUB_WORKSPACE;
12
10
  if (
13
- path.resolve(installationRoot(import.meta.url)) !==
14
- path.resolve(workspace) ||
15
11
  command("git", ["rev-parse", "HEAD"], {
16
12
  cwd: workspace,
17
13
  stdio: "pipe",
18
14
  }).trim() !== env.GITHUB_SHA
19
15
  )
20
- throw new Error("Binary distribution requires exact source-owned code");
16
+ throw new Error(
17
+ "Binary distribution requires the exact checked-out source",
18
+ );
21
19
  return workspace;
22
20
  }
23
21
  export function admitBinaryDistributionAction(core, env) {
@@ -31,7 +29,11 @@ export function admitBinaryDistributionAction(core, env) {
31
29
  sourceSha: env.GITHUB_SHA,
32
30
  });
33
31
  }
34
- export async function buildBinaryDistributionAction(core, env) {
32
+ export async function buildBinaryDistributionAction(
33
+ core,
34
+ env,
35
+ { build = buildBinaryDistribution } = {},
36
+ ) {
35
37
  const workspace = sourceWorkspace(env),
36
38
  matrix = JSON.parse(core.getInput("matrix-json", { required: true }));
37
39
  const nodePath = command("node", ["-p", "process.execPath"], {
@@ -42,7 +44,7 @@ export async function buildBinaryDistributionAction(core, env) {
42
44
  cwd: workspace,
43
45
  stdio: "pipe",
44
46
  }).trim();
45
- return buildBinaryDistribution({
47
+ return build({
46
48
  workspace,
47
49
  tag: core.getInput("tag", { required: true }),
48
50
  platform: matrix.platform,
@@ -52,9 +54,13 @@ export async function buildBinaryDistributionAction(core, env) {
52
54
  logPath: env.BUILDCHAIN_LOG_PATH,
53
55
  });
54
56
  }
55
- export async function qualifyBinaryDistributionAction(core, env) {
57
+ export async function qualifyBinaryDistributionAction(
58
+ core,
59
+ env,
60
+ { qualify = qualifyBinaryDistribution } = {},
61
+ ) {
56
62
  const workspace = sourceWorkspace(env);
57
- return qualifyBinaryDistribution({
63
+ return qualify({
58
64
  workspace,
59
65
  tag: core.getInput("tag", { required: true }),
60
66
  repository: env.GITHUB_REPOSITORY,
@@ -8,10 +8,6 @@ export function dispatchBinaryPublication(
8
8
  /^[\w.-]+\/[\w.-]+$/u.test(repository || ""),
9
9
  "Binary publication requires an exact repository",
10
10
  );
11
- requireValue(
12
- /^[0-9a-f]{40}$/u.test(sha || ""),
13
- "Binary publication requires an exact runtime SHA",
14
- );
15
11
  requireValue(
16
12
  /^\d+$/u.test(runId || ""),
17
13
  "Binary publication requires an exact evidence run",
@@ -29,7 +25,7 @@ export function dispatchBinaryPublication(
29
25
  "--ref",
30
26
  tag,
31
27
  "-f",
32
- `buildchain-ref=${sha}`,
28
+ `runtime-ref=${sha}`,
33
29
  "-f",
34
30
  `evidence-run-id=${runId}`,
35
31
  "-f",
@@ -43,7 +39,7 @@ export function binaryPublicationDispatchAction(_core, env) {
43
39
  dispatchBinaryPublication({
44
40
  repository: env.GITHUB_REPOSITORY,
45
41
  tag: env.RELEASE_TAG,
46
- sha: env.GITHUB_SHA,
42
+ sha: env.BUILDCHAIN_RUNTIME_SHA,
47
43
  runId: env.GITHUB_RUN_ID,
48
44
  });
49
45
  }
@@ -1,19 +1,10 @@
1
1
  import path from "node:path";
2
- import { command } from "../../runtime/action-process.mjs";
3
2
  import { installationRoot } from "../../runtime/installation-root.js";
4
3
  export function demoActionContext(core, env) {
5
4
  const runtimeRoot = installationRoot(import.meta.url);
6
5
  const workspace = path.resolve(env.GITHUB_WORKSPACE);
7
- const sha = core.getInput("runtime-sha", { required: true });
8
- if (
9
- !/^[a-f0-9]{40}$/u.test(sha) ||
10
- command("git", ["-C", runtimeRoot, "rev-parse", "HEAD"], {
11
- stdio: "pipe",
12
- }).trim() !== sha
13
- )
14
- throw new Error(
15
- "Demo runtime differs from the exact workflow implementation",
16
- );
6
+ const sha = env.BUILDCHAIN_RUNTIME_SHA;
7
+
17
8
  return {
18
9
  workspace,
19
10
  runtimeRoot,
@@ -1,24 +1,22 @@
1
- import fs from "node:fs";
2
1
  import path from "node:path";
3
- import { installationRoot } from "../../runtime/installation-root.js";
4
2
  import { sourceSha } from "../standalone/identity.js";
5
3
  import { buildStandaloneBinary } from "../standalone/build.js";
6
4
  import { runTransportSmoke } from "./transport-smoke.js";
7
- export function prepareDemoBinaryAction(core, env) {
5
+ export function prepareDemoBinaryAction(
6
+ core,
7
+ env,
8
+ { build = buildStandaloneBinary, smoke = runTransportSmoke } = {},
9
+ ) {
8
10
  const workspace = path.resolve(env.GITHUB_WORKSPACE);
9
- if (
10
- fs.realpathSync(installationRoot(import.meta.url)) !==
11
- fs.realpathSync(workspace) ||
12
- sourceSha(workspace) !== env.GITHUB_SHA
13
- )
11
+ if (sourceSha(workspace) !== env.GITHUB_SHA)
14
12
  throw new Error(
15
13
  "Demo binary must be built from the exact checked-out source",
16
14
  );
17
- buildStandaloneBinary({
15
+ build({
18
16
  cwd: workspace,
19
17
  outputDir: "dist/auditable-demo-binary",
20
18
  });
21
- runTransportSmoke({
19
+ smoke({
22
20
  artifactRoot: path.join(workspace, "dist/auditable-demo-binary"),
23
21
  scenarioPath: path.join(workspace, ".buildchain/auditable-demo.json"),
24
22
  });
@@ -15,8 +15,6 @@ export function prepareGateProfileController({
15
15
  execFileSync("git", ["-C", directory, "rev-parse", "HEAD"], {
16
16
  encoding: "utf8",
17
17
  }).trim();
18
- if (git(runtimeRoot) !== runtimeSha)
19
- throw new Error("Gate runtime differs from admitted commit");
20
18
  const sourceRoot = path.join(workspace, "source");
21
19
  const sourceSha = git(sourceRoot);
22
20
  const cwd = containedBuildPath(
@@ -1,24 +1,19 @@
1
1
  import path from "node:path";
2
- import { installationRoot } from "../../runtime/installation-root.js";
3
- import { verifyCheckoutIdentity } from "../../runtime/checkout-identity.js";
4
2
  import { validateAttestationInput } from "./admission.js";
5
3
  import { prepareAttestation, sealAttestation } from "./transaction.js";
6
4
  export function admitAttestationAction(core, env) {
7
5
  const input = JSON.parse(core.getInput("request-json", { required: true }));
8
- validateAttestationInput({ runtimeSha: input["buildchain-ref"], definitionSha: core.getInput("definition-sha", { required: true }), evidenceRunId: input["evidence-run-id"], currentRunId: env.GITHUB_RUN_ID,
6
+ validateAttestationInput({ evidenceRunId: input["evidence-run-id"], currentRunId: env.GITHUB_RUN_ID,
9
7
  sourceSha: input["source-sha"], currentSourceSha: env.GITHUB_SHA, subjectRelativePath: input["subject-relative-path"], platformManifestRelativePath: input["platform-manifest-relative-path"], releasePassportRelativePath: input["release-passport-relative-path"] });
10
8
  }
11
9
  const input = (core, name) => core.getInput(name, { required: true });
12
- function runtime(core) { verifyCheckoutIdentity({ directory: installationRoot(import.meta.url), sha: input(core, "runtime-sha"), label: "Attester runtime" }); }
13
10
  export function prepareAttestationAction(core, env) {
14
- runtime(core);
15
11
  const outputs = prepareAttestation({ subjectPath: input(core, "subject-path"), platformManifestPath: input(core, "platform-manifest-path"), releasePassportPath: input(core, "release-passport-path"),
16
- policy: JSON.parse(input(core, "policy-json")), expectedBuildchainRef: input(core, "runtime-sha"), expectedCallerRepository: env.GITHUB_REPOSITORY, expectedSourceSha: env.GITHUB_SHA,
12
+ policy: JSON.parse(input(core, "policy-json")), expectedCallerRepository: env.GITHUB_REPOSITORY, expectedSourceSha: env.GITHUB_SHA,
17
13
  outputDir: path.join(env.GITHUB_WORKSPACE, ".buildchain/github-artifact-attestation") });
18
14
  for (const [key, value] of Object.entries(outputs)) core.setOutput(key, value);
19
15
  }
20
16
  export function sealAttestationAction(core, env) {
21
- runtime(core);
22
17
  const outputs = sealAttestation({ runtimeSha: input(core, "runtime-sha"), sourceSha: env.GITHUB_SHA, outputDir: path.join(env.GITHUB_WORKSPACE, ".buildchain/github-artifact-attestation"), preparation: JSON.parse(input(core, "preparation-json")),
23
18
  bundlePath: input(core, "bundle-path"), attestationId: input(core, "attestation-id"), attestationUrl: input(core, "attestation-url"), token: input(core, "token"), environment: env,
24
19
  workflow: { repository: env.GITHUB_REPOSITORY, runId: env.GITHUB_RUN_ID, runAttempt: env.GITHUB_RUN_ATTEMPT, job: env.GITHUB_JOB, url: `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}` } });
@@ -1,13 +1,5 @@
1
1
  import { requireValue } from "../../runtime/action-process.mjs";
2
2
  export function validateAttestationInput(request) {
3
- requireValue(
4
- /^[0-9a-f]{40}$/u.test(request.runtimeSha || ""),
5
- "buildchain-ref must be an exact 40-hex commit",
6
- );
7
- requireValue(
8
- request.runtimeSha === request.definitionSha,
9
- "attester runtime must match the defining signer workflow SHA",
10
- );
11
3
  requireValue(
12
4
  request.evidenceRunId === request.currentRunId,
13
5
  "attestation inputs must come from the current caller workflow run",
@@ -41,7 +41,6 @@ export function sealAttestation(
41
41
  verify = verifyArtifactAttestationSigner,
42
42
  ) {
43
43
  if (
44
- preparation.policy.signer.workflowDigest !== runtimeSha ||
45
44
  preparation.policy.caller.sourceSha !== sourceSha ||
46
45
  preparation.policy.caller.repository !== workflow.repository
47
46
  )
@@ -52,7 +51,7 @@ export function sealAttestation(
52
51
  verify({
53
52
  subjectPath: preparation.subjectPath,
54
53
  repository: workflow.repository,
55
- runtimeSha,
54
+ signerDigest: preparation.policy.signer.workflowDigest,
56
55
  sourceSha,
57
56
  predicateType: preparation.predicateType,
58
57
  bundlePath,
@@ -1,3 +1,4 @@
1
+ import { buildStageRecovery } from "../recovery/transaction.js";
1
2
  import { readBuildActionContext } from "../plan/action-context.js";
2
3
  import { runBuildStage } from "./stage.js";
3
4
  export async function runBuildStageAction(core, env) {
@@ -9,6 +10,7 @@ export async function runBuildStageAction(core, env) {
9
10
  );
10
11
  await runBuildStage({
11
12
  ...context,
13
+ recovery: buildStageRecovery(context, core.getInput("token", { required: true })),
12
14
  stage: core.getInput("stage", { required: true }),
13
15
  environment: {
14
16
  ...environment,