@kungfu-tech/buildchain 4.0.0 → 4.0.1-alpha.10

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 (228) hide show
  1. package/AGENTS.md +13 -5
  2. package/actions/promote-buildchain-ref/README.md +11 -6
  3. package/actions/release-tail/README.md +8 -0
  4. package/architecture/ci-lane-change-budget.json +187 -0
  5. package/architecture/decisions/0002-next-development-transition.md +101 -0
  6. package/architecture/decisions/0003-two-phase-delivery-warrant.md +152 -0
  7. package/architecture/internal-capabilities.json +219 -7
  8. package/architecture/maintainability-policy.json +246 -29
  9. package/architecture/release-tail-contract-inventory.json +5 -2
  10. package/architecture/v3-core-mechanism-inventory.json +91 -0
  11. package/architecture/v4-adopter-delivery-parity.json +32 -5
  12. package/architecture/v4-capability-state-machine-manifest.json +73 -0
  13. package/architecture/v4-compatibility-facts-parity.json +77 -0
  14. package/architecture/v4-delivery-authority-parity.json +250 -0
  15. package/architecture/v4-delivery-warrant-shadow-fixtures.json +41 -9
  16. package/architecture/v4-floating-consumer-policy.json +81 -0
  17. package/architecture/v4-floating-consumer-policy.md +32 -0
  18. package/architecture/v4-next-development-parity.json +192 -0
  19. package/architecture/v4-publication-rehearsal-parity.json +84 -0
  20. package/architecture/v4-release-train-parity.json +1 -0
  21. package/architecture/v4-runtime-ref-resume-authority.json +64 -0
  22. package/architecture/v4-stage-capsule-qualification.json +2 -2
  23. package/architecture/v4-tail-reseal-parity.json +150 -0
  24. package/bin/buildchain.mjs +32 -3
  25. package/bin/internal/adopter-delivery-cli.mjs +70 -0
  26. package/bin/internal/command-registry.mjs +3 -0
  27. package/bin/internal/compatibility-facts-cli.mjs +101 -0
  28. package/bin/internal/trust-release-release-handlers.mjs +5 -0
  29. package/contracts/dev-delivery-authority-v2.schema.json +662 -0
  30. package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +47 -0
  31. package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +47 -0
  32. package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +40 -0
  33. package/contracts/fixtures/v4-adopter-delivery-v1/archive-template.json +19 -0
  34. package/contracts/fixtures/v4-adopter-delivery-v1/bootstrap-positive.json +93 -0
  35. package/contracts/fixtures/v4-adopter-delivery-v1/gate-positive.json +29 -0
  36. package/contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json +26 -0
  37. package/contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json +50 -0
  38. package/contracts/fixtures/v4-compatibility-facts-v1/shared.json +1129 -0
  39. package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +59 -0
  40. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/artifacts/product.bin +1 -0
  41. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/config/buildchain.toml +5 -0
  42. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/release-activation.json +1 -0
  43. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/signed-channel.json +1 -0
  44. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/evidence/qualification.json +1 -0
  45. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/candidate.json +5 -0
  46. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/release-passport.json +1 -0
  47. package/contracts/fixtures/v4-publication-rehearsal-v1/capsule.json +707 -0
  48. package/contracts/fixtures/v4-publication-rehearsal-v1/offline-vectors.json +27 -0
  49. package/contracts/fixtures/v4-runtime-ref-resume-authority-v1/scenario.json +15 -0
  50. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +229 -0
  51. package/contracts/next-development-request-v1.schema.json +66 -0
  52. package/contracts/next-development-transition-v1.schema.json +292 -0
  53. package/contracts/v4-adopter-delivery-v1.schema.json +81 -0
  54. package/contracts/v4-compatibility-facts-v1.schema.json +230 -0
  55. package/contracts/v4-floating-consumer-policy-receipt-v1.schema.json +107 -0
  56. package/contracts/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  57. package/contracts/v4-runtime-ref-resume-authority-v1.schema.json +235 -0
  58. package/contracts/v4-tail-reseal-v1.schema.json +276 -0
  59. package/dist/site/agent-index.json +5 -0
  60. package/dist/site/artifact-schemas.json +10 -0
  61. package/dist/site/buildchain-contract.json +1562 -44
  62. package/dist/site/buildchain-site.json +684 -42
  63. package/dist/site/capability-registry.json +17 -14
  64. package/dist/site/cli-registry.json +205 -3
  65. package/dist/site/controller-registry.json +62 -6
  66. package/dist/site/kfd-claims.json +551 -22
  67. package/dist/site/kfd-upstream-aggregate.json +1 -1
  68. package/dist/site/manual-registry.json +55 -9
  69. package/dist/site/node-api-registry.json +15247 -8690
  70. package/dist/site/page-registry.json +647 -29
  71. package/dist/site/public-surface-audit.json +876 -55
  72. package/dist/site/publication-authority-registry.json +44 -8
  73. package/dist/site/publication-registry.json +4 -4
  74. package/dist/site/release-provenance.json +26 -0
  75. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +662 -0
  76. package/dist/site/schemas/release-tail-capabilities-v1.schema.json +199 -0
  77. package/dist/site/schemas/v4-adopter-delivery-v1.schema.json +81 -0
  78. package/dist/site/schemas/v4-compatibility-facts-v1.schema.json +230 -0
  79. package/dist/site/schemas/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  80. package/dist/site/site-manifest.json +37 -13
  81. package/dist/site/workflow-registry.json +200 -22
  82. package/docs/MAP.md +10 -2
  83. package/docs/cli-reference.md +404 -13
  84. package/docs/cli.md +8 -0
  85. package/docs/dev-alpha-candidate-patrol.md +8 -0
  86. package/docs/dev-delivery-qualification-landing-adr.md +251 -0
  87. package/docs/dev-delivery-warrant.md +361 -30
  88. package/docs/lifecycle-protocol.md +41 -0
  89. package/docs/next-development-transition.md +118 -0
  90. package/docs/node-api-reference.md +748 -322
  91. package/docs/release-tail-provider-plane.md +30 -0
  92. package/docs/reusable-build-surface.md +41 -0
  93. package/docs/runtime-train-validation.md +10 -0
  94. package/docs/v4-adopter-delivery.md +133 -0
  95. package/docs/v4-compatibility-facts.md +91 -0
  96. package/docs/v4-publication-rehearsal.md +130 -0
  97. package/docs/v4-runtime-ref-resume-authority.md +69 -0
  98. package/docs/v4-tail-reseal.md +73 -0
  99. package/docs/versioning.md +4 -2
  100. package/package.json +36 -6
  101. package/packages/core/adopter-delivery-passport.js +259 -0
  102. package/packages/core/adopter-delivery-vectors.js +158 -0
  103. package/packages/core/adopter-delivery-vectors.json +77 -0
  104. package/packages/core/artifact-signing.js +61 -0
  105. package/packages/core/buildchain-agent-manuals.js +3 -0
  106. package/packages/core/buildchain-compatibility-authority.js +336 -0
  107. package/packages/core/buildchain-compatibility-fact.js +394 -0
  108. package/packages/core/buildchain-compatibility-facts.json +217 -0
  109. package/packages/core/buildchain-compatibility-proof.js +566 -0
  110. package/packages/core/buildchain-config.js +150 -1
  111. package/packages/core/buildchain-contract.js +96 -143
  112. package/packages/core/buildchain-delivery-bootstrap.js +240 -0
  113. package/packages/core/buildchain-delivery-infrastructure.js +164 -0
  114. package/packages/core/buildchain-delivery-self-dogfood.js +395 -0
  115. package/packages/core/buildchain-publication-authority.js +1 -0
  116. package/packages/core/channel-candidate.js +8 -0
  117. package/packages/core/channel-promotion-baseline.js +55 -0
  118. package/packages/core/ci-lane-change-budget.js +247 -0
  119. package/packages/core/dev-alpha-candidate-selection.js +10 -2
  120. package/packages/core/dev-delivery-authority-candidate.js +270 -0
  121. package/packages/core/dev-delivery-authority-evidence.js +146 -0
  122. package/packages/core/dev-delivery-authority-landing.js +461 -0
  123. package/packages/core/dev-delivery-authority-observation.js +48 -0
  124. package/packages/core/dev-delivery-authority-qualification.js +591 -0
  125. package/packages/core/dev-delivery-authority-settlement.js +213 -0
  126. package/packages/core/dev-delivery-authority-state.js +583 -0
  127. package/packages/core/dev-delivery-candidate-identity.js +13 -0
  128. package/packages/core/dev-delivery-contract-surface.js +76 -0
  129. package/packages/core/dev-delivery-execution-failure.js +133 -0
  130. package/packages/core/dev-delivery-execution-transfer.js +592 -0
  131. package/packages/core/dev-delivery-landing-admission-core.js +119 -0
  132. package/packages/core/dev-delivery-landing-readback.js +598 -0
  133. package/packages/core/dev-delivery-landing-terminal-evidence.js +271 -0
  134. package/packages/core/dev-delivery-landing-testing-port.js +6 -0
  135. package/packages/core/dev-delivery-native-execution.js +110 -0
  136. package/packages/core/dev-delivery-native-proof.js +562 -0
  137. package/packages/core/dev-delivery-process-boundary.js +563 -0
  138. package/packages/core/dev-delivery-proof.js +37 -3
  139. package/packages/core/dev-delivery-provider-attempt.js +127 -0
  140. package/packages/core/dev-delivery-provider-heartbeat.js +382 -0
  141. package/packages/core/dev-delivery-warrant-cancellation.js +1 -0
  142. package/packages/core/dev-delivery-warrant-qualification.js +145 -0
  143. package/packages/core/dev-delivery-warrant-settlement.js +237 -36
  144. package/packages/core/dev-delivery-warrant-state.js +587 -0
  145. package/packages/core/dev-delivery-warrant.js +328 -370
  146. package/packages/core/github-governance-authority.js +1 -0
  147. package/packages/core/index.js +7 -0
  148. package/packages/core/kungfu-temporal-fact.js +557 -0
  149. package/packages/core/legacy-kfd-adopter-driver.js +167 -0
  150. package/packages/core/next-development-candidate-reservation.js +186 -0
  151. package/packages/core/next-development-controller.js +728 -0
  152. package/packages/core/next-development-projection.js +287 -0
  153. package/packages/core/next-development-transition.js +738 -0
  154. package/packages/core/paper-agent-entry.js +11 -5
  155. package/packages/core/paper.js +16 -5
  156. package/packages/core/publication-authority.js +5 -5
  157. package/packages/core/published-delivery-authority.js +266 -0
  158. package/packages/core/release-candidate-recovery.js +66 -11
  159. package/packages/core/release-candidate.js +79 -19
  160. package/packages/core/release-passport.js +271 -38
  161. package/packages/core/v4-adopter-delivery-parity.js +3 -3
  162. package/packages/core/v4-adopter-delivery.js +359 -0
  163. package/packages/core/v4-canonical-contracts.js +5 -0
  164. package/packages/core/v4-delivery-warrant-read-candidate.js +10 -3
  165. package/packages/core/v4-floating-consumer-evidence.js +338 -0
  166. package/packages/core/v4-floating-consumer-policy.js +569 -0
  167. package/packages/core/v4-floating-consumer-release-passport.js +153 -0
  168. package/packages/core/v4-publication-rehearsal-capsule.js +468 -0
  169. package/packages/core/v4-publication-rehearsal-provider-bindings.js +212 -0
  170. package/packages/core/v4-publication-rehearsal.js +481 -0
  171. package/packages/core/v4-runtime-ref-resume-authority.js +625 -0
  172. package/packages/core/v4-runtime-selector-persistence.js +228 -0
  173. package/packages/core/v4-tail-reseal-contract.js +26 -0
  174. package/packages/core/v4-tail-reseal-github.js +178 -0
  175. package/packages/core/v4-tail-reseal-receipt.js +225 -0
  176. package/packages/core/v4-tail-reseal.js +594 -0
  177. package/packages/core/workflow-yaml-contract.js +72 -2
  178. package/scripts/audit-publication-control-plane.mjs +31 -31
  179. package/scripts/buildchain-cli-help.mjs +41 -2
  180. package/scripts/check-ci-lane-change-budget.mjs +100 -0
  181. package/scripts/check-inventory.mjs +14 -3
  182. package/scripts/check-v4-floating-consumer-policy-contract.mjs +217 -0
  183. package/scripts/check-v4-public-dogfood-contract.mjs +6 -11
  184. package/scripts/dev-alpha-candidate-patrol.mjs +22 -1
  185. package/scripts/dev-delivery-authority-command-adapters.mjs +206 -0
  186. package/scripts/dev-delivery-authority-provider.mjs +28 -0
  187. package/scripts/dev-delivery-authority.mjs +490 -0
  188. package/scripts/dev-delivery-native-run.mjs +177 -0
  189. package/scripts/dev-delivery-process-boundary.mjs +260 -0
  190. package/scripts/dev-delivery-proof.mjs +67 -2
  191. package/scripts/dev-delivery-provider-heartbeat.mjs +215 -0
  192. package/scripts/dev-delivery-source-proof-replay.mjs +153 -0
  193. package/scripts/dev-delivery-source-proof-reuse.mjs +547 -0
  194. package/scripts/dev-delivery-two-phase-resume.mjs +345 -0
  195. package/scripts/dev-delivery-two-phase.mjs +573 -0
  196. package/scripts/dev-delivery-warrant-options.mjs +266 -0
  197. package/scripts/dev-delivery-warrant-store.mjs +231 -0
  198. package/scripts/dev-delivery-warrant.mjs +232 -194
  199. package/scripts/dev-pr-auto-merge.mjs +37 -48
  200. package/scripts/dev-pr-delivery-warrant.mjs +216 -2
  201. package/scripts/dev-pr-prequeue-guard.mjs +399 -0
  202. package/scripts/dev-qualification-patrol.mjs +9 -9
  203. package/scripts/dispatch-artifact-signing-authority.mjs +1 -1
  204. package/scripts/ensure-github-release.mjs +3 -3
  205. package/scripts/generate-channel-build-workflow.mjs +3 -0
  206. package/scripts/generate-channel-promotion-workflow.mjs +114 -14
  207. package/scripts/generate-next-development-guidance.mjs +49 -0
  208. package/scripts/generate-release-candidate-passport.mjs +192 -32
  209. package/scripts/generate-site-bundle.mjs +69 -4
  210. package/scripts/init-repo.mjs +26 -4
  211. package/scripts/inspect-artifact-signing-requests.mjs +6 -0
  212. package/scripts/next-development-self-dogfood-harness.mjs +460 -0
  213. package/scripts/next-development-self-dogfood.mjs +597 -0
  214. package/scripts/next-development-transition.mjs +47 -0
  215. package/scripts/npm-publish-transaction.mjs +103 -91
  216. package/scripts/promotion-channel-router.mjs +4 -4
  217. package/scripts/release-candidate-anchor-provenance.mjs +99 -0
  218. package/scripts/release-tail.mjs +51 -3
  219. package/scripts/release-train-self-dogfood.mjs +94 -92
  220. package/scripts/resume-from-candidate-run.mjs +565 -41
  221. package/scripts/seal-artifact-signing-requests.mjs +6 -0
  222. package/scripts/site-capability-metadata.mjs +43 -0
  223. package/scripts/stable-candidate-qualification.mjs +9 -10
  224. package/scripts/v4-consumer-policy.mjs +231 -0
  225. package/scripts/v4-publication-rehearsal-fixture.mjs +144 -0
  226. package/scripts/v4-tail-reseal-macos-rehearsal.mjs +134 -0
  227. package/scripts/v4-tail-reseal.mjs +416 -0
  228. package/templates/native-dev-delivery.yml +143 -0
package/AGENTS.md CHANGED
@@ -109,12 +109,20 @@ called only by the public reusable workflow and tests. `version-state`,
109
109
  `publish`, provider, signing, release, credential, AWS, and production-reuse
110
110
  effects remain excluded.
111
111
 
112
+ Buildchain v4 workflow calls persisted in tracked source use only `@v4` or
113
+ `@v4-alpha` and retain matching stable and alpha contract locks.
114
+ A source-persisted exact commit SHA, exact default, repository-variable indirection, nested
115
+ composite indirection, missing lock, or stale selected lock fails consumer
116
+ admission. Exact resolved SHAs remain evidence and runtime data, never a durable
117
+ selector.
118
+
112
119
  If public workflow recursion prevents candidate validation, publish the exact
113
- candidate at `train/v4/v4.0/<capability>` and make the thin caller consume that
114
- fully qualified public train ref. Fix failures in the train/public contract;
115
- never solve recursion with an internal exception. After qualification and
116
- protected merge, repin the durable caller to the exact protected commit when
117
- the delivery plan requires it. `pnpm run check` and protected Verify run
120
+ candidate at `train/v4/v4.0/<capability>`, keep the thin caller on `@v4-alpha`,
121
+ and pass the train only through the trusted non-persistent runtime input. Fix
122
+ failures in the train/public contract; never solve recursion with an internal exception.
123
+ Never use a persisted train/SHA selector. After qualification and protected
124
+ merge, the durable caller remains on the floating channel with refreshed dual
125
+ contract locks. `pnpm run check` and protected Verify run
118
126
  `scripts/check-v4-public-dogfood-contract.mjs`; changing this rule, its gate, or
119
127
  the protected caller requires independent `@kungfu-origin` review.
120
128
 
@@ -156,8 +156,10 @@ trusted channel workflow:
156
156
 
157
157
  ```yaml
158
158
  - uses: kungfu-systems/buildchain/actions/promote-buildchain-ref@v3
159
+ env:
160
+ BUILDCHAIN_TAG_UPDATE_TOKEN: ${{ secrets.BUILDCHAIN_PROMOTION_TOKEN }}
159
161
  with:
160
- token: ${{ secrets.BUILDCHAIN_PROMOTION_TOKEN }}
162
+ token: ${{ github.token }}
161
163
  generated-ref-update-token: ${{ github.token }}
162
164
  sha: ${{ github.sha }}
163
165
  target-ref: release/v3/v3.0
@@ -511,11 +513,14 @@ governance semantics:
511
513
  with either the `verification-command` input or `buildchain.toml`
512
514
  `lifecycle.verify` before any tags or channel refs move.
513
515
 
514
- The reusable promotion workflow keeps governance reads, generated status checks,
515
- and generated ref updates on the run-scoped `github.token`. When branch
516
- protection rejects generated bookkeeping, it supplies `BUILDCHAIN_PROMOTION_TOKEN`
517
- only through `generated-pull-request-token` so the same-repository recovery PR can
518
- be listed or created without broadening the governance client. Protected branch
516
+ The reusable promotion workflow keeps governance reads, provider finalization,
517
+ generated status checks, and generated ref updates on the run-scoped
518
+ `github.token`. It exposes `BUILDCHAIN_PROMOTION_TOKEN` only through the
519
+ step-scoped `BUILDCHAIN_TAG_UPDATE_TOKEN` environment variable and the
520
+ `generated-pull-request-token`: the former creates or moves public release tags,
521
+ while the latter lists or creates the
522
+ same-repository recovery PR when branch protection rejects generated bookkeeping.
523
+ Protected branch
519
524
  review and check rules guard human channel merges, while the reusable build trust
520
525
  gate checks the source-lock channel HEAD and merged same-repository PR lineage
521
526
  before heavy build runners start. This action still independently rechecks PR
@@ -11,3 +11,11 @@ not the adapter, compares the observed subject and target roots, owns retry and
11
11
  terminal classification, checkpoints state and emits the standardized receipt.
12
12
  Tokens remain Action inputs and are never written to the transaction or
13
13
  receipt.
14
+
15
+ When `rehearsal-capsule` is supplied, the same Action switches to the v4
16
+ Publication Rehearsal Capsule boundary. `simulate` and `replay` remain
17
+ effect-disabled. `provider` additionally requires exact capsule-bound
18
+ rehearsal authority, consumes only the capsule-rooted data bindings, and
19
+ records every request/readback while still emitting
20
+ `productionAuthority: false` and no Release Passport. See
21
+ [`docs/v4-publication-rehearsal.md`](../../docs/v4-publication-rehearsal.md).
@@ -0,0 +1,187 @@
1
+ {
2
+ "schema": "buildchain.ci-lane-change-budget/v1",
3
+ "authorityClassification": "repository-policy-enforcement",
4
+ "baseline": {
5
+ "gitRevision": "7fdf0b560670df65929ab2ee833c3d6339372d8a",
6
+ "source": "protected dev/v4/v4.0 before CI lane change-budget enforcement",
7
+ "laneSetRoot": "sha256:5bed17dc265f424e5d528949231146c633be954b8c3c2535ba18aec6ac1465a4",
8
+ "lanes": [
9
+ ".github/workflows/.auditable-demo.yml#gate",
10
+ ".github/workflows/.auditable-demo.yml#render",
11
+ ".github/workflows/.binary-release-assets.yml#publication-authority",
12
+ ".github/workflows/.binary-release-assets.yml#publish",
13
+ ".github/workflows/.build.yml#anchored-release-preflight",
14
+ ".github/workflows/.build.yml#artifact-signing-control",
15
+ ".github/workflows/.build.yml#artifact-transfer",
16
+ ".github/workflows/.build.yml#build-linux-container",
17
+ ".github/workflows/.build.yml#build-native",
18
+ ".github/workflows/.build.yml#controller-plan",
19
+ ".github/workflows/.build.yml#controller-receipt",
20
+ ".github/workflows/.build.yml#credential-island-macos",
21
+ ".github/workflows/.build.yml#finalize-artifact-signing",
22
+ ".github/workflows/.build.yml#relay-artifacts",
23
+ ".github/workflows/.build.yml#resolve-contract",
24
+ ".github/workflows/.build.yml#resolve-source",
25
+ ".github/workflows/.build.yml#summarize",
26
+ ".github/workflows/.build.yml#trust-gate",
27
+ ".github/workflows/.bump-minor-version.yml#bump",
28
+ ".github/workflows/.declarative-auditable-demo.yml#capture",
29
+ ".github/workflows/.declarative-auditable-demo.yml#publish",
30
+ ".github/workflows/.declarative-auditable-demo.yml#qualify",
31
+ ".github/workflows/.gate-profile.yml#aggregate",
32
+ ".github/workflows/.gate-profile.yml#plan",
33
+ ".github/workflows/.gate-profile.yml#run-gates",
34
+ ".github/workflows/.publication-authority.yml#verify",
35
+ ".github/workflows/.release-candidate-promote.yml#controller-plan",
36
+ ".github/workflows/.release-candidate-promote.yml#controller-receipt",
37
+ ".github/workflows/.release-candidate-promote.yml#github-artifact-attestation",
38
+ ".github/workflows/.release-candidate-promote.yml#preflight",
39
+ ".github/workflows/.release-candidate-promote.yml#promote",
40
+ ".github/workflows/.release-candidate-promote.yml#publication-authority",
41
+ ".github/workflows/.release-candidate-promote.yml#publication-plan",
42
+ ".github/workflows/.release-candidate-promote.yml#publication-qualification",
43
+ ".github/workflows/.release-candidate-promote.yml#publish-github-artifact-attestation-evidence",
44
+ ".github/workflows/.release-candidate-promote.yml#qualification-plan",
45
+ ".github/workflows/.release-candidate-promote.yml#release-candidate-preflight",
46
+ ".github/workflows/.release-docker.yml#retired",
47
+ ".github/workflows/.release-elastic-beanstalk.yml#retired",
48
+ ".github/workflows/.release-new-version.yml#retired",
49
+ ".github/workflows/.release-verify.yml#build",
50
+ ".github/workflows/.release-verify.yml#build_local",
51
+ ".github/workflows/.release-verify.yml#prepare",
52
+ ".github/workflows/.release-verify.yml#verify",
53
+ ".github/workflows/.sam-release.yml#retired",
54
+ ".github/workflows/.sam-verify.yml#build",
55
+ ".github/workflows/.sam-verify.yml#prepare",
56
+ ".github/workflows/.sam-verify.yml#verify",
57
+ ".github/workflows/.sync-release-page.yml#sync-release-page",
58
+ ".github/workflows/.sync-remote-git.yml#sync",
59
+ ".github/workflows/.web-surface.yml#apply-input-gate",
60
+ ".github/workflows/.web-surface.yml#controller-plan",
61
+ ".github/workflows/.web-surface.yml#controller-receipt",
62
+ ".github/workflows/.web-surface.yml#external-publication-authority",
63
+ ".github/workflows/.web-surface.yml#open-production-release-pr",
64
+ ".github/workflows/.web-surface.yml#plan",
65
+ ".github/workflows/.web-surface.yml#preview-apply",
66
+ ".github/workflows/.web-surface.yml#preview-cleanup",
67
+ ".github/workflows/.web-surface.yml#production-apply",
68
+ ".github/workflows/.web-surface.yml#publication-authority",
69
+ ".github/workflows/.web-surface.yml#publication-decision",
70
+ ".github/workflows/.web-surface.yml#release-intent",
71
+ ".github/workflows/.web-surface.yml#runtime",
72
+ ".github/workflows/.web-surface.yml#staging-apply",
73
+ ".github/workflows/.wheel-release.yml#retired",
74
+ ".github/workflows/.wheel-verify.yml#build",
75
+ ".github/workflows/.wheel-verify.yml#prepare",
76
+ ".github/workflows/.wheel-verify.yml#verify",
77
+ ".github/workflows/artifact-signing-authority.yml#deliver",
78
+ ".github/workflows/artifact-signing-authority.yml#detached",
79
+ ".github/workflows/artifact-signing-authority.yml#intake",
80
+ ".github/workflows/artifact-signing-authority.yml#macos",
81
+ ".github/workflows/artifact-signing-authority.yml#windows",
82
+ ".github/workflows/auditable-demo-media-profile-qualification.yml#qualify",
83
+ ".github/workflows/auditable-demo.yml#dogfood",
84
+ ".github/workflows/auditable-demo.yml#exact-binary",
85
+ ".github/workflows/binary-distribution.yml#binary",
86
+ ".github/workflows/binary-distribution.yml#dispatch-publication",
87
+ ".github/workflows/binary-distribution.yml#passport",
88
+ ".github/workflows/binary-distribution.yml#preflight",
89
+ ".github/workflows/binary-release-assets.yml#publish",
90
+ ".github/workflows/binary-release-assets.yml#resolve",
91
+ ".github/workflows/build-surface-fixture.yml#buildchain-package-candidate",
92
+ ".github/workflows/build-surface-fixture.yml#libnode-shaped",
93
+ ".github/workflows/build.yml#alpha",
94
+ ".github/workflows/build.yml#controller-plan",
95
+ ".github/workflows/build.yml#controller-receipt",
96
+ ".github/workflows/build.yml#override",
97
+ ".github/workflows/build.yml#resolve-channel",
98
+ ".github/workflows/build.yml#stable",
99
+ ".github/workflows/build.yml#summarize",
100
+ ".github/workflows/buildchain-alpha-self-dogfood.yml#alpha-consumer",
101
+ ".github/workflows/buildchain-alpha-self-dogfood.yml#stable-consumer",
102
+ ".github/workflows/buildchain-alpha-self-dogfood.yml#verify-floating-refs",
103
+ ".github/workflows/buildchain-candidate-recovery-dogfood-failure.yml#deterministic-startup-router-failure",
104
+ ".github/workflows/buildchain-dev-delivery.yml#deliver",
105
+ ".github/workflows/buildchain-patrol-daily.yml#patrol",
106
+ ".github/workflows/buildchain-patrol-monthly.yml#patrol",
107
+ ".github/workflows/buildchain-patrol-weekly.yml#patrol",
108
+ ".github/workflows/buildchain-patrol.yml#patrol",
109
+ ".github/workflows/buildchain-ref-promotion-recovery.yml#consumer-admission",
110
+ ".github/workflows/buildchain-ref-promotion-recovery.yml#promote-alpha-recovery",
111
+ ".github/workflows/buildchain-ref-promotion.yml#promote-alpha",
112
+ ".github/workflows/buildchain-ref-promotion.yml#promote-stable",
113
+ ".github/workflows/buildchain-ref-promotion.yml#reject-invalid-candidate-recovery",
114
+ ".github/workflows/buildchain-ref-promotion.yml#reject-invalid-durable-recovery",
115
+ ".github/workflows/buildchain-ref-promotion.yml#reject-manual-apply",
116
+ ".github/workflows/buildchain-stable-candidate-patrol.yml#patrol",
117
+ ".github/workflows/buildchain-stable-candidate-qualification.yml#qualify",
118
+ ".github/workflows/candidate-lab.yml#lab",
119
+ ".github/workflows/check.yml#check",
120
+ ".github/workflows/dev-alpha-candidate-patrol.yml#observe",
121
+ ".github/workflows/dev-alpha-candidate-patrol.yml#settle",
122
+ ".github/workflows/dev-delivery-warrant-cancel.yml#cancel",
123
+ ".github/workflows/dev-delivery-warrant-close.yml#close",
124
+ ".github/workflows/dev-merge-queue-governance.yml#reconcile",
125
+ ".github/workflows/dev-pr-auto-merge.yml#admission",
126
+ ".github/workflows/dev-pr-auto-merge.yml#delivery-heartbeat",
127
+ ".github/workflows/dev-pr-auto-merge.yml#merge-dev-prs",
128
+ ".github/workflows/dev-pr-auto-merge.yml#native-execution",
129
+ ".github/workflows/dev-pr-auto-merge.yml#seal-native-execution",
130
+ ".github/workflows/dev-qualification-patrol.yml#mutate",
131
+ ".github/workflows/dev-qualification-patrol.yml#observe",
132
+ ".github/workflows/engineering-housekeeper-daily.yml#apply",
133
+ ".github/workflows/engineering-housekeeper-daily.yml#invalid-apply-gate",
134
+ ".github/workflows/engineering-housekeeper-daily.yml#report",
135
+ ".github/workflows/engineering-housekeeper-monthly.yml#apply",
136
+ ".github/workflows/engineering-housekeeper-monthly.yml#invalid-apply-gate",
137
+ ".github/workflows/engineering-housekeeper-monthly.yml#report",
138
+ ".github/workflows/engineering-housekeeper-weekly.yml#apply",
139
+ ".github/workflows/engineering-housekeeper-weekly.yml#invalid-apply-gate",
140
+ ".github/workflows/engineering-housekeeper-weekly.yml#report",
141
+ ".github/workflows/engineering-housekeeper.yml#delete-branches",
142
+ ".github/workflows/engineering-housekeeper.yml#label-pull-requests",
143
+ ".github/workflows/engineering-housekeeper.yml#plan",
144
+ ".github/workflows/github-artifact-attestation.yml#attest",
145
+ ".github/workflows/github-governance-audit.yml#audit",
146
+ ".github/workflows/npm-publish.yml#dry-run",
147
+ ".github/workflows/paper-release-sealed.yml#publication-authority",
148
+ ".github/workflows/paper-release-sealed.yml#publication-candidate",
149
+ ".github/workflows/paper-release-sealed.yml#publish",
150
+ ".github/workflows/paper-release.yml#paper-release",
151
+ ".github/workflows/paper-release.yml#publication-authority",
152
+ ".github/workflows/patrol-daily.yml#patrol",
153
+ ".github/workflows/patrol-monthly.yml#patrol",
154
+ ".github/workflows/patrol-observed-evidence.yml#publish",
155
+ ".github/workflows/patrol-weekly.yml#patrol",
156
+ ".github/workflows/publication-artifact.yml#publication",
157
+ ".github/workflows/release-candidate-promote.yml#alpha",
158
+ ".github/workflows/release-candidate-promote.yml#consumer-admission",
159
+ ".github/workflows/release-candidate-promote.yml#resolve-promotion",
160
+ ".github/workflows/release-candidate-promote.yml#stable",
161
+ ".github/workflows/release-governance-reconcile.yml#reconcile",
162
+ ".github/workflows/release-line-bootstrap.yml#bootstrap",
163
+ ".github/workflows/release-new-version.yml#buildchain-self-release",
164
+ ".github/workflows/release-propagation.yml#propagate",
165
+ ".github/workflows/release-tail.yml#release-tail",
166
+ ".github/workflows/release-verify.yml#try",
167
+ ".github/workflows/release-verify.yml#verify",
168
+ ".github/workflows/schedule-purge-artifacts.yml#delete-artifacts",
169
+ ".github/workflows/self-hosted-runner-smoke.yml#smoke",
170
+ ".github/workflows/stable-candidate-patrol.yml#patrol",
171
+ ".github/workflows/v4-adopter-delivery-dogfood.yml#dogfood",
172
+ ".github/workflows/v4-adopter-delivery.yml#conformance",
173
+ ".github/workflows/v4-adopter-delivery.yml#consumer-admission",
174
+ ".github/workflows/v4-public-consumer-dogfood.yml#dogfood",
175
+ ".github/workflows/v4-publication-rehearsal-dogfood.yml#rehearsal",
176
+ ".github/workflows/v4-stage-capsule-canary.yml#consumer-admission",
177
+ ".github/workflows/v4-stage-capsule-canary.yml#qualify",
178
+ ".github/workflows/v4-stage-capsule-canary.yml#reconcile",
179
+ ".github/workflows/v4-tail-reseal.yml#plan",
180
+ ".github/workflows/v4-tail-reseal.yml#platforms",
181
+ ".github/workflows/v4-tail-reseal.yml#seal",
182
+ ".github/workflows/verify.yml#check",
183
+ ".github/workflows/verify.yml#stage-capsule-checkpoints"
184
+ ]
185
+ },
186
+ "declarations": []
187
+ }
@@ -0,0 +1,101 @@
1
+ ---
2
+ status: accepted
3
+ period: 2026-08-11
4
+ theme: next-development-transition
5
+ doc_type: architecture-decision-record
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: A
10
+ review_state: self-reviewed
11
+ last_reviewed: 2026-08-11
12
+ ---
13
+
14
+ # ADR 0002: Alpha Publication and Next-development Are Separate Transactions
15
+
16
+ ## Status
17
+
18
+ Accepted. This decision is normative for Buildchain promotion controllers and
19
+ for generated consumer guidance.
20
+
21
+ ## Context
22
+
23
+ An Alpha publication and preparation of the following development version have
24
+ different trust boundaries. Alpha publication establishes public, immutable
25
+ facts about version N. Preparing N+1 changes repository version material and
26
+ may require a protected pull request or an upstream anchor that does not exist
27
+ when Alpha N completes. Treating both operations as one success condition makes
28
+ a post-publication conflict appear to invalidate a publication that already
29
+ succeeded, and encourages retries to move Alpha refs while repairing Dev.
30
+
31
+ Buildchain supports two legal version models:
32
+
33
+ - `semver` with `next = "auto"`, where N+1 increments the Alpha sequence on
34
+ the same semantic patch; and
35
+ - `anchored` with `next = "manual"`, where no version may be inferred before a
36
+ declared anchor manifest is materialized and rooted.
37
+
38
+ The crossed combinations `semver/manual` and `anchored/auto` have no defined
39
+ meaning and are rejected.
40
+
41
+ ## Decision
42
+
43
+ Alpha publication reaches its own terminal success before a next-development
44
+ transition is created. The transition records the completed Alpha exact tag,
45
+ release commit, tree, publication evidence root, and completion time. A
46
+ deterministic idempotency key covers that completed-Alpha root together with
47
+ the repository, legal version model, and the role-separated adapter path set.
48
+
49
+ The independent next-development state machine is:
50
+
51
+ ```text
52
+ planned ----------------------> materialized -> pr-pending -> merged -> verified
53
+ \ \---------------------------> merged
54
+ -> waiting-anchor ----------> materialized
55
+ ```
56
+
57
+ `semver/auto` derives its target while planned. `anchored/manual` remains in
58
+ `waiting-anchor` until an exact semantic version and the digest of the declared
59
+ anchor manifest are supplied. `pr-pending` is durable incomplete state, not a
60
+ publication failure. Direct materialization may proceed to `merged` or
61
+ `verified` when repository governance does not require a pull request.
62
+
63
+ Every non-initial state transition is compare-and-swap guarded and rooted in
64
+ explicit evidence. Replaying an identical request is a no-op. Alpha outcome is
65
+ always `preserved-success`; no transition may write an Alpha branch, exact tag,
66
+ or floating tag. A controller that needs to repair next-development state may
67
+ write only paths declared by `version.files` and `version.derived_files`; the
68
+ configured anchor manifest is declared read-only authority.
69
+
70
+ ## Local adapter boundary
71
+
72
+ The reference adapter is provider-neutral. It reads the checked-in
73
+ `buildchain.toml`, derives the sorted path allowlist, validates the completed
74
+ Alpha and optional anchor, and plans version-file content. It never invokes Git,
75
+ network clients, lifecycle commands, package registries, or provider APIs.
76
+ Mutation requires explicit `--write`, rejects symlinks and path escapes, and is
77
+ limited to configured `version.files`. The standard repository transaction
78
+ adapter passes the exact target in `BUILDCHAIN_VERSION`, permits changes only
79
+ to `version.files` plus `version.derived_files`, runs
80
+ `lifecycle.version-state` when derived files are declared, and then runs
81
+ `lifecycle.verify`. The reference writer fails closed rather than invoking
82
+ those consumer commands because transaction execution is a separate slice.
83
+ For anchored/manual, the consumer must
84
+ materialize the declared manifest first; the adapter verifies its exact digest
85
+ and does not invent or edit upstream anchor data.
86
+
87
+ Preparing development state alone creates no Git tag, GitHub Release, public
88
+ package, or release candidate.
89
+
90
+ ## Consequences
91
+
92
+ - A completed Alpha N remains successful when N+1 waits for an anchor, a
93
+ protected PR, merge, or verification.
94
+ - Retrying development preparation cannot republish Alpha N or change any
95
+ Alpha ref.
96
+ - Semver and anchored consumers share one lifecycle while retaining their
97
+ distinct version authority.
98
+ - Provider adapters may project pull-request identifiers and merge evidence,
99
+ but those observations do not become part of the local mutation authority.
100
+ - Generated config, Agent instructions, and public documentation are checked
101
+ against the same constants; projection drift fails repository checks.
@@ -0,0 +1,152 @@
1
+ ---
2
+ status: accepted
3
+ period: 2026-08-11
4
+ theme: two-phase-delivery-warrant
5
+ doc_type: architecture-decision-record
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: A
10
+ review_state: self-reviewed
11
+ last_reviewed: 2026-08-15
12
+ ---
13
+
14
+ # ADR 0003: Delivery Order Is Reserved Before Native Qualification
15
+
16
+ ## Status
17
+
18
+ Accepted. This decision is normative for the v3 Delivery Warrant state machine,
19
+ reusable delivery workflows, and generated native consumer workflows.
20
+
21
+ ## Context
22
+
23
+ A slow native pull request can pass source acceptance, obtain approval, and then
24
+ spend long enough in platform qualification for the protected dev base to move
25
+ many times. Requiring all native shards to finish before the pull request owns
26
+ a delivery turn permits a stream of later fast candidates to overtake it.
27
+ Freezing dev or disabling protection would avoid the race only by stopping
28
+ unrelated work or removing the authority that must be proven.
29
+
30
+ Native evidence also has two identities that must not be conflated. Semantic
31
+ source, affected closure, dependency graph, and toolchain determine whether a
32
+ native result remains valid. The current dev commit and replay tree determine
33
+ the final integration composition. A dev-only documentation change should not
34
+ invalidate semantic native evidence, while a change inside the affected closure
35
+ must never be silently reused.
36
+
37
+ ## Decision
38
+
39
+ Delivery Warrant ownership has two phases:
40
+
41
+ ```text
42
+ queued -> provisional --native proof accepted--> qualified -> GitHub merge queue
43
+ | |
44
+ +--failure--------+--> terminal release -> wake next candidate
45
+ +--expiry------------> recovered queue entry with a new fence
46
+ ```
47
+
48
+ Source acceptance, the ready label, current approval, and required source checks
49
+ are established before selection. Selection issues a `provisional` Warrant with
50
+ one TTL, heartbeat protocol, lease generation, and fencing token. It reserves
51
+ the next protected-dev delivery turn but is not merge-queue authority. Later
52
+ pull requests may run source and CI work and remain visible in the durable FIFO
53
+ plus aging queue; none may enter the protected merge queue while another exact
54
+ candidate owns the active Warrant.
55
+
56
+ Native success upgrades the same fenced generation atomically to `qualified`.
57
+ The transition binds a Native Qualification Proof and a rooted reuse decision.
58
+ Only a qualified Warrant may authorize enqueue. The upgrade does not mint a new
59
+ fence and cannot change the PR head or semantic source roots.
60
+
61
+ Native Qualification Proof v3 binds semantic source identity, semantic patch,
62
+ qualification plan, affected closure, dependency graph, toolchain, execution
63
+ environment contract, covered paths, exact shard evidence roots, the dev base
64
+ used for qualification, and the exact native execution receipt. That receipt
65
+ contains the normalized repository, protected base, source head, qualified
66
+ base, toolchain root, and environment root binding established before the
67
+ native process starts. The proof repeats and roots that binding, and includes
68
+ the receipt root in its shard evidence. Its
69
+ timestamp is observational rather than part of proof identity. Reuse on another
70
+ base requires an attributed base delta. Identical base is accepted directly; a
71
+ descendant base with no overlap against the affected closure reuses the proof;
72
+ overlap requires affected or full native revalidation; unknown ancestry,
73
+ truncated attribution, semantic change, closure change, dependency change, or
74
+ toolchain change requires full revalidation.
75
+
76
+ The reusable controller composes the exact PR head with the observed protected
77
+ base before running native work, heartbeats while the command is active, and
78
+ checks base drift after completion. It may perform one automatic revalidation
79
+ on the latest base. Continued overlapping drift fails closed. Native failure,
80
+ cancel, semantic head movement, unrecoverable composition conflict, or exhausted
81
+ revalidation closes only the current fence. The controller then emits a rooted
82
+ `buildchain-dev-delivery-wake` repository event for the next queued candidate.
83
+ Cancellation that prevents cleanup is covered by TTL recovery; the stale worker
84
+ cannot renew or qualify after a new fence is minted.
85
+
86
+ PR-controlled native execution is a credentialless candidate job on a
87
+ GitHub-hosted runner. Its child process and complete `/proc` ancestry receive no
88
+ controller or provider write credential. The ancestry sentinel treats unreadable
89
+ process state as failure and detects generic auth, credential, key, password,
90
+ secret, and token variable names. Only a dependent credentialed finalizer on a
91
+ provider-readback-proven distinct GitHub-hosted job and runner may independently
92
+ verify the content-addressed proof/state transfer, reread the same live fence,
93
+ PR head, and protected base, and qualify or settle the attempt. A successful
94
+ candidate exit is evidence input, not authority to mutate provider state or a
95
+ completion signal by itself. Persistent self-hosted runners are unsupported
96
+ because job ordering alone cannot prove detached-descendant cleanup.
97
+
98
+ GitHub `merge_group` checks and the protected dev ref remain final integration
99
+ authority. No transition disables a check, changes branch protection, force
100
+ updates the Warrant ref, or freezes dev.
101
+
102
+ Required native delivery validates the environment root before candidate
103
+ submission, Warrant selection, checkout/composition, or native process spawn.
104
+ An empty or malformed root is therefore an admission failure, not a terminal
105
+ failure after native capacity has been spent. `off`, `shadow`, and
106
+ `non-native-fast` compatibility does not turn the reusable workflow input into
107
+ an unconditional requirement.
108
+
109
+ ## Compatibility
110
+
111
+ Existing v1 queue documents remain readable. An historical active Warrant that
112
+ does not contain `phase` is interpreted as the former already-qualified shape
113
+ without rewriting its state root. Newly selected Warrants always contain
114
+ `phase: provisional`. Existing `off` and `shadow` workflow modes remain
115
+ available; `required` now enforces the two-phase upgrade. Native Qualification
116
+ Proof v1 and v2 documents remain verifiable as historical evidence, but their
117
+ execution receipts do not bind the environment root. They cannot gain v3 exact
118
+ reuse authority and must be replaced by an explicit native revalidation.
119
+
120
+ In bounded authority mode, every newly issued Landing Warrant requires the
121
+ complete verified-native qualification shape, including the qualification
122
+ contract, execution binding, execution receipt, command, source proof, and native
123
+ proof roots. A migrated `legacy-compatibility-only` qualification may preserve
124
+ the exact already-active historical Landing fence for safe handoff, but it can
125
+ never mint a new Landing Warrant or acquire native proof authority.
126
+
127
+ Elapsed lease time is not provider-stop evidence. Cleanup of an expired Landing
128
+ fence requires a separate independent provider terminal verifier whose rooted
129
+ readback matches the exact state root, candidate, source head, fencing token,
130
+ generation, provider run, and provider job and is fresh for that Warrant
131
+ generation. Caller-asserted, forged, mismatched, nonterminal, or stale readback
132
+ cannot release the exclusive slot.
133
+
134
+ ## Consequences
135
+
136
+ - Slow approved candidates stop starving without serializing development or CI.
137
+ - A provisional receipt is intentionally insufficient for merge admission.
138
+ - Base-only replay churn can reuse native evidence when closure attribution is
139
+ complete and disjoint.
140
+ - Overlap and uncertainty spend more native compute but cannot create an
141
+ unproven protected-dev landing.
142
+ - Consumers need a promotion token that can advance the Warrant state ref and
143
+ emit the wake event, plus a native command or an exact reusable proof.
144
+ - Invalid required-native environment inputs fail before they can allocate a
145
+ Warrant or native runner time.
146
+ - Legacy unbound native evidence remains readable but intentionally spends a
147
+ new validation run before qualification.
148
+ - Candidate execution remains credentialless; credentialed readback,
149
+ qualification, and settlement happen only in a distinct, live-evidenced fresh
150
+ GitHub-hosted finalizer job after candidate job completion.
151
+ - Expired Landing cleanup is rooted in exact independent provider readback, not
152
+ a timeout or the controller's own assertion.