@kungfu-tech/buildchain 4.0.2-alpha.9 → 4.0.3-alpha.0

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 (281) hide show
  1. package/AGENTS.md +14 -5
  2. package/CONTRIBUTING.md +58 -0
  3. package/README.md +3 -3
  4. package/actions/promote-buildchain-ref/README.md +1 -1
  5. package/actions/release-candidate-promote/README.md +31 -0
  6. package/architecture/agent-change-map.md +190 -126
  7. package/architecture/{v4-architecture-constitution.md → architecture-constitution.md} +33 -30
  8. package/architecture/{v3-core-mechanism-inventory.md → baseline-core-mechanism-inventory.md} +1 -1
  9. package/architecture/{v4-bootstrap-authority.json → bootstrap-authority.json} +3 -3
  10. package/architecture/{v3-v4-capability-closure.md → capability-parity-closure.md} +3 -3
  11. package/architecture/{v3-v4-live-capability-inventory.json → capability-parity-live-capability-inventory.json} +4 -4
  12. package/architecture/{v4-capability-state-machine-manifest.json → capability-state-machine-manifest.json} +2 -2
  13. package/architecture/{v4-capability-state-machine-manifest.schema.json → capability-state-machine-manifest.schema.json} +2 -2
  14. package/architecture/ci-lane-change-budget.json +384 -0
  15. package/architecture/{v4-cross-platform-adopter-qualification.json → cross-platform-adopter-qualification.json} +4 -4
  16. package/architecture/{v4-delivery-authority-parity.json → delivery-authority-parity.json} +17 -17
  17. package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.json → delivery-warrant-shadow-bootstrap-plan.json} +4 -4
  18. package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.md → delivery-warrant-shadow-bootstrap-plan.md} +7 -7
  19. package/architecture/{v4-floating-consumer-policy.json → floating-consumer-policy.json} +2 -2
  20. package/architecture/{v4-floating-consumer-policy.md → floating-consumer-policy.md} +1 -1
  21. package/architecture/implementation-naming.json +1273 -0
  22. package/architecture/internal-capabilities.json +201 -154
  23. package/architecture/maintainability-debt.json +205 -146
  24. package/architecture/maintainability-policy.json +37 -33
  25. package/architecture/{v4-next-development-parity.json → next-development-parity.json} +12 -12
  26. package/architecture/{v4-partial-mutation-recovery-qualification.json → partial-mutation-recovery-qualification.json} +8 -5
  27. package/architecture/{v4-platform-stage-checkpoints.json → platform-stage-checkpoints.json} +3 -3
  28. package/architecture/{v4-provider-operation-journal-contract.json → provider-operation-journal-contract.json} +10 -7
  29. package/architecture/publication-facade-patches.json +64 -0
  30. package/architecture/{v4-publication-rehearsal-parity.json → publication-rehearsal-parity.json} +4 -4
  31. package/architecture/{v4-release-activation-shadow-domain.json → release-activation-shadow-domain.json} +9 -6
  32. package/architecture/release-tail-contract-inventory.json +6 -6
  33. package/architecture/{v4-release-topology.json → release-topology.json} +163 -72
  34. package/architecture/{v4-release-train-parity.json → release-train-parity.json} +2 -2
  35. package/architecture/{v4-runtime-ref-resume-authority.json → runtime-ref-resume-authority.json} +1 -1
  36. package/architecture/{v4-runtime-semantic-closure.json → runtime-semantic-closure.json} +2 -2
  37. package/architecture/{v4-rust-libnode-bridge-evaluation.json → rust-libnode-bridge-evaluation.json} +3 -3
  38. package/architecture/{v4-rust-libnode-bridge-spike.md → rust-libnode-bridge-spike.md} +6 -6
  39. package/architecture/rust-wasm-production-authority.json +58 -0
  40. package/architecture/{v4-stable-publication-fence.json → stable-publication-fence.json} +7 -4
  41. package/architecture/{v4-stage-capsule-contract.json → stage-capsule-contract.json} +1 -1
  42. package/architecture/{v4-stage-capsule-qualification.json → stage-capsule-qualification.json} +8 -8
  43. package/architecture/{v4-stage-capsule-resume-planner.json → stage-capsule-resume-planner.json} +2 -2
  44. package/architecture/{v4-stage-capsule-store-contract.json → stage-capsule-store-contract.json} +4 -4
  45. package/architecture/{v4-tail-reseal-parity.json → tail-reseal-parity.json} +35 -33
  46. package/architecture/universal-workflow-bootstrap.json +176 -0
  47. package/architecture/universal-workflow-fault-campaign.json +72 -0
  48. package/architecture/universal-workflow-train-admission.json +40 -0
  49. package/architecture/workflow-taxonomy.json +1462 -0
  50. package/bin/buildchain.mjs +10 -10
  51. package/bin/internal/adopter-delivery-cli.mjs +9 -9
  52. package/contracts/buildchain-v2-residuals-v1.json +57 -48
  53. package/contracts/dev-delivery-authority-v2.schema.json +16 -2
  54. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  55. package/contracts/v4-canonical-contracts-v1.schema.json +1 -0
  56. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.lock +1 -1
  57. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.toml +1 -1
  58. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/src/main.rs +3 -3
  59. package/dist/site/buildchain-contract.json +98 -53
  60. package/dist/site/buildchain-site.json +351 -102
  61. package/dist/site/capability-registry.json +7 -7
  62. package/dist/site/controller-registry.json +50 -13
  63. package/dist/site/kfd-claims.json +2773 -1052
  64. package/dist/site/kfd-upstream-aggregate.json +1 -1
  65. package/dist/site/manual-registry.json +14 -14
  66. package/dist/site/node-api-registry.json +13176 -10733
  67. package/dist/site/page-registry.json +332 -83
  68. package/dist/site/public-surface-audit.json +3227 -1222
  69. package/dist/site/publication-authority-registry.json +1135 -363
  70. package/dist/site/publication-registry.json +4 -4
  71. package/dist/site/release-provenance.json +18 -9
  72. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +16 -2
  73. package/dist/site/site-manifest.json +18 -18
  74. package/dist/site/workflow-registry.json +5367 -1931
  75. package/docs/MAP.md +5 -3
  76. package/docs/auditable-demo.md +1 -1
  77. package/docs/cli.md +21 -8
  78. package/docs/dev-delivery-warrant.md +1 -1
  79. package/docs/engineering-housekeeper.md +3 -3
  80. package/docs/kfd-support.md +26 -2
  81. package/docs/next-development-transition.md +26 -3
  82. package/docs/node-api-reference.md +618 -358
  83. package/docs/oci-publication.md +173 -0
  84. package/docs/publication-authority.md +2 -2
  85. package/docs/publish-transaction.md +36 -3
  86. package/docs/release-candidate.md +3 -3
  87. package/docs/release-flow.md +67 -19
  88. package/docs/release-governance.md +8 -8
  89. package/docs/release-passport.md +27 -2
  90. package/docs/reusable-build-surface.md +17 -1
  91. package/docs/v4-adopter-delivery.md +4 -4
  92. package/docs/v4-canonical-contracts.md +7 -7
  93. package/docs/v4-delivery-warrant-read-candidate.md +3 -3
  94. package/docs/v4-delivery-warrant-semantic-diff.md +3 -3
  95. package/docs/v4-production-release.md +77 -8
  96. package/docs/v4-publication-rehearsal.md +3 -3
  97. package/docs/v4-runtime-ref-resume-authority.md +2 -2
  98. package/docs/v4-rust-wasm-production-authority.md +58 -0
  99. package/docs/v4-stage-capsule.md +9 -9
  100. package/docs/v4-tail-reseal.md +2 -2
  101. package/docs/workflow-catalog.md +155 -0
  102. package/docs/workflow-path-migration.md +109 -0
  103. package/package.json +39 -24
  104. package/packages/compatibility/adopter-delivery.js +16 -0
  105. package/packages/compatibility/cross-platform-adopter-qualification.js +12 -0
  106. package/packages/compatibility/floating-consumer-policy.js +14 -0
  107. package/packages/compatibility/publication-qualification.js +11 -0
  108. package/packages/compatibility/publication-rehearsal.js +18 -0
  109. package/packages/compatibility/runtime-ref-resume-authority.js +13 -0
  110. package/packages/compatibility/tail-reseal-receipt.js +7 -0
  111. package/packages/compatibility/tail-reseal.js +11 -0
  112. package/packages/core/{v4-adopter-delivery-parity.js → adopter-delivery-parity.js} +12 -12
  113. package/packages/core/{v4-adopter-delivery.js → adopter-delivery.js} +24 -24
  114. package/packages/core/artifact-verification-envelope.js +5 -5
  115. package/packages/core/buildchain-contract.js +6 -6
  116. package/packages/core/buildchain-domain.wasm +0 -0
  117. package/packages/core/buildchain-kfd-claims.js +2 -2
  118. package/packages/core/buildchain-publication-authority.js +43 -26
  119. package/packages/core/{v4-canonical-contracts.js → canonical-contracts.js} +39 -103
  120. package/packages/core/ci-lane-change-budget.js +14 -1
  121. package/packages/core/controller-evidence.js +4 -1
  122. package/packages/core/{v4-cross-platform-adopter-qualification.js → cross-platform-adopter-qualification.js} +19 -19
  123. package/packages/core/{v4-delivery-warrant-fixture-runner.js → delivery-warrant-fixture-runner.js} +36 -32
  124. package/packages/core/{v4-delivery-warrant-read-candidate.js → delivery-warrant-read-candidate.js} +40 -40
  125. package/packages/core/{v4-delivery-warrant-semantic-diff-gate.js → delivery-warrant-semantic-diff-gate.js} +58 -59
  126. package/packages/core/{v4-delivery-warrant-shadow-adapter.js → delivery-warrant-shadow-adapter.js} +15 -15
  127. package/packages/core/dev-delivery-candidate-identity.js +40 -6
  128. package/packages/core/dev-delivery-execution-transfer.js +6 -6
  129. package/packages/core/dev-delivery-native-proof.js +12 -8
  130. package/packages/core/dev-delivery-warrant-legacy-recovery.js +1 -1
  131. package/packages/core/dev-delivery-warrant-native-compatibility.js +4 -4
  132. package/packages/core/dev-delivery-warrant-state.js +14 -15
  133. package/packages/core/dev-delivery-warrant.js +15 -5
  134. package/packages/core/domain-wasm-artifact.js +7 -0
  135. package/packages/core/domain-wasm.js +216 -0
  136. package/packages/core/{v4-floating-consumer-evidence.js → floating-consumer-evidence.js} +14 -14
  137. package/packages/core/{v4-floating-consumer-policy.js → floating-consumer-policy.js} +28 -30
  138. package/packages/core/{v4-floating-consumer-release-passport.js → floating-consumer-release-passport.js} +25 -25
  139. package/packages/core/github-governance-authority.js +4 -4
  140. package/packages/core/index.js +4 -8
  141. package/packages/core/kfd-adopter-manifest.js +46 -47
  142. package/packages/core/next-development-projection.js +26 -3
  143. package/packages/core/next-development-transition.js +5 -6
  144. package/packages/core/oci-compose-qualification.js +143 -0
  145. package/packages/core/oci-publication-bundle.js +281 -0
  146. package/packages/core/oci-publication-graph.js +206 -0
  147. package/packages/core/paper-agent-entry.js +30 -4
  148. package/packages/core/paper-fleet.js +1 -1
  149. package/packages/core/paper-runtime-channels.js +348 -0
  150. package/packages/core/paper-scaffold-content.js +10 -0
  151. package/packages/core/paper.js +37 -71
  152. package/packages/core/partial-mutation-recovery-qualification.js +18 -0
  153. package/packages/core/{v4-platform-stage-checkpoints.js → platform-stage-checkpoints.js} +37 -37
  154. package/packages/core/product-publication.js +59 -0
  155. package/packages/core/{v4-protected-publication-source.js → protected-publication-source.js} +22 -24
  156. package/packages/core/provider-operation-journal.js +62 -0
  157. package/packages/core/{v4-provider-readback-idempotency.js → provider-readback-idempotency.js} +40 -125
  158. package/packages/core/public-export-compatibility.js +33 -0
  159. package/packages/core/publication-development.js +72 -0
  160. package/packages/core/{v4-publication-qualification.js → publication-qualification.js} +17 -17
  161. package/packages/core/{v4-publication-rehearsal-capsule.js → publication-rehearsal-capsule.js} +23 -23
  162. package/packages/core/publication-rehearsal-projection.js +2 -2
  163. package/packages/core/{v4-publication-rehearsal-provider-bindings.js → publication-rehearsal-provider-bindings.js} +4 -4
  164. package/packages/core/publication-rehearsal-runtime.js +21 -21
  165. package/packages/core/{v4-publication-rehearsal.js → publication-rehearsal.js} +33 -33
  166. package/packages/core/publication-sealed-bundle.js +78 -13
  167. package/packages/core/release-activation-shadow.js +32 -0
  168. package/packages/core/release-candidate.js +6 -6
  169. package/packages/core/release-invocation.js +64 -0
  170. package/packages/core/release-line-dry-run.js +1 -1
  171. package/packages/core/release-passport-contract.js +5 -5
  172. package/packages/core/release-passport.js +41 -40
  173. package/packages/core/release-tail-product-capabilities.js +9 -0
  174. package/packages/core/release-tail-provider-plane.js +68 -1048
  175. package/packages/core/{v4-runtime-ref-resume-authority.js → runtime-ref-resume-authority.js} +36 -40
  176. package/packages/core/{v4-runtime-selector-persistence.js → runtime-selector-persistence.js} +7 -7
  177. package/packages/core/stable-publication-fence.js +28 -0
  178. package/packages/core/{v4-stage-capsule-local-store.js → stage-capsule-local-store.js} +56 -54
  179. package/packages/core/{v4-stage-capsule-qualification-campaign.js → stage-capsule-qualification-campaign.js} +37 -38
  180. package/packages/core/{v4-stage-capsule-qualification.js → stage-capsule-qualification.js} +28 -29
  181. package/packages/core/{v4-stage-capsule-resume-planner.js → stage-capsule-resume-planner.js} +29 -29
  182. package/packages/core/{v4-stage-capsule-store.js → stage-capsule-store.js} +59 -56
  183. package/packages/core/{v4-stage-capsule.js → stage-capsule.js} +45 -45
  184. package/packages/core/{v4-tail-reseal-contract.js → tail-reseal-contract.js} +6 -6
  185. package/packages/core/{v4-tail-reseal-github.js → tail-reseal-github.js} +12 -12
  186. package/packages/core/{v4-tail-reseal-receipt.js → tail-reseal-receipt.js} +22 -22
  187. package/packages/core/{v4-tail-reseal.js → tail-reseal.js} +29 -29
  188. package/packages/core/universal-workflow-bootstrap.js +586 -0
  189. package/scripts/{v4-architecture.mjs → architecture.mjs} +6 -6
  190. package/scripts/binary-publication-evidence.mjs +135 -0
  191. package/scripts/{v4-bridge-bootstrap.mjs → bridge-bootstrap.mjs} +14 -18
  192. package/scripts/{v4-bridge-evidence.mjs → bridge-evidence.mjs} +8 -8
  193. package/scripts/build-contract-core.mjs +1 -14
  194. package/scripts/build-domain-wasm.mjs +177 -0
  195. package/scripts/{v3-v4-capability-catalog.mjs → capability-parity-catalog.mjs} +19 -19
  196. package/scripts/check-action-bundles.mjs +12 -2
  197. package/scripts/{check-v3-v4-capability-inventory.mjs → check-capability-parity-inventory.mjs} +42 -42
  198. package/scripts/check-ci-lane-change-budget.mjs +4 -1
  199. package/scripts/check-core-mechanism-inventory.mjs +8 -4
  200. package/scripts/{check-v4-floating-consumer-policy-contract.mjs → check-floating-consumer-policy-contract.mjs} +10 -10
  201. package/scripts/check-implementation-naming.mjs +135 -0
  202. package/scripts/check-inventory.mjs +39 -47
  203. package/scripts/check-maintainability.mjs +25 -115
  204. package/scripts/{check-v4-public-dogfood-contract.mjs → check-public-dogfood-contract.mjs} +37 -24
  205. package/scripts/{check-v4-release-topology.mjs → check-release-topology.mjs} +131 -52
  206. package/scripts/{check-v4-runtime-semantic-closure.mjs → check-runtime-semantic-closure.mjs} +23 -17
  207. package/scripts/check-universal-workflow-bootstrap.mjs +266 -0
  208. package/scripts/check-workflow-taxonomy.mjs +6 -0
  209. package/scripts/{v4-consumer-policy.mjs → consumer-policy.mjs} +15 -15
  210. package/scripts/copy-domain-wasm.mjs +14 -0
  211. package/scripts/{v4-cross-platform-adopter-qualification.mjs → cross-platform-adopter-qualification.mjs} +9 -9
  212. package/scripts/{v4-declarative-promotion-admission.mjs → declarative-promotion-admission.mjs} +4 -4
  213. package/scripts/dev-delivery-authority-command-adapters.mjs +1 -1
  214. package/scripts/dev-delivery-authority.mjs +8 -8
  215. package/scripts/dev-delivery-source-proof-reuse.mjs +2 -1
  216. package/scripts/dev-delivery-warrant-options.mjs +15 -10
  217. package/scripts/dev-delivery-warrant-store.mjs +98 -13
  218. package/scripts/dev-delivery-warrant-transition.mjs +109 -0
  219. package/scripts/dev-delivery-warrant.mjs +80 -103
  220. package/scripts/dev-pr-auto-merge.mjs +15 -15
  221. package/scripts/dev-pr-delivery-warrant.mjs +1 -1
  222. package/scripts/generate-channel-build-workflow.mjs +7 -2
  223. package/scripts/generate-channel-promotion-workflow.mjs +19 -34
  224. package/scripts/generate-release-candidate-passport.mjs +23 -23
  225. package/scripts/generate-site-bundle.mjs +28 -28
  226. package/scripts/generate-universal-workflow-facades.mjs +498 -0
  227. package/scripts/generate-workflow-taxonomy.mjs +25 -0
  228. package/scripts/github-output.mjs +31 -0
  229. package/scripts/{v4-host-adapter.mjs → host-adapter.mjs} +1 -1
  230. package/scripts/implementation-references.mjs +25 -0
  231. package/scripts/init-repo.mjs +1 -1
  232. package/scripts/maintainability-metrics.mjs +16 -5
  233. package/scripts/maintainability-public-surface.mjs +115 -0
  234. package/scripts/next-development-review.mjs +313 -0
  235. package/scripts/oci-compose-preview.mjs +261 -0
  236. package/scripts/paper-work-fleet-cli.mjs +2 -0
  237. package/scripts/{v4-platform-stage-checkpoint-rehearsal.mjs → platform-stage-checkpoint-rehearsal.mjs} +17 -17
  238. package/scripts/{v4-product-publication-intent.mjs → product-publication-intent.mjs} +28 -13
  239. package/scripts/publication-candidate-kind.mjs +93 -0
  240. package/scripts/publication-candidate-sealer.mjs +16 -1
  241. package/scripts/{v4-publication-rehearsal-fixture.mjs → publication-rehearsal-fixture.mjs} +5 -5
  242. package/scripts/publication-settlement.mjs +211 -0
  243. package/scripts/release-asset-client.mjs +91 -0
  244. package/scripts/{v4-release-candidate-adapter.mjs → release-candidate-adapter.mjs} +4 -4
  245. package/scripts/release-candidate-resolver.mjs +24 -35
  246. package/scripts/release-tail.mjs +5 -5
  247. package/scripts/resume-from-candidate-run.mjs +35 -42
  248. package/scripts/site-capability-metadata.mjs +9 -0
  249. package/scripts/source-verification-evidence.mjs +344 -0
  250. package/scripts/stable-candidate-qualification.mjs +1 -1
  251. package/scripts/{v4-stage-capsule-qualification.mjs → stage-capsule-qualification.mjs} +62 -62
  252. package/scripts/{v4-stage-capsule-resume-rehearsal.mjs → stage-capsule-resume-rehearsal.mjs} +6 -6
  253. package/scripts/{v4-tail-reseal-macos-rehearsal.mjs → tail-reseal-macos-rehearsal.mjs} +9 -9
  254. package/scripts/{v4-tail-reseal.mjs → tail-reseal.mjs} +19 -19
  255. package/scripts/universal-facade-maintainability.mjs +91 -0
  256. package/scripts/universal-workflow-backflow.mjs +212 -0
  257. package/scripts/universal-workflow-engine.mjs +620 -0
  258. package/scripts/universal-workflow-self-dogfood.mjs +205 -0
  259. package/scripts/verify-version-state-delta.mjs +175 -0
  260. package/scripts/{v4-warrant-shadow-plan.mjs → warrant-shadow-plan.mjs} +6 -6
  261. package/scripts/workflow-taxonomy.mjs +507 -0
  262. package/templates/native-dev-delivery.yml +4 -7
  263. package/templates/universal-buildchain-bootstrap-recovery.yml +282 -0
  264. package/templates/universal-buildchain-bootstrap.yml +28 -0
  265. package/actions/v4-release-candidate-promote/README.md +0 -3
  266. package/packages/core/v4-partial-mutation-recovery-qualification.js +0 -395
  267. package/packages/core/v4-product-publication.js +0 -387
  268. package/packages/core/v4-provider-operation-journal.js +0 -531
  269. package/packages/core/v4-release-activation-shadow.js +0 -519
  270. package/packages/core/v4-release-invocation.js +0 -425
  271. package/packages/core/v4-stable-publication-fence.js +0 -357
  272. /package/architecture/{v4-adopter-delivery-parity.json → adopter-delivery-parity.json} +0 -0
  273. /package/architecture/{v3-core-mechanism-inventory.json → baseline-core-mechanism-inventory.json} +0 -0
  274. /package/architecture/{v4-canonical-contract-fixtures.json → canonical-contract-fixtures.json} +0 -0
  275. /package/architecture/{v4-compatibility-facts-parity.json → compatibility-facts-parity.json} +0 -0
  276. /package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.schema.json → delivery-warrant-shadow-bootstrap-plan.schema.json} +0 -0
  277. /package/architecture/{v4-delivery-warrant-shadow-fixtures.json → delivery-warrant-shadow-fixtures.json} +0 -0
  278. /package/architecture/{v4-delivery-warrant-shadow-fixtures.schema.json → delivery-warrant-shadow-fixtures.schema.json} +0 -0
  279. /package/architecture/{v4-exception-ledger.json → exception-ledger.json} +0 -0
  280. /package/architecture/{v4-exception-ledger.schema.json → exception-ledger.schema.json} +0 -0
  281. /package/architecture/{v4-release-invocation-fixtures.json → release-invocation-fixtures.json} +0 -0
@@ -0,0 +1,173 @@
1
+ ---
2
+ status: draft
3
+ period: ongoing
4
+ theme: oci-publication
5
+ doc_type: technical-reference
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-07
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-06
16
+ invisible_context_boundary: No credentials or production registry state inspected.
17
+ ---
18
+
19
+ # OCI image family publication
20
+
21
+ Compose preview uses the workflow's scoped `packages: write` token for GHCR
22
+ requests. The separate `BUILDCHAIN_PROMOTION_TOKEN` serves GitHub governance
23
+ and receipt publication; it is never a fallback registry credential. Missing
24
+ registry identity fails before a write, and an unsuccessful registry response
25
+ reports only its HTTP status while retaining the exact qualification for recovery.
26
+
27
+ Buildchain v4 can publish a sealed family of container images to GHCR through
28
+ `publish-artifact-kind: oci` on the public release candidate promotion workflow.
29
+ The candidate build produces the image bytes and smoke evidence. The built-in
30
+ provider verifies and uploads those bytes, reads back every public image digest,
31
+ then allows release references and GitHub Release evidence to converge.
32
+
33
+ ## Candidate contract
34
+
35
+ Publish exactly one `oci-family.json` alongside OCI layouts and smoke JSON files
36
+ in the Build artifact. Import `sealOciPublicationBundle` from
37
+ `@kungfu-tech/buildchain/oci-publication` to validate and seal the family. Its
38
+ `body` contains:
39
+
40
+ - `schema: kungfu-buildchain-oci-family/v1`, consumer `repository`, exact Git
41
+ `sourceSha`, and candidate package `version`.
42
+ - `expectedImages`: the complete set of image names.
43
+ - `images`: one entry for each expected image, with `name`, `repository`,
44
+ `digest`, `layout`, `platform`, `action`, `content`, and `smoke`.
45
+
46
+ Destinations must be `ghcr.io/<consumer-owner>/<consumer-repo>/<image-name>`.
47
+ `layout` is a relative OCI layout directory. Each image is a single Linux
48
+ amd64 or arm64 manifest; OCI and Docker schema 2 manifests are supported.
49
+ Layouts may share blobs and an index; each shared index entry identifies its
50
+ image with the `org.opencontainers.image.ref.name` annotation.
51
+
52
+ `content` records the image's original `sourceSha` and `version`, matching its
53
+ OCI revision/version labels. For `action: built`, both equal the candidate.
54
+ For `action: reused`, they retain the original content provenance while the
55
+ family binds the current candidate. `smoke` records a relative `path` and SHA256
56
+ `sha256`; its JSON must identify the image and record `passed: true`. The
57
+ consumer owns the actual smoke command and must fail the build if it fails.
58
+
59
+ Sealing verifies all config/layer sizes and digests, platform and provenance
60
+ labels, smoke bytes, and family completeness. Absolute paths, traversal, and
61
+ symlinks are rejected. The resolver derives the exact required image artifacts
62
+ from this sealed family, including when recovering a previous candidate run.
63
+
64
+ ## Authority and publication
65
+
66
+ The thin caller grants `packages: write` in addition to its existing promotion
67
+ permissions. Reusable promotion wrappers inherit that caller envelope; npm
68
+ consumers do not need to request package registry authority. The provider uses
69
+ the action token only for GHCR, scoped to each declared consumer image.
70
+ No consumer publish command is executed.
71
+
72
+ The rooted product plan declares version-state materialization, OCI family
73
+ publication, then release reference convergence. Each image uses the exact
74
+ `v<version>` tag. A different existing digest aborts publication; a matching
75
+ existing image is reused. After a partial failure, recovery validates the same
76
+ candidate bytes and publishes only missing images. GHCR does not provide tag
77
+ compare-and-swap: callers must serialize publishers for a version, and external
78
+ writers must not race the publication workflow.
79
+
80
+ Success requires anonymous readback of every declared image at its expected
81
+ digest. Existing GHCR packages must permit the repository token to write and
82
+ anonymous clients to pull. The provider does not change package visibility or
83
+ access policy. It attaches `oci-publication-readback.json` to the GitHub Release;
84
+ the caller should also include the family and smoke JSON files in
85
+ `github-release-payload-patterns`.
86
+
87
+ See [Runtime Train Validation](runtime-train-validation.md) for testing an
88
+ unreleased runtime without persisting a train or exact SHA in the workflow.
89
+
90
+ ## Multi-platform images and Compose applications
91
+
92
+ Use `schema: kungfu-buildchain-oci-family/v2` when the family includes an OCI
93
+ index or a Compose application. Existing v1 families keep their published
94
+ single-platform contract.
95
+
96
+ An index entry declares `platform: multi-platform` and the complete `platforms`
97
+ array, for example `["linux/amd64", "linux/arm64"]`. Every runnable child must
98
+ have matching platform and content labels. Descriptor sizes, digests and media
99
+ types are verified recursively; nested manifests are uploaded before their
100
+ parent index. BuildKit attestation manifests must identify a runnable child and
101
+ contain matching in-toto subjects. Missing platforms, duplicate platforms,
102
+ foreign URLs and broken blob references fail sealing. Embedded descriptor `data`
103
+ is accepted only as canonical Base64 for at most 1 MiB, with the declared size
104
+ and digest matching the required local blob byte for byte. Malformed or
105
+ inconsistent embedded content fails sealing; manifests are never rewritten.
106
+ This follows the [OCI embedded-content contract](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#embedded-content).
107
+
108
+ A Compose entry declares `kind: compose`, `platform: compose`, and `targetImage`
109
+ pointing to an image in the same family. Its unique family name may differ from
110
+ that image, but its destination repository must match it. The immutable tag is
111
+ `compose-v<version>`; image entries retain `v<version>`.
112
+
113
+ The bounded Compose representation is an OCI 1.1 image manifest with
114
+ `artifactType: application/vnd.docker.compose.project`, an empty JSON config
115
+ and one `application/vnd.docker.compose.file+yaml` layer. That layer contains
116
+ JSON, a YAML subset, so structural verification needs no executable YAML loader.
117
+ Every service image is pinned to a digest and at least one uses the exact
118
+ family image. Environment interpolation inside other fields can remain intact.
119
+ These media types follow the [Docker Compose publisher](https://github.com/docker/compose/blob/v5.1.2/internal/oci/push.go).
120
+
121
+ Candidate smoke evidence describes its actual pre-publication checks. It must
122
+ not claim that an unpublished public Compose reference was installed. Public
123
+ installation qualification occurs after immutable publication and before a
124
+ preview alias moves.
125
+
126
+ ## Evidence-gated Compose preview
127
+
128
+ An optional Compose `preview` declaration contains exactly the supported alias
129
+ `compose-preview`, the previously accepted `previousDigest` (or `none`), and
130
+ `qualificationWorkflow`, a repository workflow path. The immutable family seals
131
+ this policy before any publication effect.
132
+
133
+ After v4 publication is complete, dispatch that qualification workflow on the
134
+ exact published alpha tag. It must pull the immutable public image and Compose,
135
+ run fresh installation, restart, account-isolation, runtime-hardening, upgrade
136
+ and rollback checks, and qualify both Linux architectures. The workflow has no
137
+ registry write authority. Upload one artifact named
138
+ `oci-compose-qualification-<run-id>-<run-attempt>` containing `qualification.json`
139
+ and its hash-bound JSON evidence files.
140
+
141
+ The receipt uses `schema: kungfu-buildchain-compose-qualification/v1` and binds
142
+ `repository`, `tag`, published `sourceSha`, sealed `familyRoot`, `runId`,
143
+ `runAttempt`, exact `image` and `application` repository/digest references,
144
+ `previousDigest`, and `passed: true`. Its `checks` object requires all of
145
+ `freshInstall`, `restartPersistence`, `upgradePersistence`, `rollbackPersistence`,
146
+ `accountIsolation`, and `hardenedRuntime` to be true. Its `platforms` object
147
+ requires `linux/amd64` and `linux/arm64` entries with `passed: true`; `evidence`
148
+ contains nonempty `{path, sha256}` bindings to the actual JSON results.
149
+
150
+ A thin consumer workflow listens to completion of that qualification workflow
151
+ and calls `public-release-oci-compose-preview.yml@v4-alpha`, passing
152
+ `BUILDCHAIN_PROMOTION_TOKEN`. The reusable workflow resolves its own exact
153
+ runtime, enforces the dual floating-channel locks, verifies the public v4
154
+ settlement, family and provider readback roots, and checks the live GitHub run's
155
+ repository, source, workflow, event, attempt and successful conclusion. It never
156
+ executes the consumer's artifact files. Only then does it copy the exact Compose
157
+ manifest bytes to the declared alias and verify the public digest.
158
+
159
+ The expected-old digest is checked immediately before mutation. An already
160
+ matching target is an idempotent success; any other drift blocks the move.
161
+ Publishers for this alias share repository-level concurrency. GHCR has no atomic
162
+ tag compare-and-swap, so external writers must also avoid racing this workflow.
163
+ The immutable release retains the appended
164
+ `buildchain-compose-preview-<run-id>-<run-attempt>.json` receipt. A failed
165
+ qualification leaves the existing preview intact, while the immutable alpha
166
+ and its original publication evidence remain available for diagnosis.
167
+
168
+ The verified publication Passport distinguishes the built candidate from the
169
+ protected publication commit. Compose family source identity follows
170
+ `source.builtSourceSha`; `source.builtSourceTreeSha` must equal the admitted
171
+ invocation tree. Registry readback and qualification runs remain bound to the
172
+ protected publication SHA. A tree-equivalent protected merge therefore retains
173
+ the original image identity without accepting a different source tree.
@@ -227,7 +227,7 @@ buildchain audit publication-control-plane \
227
227
  --source-sha <exact-merged-branch-sha> \
228
228
  --workflow .github/workflows/release-candidate-promote.yml \
229
229
  --workflow-ref <exact-buildchain-sha> \
230
- --publisher-workflow .github/workflows/buildchain-ref-promotion.yml \
230
+ --publisher-workflow .github/workflows/self-release-promote.yml \
231
231
  --job promote \
232
232
  --environment none
233
233
 
@@ -236,7 +236,7 @@ buildchain audit publication-control-plane \
236
236
  --repository kungfu-systems/buildchain \
237
237
  --branch dev/v3/v3.0 \
238
238
  --workflow .github/workflows/release-candidate-promote.yml \
239
- --publisher-workflow .github/workflows/buildchain-ref-promotion.yml \
239
+ --publisher-workflow .github/workflows/self-release-promote.yml \
240
240
  --job promote \
241
241
  --environment none \
242
242
  --npm-trust-json sanitized-npm-trust.json
@@ -8,11 +8,11 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-08-06
11
+ last_reviewed: 2026-09-06
12
12
  ai_provenance:
13
- model_family: GPT-5
13
+ model_family: GPT-6
14
14
  product: Codex
15
- generated_at: 2026-07-31
15
+ generated_at: 2026-09-06
16
16
  invisible_context: not asserted
17
17
  ---
18
18
 
@@ -113,6 +113,39 @@ a missing or different id fails before provider mutation. An absent transaction
113
113
  is created only when no expected existing identity was requested. See
114
114
  [Release Candidate: Resume from an existing candidate run](release-candidate.md#resume-from-an-existing-candidate-run).
115
115
 
116
+ ## V4 sealed npm package sets
117
+
118
+ The v4 alpha provider accepts a sealed set of 2–64 npm tarballs with one main
119
+ package and same-version platform packages. The candidate resolver records each
120
+ package's name, version, role, relative path, size, SHA-256, and npm integrity in
121
+ the candidate root. QUALIFY passes the set into the Rust/WASM publication
122
+ planner, which binds every package to its own operation and orders platform
123
+ packages by name before the main package. A single package retains the existing
124
+ operation identity.
125
+
126
+ Use `publish-package-main` to name the main package. The optional
127
+ `publish-package-set-order: platforms-first-main-last` input states the same
128
+ ordering. Omit legacy `publish-mode` and `publish-command` inputs: the v4 provider
129
+ publishes the sealed tarballs through npm trusted publishing. It does not run a
130
+ consumer publish command.
131
+
132
+ Before any provider effect, APPLY checks the complete package inventory,
133
+ tarball package identities, bytes, and integrity against the rooted intent.
134
+ Each package receives independent registry readback and a Release Tail receipt.
135
+ After an interrupted attempt, existing matching versions are observed without
136
+ republishing; conflicting integrity stops the transaction. Release refs follow
137
+ only after every package is confirmed.
138
+
139
+ Anchored alpha versions such as `22.22.3-kf.5-alpha.4` remain unchanged. For
140
+ `anchored/manual` repositories, successful publication leaves next development
141
+ in `waiting-anchor`; it does not invent the next upstream anchor. Multi-package
142
+ stable rematerialization is not supported by this provider and fails before
143
+ publication. The existing singleton stable flow remains available.
144
+
145
+ The contract is exercised by `product-publication-topology.test.mjs`,
146
+ `product-provider-adapters.test.mjs`, and
147
+ `alpha-next-development-provider.test.mjs` under `tests/`.
148
+
116
149
  ## Lifecycle
117
150
 
118
151
  Repositories declare publish work in `.buildchain/buildchain.toml`:
@@ -265,7 +265,7 @@ in the release passport.
265
265
 
266
266
  Standalone binary publication is a separate consumer capability. The promotion
267
267
  wrapper does not assume that an npm-only repository provides
268
- `.github/workflows/binary-distribution.yml`. Repositories that own that workflow
268
+ `.github/workflows/self-build-binary-distribution.yml`. Repositories that own that workflow
269
269
  opt in with `standalone-binary-distribution: true`; Buildchain's self-promotion
270
270
  does so explicitly. Once enabled, a missing or invalid binary workflow remains a
271
271
  hard failure rather than being silently skipped.
@@ -303,7 +303,7 @@ short-lived admission JSON in repository-specific workflow code:
303
303
  ```yaml
304
304
  publication-auto-admission: true
305
305
  publication-auto-no-gate: true
306
- publication-publisher-workflow-path: .github/workflows/buildchain-ref-promotion.yml
306
+ publication-publisher-workflow-path: .github/workflows/self-release-promote.yml
307
307
  publication-product: Example Product
308
308
  publication-target: npm:@example/product
309
309
  publication-package-name: "@example/product"
@@ -339,7 +339,7 @@ an npm package identity:
339
339
  ```yaml
340
340
  publication-auto-admission: true
341
341
  publication-auto-no-gate: true
342
- publication-publisher-workflow-path: .github/workflows/buildchain-ref-promotion.yml
342
+ publication-publisher-workflow-path: .github/workflows/self-release-promote.yml
343
343
  publication-product: Example Binary
344
344
  publication-target: github-release:example/example-binary
345
345
  publication-package-name: ""
@@ -8,17 +8,17 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-07-31
11
+ last_reviewed: 2026-09-05
12
12
  ai_provenance:
13
- model_family: GPT-5
13
+ model_family: GPT-6
14
14
  product: Codex
15
- generated_at: 2026-07-31
15
+ generated_at: 2026-09-05
16
16
  invisible_context: not asserted
17
17
  ---
18
18
 
19
19
  # Release Flow Diagrams
20
20
 
21
- This document describes the Buildchain v4 branch, tag, and version-state flow.
21
+ This document describes v4 alpha publication and the legacy v3 release flow.
22
22
  See [Release governance](release-governance.md) for the design rationale.
23
23
 
24
24
  ## Architecture
@@ -142,7 +142,21 @@ published. Queue reconciliation runs after branch protection and before the
142
142
  default-branch switch, so a failed governance apply leaves the old active line
143
143
  in place and the idempotently created new refs can be retried.
144
144
 
145
- ## Alpha Promotion
145
+ ## V4 Alpha Publication
146
+
147
+ The protected `dev/v4/v4.0 -> alpha/v4/v4.0` channel PR admits the source.
148
+ Publication creates the immutable `v4.0.Z-alpha.N` tag and advances the eligible
149
+ floating alpha refs to that published source. Its completed receipt and original
150
+ Release Passport remain the publication authority.
151
+
152
+ A separate protected next-development PR prepares `4.0.Z-alpha.(N+1)` on
153
+ `dev/v4/v4.0`. Preparing that version does not publish another exact tag or move
154
+ the alpha refs. A review, queue, or transient API failure in that PR leaves
155
+ publication complete and next-development incomplete; recovery resumes the
156
+ missing tail. Binary distribution has its own evidence and completion state.
157
+ See [What each verification proves](#what-each-verification-proves).
158
+
159
+ ## Legacy V3 Alpha Promotion
146
160
 
147
161
  ```mermaid
148
162
  sequenceDiagram
@@ -180,7 +194,7 @@ dev/vX/vX.Y
180
194
 
181
195
  all point at the generated alpha version-state commit.
182
196
 
183
- ## Release Promotion
197
+ ## Legacy V3 Release Promotion
184
198
 
185
199
  ```mermaid
186
200
  sequenceDiagram
@@ -234,7 +248,7 @@ dev/vX/vX.Y
234
248
 
235
249
  point at the next alpha version-state commit.
236
250
 
237
- ## State Machine
251
+ ## Legacy V3 State Machine
238
252
 
239
253
  ```mermaid
240
254
  stateDiagram-v2
@@ -249,28 +263,28 @@ stateDiagram-v2
249
263
 
250
264
  The same minor line can loop through this state machine many times.
251
265
 
252
- ## Version Examples
266
+ ## Legacy V3 Version Examples
253
267
 
254
- Assume `v4.0.2-alpha.1` has been tested and a maintainer merges
255
- `alpha/v4/v4.0 -> release/v4/v4.0`.
268
+ Assume `v3.0.2-alpha.1` has been tested and a maintainer merges
269
+ `alpha/v3/v3.0 -> release/v3/v3.0`.
256
270
 
257
271
  Buildchain should produce:
258
272
 
259
273
  ```text
260
- v4.0.2 exact production tag
261
- v4.0 floating minor tag
262
- v4 floating major tag when v4.0 is the selected major line
263
- release/v4/v4.0 production channel branch
274
+ v3.0.2 exact production tag
275
+ v3.0 floating minor tag
276
+ v3 floating major tag when v3.0 is the selected major line
277
+ release/v3/v3.0 production channel branch
264
278
  ```
265
279
 
266
280
  It should also prepare:
267
281
 
268
282
  ```text
269
- v4.0.3-alpha.0 exact next alpha tag
270
- v4.0-alpha floating alpha tag
271
- v4-alpha floating major alpha tag when v4.0 is the highest published alpha minor
272
- alpha/v4/v4.0 alpha channel branch
273
- dev/v4/v4.0 development channel branch
283
+ v3.0.3-alpha.0 exact next alpha tag
284
+ v3.0-alpha floating alpha tag
285
+ v3-alpha floating major alpha tag when v3.0 is the highest published alpha minor
286
+ alpha/v3/v3.0 alpha channel branch
287
+ dev/v3/v3.0 development channel branch
274
288
  ```
275
289
 
276
290
  This is expected behavior. A production release closes one patch and opens the
@@ -333,3 +347,37 @@ the current target ref contains or corresponds to the recorded
333
347
  `release_material_sha`. It must then tolerate exact tags, dev refs, or alpha
334
348
  refs that have already moved and continue filling any missing floating tags
335
349
  before writing the transaction state as `complete`.
350
+
351
+ ## What each verification proves
352
+
353
+ | Evidence | Meaning and reuse boundary |
354
+ | --- | --- |
355
+ | Full source execution | `pnpm run check` runs source tests, Rust gates, policy checks and generated artifact checks. Each Node test file runs once; the focused `check:contracts` command still includes its 22 contract test files. |
356
+ | Merge queue proof | A successful full merge-group run seals its exact source SHA/tree, workflow, check definition, WASM runtime, toolchain versions, dependency locks, hosted image and platform. The proof expires after six hours and is verified against the completed GitHub run attempt and artifact archive digest. |
357
+ | Push reuse | A Dev push may reuse that exact full execution. Its summary links the original run and proof; it does not claim to have rerun tests. Missing, failed, expired, ambiguous, tampered or unavailable evidence executes the full check. |
358
+ | Version-state projection | Requires an authenticated full-source proof for the exact base and an ancestor-bound delta containing only declared version files and derived material. The base generator reconstructs every tracked byte, including derived digests. Any source, workflow, lock, configuration, file-mode or unexplained output change executes the full check. Projection results cannot issue a new full-source proof. |
359
+ | Generated version-state check | `Version-state projection / <context>` describes generated material. It never uses a protected full-source check's name on v4. Required PR lineage, review and merge queue gates remain independent. |
360
+ | Candidate qualification | Validates the sealed candidate, admitted runtime, source lock and publication authority. Source test reuse grants no provider mutation authority. |
361
+ | Provider readback and settlement | Verifies actual tags, npm integrity, release assets and native receipt roots. Publication, next-development and binary distribution are reported separately. |
362
+
363
+ The protected `check` context keeps its stable name while step names and summaries
364
+ identify full execution, exact proof reuse, or generated projection. The two
365
+ consumer-policy checks execute inside the root check, without duplicate Verify
366
+ pre-steps. The root check uses the Rust-only contract command before its complete
367
+ Node suite, removing 22 repeated test-file executions without removing tests.
368
+
369
+ The public v4 consumer remains a thin floating-channel caller with both locks.
370
+ Linux, macOS and Windows each execute the declared lifecycle, clean-process
371
+ restore and runtime/source binding. Their platform and called-runtime identities
372
+ differ from the source Verify lane, so a Linux source proof cannot replace them.
373
+ The Stage Capsule checkpoint matrix also retains all three platforms. Shared
374
+ platform-independent logic lives in the root check and public runtime; there is
375
+ no Buildchain-only dogfood exception or persisted candidate runtime selector.
376
+
377
+ A local Linux sample on 2026-09-05 measured the original full check at
378
+ `a41c00a0c0b2dbd57c238cd9b326b167a1d27ca8` at 148.772 seconds and the updated check
379
+ at 126.731 seconds, both exit 0. The original plan executed 226 Node test files
380
+ plus 22 duplicate selections; the updated plan executes all 231 files once,
381
+ including the new negative and recovery tests (2,047 tests). These are individual
382
+ local measurements with existing tool caches; hosted queue/push reuse is proved
383
+ separately by the exact run attempt and evidence roots in each job summary.
@@ -77,8 +77,8 @@ line.
77
77
 
78
78
  Buildchain implements the same governance loop with:
79
79
 
80
- - `.github/workflows/release-verify.yml` for PR verification;
81
- - `.github/workflows/buildchain-ref-promotion.yml` for post-verify ref
80
+ - `.github/workflows/self-build-release-verify-compat.yml` for PR verification;
81
+ - `.github/workflows/self-release-promote.yml` for post-verify ref
82
82
  promotion; this workflow dogfoods the declarative
83
83
  `release-candidate-promote.yml` wrapper and does not hand-wire resolver,
84
84
  artifact download, publish-gate, or promote action steps;
@@ -246,7 +246,7 @@ while exact tags and SHAs remain the reproducible audit choice.
246
246
  ### Buildchain Alpha Self-Dogfood
247
247
 
248
248
  Buildchain continuously consumes its own current major alpha through
249
- `.github/workflows/buildchain-alpha-self-dogfood.yml`. Both lanes call the
249
+ `.github/workflows/self-build-alpha-dogfood.yml`. Both lanes call the
250
250
  released channel router at `build.yml@v3-alpha`. The auto lane must resolve
251
251
  `v3-alpha`; the explicit stable lane must resolve `v3`. Both execute the same
252
252
  declared install, build, and verify fixture, proving that a single consumer
@@ -295,7 +295,7 @@ resolution and evidence comparison.
295
295
 
296
296
  This is a post-publication consumer canary, not a release bootstrap. Source
297
297
  verification still runs the current commit, and
298
- `buildchain-ref-promotion.yml` still passes the verified exact SHA into the
298
+ `self-release-promote.yml` still passes the verified exact SHA into the
299
299
  promotion workflow. Patrol, dev-merge, repair, and promotion defaults remain on
300
300
  stable or exact refs so a broken alpha cannot prevent Buildchain from publishing
301
301
  its fix. When Buildchain opens a new major, inventory validation requires this
@@ -526,7 +526,7 @@ The repository policy can be declared once instead of repeated as CLI flags:
526
526
  ```toml
527
527
  [governance.dev.merge_queue]
528
528
  mode = "inherit"
529
- required_workflows = [".github/workflows/verify.yml"]
529
+ required_workflows = [".github/workflows/self-build-verify.yml"]
530
530
  ```
531
531
 
532
532
  `enabled` explicitly requires Buildchain to create or update an exact-branch
@@ -632,7 +632,7 @@ binds the caller commit/tree and both workflow digests.
632
632
  ```sh
633
633
  node .buildchain/workflow-contract-runtime/scripts/workflow-call-contract.mjs check \
634
634
  --caller-root . \
635
- --caller-workflow .github/workflows/release-new-version.yml \
635
+ --caller-workflow .github/workflows/self-release-new-version-compat.yml \
636
636
  --caller-repository kungfu-systems/example \
637
637
  --job promote \
638
638
  --callee-root .buildchain/workflow-contract-runtime \
@@ -1009,8 +1009,8 @@ v3.0.1-alpha.0
1009
1009
  When debugging or extending release behavior, read in this order:
1010
1010
 
1011
1011
  1. `docs/release-flow.md`
1012
- 2. `.github/workflows/release-verify.yml`
1013
- 3. `.github/workflows/buildchain-ref-promotion.yml`
1012
+ 2. `.github/workflows/self-build-release-verify-compat.yml`
1013
+ 3. `.github/workflows/self-release-promote.yml`
1014
1014
  4. `.github/workflows/release-candidate-promote.yml`
1015
1015
  5. `.github/workflows/.release-candidate-promote.yml`
1016
1016
  6. `actions/promote-buildchain-ref/README.md`
@@ -1,3 +1,22 @@
1
+ ---
2
+ status: active
3
+ period: ongoing
4
+ theme: generic-kfd-adopter-binding
5
+ doc_type: reference
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-06
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-06
16
+ visible_context: Buildchain v3 implementation and v4 source and regression tests.
17
+ invisible_context_boundary: No credentials or private runtime evidence inspected.
18
+ ---
19
+
1
20
  # Release Passport
2
21
 
3
22
  Buildchain Release Passport is the core product mechanism: a mature product
@@ -403,8 +422,14 @@ Pass the standard full-cut declaration with `--kfd-adopter-manifest-json`
403
422
  together with three `--kfd-product-gate-json` arguments for KFD-4, KFD-5, and
404
423
  KFD-7. The collector invokes the verifier from the exact installed
405
424
  `@kungfu-tech/kfd` package, binds the package artifact, registry and verifier
406
- roots, the exact Buildchain source, the manifest/report/bundle witness roots,
407
- and the existing product-gate roots. It emits `kfd-adopter-manifest.json`,
425
+ roots, the collector's exact product repository and source, the
426
+ manifest/report/bundle witness roots, and the existing product-gate roots. A
427
+ non-Buildchain adopter is accepted only when its manifest identity, artifact
428
+ coordinate, and all three product-gate repositories match the collector's
429
+ `--repository` value. The lower-level Node API exposes the same boundary as
430
+ `expectedAdopterId`, `expectedSourceRepository`, and `expectedSourceSha`, while
431
+ omitted identity/repository values retain the Buildchain self-release default.
432
+ It emits `kfd-adopter-manifest.json`,
408
433
  `kfd-adopter-manifest-gate.json`, and a legacy `kfd-support.json` projection.
409
434
  The release passport and `artifact-evidence.json` carry the same rooted
410
435
  `kfdAdopter` binding.
@@ -128,10 +128,26 @@ in the final Release Passport. See
128
128
  [`v4-runtime-ref-resume-authority.md`](v4-runtime-ref-resume-authority.md).
129
129
 
130
130
  See the normative
131
- [`v4 floating consumer policy`](../architecture/v4-floating-consumer-policy.md)
131
+ [`v4 floating consumer policy`](../architecture/floating-consumer-policy.md)
132
132
  and its machine declaration for the exact acceptance boundary. This policy does
133
133
  not change v3 behavior.
134
134
 
135
+ ### Universal Bootstrap verified-caller admission
136
+
137
+ The v4 Universal Bootstrap does not maintain a repository allowlist. Any
138
+ repository that can call the public reusable workflow may submit the single
139
+ versioned request envelope. Admission still fails closed unless the request's
140
+ consumer repository, caller workflow path, and source SHA exactly match the
141
+ GitHub-observed caller context.
142
+
143
+ Open consumer admission does not mean open execution authority. The candidate
144
+ must still be an exact Buildchain SHA selected through a governed discovery
145
+ ref, bind the current candidate-owned admission root, have exact-head
146
+ independent review and required checks, request an admitted capability and
147
+ contract-root set, stay within the permission ceiling and validity window, and
148
+ inherit only authority available from the caller. The candidate engine exposes
149
+ bounded capability adapters; it does not accept caller-provided shell or code.
150
+
135
151
  ## Advanced Workflow
136
152
 
137
153
  Consumers that need direct workflow-shell or runtime control call the advanced
@@ -33,7 +33,7 @@ minimal v4 absorption base
33
33
  verified protected-base advances through
34
34
  `dev/v4/v4.0@e0342713c7447960c13bd73377282b2e93f4853d` before delivery. These
35
35
  identities, the v3 vector-suite root, and the KFD package cut are committed in
36
- [`v4-adopter-delivery-parity.json`](../architecture/v4-adopter-delivery-parity.json)
36
+ [`adopter-delivery-parity.json`](../architecture/adopter-delivery-parity.json)
37
37
  and exposed by the public Node API.
38
38
 
39
39
  ## Public contract
@@ -110,12 +110,12 @@ artifact_profile_selector = "package"
110
110
  ```
111
111
 
112
112
  The public reusable workflow is
113
- `kungfu-systems/buildchain/.github/workflows/v4-adopter-delivery.yml@v4` for
113
+ `kungfu-systems/buildchain/.github/workflows/public-build-adopter-qualification.yml@v4` for
114
114
  stable use and `@v4-alpha` during prerelease evaluation. It resolves the exact
115
115
  called-workflow SHA, enforces floating selector plus dual-lock consumer
116
116
  admission, and runs the same CLI on Linux, macOS, and Windows. Buildchain
117
117
  dogfoods it through the thin
118
- [`v4-adopter-delivery-dogfood.yml`](../.github/workflows/v4-adopter-delivery-dogfood.yml)
118
+ [`self-build-adopter-dogfood.yml`](../.github/workflows/self-build-adopter-dogfood.yml)
119
119
  caller, which contains no steps or local orchestration and persists only the
120
120
  floating `@v4-alpha` selector.
121
121
 
@@ -139,7 +139,7 @@ terminal verification and N-1 bootstrap must pass, and the independent
139
139
  The workflow then reconciles one exact report from each platform. Final family
140
140
  qualification combines the Buildchain self-dogfood and `agent-hub-demo`
141
141
  matrices through the exported
142
- `@kungfu-tech/buildchain/v4-cross-platform-adopter-qualification` aggregator.
142
+ `@kungfu-tech/buildchain/cross-platform-adopter-qualification` aggregator.
143
143
  The report and aggregate explicitly grant no production, provider, release, or
144
144
  stable-publication authority.
145
145
 
@@ -41,21 +41,21 @@ Event, receipt, and typed-fault objects use closed versioned shapes in [`contrac
41
41
 
42
42
  ## Implementations and proof
43
43
 
44
- - JavaScript: [`packages/core/v4-canonical-contracts.js`](../packages/core/v4-canonical-contracts.js)
45
- - Rust: [`crates/buildchain-v4-contracts`](../crates/buildchain-v4-contracts)
46
- - Shared golden and adversarial cases: [`architecture/v4-canonical-contract-fixtures.json`](../architecture/v4-canonical-contract-fixtures.json)
44
+ - JavaScript: [`packages/core/canonical-contracts.js`](../packages/core/canonical-contracts.js)
45
+ - Rust: [`crates/buildchain-domain-contracts`](../crates/buildchain-domain-contracts)
46
+ - Shared golden and adversarial cases: [`architecture/canonical-contract-fixtures.json`](../architecture/canonical-contract-fixtures.json)
47
47
 
48
48
  Run the focused proof with:
49
49
 
50
50
  ```sh
51
- pnpm run check:v4-contracts
51
+ pnpm run check:contracts
52
52
  ```
53
53
 
54
54
  The check validates both implementations, compares exact UTF-8 bytes and SHA-256 roots, exercises invalid numbers, keys, clocks, domains, and envelope shapes, and scans the pure libraries for ambient clock or provider imports. Delivery Warrant decide/fold, shadow invocation, provider effects, and production authority remain outside this contract slice.
55
55
 
56
56
  ## Shared Delivery Warrant fixture runner
57
57
 
58
- The versioned trace contract in [`contracts/v4-delivery-warrant-trace-v1.schema.json`](../contracts/v4-delivery-warrant-trace-v1.schema.json) is the language-neutral boundary for retained Delivery Warrant fixtures. The JavaScript runner in [`packages/core/v4-delivery-warrant-fixture-runner.js`](../packages/core/v4-delivery-warrant-fixture-runner.js) and the Rust runner in [`crates/buildchain-v4-contracts`](../crates/buildchain-v4-contracts) consume the same UTF-8 fixture bytes and emit the same deterministic semantic projection.
58
+ The versioned trace contract in [`contracts/v4-delivery-warrant-trace-v1.schema.json`](../contracts/v4-delivery-warrant-trace-v1.schema.json) is the language-neutral boundary for retained Delivery Warrant fixtures. The JavaScript runner in [`packages/core/delivery-warrant-fixture-runner.js`](../packages/core/delivery-warrant-fixture-runner.js) and the Rust runner in [`crates/buildchain-domain-contracts`](../crates/buildchain-domain-contracts) consume the same UTF-8 fixture bytes and emit the same deterministic semantic projection.
59
59
 
60
60
  Each trace is closed and ordered. It binds the exact prior root, event, action or typed fault, canonical successor bytes and root, generation, fencing counter, ordered declarative effects, provider-neutral observations, and rooted receipt. The runner verifies the full root chain before returning a projection. Malformed JSON, missing or unknown fields, reordered sequences, stale roots, and unsupported contract versions fail closed.
61
61
 
@@ -68,13 +68,13 @@ The runner is not a state-machine implementation and does not sample time, execu
68
68
 
69
69
  ## TypeScript shadow adapter
70
70
 
71
- The adapter in [`packages/core/v4-delivery-warrant-shadow-adapter.js`](../packages/core/v4-delivery-warrant-shadow-adapter.js) runs the existing TypeScript v3 fixture projection first and preserves that exact result as the only authoritative output. When explicitly enabled, it sends the same canonical input bytes to the replaceable Rust host command, requires the effect-disabled host capability, and captures the returned semantic projection only as a non-authoritative observation. Rust never receives effect authority, and success, failure, timeout, cancellation, malformed output, or an unsupported host cannot change the v3 result.
71
+ The adapter in [`packages/core/delivery-warrant-shadow-adapter.js`](../packages/core/delivery-warrant-shadow-adapter.js) runs the existing TypeScript v3 fixture projection first and preserves that exact result as the only authoritative output. When explicitly enabled, it sends the same canonical input bytes to the replaceable Rust host command, requires the effect-disabled host capability, and captures the returned semantic projection only as a non-authoritative observation. Rust never receives effect authority, and success, failure, timeout, cancellation, malformed output, or an unsupported host cannot change the v3 result.
72
72
 
73
73
  Shadow retention accepts only checked-in fixtures or captured replays explicitly marked public-safe. Each returned observation binds the input root, exact TypeScript and Rust source revisions, validator version, capture time, fixed retention deadline, both projections, and sanitized diagnostics. It contains no comparison verdict or cutover signal. The adapter is disabled unless the caller opts in or sets `BUILDCHAIN_V4_WARRANT_SHADOW=enabled`; even then, invalid source bindings or an unsafe retention class skip Rust invocation.
74
74
 
75
75
  ## Pure Rust Delivery Warrant domain
76
76
 
77
- The `warrant` module in [`crates/buildchain-v4-contracts`](../crates/buildchain-v4-contracts) implements the protected Delivery Warrant manifest as provider-free typed state, seven event decisions, and a separate fold. It freezes all nine candidate states and all nine primitives from the shadow bootstrap plan. Every decision binds the event's exact `subjectRoot`, takes time only from the validated event envelope, and returns a typed action or fault. Fold produces a canonical successor; the combined transition produces only ordered `persist-successor` and `request-admission` intents plus a rooted receipt. It never executes either intent.
77
+ The `warrant` module in [`crates/buildchain-domain-contracts`](../crates/buildchain-domain-contracts) implements the protected Delivery Warrant manifest as provider-free typed state, seven event decisions, and a separate fold. It freezes all nine candidate states and all nine primitives from the shadow bootstrap plan. Every decision binds the event's exact `subjectRoot`, takes time only from the validated event envelope, and returns a typed action or fault. Fold produces a canonical successor; the combined transition produces only ordered `persist-successor` and `request-admission` intents plus a rooted receipt. It never executes either intent.
78
78
 
79
79
  Duplicate submission deliberately retains the legacy generation/root mutation for shadow comparability. Manifest aliases remain explicit, waiting and blocked remain valid states without invented public transitions, and response-loss reconciliation is symmetric for every declarative effect. Stale expected-old roots and fences, lease expiry, terminal duplicates, cancellation, response loss, provider conflict, and retry exhaustion are closed typed outcomes. The retry policy permits at most one reread/redecision and then stops.
80
80
 
@@ -52,7 +52,7 @@ buildchain dev warrant observe \
52
52
  --read-typescript-revision <sha> \
53
53
  --read-rust-revision <sha> \
54
54
  --read-validator-version semantic-diff-gate-v1 \
55
- --read-evidence-output .buildchain/dev-delivery/v4-read-evidence.json
55
+ --read-evidence-output .buildchain/dev-delivery/read-evidence.json
56
56
  ```
57
57
 
58
58
  The returned command result keeps the existing v3 observation schema for
@@ -64,8 +64,8 @@ root, and the retained evidence receipt root.
64
64
  Focused verification:
65
65
 
66
66
  ```sh
67
- node --test tests/v4-delivery-warrant-read-candidate.test.mjs
68
- pnpm run check:v4-contracts
67
+ node --test tests/delivery-warrant-read-candidate.test.mjs
68
+ pnpm run check:contracts
69
69
  ```
70
70
 
71
71
  This candidate does not authorize a v4 write cutover. Protected-window parity,