@kungfu-tech/buildchain 3.0.3-alpha.0 → 3.0.3-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +32 -1
- package/actions/promote-buildchain-ref/README.md +90 -19
- package/actions/report-buildchain-issue/README.md +19 -1
- package/actions/run-lifecycle/README.md +5 -0
- package/actions/validate-config/README.md +19 -1
- package/bin/buildchain.mjs +41 -241
- package/bin/internal/command-registry.mjs +82 -0
- package/bin/internal/trust-release-cli.mjs +1 -0
- package/contracts/auditable-demo-media-profiles-v1.json +116 -1
- package/contracts/buildchain-v2-residuals-v1.json +0 -45
- package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +143 -0
- package/contracts/evidence/auditable-demo-web-delivery-v1.json +7 -3
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/complete-transcript.txt +2 -0
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/public-projection.json +16 -0
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/scene.json +12 -0
- package/dist/site/buildchain-contract.json +161 -42
- package/dist/site/buildchain-site.json +180 -84
- package/dist/site/capability-registry.json +6 -6
- package/dist/site/cli-registry.json +932 -98
- package/dist/site/controller-registry.json +97 -5
- package/dist/site/kfd-claims.json +316 -23
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +20 -20
- package/dist/site/node-api-registry.json +371 -56
- package/dist/site/page-registry.json +155 -59
- package/dist/site/public-surface-audit.json +286 -24
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +3 -0
- package/dist/site/site-manifest.json +24 -24
- package/dist/site/workflow-registry.json +570 -79
- package/docs/MAP.md +22 -4
- package/docs/auditable-demo.md +35 -12
- package/docs/aws-us-elastic-runner-burst-plane.md +381 -0
- package/docs/cli.md +143 -12
- package/docs/consumer-issue-reporting.md +19 -1
- package/docs/github-governance-authority.md +2 -2
- package/docs/lifecycle-protocol.md +20 -2
- package/docs/migration-inventory.md +24 -5
- package/docs/ownership.md +19 -1
- package/docs/publication-artifacts.md +185 -18
- package/docs/publication-authority.md +4 -4
- package/docs/publish-transaction.md +78 -31
- package/docs/release-candidate.md +24 -0
- package/docs/release-flow.md +50 -32
- package/docs/release-governance.md +31 -31
- package/docs/release-passport.md +4 -0
- package/docs/release-propagation.md +57 -12
- package/docs/reusable-build-surface.md +95 -27
- package/docs/runtime-train-validation.md +20 -2
- package/docs/stable-candidate-patrol.md +6 -6
- package/docs/toolkit-observability.md +22 -0
- package/docs/versioning.md +6 -4
- package/docs/web-surface-deployments.md +62 -0
- package/package.json +7 -5
- package/packages/core/README.md +61 -4
- package/packages/core/buildchain-contract.js +8 -4
- package/packages/core/cache-evidence.js +1 -0
- package/packages/core/diagnostics.js +105 -30
- package/packages/core/github-governance-authority.js +10 -25
- package/packages/core/index.js +40 -0
- package/packages/core/paper-fleet.js +260 -0
- package/packages/core/paper-repository.js +210 -0
- package/packages/core/paper-work.js +365 -0
- package/packages/core/paper.js +3180 -0
- package/packages/core/public-surface-audit.js +26 -75
- package/packages/core/public-surface-cli.js +117 -0
- package/packages/core/publication-artifact.js +1 -6
- package/packages/core/publication-authority.js +1 -0
- package/packages/core/publication-reproducibility.js +947 -0
- package/packages/core/publication-sealed-bundle.js +190 -0
- package/packages/core/publish-transaction.js +147 -17
- package/packages/core/release-candidate.js +234 -0
- package/packages/core/release-passport.js +483 -201
- package/packages/core/release-propagation.js +175 -1
- package/scripts/auditable-demo.mjs +119 -5
- package/scripts/aws-codebuild-toolchain.mjs +285 -0
- package/scripts/aws-macos-jit-core.mjs +378 -0
- package/scripts/aws-macos-jit.mjs +123 -0
- package/scripts/aws-runner-burst-core.mjs +248 -0
- package/scripts/aws-runner-burst.mjs +79 -0
- package/scripts/aws-windows-jit-core.mjs +374 -0
- package/scripts/aws-windows-jit.mjs +121 -0
- package/scripts/build-contract-core.mjs +69 -6
- package/scripts/build-standalone-binary.mjs +23 -0
- package/scripts/buildchain-cli-help.mjs +256 -0
- package/scripts/buildchain-contract-lock.mjs +1 -1
- package/scripts/check-internal-architecture.mjs +69 -2
- package/scripts/check-inventory.mjs +69 -2
- package/scripts/check-javascript-syntax.mjs +31 -0
- package/scripts/check-maintainability.mjs +371 -0
- package/scripts/compiler-cache-evidence.mjs +221 -0
- package/scripts/dev-alpha-candidate-patrol.mjs +268 -43
- package/scripts/finalize-native-artifact-signing-result.mjs +75 -4
- package/scripts/generate-channel-promotion-workflow.mjs +3 -12
- package/scripts/generate-release-candidate-passport.mjs +4 -0
- package/scripts/generate-site-bundle.mjs +68 -188
- package/scripts/import-artifact-signing-results.mjs +64 -5
- package/scripts/inspect-artifact-signing-requests.mjs +7 -0
- package/scripts/maintainability-metrics.mjs +339 -0
- package/scripts/npm-publish-transaction.mjs +57 -6
- package/scripts/paper-work-fleet-cli.mjs +563 -0
- package/scripts/paper.mjs +631 -0
- package/scripts/promotion-channel-router.mjs +16 -4
- package/scripts/publication-reproducibility.mjs +62 -0
- package/scripts/release-propagation.mjs +39 -0
- package/scripts/resolve-build-contract.mjs +6 -0
- package/scripts/route-offline-runners.mjs +236 -0
- package/scripts/run-lifecycle-core.mjs +62 -1
- package/scripts/runtime-ref-core.mjs +23 -2
- package/scripts/seal-artifact-signing-requests.mjs +13 -6
- package/scripts/site-capability-metadata.mjs +202 -0
- package/scripts/stable-candidate-qualification.mjs +42 -0
- package/scripts/web-surface-core.mjs +272 -86
|
@@ -8,7 +8,7 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: B
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-07-
|
|
11
|
+
last_reviewed: 2026-07-31
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
@@ -212,7 +212,7 @@ providers select an explicit adapter:
|
|
|
212
212
|
```bash
|
|
213
213
|
buildchain audit publication-control-plane \
|
|
214
214
|
--repository kungfu-systems/buildchain \
|
|
215
|
-
--branch dev/
|
|
215
|
+
--branch dev/v3/v3.0 \
|
|
216
216
|
--source-sha <exact-merged-branch-sha> \
|
|
217
217
|
--workflow .github/workflows/release-candidate-promote.yml \
|
|
218
218
|
--workflow-ref <exact-buildchain-sha> \
|
|
@@ -223,7 +223,7 @@ buildchain audit publication-control-plane \
|
|
|
223
223
|
# Optional stronger external evidence; generate the JSON outside the workflow.
|
|
224
224
|
buildchain audit publication-control-plane \
|
|
225
225
|
--repository kungfu-systems/buildchain \
|
|
226
|
-
--branch dev/
|
|
226
|
+
--branch dev/v3/v3.0 \
|
|
227
227
|
--workflow .github/workflows/release-candidate-promote.yml \
|
|
228
228
|
--publisher-workflow .github/workflows/buildchain-ref-promotion.yml \
|
|
229
229
|
--job promote \
|
|
@@ -232,7 +232,7 @@ buildchain audit publication-control-plane \
|
|
|
232
232
|
|
|
233
233
|
buildchain audit publication-control-plane \
|
|
234
234
|
--repository kungfu-systems/buildchain \
|
|
235
|
-
--branch release/
|
|
235
|
+
--branch release/v3/v3.0 \
|
|
236
236
|
--workflow .github/workflows/.binary-release-assets.yml \
|
|
237
237
|
--job publish \
|
|
238
238
|
--environment buildchain-release-assets \
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: active
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-publish-transaction
|
|
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
|
# Publish Transaction
|
|
2
20
|
|
|
3
21
|
Buildchain release promotion is not just tag movement. A release can also publish
|
|
@@ -7,7 +25,7 @@ than Git refs because most registries are append-only: a failed rerun must know
|
|
|
7
25
|
which artifacts already exist, which are still missing, and whether any existing
|
|
8
26
|
artifact conflicts with the release material.
|
|
9
27
|
|
|
10
|
-
Buildchain
|
|
28
|
+
Buildchain v3 models that work as a release transaction.
|
|
11
29
|
|
|
12
30
|
## Why This Exists
|
|
13
31
|
|
|
@@ -47,6 +65,7 @@ The branch contains:
|
|
|
47
65
|
```text
|
|
48
66
|
state.json
|
|
49
67
|
evidence.json # present after publish evidence exists
|
|
68
|
+
sealed-bundle/<candidate-root>/files/** # present for build-once publication
|
|
50
69
|
```
|
|
51
70
|
|
|
52
71
|
The local `.buildchain/release-state/...` and
|
|
@@ -62,6 +81,16 @@ for transient service failures such as HTTP 5xx responses, connection resets,
|
|
|
62
81
|
timeouts, and "other side closed" socket failures. If the durable write still
|
|
63
82
|
cannot be persisted after retries, the action fails closed.
|
|
64
83
|
|
|
84
|
+
For a sealed publication, `state.json` also carries the typed sealed-bundle
|
|
85
|
+
manifest, its candidate root, publication milestones, stable
|
|
86
|
+
`publication_state`, and an exact resume command. The durable ref stores every
|
|
87
|
+
declared bundle file as binary Git blobs before the publish lifecycle starts.
|
|
88
|
+
A fresh runner restores those blobs into
|
|
89
|
+
`.buildchain/recovered-publication/<version>/`, verifies every size and SHA-256
|
|
90
|
+
against the manifest, and only then supplies the recovered paths to the publish
|
|
91
|
+
lifecycle. A missing or changed tarball, PDF, source bundle, or manifest fails
|
|
92
|
+
before registry publication.
|
|
93
|
+
|
|
65
94
|
Durable release-state refs reserve their exact version even when the public exact
|
|
66
95
|
tag was never created. If a later machine run sees a failed or repair-required
|
|
67
96
|
state for `vX.Y.Z-alpha.N` and cannot resume it with the same transaction
|
|
@@ -103,6 +132,10 @@ BUILDCHAIN_RELEASE_SHA
|
|
|
103
132
|
BUILDCHAIN_RELEASE_MATERIAL_SHA
|
|
104
133
|
BUILDCHAIN_PUBLISH_TOOLING_SHA
|
|
105
134
|
BUILDCHAIN_PUBLISH_EVIDENCE
|
|
135
|
+
BUILDCHAIN_SEALED_BUNDLE_ROOT
|
|
136
|
+
BUILDCHAIN_SEALED_NPM_TARBALL
|
|
137
|
+
BUILDCHAIN_SEALED_NPM_INTEGRITY
|
|
138
|
+
BUILDCHAIN_SEALED_NPM_SHA256
|
|
106
139
|
BUILDCHAIN_REQUIRED_ARTIFACTS
|
|
107
140
|
BUILDCHAIN_PUBLISH_MODE
|
|
108
141
|
BUILDCHAIN_PUBLISH_AUTH
|
|
@@ -121,7 +154,8 @@ command = "node scripts/npm-publish-transaction.mjs"
|
|
|
121
154
|
That script validates that `package.json` matches `BUILDCHAIN_VERSION`, runs
|
|
122
155
|
`npm publish --access public --tag <BUILDCHAIN_NPM_DIST_TAG>` through npm Trusted
|
|
123
156
|
Publishing, and writes npm artifact evidence before the promotion action moves
|
|
124
|
-
public refs.
|
|
157
|
+
public refs. When the sealed npm variables are present, the script verifies and
|
|
158
|
+
publishes that exact `.tgz` file. It does not run `npm pack` again.
|
|
125
159
|
|
|
126
160
|
`BUILDCHAIN_RELEASE_MATERIAL_SHA` is the source material whose artifacts must
|
|
127
161
|
match. `BUILDCHAIN_PUBLISH_TOOLING_SHA` identifies the publishing code. A repair
|
|
@@ -253,7 +287,7 @@ fields and required artifact identities before final refs move.
|
|
|
253
287
|
"channel": "release",
|
|
254
288
|
"source_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
255
289
|
"release_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
256
|
-
"target_ref": "release/
|
|
290
|
+
"target_ref": "release/v3/v3.0",
|
|
257
291
|
"release_material_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
258
292
|
"publish_tooling_sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
259
293
|
"artifacts": [
|
|
@@ -323,33 +357,42 @@ however they need, as long as they emit the common evidence contract.
|
|
|
323
357
|
The state machine is:
|
|
324
358
|
|
|
325
359
|
```text
|
|
326
|
-
prepared -> publishing -> published -> finalizing -> complete
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
360
|
+
prepared -> sealed -> publishing -> published -> finalizing -> complete
|
|
361
|
+
| | |
|
|
362
|
+
v v v
|
|
363
|
+
publish_failed repair_required failed_permanently
|
|
364
|
+
|
|
|
365
|
+
v
|
|
366
|
+
abandoned
|
|
333
367
|
```
|
|
334
368
|
|
|
335
369
|
Supported states:
|
|
336
370
|
|
|
337
|
-
| State
|
|
338
|
-
|
|
|
339
|
-
| `prepared`
|
|
340
|
-
| `
|
|
341
|
-
| `
|
|
342
|
-
| `
|
|
343
|
-
| `
|
|
344
|
-
| `
|
|
345
|
-
| `
|
|
346
|
-
| `
|
|
347
|
-
| `
|
|
371
|
+
| State | Meaning |
|
|
372
|
+
| -------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
373
|
+
| `prepared` | Transaction identity was created, but publish has not started. |
|
|
374
|
+
| `sealed` | Exact candidate bytes and manifest are verified and durable; registry publication has not started. |
|
|
375
|
+
| `publishing` | Publish lifecycle is running or may have been interrupted. |
|
|
376
|
+
| `publish_failed` | Publish command failed before valid evidence was produced. |
|
|
377
|
+
| `published` | Evidence is valid; refs have not necessarily finalized. |
|
|
378
|
+
| `finalizing` | Buildchain is moving exact/floating refs or needs a later run to do it. |
|
|
379
|
+
| `complete` | Required evidence is valid and refs have finalized. |
|
|
380
|
+
| `repair_required` | Existing evidence or artifact state conflicts with expected release material. |
|
|
381
|
+
| `abandoned` | A human or controlled process abandoned this transaction, usually because a newer version supersedes it. |
|
|
382
|
+
| `failed_permanently` | Recovery should not continue without explicit override. |
|
|
348
383
|
|
|
349
384
|
`repair_required`, `abandoned`, and `failed_permanently` fail closed unless the
|
|
350
385
|
operator passes an explicit override. That override is for controlled repair
|
|
351
386
|
runs, not normal retry behavior.
|
|
352
387
|
|
|
388
|
+
`publication_state` is a stable operator-facing projection over the detailed
|
|
389
|
+
transaction state. Its successful progression is
|
|
390
|
+
`prepared -> sealed -> package-published -> alpha-complete` for Alpha or
|
|
391
|
+
`release-complete` for stable release. If npm succeeds but GitHub Release work
|
|
392
|
+
is interrupted, the durable record remains `package-published`; the next run
|
|
393
|
+
reuses the exact npm evidence and sealed release assets instead of rebuilding
|
|
394
|
+
or republishing them.
|
|
395
|
+
|
|
353
396
|
## Ref Ordering
|
|
354
397
|
|
|
355
398
|
When publish transactions are enabled, promotion order is:
|
|
@@ -357,11 +400,15 @@ When publish transactions are enabled, promotion order is:
|
|
|
357
400
|
1. verify target source and governance;
|
|
358
401
|
2. create or reuse the version-state release commit;
|
|
359
402
|
3. acquire or resume the release transaction;
|
|
360
|
-
4.
|
|
361
|
-
5.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
403
|
+
4. for build-once publication, verify and persist the complete sealed bundle;
|
|
404
|
+
5. run `lifecycle.publish` from the exact sealed tarball or accept already-valid
|
|
405
|
+
evidence;
|
|
406
|
+
6. validate evidence and required artifacts;
|
|
407
|
+
7. move exact release/prerelease tag;
|
|
408
|
+
8. move floating tags and channel refs;
|
|
409
|
+
9. mark the transaction `complete`;
|
|
410
|
+
10. create or update the GitHub Release from restored sealed assets and record
|
|
411
|
+
the `github_release` milestone.
|
|
365
412
|
|
|
366
413
|
When a protected channel requires a generated version-state pull request, the
|
|
367
414
|
first run can stop at `finalizing` after registry publication. If the reviewed
|
|
@@ -497,10 +544,10 @@ different SHA is a material conflict and blocks recovery.
|
|
|
497
544
|
Local recovery commands operate on the same state/evidence files:
|
|
498
545
|
|
|
499
546
|
```bash
|
|
500
|
-
node scripts/release-transaction.mjs inspect --version
|
|
501
|
-
node scripts/release-transaction.mjs recover --version
|
|
502
|
-
node scripts/release-transaction.mjs finalize --version
|
|
503
|
-
node scripts/release-transaction.mjs abort --version
|
|
547
|
+
node scripts/release-transaction.mjs inspect --version v3.0.2
|
|
548
|
+
node scripts/release-transaction.mjs recover --version v3.0.2
|
|
549
|
+
node scripts/release-transaction.mjs finalize --version v3.0.2
|
|
550
|
+
node scripts/release-transaction.mjs abort --version v3.0.2 --superseded-by v3.0.3
|
|
504
551
|
```
|
|
505
552
|
|
|
506
553
|
The CLI is a diagnostic and local repair surface. It reports the durable
|
|
@@ -517,7 +564,7 @@ When no state file exists, creation commands also require:
|
|
|
517
564
|
--repository kungfu-systems/buildchain \
|
|
518
565
|
--source-sha <sha> \
|
|
519
566
|
--release-sha <sha> \
|
|
520
|
-
--target-ref release/
|
|
567
|
+
--target-ref release/v3/v3.0 \
|
|
521
568
|
--channel release
|
|
522
569
|
```
|
|
523
570
|
|
|
@@ -41,6 +41,21 @@ contains:
|
|
|
41
41
|
- normalized platform matrix and artifact summaries;
|
|
42
42
|
- the hash of the aggregate `build-summary.json`.
|
|
43
43
|
|
|
44
|
+
## Initiative-family release evidence
|
|
45
|
+
|
|
46
|
+
A consumer may pass `release-candidate-family-evidence-json` to the reusable
|
|
47
|
+
build. Buildchain normalizes that value as
|
|
48
|
+
`kungfu-buildchain-initiative-family-release-evidence/v1`, binds it into the
|
|
49
|
+
candidate hash, and carries it unchanged into publication authority. The
|
|
50
|
+
envelope can identify one Initiative family root plus the exact Initiative and
|
|
51
|
+
Assignment responsible for the release; continuation evidence can also bind
|
|
52
|
+
the previous family root.
|
|
53
|
+
|
|
54
|
+
This is an adapter-edge release contract, not a second Work Control authority.
|
|
55
|
+
The immutable native Family State v1 projection and the additive Family State
|
|
56
|
+
v2 typed envelope remain owned by Kungfu. Buildchain only proves that the
|
|
57
|
+
release candidate consumed the caller-supplied family evidence exactly.
|
|
58
|
+
|
|
44
59
|
Promotion workflows that should not rebuild artifacts can enable:
|
|
45
60
|
|
|
46
61
|
```yaml
|
|
@@ -52,6 +67,10 @@ Promotion workflows that should not rebuild artifacts can enable:
|
|
|
52
67
|
promote-only-release-candidate: "true"
|
|
53
68
|
release-candidate-passport-path: .buildchain/artifacts/release-candidate-passport.json
|
|
54
69
|
release-candidate-build-summary-path: .buildchain/artifacts/build-summary.json
|
|
70
|
+
release-candidate-family-evidence-required: "true"
|
|
71
|
+
release-candidate-family-evidence-root: sha256:<initiative-family-root>
|
|
72
|
+
release-candidate-family-initiative-id: 2026-07-30-example-initiative
|
|
73
|
+
release-candidate-family-assignment-id: 2026-07-30-example-release
|
|
55
74
|
```
|
|
56
75
|
|
|
57
76
|
With `promote-only-release-candidate: "true"`, promotion fails before
|
|
@@ -82,6 +101,11 @@ other package as `role: platform`. Consumer workflows therefore stay
|
|
|
82
101
|
declarative and do not need their own artifact download or publish-evidence
|
|
83
102
|
generation scripts.
|
|
84
103
|
|
|
104
|
+
When `release-candidate-family-evidence-required` is true, the promotion
|
|
105
|
+
boundary additionally requires the exact family root and may require the
|
|
106
|
+
Initiative and Assignment ids. Missing, mismatched, or source-drifted family
|
|
107
|
+
evidence fails before version-state, release-state, tag, or branch mutation.
|
|
108
|
+
|
|
85
109
|
Because a channel merge can trigger promotion before its PR-stage matrix has
|
|
86
110
|
finished uploading evidence, the resolver waits up to ten minutes for the exact
|
|
87
111
|
merged PR's successful workflow run and paired artifacts. Polling remains bound
|
package/docs/release-flow.md
CHANGED
|
@@ -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
|
|
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/
|
|
50
|
-
| Alpha branch | `alpha/
|
|
51
|
-
| Release branch | `release/
|
|
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 | `
|
|
54
|
-
| Exact release tag | `
|
|
55
|
-
| Floating alpha tag | `
|
|
56
|
-
| Floating major alpha tag | `
|
|
57
|
-
| Floating minor tag | `
|
|
58
|
-
| Floating major tag | `
|
|
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 `
|
|
73
|
-
and `
|
|
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 `
|
|
81
|
-
- floating tags such as `
|
|
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
|
|
98
|
-
--minor
|
|
99
|
-
--source-ref release/
|
|
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 `
|
|
106
|
-
- creates `dev/
|
|
107
|
-
- creates `alpha/
|
|
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/
|
|
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 `
|
|
233
|
-
`alpha/
|
|
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
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
release/
|
|
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
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
alpha/
|
|
251
|
-
dev/
|
|
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-
|
|
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
|
|
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 `
|
|
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 `
|
|
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
|
|
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/
|
|
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 `
|
|
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
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
v3.0.0
|
|
189
|
+
v3.0.1
|
|
190
|
+
v3.0.2
|
|
191
191
|
...
|
|
192
|
-
|
|
192
|
+
v3.0.1234
|
|
193
193
|
```
|
|
194
194
|
|
|
195
195
|
This is why Buildchain maintains both exact and floating refs:
|
|
196
196
|
|
|
197
|
-
- `
|
|
198
|
-
- `
|
|
199
|
-
- `
|
|
200
|
-
- `
|
|
201
|
-
- `
|
|
202
|
-
- `v3-alpha` is the latest test channel on the highest published alpha minor in major `
|
|
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
|
-
`
|
|
209
|
-
`
|
|
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
|
-
`
|
|
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 `
|
|
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.
|
|
@@ -285,7 +285,7 @@ reviewed alpha SHA and compatibility digest; it does not replace the stable
|
|
|
285
285
|
consumer lock. A later alpha with only compatible additive drift continues,
|
|
286
286
|
while a changed breaking digest fails until the new alpha contract is reviewed.
|
|
287
287
|
|
|
288
|
-
The evidence job resolves `v3-alpha` and `
|
|
288
|
+
The evidence job resolves `v3-alpha` and `v3` through the GitHub refs API,
|
|
289
289
|
compares those immutable SHAs with the reusable workflow outputs, verifies the
|
|
290
290
|
`alpha` and `stable` classifications, and uploads a JSON evidence artifact.
|
|
291
291
|
The canary runs after successful Buildchain ref promotion, on a daily fallback
|
|
@@ -618,7 +618,7 @@ jobs:
|
|
|
618
618
|
checks: read
|
|
619
619
|
statuses: read
|
|
620
620
|
with:
|
|
621
|
-
target-branch: dev/
|
|
621
|
+
target-branch: dev/v3/v3.0
|
|
622
622
|
required-status-checks: check / check
|
|
623
623
|
ready-label: ready
|
|
624
624
|
block-labels: blocked,do-not-merge
|
|
@@ -720,7 +720,7 @@ when that is explicitly allowed by the caller.
|
|
|
720
720
|
|
|
721
721
|
## Lifecycle Configuration
|
|
722
722
|
|
|
723
|
-
|
|
723
|
+
`.buildchain/buildchain.toml` is the v3 user configuration format. It lets a repository
|
|
724
724
|
declare version-state files and lifecycle commands without pretending every
|
|
725
725
|
project is a Node workspace. Supported version files include JSON, TOML, and
|
|
726
726
|
regex-based files such as `CMakeLists.txt` or `conanfile.py`.
|
|
@@ -785,13 +785,13 @@ bypass actor.
|
|
|
785
785
|
|
|
786
786
|
When the loop succeeds, maintainers and consumers can rely on these facts:
|
|
787
787
|
|
|
788
|
-
- every production release has an exact tag such as `
|
|
789
|
-
- every production minor line has a floating tag such as `
|
|
790
|
-
- every selected stable major has a floating tag such as `
|
|
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`;
|
|
791
791
|
- every next-major release is driven by a reviewed `release -> publish-gate/major` PR,
|
|
792
792
|
not a hidden manual button;
|
|
793
|
-
- every test channel has an exact alpha tag such as `
|
|
794
|
-
- every alpha minor line has a floating tag such as `
|
|
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`;
|
|
795
795
|
- every major with a published alpha has a cross-minor floating tag such as `v3-alpha`, owned by its highest published alpha minor;
|
|
796
796
|
- version manifests match the tag visible from the same commit;
|
|
797
797
|
- production releases are derived from the alpha tree that was tested;
|
|
@@ -887,8 +887,8 @@ Buildchain also does not maintain bare exact tags such as `1.0.0`. The supported
|
|
|
887
887
|
exact release and alpha refs are v-prefixed:
|
|
888
888
|
|
|
889
889
|
```text
|
|
890
|
-
|
|
891
|
-
|
|
890
|
+
v3.0.0
|
|
891
|
+
v3.0.1-alpha.0
|
|
892
892
|
```
|
|
893
893
|
|
|
894
894
|
## Operational Reading Order
|
package/docs/release-passport.md
CHANGED
|
@@ -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
|