@kungfu-tech/buildchain 3.0.2 → 3.0.3-alpha.1

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 (127) hide show
  1. package/AGENTS.md +1 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +27 -1
  4. package/actions/promote-buildchain-ref/README.md +90 -19
  5. package/actions/report-buildchain-issue/README.md +20 -2
  6. package/actions/run-lifecycle/README.md +5 -0
  7. package/actions/validate-config/README.md +19 -1
  8. package/bin/buildchain.mjs +56 -2
  9. package/bin/internal/command-registry.mjs +82 -0
  10. package/bin/internal/trust-release-cli.mjs +1 -0
  11. package/contracts/auditable-demo-media-profiles-v1.json +116 -1
  12. package/contracts/buildchain-v2-residuals-v1.json +146 -0
  13. package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +143 -0
  14. package/contracts/evidence/auditable-demo-web-delivery-v1.json +7 -3
  15. package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/complete-transcript.txt +2 -0
  16. package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/public-projection.json +16 -0
  17. package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/scene.json +12 -0
  18. package/dist/site/buildchain-contract.json +188 -46
  19. package/dist/site/buildchain-site.json +181 -90
  20. package/dist/site/capability-registry.json +5 -5
  21. package/dist/site/cli-registry.json +860 -98
  22. package/dist/site/controller-registry.json +118 -5
  23. package/dist/site/kfd-claims.json +233 -19
  24. package/dist/site/kfd-upstream-aggregate.json +1 -1
  25. package/dist/site/manual-registry.json +20 -20
  26. package/dist/site/node-api-registry.json +374 -59
  27. package/dist/site/page-registry.json +156 -65
  28. package/dist/site/public-surface-audit.json +231 -22
  29. package/dist/site/publication-registry.json +4 -4
  30. package/dist/site/release-provenance.json +3 -0
  31. package/dist/site/site-manifest.json +24 -24
  32. package/dist/site/workflow-registry.json +575 -79
  33. package/docs/MAP.md +22 -4
  34. package/docs/auditable-demo.md +54 -13
  35. package/docs/aws-us-elastic-runner-burst-plane.md +381 -0
  36. package/docs/cli.md +119 -12
  37. package/docs/consumer-issue-reporting.md +20 -2
  38. package/docs/dev-alpha-candidate-patrol.md +24 -10
  39. package/docs/github-governance-authority.md +24 -31
  40. package/docs/lifecycle-protocol.md +20 -2
  41. package/docs/migration-inventory.md +24 -5
  42. package/docs/observed-evidence-patrol.md +28 -12
  43. package/docs/ownership.md +19 -1
  44. package/docs/publication-artifacts.md +158 -18
  45. package/docs/publication-authority.md +4 -4
  46. package/docs/publish-transaction.md +78 -31
  47. package/docs/release-candidate.md +24 -0
  48. package/docs/release-flow.md +50 -32
  49. package/docs/release-governance.md +39 -32
  50. package/docs/release-passport.md +4 -0
  51. package/docs/release-propagation.md +57 -12
  52. package/docs/reusable-build-surface.md +218 -90
  53. package/docs/runtime-train-validation.md +20 -2
  54. package/docs/shifu-gate-profiles.md +7 -1
  55. package/docs/stable-candidate-patrol.md +6 -6
  56. package/docs/toolkit-observability.md +22 -0
  57. package/docs/versioning.md +46 -24
  58. package/docs/web-surface-deployments.md +82 -1
  59. package/package.json +7 -5
  60. package/packages/core/README.md +60 -4
  61. package/packages/core/artifact-signing.js +1 -0
  62. package/packages/core/buildchain-contract.js +9 -4
  63. package/packages/core/cache-evidence.js +1 -0
  64. package/packages/core/controller-evidence.js +2 -0
  65. package/packages/core/diagnostics.js +105 -30
  66. package/packages/core/github-governance-authority.js +25 -17
  67. package/packages/core/index.js +40 -0
  68. package/packages/core/paper.js +3226 -0
  69. package/packages/core/public-surface-audit.js +3 -0
  70. package/packages/core/publication-artifact.js +1 -6
  71. package/packages/core/publication-authority.js +1 -0
  72. package/packages/core/publication-control-plane-audit.js +28 -0
  73. package/packages/core/publication-reproducibility.js +947 -0
  74. package/packages/core/publication-sealed-bundle.js +190 -0
  75. package/packages/core/publish-transaction.js +147 -17
  76. package/packages/core/release-candidate.js +234 -0
  77. package/packages/core/release-passport.js +519 -228
  78. package/packages/core/release-propagation.js +175 -1
  79. package/packages/core/stable-release-gate.js +4 -1
  80. package/scripts/artifact-signing-delegation.mjs +268 -0
  81. package/scripts/audit-github-governance.mjs +32 -13
  82. package/scripts/audit-publication-control-plane.mjs +17 -8
  83. package/scripts/auditable-demo.mjs +266 -7
  84. package/scripts/aws-codebuild-toolchain.mjs +285 -0
  85. package/scripts/aws-macos-jit-core.mjs +378 -0
  86. package/scripts/aws-macos-jit.mjs +123 -0
  87. package/scripts/aws-runner-burst-core.mjs +248 -0
  88. package/scripts/aws-runner-burst.mjs +79 -0
  89. package/scripts/aws-windows-jit-core.mjs +374 -0
  90. package/scripts/aws-windows-jit.mjs +121 -0
  91. package/scripts/build-contract-core.mjs +69 -6
  92. package/scripts/build-standalone-binary.mjs +23 -0
  93. package/scripts/buildchain-contract-lock.mjs +1 -1
  94. package/scripts/buildchain-patrol.mjs +1 -1
  95. package/scripts/check-internal-architecture.mjs +69 -2
  96. package/scripts/check-inventory.mjs +70 -2
  97. package/scripts/check-javascript-syntax.mjs +31 -0
  98. package/scripts/check-maintainability.mjs +371 -0
  99. package/scripts/compiler-cache-evidence.mjs +221 -0
  100. package/scripts/dev-alpha-candidate-patrol.mjs +288 -43
  101. package/scripts/dispatch-artifact-signing-authority.mjs +7 -1
  102. package/scripts/finalize-native-artifact-signing-result.mjs +185 -31
  103. package/scripts/gate-profile-core.mjs +6 -1
  104. package/scripts/generate-channel-promotion-workflow.mjs +3 -12
  105. package/scripts/generate-release-candidate-passport.mjs +4 -0
  106. package/scripts/generate-site-bundle.mjs +84 -18
  107. package/scripts/import-artifact-signing-results.mjs +64 -5
  108. package/scripts/inspect-artifact-signing-requests.mjs +52 -14
  109. package/scripts/maintainability-metrics.mjs +339 -0
  110. package/scripts/npm-publish-transaction.mjs +57 -6
  111. package/scripts/observed-evidence.mjs +151 -33
  112. package/scripts/paper.mjs +645 -0
  113. package/scripts/promotion-channel-router.mjs +16 -4
  114. package/scripts/publication-reproducibility.mjs +62 -0
  115. package/scripts/reconcile-github-governance.mjs +8 -1
  116. package/scripts/release-propagation.mjs +39 -0
  117. package/scripts/resolve-artifact-signing-upload-route.mjs +55 -0
  118. package/scripts/resolve-build-contract.mjs +6 -0
  119. package/scripts/route-offline-runners.mjs +236 -0
  120. package/scripts/run-candidate-body-prefix-renderer.mjs +187 -0
  121. package/scripts/run-lifecycle-core.mjs +62 -1
  122. package/scripts/runtime-ref-core.mjs +36 -4
  123. package/scripts/seal-artifact-signing-requests.mjs +64 -12
  124. package/scripts/stable-candidate-qualification.mjs +50 -0
  125. package/scripts/verify-artifact-signing-results.mjs +26 -1
  126. package/scripts/web-surface-core.mjs +272 -86
  127. package/scripts/web-surface-production-decision.mjs +19 -3
@@ -1,6 +1,24 @@
1
+ ---
2
+ status: active
3
+ period: ongoing
4
+ theme: buildchain-release-flow
5
+ doc_type: technical-reference
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: A
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-07-31
12
+ ai_provenance:
13
+ model_family: GPT-5
14
+ product: Codex
15
+ generated_at: 2026-07-31
16
+ invisible_context: not asserted
17
+ ---
18
+
1
19
  # Release Flow Diagrams
2
20
 
3
- This document describes the Buildchain v2 branch, tag, and version-state flow.
21
+ This document describes the Buildchain v3 branch, tag, and version-state flow.
4
22
  See [Release governance](release-governance.md) for the design rationale.
5
23
 
6
24
  ## Architecture
@@ -46,16 +64,16 @@ for the versioned policy and evidence contract.
46
64
 
47
65
  | Ref kind | Example | Mutability | Purpose |
48
66
  | --- | --- | --- | --- |
49
- | Development branch | `dev/v2/v2.0` | moves | next source state for a minor line |
50
- | Alpha branch | `alpha/v2/v2.0` | moves | latest test state for a minor line |
51
- | Release branch | `release/v2/v2.0` | moves | latest production state for a minor line |
67
+ | Development branch | `dev/v3/v3.0` | moves | next source state for a minor line |
68
+ | Alpha branch | `alpha/v3/v3.0` | moves | latest test state for a minor line |
69
+ | Release branch | `release/v3/v3.0` | moves | latest production state for a minor line |
52
70
  | Major gate branch | `publish-gate/major` | moves | reviewed administrator gate for publishing the next major |
53
- | Exact alpha tag | `v2.0.3-alpha.0` | immutable | audit ref for one tested prerelease |
54
- | Exact release tag | `v2.0.2` | immutable | audit ref for one production release |
55
- | Floating alpha tag | `v2.0-alpha` | moves | latest test channel for a minor line |
56
- | Floating major alpha tag | `v2-alpha` | moves | latest test channel on the highest published alpha minor for a major line |
57
- | Floating minor tag | `v2.0` | moves | latest production patch on a minor line |
58
- | Floating major tag | `v2` | moves | selected stable major entrypoint |
71
+ | Exact alpha tag | `v3.0.3-alpha.0` | immutable | audit ref for one tested prerelease |
72
+ | Exact release tag | `v3.0.2` | immutable | audit ref for one production release |
73
+ | Floating alpha tag | `v3.0-alpha` | moves | latest test channel for a minor line |
74
+ | Floating major alpha tag | `v3-alpha` | moves | latest test channel on the highest published alpha minor for a major line |
75
+ | Floating minor tag | `v3.0` | moves | latest production patch on a minor line |
76
+ | Floating major tag | `v3` | moves | selected stable major entrypoint |
59
77
 
60
78
  ## Ref Protection Contract
61
79
 
@@ -69,16 +87,16 @@ refs/tags/v*.*.*
69
87
  ```
70
88
 
71
89
  Do not apply immutable-tag rulesets to every `refs/tags/v*` ref. Buildchain
72
- must be able to update floating channel tags such as `v2`, `v2.0`, `v2.0-alpha`,
73
- and `v2-alpha` after the exact tag and publish evidence are valid. A ruleset that
90
+ must be able to update floating channel tags such as `v3`, `v3.0`, `v3.0-alpha`,
91
+ and `v3-alpha` after the exact tag and publish evidence are valid. A ruleset that
74
92
  matches all `v*` tags also matches floating tags, so release finalization can
75
93
  fail with GitHub protected-ref errors even though the exact release tag and
76
94
  published artifacts are already durable.
77
95
 
78
96
  The intended governance split is:
79
97
 
80
- - exact tags such as `v2.0.14` and `v2.0.15-alpha.0` are immutable audit refs;
81
- - floating tags such as `v2`, `v2.0`, `v2.0-alpha`, and `v2-alpha` are mutable channel refs
98
+ - exact tags such as `v3.0.2` and `v3.0.3-alpha.0` are immutable audit refs;
99
+ - floating tags such as `v3`, `v3.0`, `v3.0-alpha`, and `v3-alpha` are mutable channel refs
82
100
  owned by the Buildchain promotion token;
83
101
  - protected branches still require reviewed channel PRs before Buildchain can
84
102
  move any exact or floating release refs.
@@ -94,17 +112,17 @@ The workflow is backed by the CLI command:
94
112
 
95
113
  ```bash
96
114
  buildchain release line open \
97
- --major 2 \
98
- --minor 10 \
99
- --source-ref release/v2/v2.9 \
115
+ --major 3 \
116
+ --minor 1 \
117
+ --source-ref release/v3/v3.0 \
100
118
  --json
101
119
  ```
102
120
 
103
121
  When the workflow is run with `apply=true`, Buildchain:
104
122
 
105
- - writes the initial version-state commit, such as `2.10.0-alpha.0`;
106
- - creates `dev/v2/v2.10` from that commit;
107
- - creates `alpha/v2/v2.10` and `release/v2/v2.10` from the selected source ref;
123
+ - writes the initial version-state commit, such as `3.1.0-alpha.0`;
124
+ - creates `dev/v3/v3.1` from that commit;
125
+ - creates `alpha/v3/v3.1` and `release/v3/v3.1` from the selected source ref;
108
126
  - applies branch protection with one approving review and the configured
109
127
  required status check; dev starts strict, while alpha and release also require
110
128
  the pair-specific `verify` aggregate without a source-up-to-date ancestry loop;
@@ -112,7 +130,7 @@ When the workflow is run with `apply=true`, Buildchain:
112
130
  the exact queue parameters and bypass actors from the current default dev
113
131
  branch when the policy is `inherit` or absent;
114
132
  - switches the repository default branch to the new dev line when requested;
115
- - opens the first `dev/v2/v2.10 -> alpha/v2/v2.10` channel PR when requested.
133
+ - opens the first `dev/v3/v3.1 -> alpha/v3/v3.1` channel PR when requested.
116
134
 
117
135
  This makes minor-line creation a single audited operation. The channel PR still
118
136
  goes through the normal verify/review/promotion path before an alpha is
@@ -229,26 +247,26 @@ The same minor line can loop through this state machine many times.
229
247
 
230
248
  ## Version Examples
231
249
 
232
- Assume `v2.0.2-alpha.1` has been tested and a maintainer merges
233
- `alpha/v2/v2.0 -> release/v2/v2.0`.
250
+ Assume `v3.0.2-alpha.1` has been tested and a maintainer merges
251
+ `alpha/v3/v3.0 -> release/v3/v3.0`.
234
252
 
235
253
  Buildchain should produce:
236
254
 
237
255
  ```text
238
- v2.0.2 exact production tag
239
- v2.0 floating minor tag
240
- v2 floating major tag when v2.0 is the selected major line
241
- release/v2/v2.0 production channel branch
256
+ v3.0.2 exact production tag
257
+ v3.0 floating minor tag
258
+ v3 floating major tag when v3.0 is the selected major line
259
+ release/v3/v3.0 production channel branch
242
260
  ```
243
261
 
244
262
  It should also prepare:
245
263
 
246
264
  ```text
247
- v2.0.3-alpha.0 exact next alpha tag
248
- v2.0-alpha floating alpha tag
249
- v2-alpha floating major alpha tag when v2.0 is the highest published alpha minor
250
- alpha/v2/v2.0 alpha channel branch
251
- dev/v2/v2.0 development channel branch
265
+ v3.0.3-alpha.0 exact next alpha tag
266
+ v3.0-alpha floating alpha tag
267
+ v3-alpha floating major alpha tag when v3.0 is the highest published alpha minor
268
+ alpha/v3/v3.0 alpha channel branch
269
+ dev/v3/v3.0 development channel branch
252
270
  ```
253
271
 
254
272
  This is expected behavior. A production release closes one patch and opens the
@@ -8,7 +8,7 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-07-27
11
+ last_reviewed: 2026-07-31
12
12
  ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
@@ -18,7 +18,7 @@ ai_provenance:
18
18
 
19
19
  # Release Governance
20
20
 
21
- Buildchain v2 preserves the release semantics of the older ABV workflow while
21
+ Buildchain v3 preserves the release semantics of the older ABV workflow while
22
22
  moving the implementation into one modern repository.
23
23
 
24
24
  The central idea is simple: a reviewed merge into a release channel is the
@@ -37,9 +37,9 @@ Kungfu release automation has to keep four facts aligned:
37
37
 
38
38
  If any one of these facts is updated by hand, the system can split:
39
39
 
40
- - a consumer can fetch `v2.0` and receive a tree whose package version still
40
+ - a consumer can fetch `v3.0` and receive a tree whose package version still
41
41
  says the previous release;
42
- - a maintainer can move `v2` without producing an exact `v2.0.N` audit tag;
42
+ - a maintainer can move `v3` without producing an exact `v3.0.N` audit tag;
43
43
  - an alpha can be promoted to production even though the release tree is not the
44
44
  same tree that was tested;
45
45
  - a protected branch merge can succeed while the follow-up version commit is
@@ -70,7 +70,7 @@ repositories that usually meant changing `lerna.json` and/or `package.json`.
70
70
  That commit is important because the tag alone is not enough evidence: the
71
71
  source tree should also declare the version that the tag advertises.
72
72
 
73
- Buildchain v2 treats that as a hard semantic requirement for its own release
73
+ Buildchain v3 treats that as a hard semantic requirement for its own release
74
74
  line.
75
75
 
76
76
  ## Buildchain Implementation
@@ -133,7 +133,7 @@ older Buildchain aggregate context, inspect the exact candidate SHA first:
133
133
  GH_TOKEN="$(gh auth token)" npx @kungfu-tech/buildchain@latest \
134
134
  release-governance reconcile \
135
135
  --repository kungfu-systems/example \
136
- --branch release/v2/v2.14 \
136
+ --branch release/v3/v3.0 \
137
137
  --candidate-sha <tested-pr-head-sha> \
138
138
  --json
139
139
  ```
@@ -181,32 +181,32 @@ workflow preflight cannot receive a second set of publication side effects.
181
181
  ## Version Lines
182
182
 
183
183
  Kungfu uses Python-like version lines where a minor line can represent a
184
- long-lived product train. A line such as `v2.0` can produce many production
184
+ long-lived product train. A line such as `v3.0` can produce many production
185
185
  patch releases:
186
186
 
187
187
  ```text
188
- v2.0.0
189
- v2.0.1
190
- v2.0.2
188
+ v3.0.0
189
+ v3.0.1
190
+ v3.0.2
191
191
  ...
192
- v2.0.1234
192
+ v3.0.1234
193
193
  ```
194
194
 
195
195
  This is why Buildchain maintains both exact and floating refs:
196
196
 
197
- - `v2.0.2` is immutable release evidence;
198
- - `v2.0` is the latest production release on the `2.0` line;
199
- - `v2` is the selected stable major-line entrypoint;
200
- - `v2.0.3-alpha.0` is immutable alpha evidence;
201
- - `v2.0-alpha` is the latest test channel for the `2.0` line.
202
- - `v3-alpha` is the latest test channel on the highest published alpha minor in major `2`.
197
+ - `v3.0.2` is immutable release evidence;
198
+ - `v3.0` is the latest production release on the `3.0` line;
199
+ - `v3` is the selected stable major-line entrypoint;
200
+ - `v3.0.3-alpha.0` is immutable alpha evidence;
201
+ - `v3.0-alpha` is the latest test channel for the `3.0` line.
202
+ - `v3-alpha` is the latest test channel on the highest published alpha minor in major `3`.
203
203
 
204
204
  A release does not mean "minor is complete." It means "this patch on this minor
205
205
  line is now production."
206
206
 
207
207
  GitHub repository rules must preserve that distinction. Exact tags such as
208
- `v2.0.2` and `v2.0.3-alpha.0` should be immutable. Floating channel tags such as
209
- `v2`, `v2.0`, `v2.0-alpha`, and `v3-alpha` must remain movable by the Buildchain promotion
208
+ `v3.0.2` and `v3.0.3-alpha.0` should be immutable. Floating channel tags such as
209
+ `v3`, `v3.0`, `v3.0-alpha`, and `v3-alpha` must remain movable by the Buildchain promotion
210
210
  token after governance checks and publish evidence pass. A tag ruleset that
211
211
  protects every `refs/tags/v*` ref is too broad because it also locks the
212
212
  floating channel tags that Buildchain is required to update. Prefer exact-tag
@@ -239,7 +239,7 @@ line-specific dist-tag `vX.Y-alpha` so they cannot roll the global `alpha`
239
239
  channel backward. Exact prerelease versions remain installable directly.
240
240
 
241
241
  This keeps the test channel self-describing. If a consumer checks out
242
- `v2.0-alpha` or `v3-alpha`, the manifests and exact alpha tag agree. The major
242
+ `v3.0-alpha` or `v3-alpha`, the manifests and exact alpha tag agree. The major
243
243
  alpha ref removes routine consumer edits when Buildchain opens a newer minor,
244
244
  while exact tags and SHAs remain the reproducible audit choice.
245
245
 
@@ -248,7 +248,7 @@ while exact tags and SHAs remain the reproducible audit choice.
248
248
  Buildchain continuously consumes its own current major alpha through
249
249
  `.github/workflows/buildchain-alpha-self-dogfood.yml`. Both lanes call the
250
250
  released channel router at `build.yml@v3-alpha`. The auto lane must resolve
251
- `v3-alpha`; the explicit stable lane must resolve `v2`. Both execute the same
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
253
253
  surface routes to distinct released runtimes without duplicating lifecycle
254
254
  configuration in the consumer.
@@ -260,6 +260,13 @@ Developer ID, Windows Authenticode, and detached cryptographic signatures share
260
260
  the request/receipt model, while each profile retains its honest platform
261
261
  semantics and fail-closed verification requirements.
262
262
 
263
+ The authority verifies the complete result set on GitHub-hosted infrastructure
264
+ before delivery. The consumer controller also performs final result verification,
265
+ exact-byte import, manifest recomputation, and deterministic-artifact replacement
266
+ on a GitHub-hosted lane. Self-hosted build runners do not download authority
267
+ result payloads, and aggregate/release evidence fails closed until this
268
+ finalization succeeds.
269
+
263
270
  The central `buildchain-artifact-signing` environment reuses the established
264
271
  macOS Credential Island names (`BUILDCHAIN_MACOS_CERTIFICATE_*`,
265
272
  `BUILDCHAIN_MACOS_NOTARY_API_*`, and
@@ -278,7 +285,7 @@ reviewed alpha SHA and compatibility digest; it does not replace the stable
278
285
  consumer lock. A later alpha with only compatible additive drift continues,
279
286
  while a changed breaking digest fails until the new alpha contract is reviewed.
280
287
 
281
- The evidence job resolves `v3-alpha` and `v2` through the GitHub refs API,
288
+ The evidence job resolves `v3-alpha` and `v3` through the GitHub refs API,
282
289
  compares those immutable SHAs with the reusable workflow outputs, verifies the
283
290
  `alpha` and `stable` classifications, and uploads a JSON evidence artifact.
284
291
  The canary runs after successful Buildchain ref promotion, on a daily fallback
@@ -611,7 +618,7 @@ jobs:
611
618
  checks: read
612
619
  statuses: read
613
620
  with:
614
- target-branch: dev/v2/v2.6
621
+ target-branch: dev/v3/v3.0
615
622
  required-status-checks: check / check
616
623
  ready-label: ready
617
624
  block-labels: blocked,do-not-merge
@@ -681,7 +688,7 @@ jobs:
681
688
  dry-run: true
682
689
  ```
683
690
 
684
- All three wrappers default to the `v2` floating Buildchain runtime. When
691
+ All three wrappers default to the `v3` floating Buildchain runtime. When
685
692
  `target-branch` is omitted, the caller's current/default branch selects the
686
693
  active semver dev line, so consumers do not pin patrol to a stale minor branch.
687
694
  The separate workflow names keep consumer schedules readable and stable while
@@ -713,7 +720,7 @@ when that is explicitly allowed by the caller.
713
720
 
714
721
  ## Lifecycle Configuration
715
722
 
716
- `buildchain.toml` is the v2 user configuration format. It lets a repository
723
+ `.buildchain/buildchain.toml` is the v3 user configuration format. It lets a repository
717
724
  declare version-state files and lifecycle commands without pretending every
718
725
  project is a Node workspace. Supported version files include JSON, TOML, and
719
726
  regex-based files such as `CMakeLists.txt` or `conanfile.py`.
@@ -778,13 +785,13 @@ bypass actor.
778
785
 
779
786
  When the loop succeeds, maintainers and consumers can rely on these facts:
780
787
 
781
- - every production release has an exact tag such as `v2.0.2`;
782
- - every production minor line has a floating tag such as `v2.0`;
783
- - every selected stable major has a floating tag such as `v2`;
788
+ - every production release has an exact tag such as `v3.0.2`;
789
+ - every production minor line has a floating tag such as `v3.0`;
790
+ - every selected stable major has a floating tag such as `v3`;
784
791
  - every next-major release is driven by a reviewed `release -> publish-gate/major` PR,
785
792
  not a hidden manual button;
786
- - every test channel has an exact alpha tag such as `v2.0.3-alpha.0`;
787
- - every alpha minor line has a floating tag such as `v2.0-alpha`;
793
+ - every test channel has an exact alpha tag such as `v3.0.3-alpha.0`;
794
+ - every alpha minor line has a floating tag such as `v3.0-alpha`;
788
795
  - every major with a published alpha has a cross-minor floating tag such as `v3-alpha`, owned by its highest published alpha minor;
789
796
  - version manifests match the tag visible from the same commit;
790
797
  - production releases are derived from the alpha tree that was tested;
@@ -880,8 +887,8 @@ Buildchain also does not maintain bare exact tags such as `1.0.0`. The supported
880
887
  exact release and alpha refs are v-prefixed:
881
888
 
882
889
  ```text
883
- v2.0.0
884
- v2.0.1-alpha.0
890
+ v3.0.0
891
+ v3.0.1-alpha.0
885
892
  ```
886
893
 
887
894
  ## Operational Reading Order
@@ -99,6 +99,10 @@ Additive passport sections:
99
99
  semantic Passport root, exact clean source revision, complete platform
100
100
  coverage, verdict, and residual risk. Buildchain owns release admission, not
101
101
  the meaning of the product invariants.
102
+ - `releaseEvidence`: typed references to product-owned JSON evidence copied
103
+ beside the Passport. Buildchain does not interpret product or legal meaning;
104
+ it binds each document's canonical JSON digest and exact source SHA, tag, and
105
+ channel, then independently re-verifies the sibling document.
102
106
  - `githubArtifactAttestations`: expected GitHub keyless attestation identities
103
107
  for Linux release artifacts, including subject, caller source, original build
104
108
  evidence, exact Buildchain signer workflow digest, and least-privilege
@@ -132,6 +132,13 @@ This lets a site repository render the latest reader page and historical
132
132
  version index from release facts while keeping old PDFs, source bundles,
133
133
  manifests, and passports immutable.
134
134
 
135
+ When the downstream consumer is expected to update an exact npm paper pin, the
136
+ upstream envelope must carry both `package` and `publicationArtifact`. The
137
+ consumer can then prove that package name, version, sha512 integrity,
138
+ publication URLs, and immutable artifact digests all describe the same release.
139
+ `publicationArtifact` without `package` remains valid for evidence-only
140
+ propagation, but it cannot qualify a package-pin fast path.
141
+
135
142
  ## CLI
136
143
 
137
144
  Generate a propagation plan:
@@ -164,7 +171,34 @@ The written lock has contract
164
171
  - release passport URL and SHA-256;
165
172
  - optional site bundle manifest SHA-256;
166
173
  - downstream repository, channel, base ref, lock path;
167
- - edge id and channel policy.
174
+ - edge id and channel policy;
175
+ - a deterministic propagation key and branch derived from the exact upstream
176
+ repository/version/channel plus downstream repository.
177
+
178
+ Repeated runs for the same release identity reuse that branch and lock. A
179
+ different release version or channel receives a different branch, so concurrent
180
+ releases cannot collapse into one mutable propagation PR.
181
+
182
+ Create the exact propagation receipt after the lock/PR outcome is known:
183
+
184
+ ```bash
185
+ buildchain release-propagation receipt \
186
+ --plan .buildchain/release-propagation-plan.json \
187
+ --lock-result .buildchain/release-propagation-write-lock.json \
188
+ --pr-outcome .buildchain/release-propagation-pr-outcome.json \
189
+ --target site-libkungfu-dev \
190
+ --output .buildchain/release-propagation-receipt.json \
191
+ --json
192
+ ```
193
+
194
+ The receipt keeps four machine states separate:
195
+
196
+ - `package-published`: exact npm name/version/integrity exists;
197
+ - `alpha-complete`: the upstream alpha passport/tag is complete;
198
+ - `staging-visible`: the downstream staging surface is actually visible;
199
+ - `production-visible`: the production surface is actually visible.
200
+
201
+ Package publication or alpha completion never implies either visibility state.
168
202
 
169
203
  ## Reusable Workflow
170
204
 
@@ -181,7 +215,11 @@ jobs:
181
215
  upstream-release-json: ${{ needs.release.outputs.upstream-release-json }}
182
216
  downstream-target: site-libkungfu-dev
183
217
  downstream-repository: kungfu-systems/site-libkungfu-dev
184
- downstream-base-ref: main
218
+ downstream-base-ref: dev/v2/v2.7
219
+ downstream-update-command: >-
220
+ node scripts/paper-propagation.cjs consume
221
+ --lock "$BUILDCHAIN_PROPAGATION_LOCK_PATH"
222
+ && corepack pnpm install --lockfile-only --ignore-scripts
185
223
  downstream-prepare-command: pnpm install --frozen-lockfile --ignore-scripts
186
224
  downstream-verify-command: pnpm run check
187
225
  dry-run: false
@@ -201,8 +239,14 @@ open PR.
201
239
  The workflow checks out the Buildchain runtime selected by
202
240
  `buildchain-repository` and `buildchain-ref` into `.buildchain/runtime`, invokes
203
241
  that runtime for the propagation plan and lock write, then checks out the
204
- downstream repository and writes the exact lock. A consumer that must pin the
205
- exact upstream package or regenerate deterministic files declares
242
+ downstream repository and writes the exact lock. If
243
+ `downstream-update-command` is set, Buildchain runs that consumer-owned command
244
+ after writing the lock and exposes the exact lock path, lock SHA-256,
245
+ propagation key, branch, and upstream release JSON as
246
+ `BUILDCHAIN_PROPAGATION_*` environment variables. The command is part of the
247
+ downstream PR diff; it is not a deployment hook.
248
+
249
+ A consumer that must perform further deterministic preparation can declare
206
250
  `downstream-prepare-command`. The command receives
207
251
  `BUILDCHAIN_UPSTREAM_PACKAGE_NAME`, `BUILDCHAIN_UPSTREAM_PACKAGE_VERSION`, and
208
252
  `BUILDCHAIN_UPSTREAM_RELEASE_LOCK`. After preparation, Buildchain refreshes an
@@ -210,14 +254,15 @@ existing `<!-- buildchain:badges:start -->` README block by default. Consumers
210
254
  can disable that step with `refresh-managed-readme-badges: false`.
211
255
 
212
256
  `downstream-verify-command` runs against the final tree before any commit or
213
- push, so consumers can use the same check as their PR workflow. Preparation,
214
- badge refresh, and verification failures all fail closed. The workflow stages
215
- the complete deterministic result, signs the propagation commit with DCO, and
216
- then opens or updates the PR. It does not publish the downstream release
217
- directly. The downstream repository keeps its normal Buildchain governance: the
218
- PR updates source-of-truth facts, then downstream alpha or release publication
219
- runs through its own protected channel. A byte-identical rerun is an explicit
220
- successful no-op.
257
+ push, so consumers can use the same check as their PR workflow. Update,
258
+ preparation, badge refresh, and verification failures all fail closed. The
259
+ workflow stages the complete deterministic result, signs the propagation
260
+ commit with DCO, and then opens or updates the PR. It does not publish the
261
+ downstream release directly. The downstream repository keeps its normal
262
+ Buildchain governance: the PR updates source-of-truth facts, then downstream
263
+ alpha or release publication runs through its own protected channel. A
264
+ byte-identical rerun is an explicit successful no-op.
265
+
221
266
  For unreleased runtime validation, keep the caller's reusable workflow reference
222
267
  on `@v3` and pass a temporary train ref through `buildchain-ref`.
223
268