@kungfu-tech/buildchain 4.0.9-alpha.1 → 4.0.9-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/architecture/maintainability-debt.json +10 -10
- package/architecture/workflow-taxonomy.json +1 -1
- package/dist/site/buildchain-contract.json +2 -2
- package/dist/site/buildchain-site.json +11 -6
- package/dist/site/kfd-claims.json +2 -2
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/page-registry.json +7 -2
- package/dist/site/public-surface-audit.json +2 -2
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +4 -4
- package/dist/site/workflow-registry.json +5 -5
- package/docs/v4-production-release.md +10 -0
- package/package.json +1 -1
- package/scripts/stable-candidate-qualification.mjs +59 -34
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
},
|
|
8
8
|
"totalExcessLedger": {
|
|
9
9
|
"metric": "calibrated-full-dimensional-excess-v1",
|
|
10
|
-
"measuredExcess":
|
|
11
|
-
"current":
|
|
10
|
+
"measuredExcess": 62190,
|
|
11
|
+
"current": 54129
|
|
12
12
|
},
|
|
13
13
|
"defaults": {
|
|
14
14
|
"owner": "Buildchain architecture maintainers",
|
|
@@ -2270,24 +2270,24 @@
|
|
|
2270
2270
|
"<anonymous@445>@445": {
|
|
2271
2271
|
"lines": 183
|
|
2272
2272
|
},
|
|
2273
|
-
"<anonymous@
|
|
2273
|
+
"<anonymous@1554>@1554": {
|
|
2274
2274
|
"lines": 249
|
|
2275
2275
|
},
|
|
2276
|
-
"<anonymous@
|
|
2276
|
+
"<anonymous@2560>@2560": {
|
|
2277
2277
|
"lines": 188
|
|
2278
2278
|
}
|
|
2279
2279
|
}
|
|
2280
2280
|
},
|
|
2281
2281
|
"current": {
|
|
2282
|
-
"lines":
|
|
2282
|
+
"lines": 2884,
|
|
2283
2283
|
"functions": {
|
|
2284
2284
|
"<anonymous@445>@445": {
|
|
2285
2285
|
"lines": 183
|
|
2286
2286
|
},
|
|
2287
|
-
"<anonymous@
|
|
2287
|
+
"<anonymous@1554>@1554": {
|
|
2288
2288
|
"lines": 249
|
|
2289
2289
|
},
|
|
2290
|
-
"<anonymous@
|
|
2290
|
+
"<anonymous@2560>@2560": {
|
|
2291
2291
|
"lines": 188
|
|
2292
2292
|
}
|
|
2293
2293
|
}
|
|
@@ -2298,10 +2298,10 @@
|
|
|
2298
2298
|
"<anonymous@445>@445": {
|
|
2299
2299
|
"lines": 180
|
|
2300
2300
|
},
|
|
2301
|
-
"<anonymous@
|
|
2301
|
+
"<anonymous@1554>@1554": {
|
|
2302
2302
|
"lines": 180
|
|
2303
2303
|
},
|
|
2304
|
-
"<anonymous@
|
|
2304
|
+
"<anonymous@2560>@2560": {
|
|
2305
2305
|
"lines": 180
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
@@ -3102,7 +3102,7 @@
|
|
|
3102
3102
|
"path": "tests/build-surface.test.mjs",
|
|
3103
3103
|
"metric": "lines",
|
|
3104
3104
|
"baseline": 4639,
|
|
3105
|
-
"current":
|
|
3105
|
+
"current": 2884
|
|
3106
3106
|
},
|
|
3107
3107
|
{
|
|
3108
3108
|
"domain": "workflows",
|
|
@@ -616,7 +616,7 @@
|
|
|
616
616
|
"originalSha256": "7280bc3e9c8b9033c74f136d5a6c6998eb0f0b1caf0184510d0f7567b24b1282"
|
|
617
617
|
},
|
|
618
618
|
"compatibility": null,
|
|
619
|
-
"rationale": "
|
|
619
|
+
"rationale": "Qualify the exact published alpha runtime observed by a successful public zero-input Buildchain build, binding its source run and three-platform artifacts without cross-repository dispatch or publication authority."
|
|
620
620
|
},
|
|
621
621
|
{
|
|
622
622
|
"id": "candidate-lab",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"product": {
|
|
5
5
|
"name": "Buildchain",
|
|
6
6
|
"package": "@kungfu-tech/buildchain",
|
|
7
|
-
"version": "4.0.9-alpha.
|
|
7
|
+
"version": "4.0.9-alpha.2",
|
|
8
8
|
"repository": "https://github.com/kungfu-systems/buildchain"
|
|
9
9
|
},
|
|
10
10
|
"majorLine": "v4",
|
|
@@ -4354,5 +4354,5 @@
|
|
|
4354
4354
|
"compatibilityFactCutRoot": "sha256:f61b975d4a96c921cc4bd37fb3ed9a0596b47004fe34dc7219979d697e3707f9",
|
|
4355
4355
|
"compatibilityProofRegistryRoot": "sha256:b7194b811e4d3af2df4390bc4d1731e16a86215bd64ee18cb630dd5492f4fb63",
|
|
4356
4356
|
"compatibilityDigest": "sha256:e398528e54509c05569630ffcc98a04d41e831479ab921df65943b49bf077719",
|
|
4357
|
-
"contractDigest": "sha256:
|
|
4357
|
+
"contractDigest": "sha256:9020e79400bb4540e27298d4a035a61328a5e54306ce8a0ee3199bab76a02bd3"
|
|
4358
4358
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-bundle",
|
|
4
|
-
"generatedAt": "2026-09-
|
|
5
|
-
"publishedAt": "2026-09-
|
|
4
|
+
"generatedAt": "2026-09-08T14:54:17.000Z",
|
|
5
|
+
"publishedAt": "2026-09-08T14:54:17.000Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "55827a43f38b1d75cb4903247c1e126fda4032cf",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"package": {
|
|
39
39
|
"name": "@kungfu-tech/buildchain",
|
|
40
|
-
"version": "4.0.9-alpha.
|
|
40
|
+
"version": "4.0.9-alpha.2",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"source": {
|
|
@@ -5023,13 +5023,18 @@
|
|
|
5023
5023
|
],
|
|
5024
5024
|
"maturity": "stable",
|
|
5025
5025
|
"sourcePath": "docs/v4-production-release.md",
|
|
5026
|
-
"digest": "sha256:
|
|
5026
|
+
"digest": "sha256:078404ecd65922736de17039c43d160f6e3da971921a39c3fab10f437573e3ea",
|
|
5027
5027
|
"headings": [
|
|
5028
5028
|
{
|
|
5029
5029
|
"level": 1,
|
|
5030
5030
|
"title": "Buildchain v4 production release",
|
|
5031
5031
|
"anchor": "buildchain-v4-production-release"
|
|
5032
5032
|
},
|
|
5033
|
+
{
|
|
5034
|
+
"level": 2,
|
|
5035
|
+
"title": "Public build qualification",
|
|
5036
|
+
"anchor": "public-build-qualification"
|
|
5037
|
+
},
|
|
5033
5038
|
{
|
|
5034
5039
|
"level": 2,
|
|
5035
5040
|
"title": "Provider readback",
|
|
@@ -5056,7 +5061,7 @@
|
|
|
5056
5061
|
"anchor": "automatic-next-development-review"
|
|
5057
5062
|
}
|
|
5058
5063
|
],
|
|
5059
|
-
"markdown": "---\nstatus: active\nperiod: ongoing\ntheme: buildchain-v4-production-release\ndoc_type: runbook\nsource_level: repository-contracts + protected-provider-readback\nconfidence: high\nsensitivity: public\nevidence_grade: A\nreview_state: unreviewed\nlast_reviewed: 2026-09-08\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-08\n invisible_context: Provider credentials and private provider state were not read.\n---\n\n# Buildchain v4 production release\n\nBuildchain v4 is the production release authority for the `v4.0` line. The\nprotected source path is:\n\n```text\ndev/v4/v4.0 -> alpha/v4/v4.0 -> release/v4/v4.0\n```\n\nPublic consumers use `v4-alpha` for the current prerelease channel and `v4`\nfor stable, with matching stable and alpha contract locks. Exact commits and\nimmutable release tags identify retained evidence and explicitly admitted runtime\ninputs; tracked v4 reusable-workflow selectors remain `@v4` or `@v4-alpha`.\n\nBefore qualifying a new release, run `node scripts/check-universal-workflow-bootstrap.mjs`.\nThe required repository check rejects an expired or not-yet-valid candidate admission\npolicy before publication. Renew the bounded validity window through protected review;\nkeep its capability, permission, reviewer and exact-source requirements unchanged.\nHistorical publication receipts remain immutable when a later admission window expires.\n\nThe release transaction is fail-closed. The v4 provider-operation journal,\nactivation plan, stable publication fence, and partial-mutation recovery plan\nbind the exact source, qualification, policy, provider readback, protected\nancestry, and target roots. Confirmed operations are never replayed; uncertain\noperations require provider readback before retry; stable publication requires\nan N-1 or independently sealed qualification.\n\n## Provider readback\n\nA stable release is complete only when all of these coordinates agree:\n\n- `release/v4/v4.0`, `v4`, `v4.0`, and the exact `v4.0.x` tag;\n- the GitHub Release tag and attached Release Passport evidence;\n- npm `@kungfu-tech/buildchain@4.0.x`, its `gitHead`, and the `latest` tag;\n- the protected source and release transaction roots.\n\nThe alpha channel applies the same rule to `alpha/v4/v4.0`, `v4-alpha`, the\nexact alpha tag, and npm's `alpha` tag.\n\n## Non-destructive rollback\n\nRollback never rewrites an exact tag, release, package version, Passport, or\nprovider journal. Stop forward promotion and select the last verified exact\nv4 runtime through an admitted, non-persistent recovery input; keep tracked v4\nworkflow selectors on their locked floating channel. Use `release/v3/v3.0`\ncoordinate only as an explicit compatibility rollback reference. Restoring v3\nas production authority requires a new reviewed cutover; it is not an implicit\nfallback.\n\nBefore any retry, compare the current provider state with the retained\ntransaction and operation roots. Resume only missing eligible operations.\nConflicting state remains `repair-required` or terminal and must not be\nconverted into success by moving a floating ref.\n\n## Publication settlement and binary recovery\n\nPublication, next-development advancement, and binary distribution have separate\nresults. A completed native ReleaseReceipt remains publication evidence when the\nlater generated Dev PR is still pending or its enqueue call fails. SETTLE verifies\nthe immutable invocation, transaction, both provider states, receipt and Passport\nroots even when APPLY fails after publication. It has no provider write permission.\n\nAPPLY retains that exact chain before waiting for next-development in the existing GitHub Release as\n`buildchain-publication-settlement.json`; it reads the exact tag and original\n`buildchain.release.json` before adding the packet. The APPLY artifact also retains\n`delivery-summary.json`, which reports publication and next-development separately.\nA green workflow label cannot substitute for this receipt verification.\n\nRecovery verifies both its current execution chain and any already published\nsettlement against the exact tag, source and original Passport. It preserves\nthe existing settlement bytes and uses that original receipt for development\nadvancement. A corrected runtime may produce different recovery observations;\nthey do not authorize replacing the completed publication packet. Ambiguous,\ntampered or mismatched retained evidence still blocks recovery.\n\nBinary Distribution reads this settlement and the original publication Passport.\nTag creation can precede settlement, so it waits at most 160 observations, 15 seconds\napart, for missing evidence. A mismatched source, tag, Passport or receipt fails\nimmediately. It no longer requires a legacy `buildchain/release-state/*` ref for v4.\n\nThe sealed binary publisher retains the publication Passport and writes its own\nPassport as `buildchain.binary.release.json`. All v4 asset collisions are checked\nbefore uploads: identical bytes are preserved, absent assets are added, and\nconflicting bytes are rejected. Each publication authorization is retained as\n`buildchain.binary.capability-<sha256>.json`, so a fresh recovery capability does\nnot overwrite an earlier grant. Existing assets are never clobbered. Recovery uses\nthe same exact successful Binary Distribution evidence run through\n`self-release-binary-assets.yml`; it does not rebuild already admitted archives or\ncreate another npm version. Read back all three platform archives, checksums,\nboth Passports and the settlement packet before declaring distribution complete.\n\nThe native publication receipt authorizes no stable promotion and makes no claim\nthat a pending next-development PR has merged. Inspect the exact PR head, protected\nbase and merge result independently. A retry of the publication phase must first\nread retained provider facts and resume only missing operations.\n\n## Protected stable finalization\n\nA successful protected `Verify` on the release branch starts the same floating\nalpha publisher used for prereleases. The publisher creates the stable version\nPR and waits within the original transaction for protected merge and the exact\nmerged commit's successful `Verify`, before moving floating tags and completing\nthe publication receipt. Generated finalization heads are classified from their\nrooted product state and exact source tag, so their checks do not publish again.\n\nThe independent version reviewer also handles generated stable finalization PRs.\nIt requires the exact protected source parent, the rooted version-state parent,\nthe matching immutable stable tag, and byte-for-byte regeneration of the complete\ndeclared version delta. Verification uses protected source code without approval\ncredentials. A separate step approves only the verified head and enables normal\nprotected auto-merge. Changed source/base, modified PR contents, requested changes,\nfailed final checks, and timeout remain failures. Recover an interrupted run using\nthe original source and retained provider evidence; never rewrite published bytes.\n\n## Automatic next-development review\n\nAfter stable completion, the producer generates the next patch at `alpha.0`\nfrom an isolated Git checkout of the exact current protected Dev commit. The\ncheckout explicitly fetches the exact Dev commit into its own object database;\nshallow local clones alone may omit commits fetched only into `FETCH_HEAD`.\nIt retains its own index so version verification can inspect the actual\ngenerated delta, and uses the admitted runtime dependency bridge. A source\narchive without Git metadata cannot perform that verification. The publication\nreceipt remains complete if development preparation fails; recover the original\ntransaction with corrected, reviewed tooling before publishing the next version.\n\n`self-release-next-development.yml` observes a successful exact `Verify` PR run\nfor a same-repository `chore/next-development/*` branch. It executes only the\nprotected default branch runtime. The PR must have one parent equal to the\ncurrent protected Dev head. The protected generator reconstructs every tracked\nbyte, permits only the declared immediate alpha version increment, and verifies\nthe completed alpha settlement against the exact tag and original Passport.\nThe published source tree must equal the protected development base tree.\n\nThe verification step receives no approval credential and never executes PR\ncode. A separate step uses `BUILDCHAIN_APPROVAL_TOKEN`, verifies that its identity\nis the independent `kungfu-origin` CODEOWNER, rereads the exact PR/run/base, and\napproves only that commit. Existing requests for changes stop automation.\nThe exact approval is read back before queue admission with the separate\n`BUILDCHAIN_PROMOTION_TOKEN`. Required checks, CODEOWNER protection and native\nmerge-group verification remain enforced. Missing credentials or evidence,\nforks, source changes and base/head drift fail closed.\n\nThe producer waits for pending independent review and required checks with a\nbounded retry budget. Publication evidence is already durable during this wait,\nso binaries can proceed independently. The reviewer also enqueues the verified\nhead idempotently, allowing a producer interruption to leave a recoverable PR.\nAn interrupted producer run remains failed; a successful later release is needed\nto establish an uninterrupted end-to-end publication."
|
|
5064
|
+
"markdown": "---\nstatus: active\nperiod: ongoing\ntheme: buildchain-v4-production-release\ndoc_type: runbook\nsource_level: repository-contracts + protected-provider-readback\nconfidence: high\nsensitivity: public\nevidence_grade: A\nreview_state: unreviewed\nlast_reviewed: 2026-09-08\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-08\n invisible_context: Provider credentials and private provider state were not read.\n---\n\n# Buildchain v4 production release\n\nBuildchain v4 is the production release authority for the `v4.0` line. The\nprotected source path is:\n\n```text\ndev/v4/v4.0 -> alpha/v4/v4.0 -> release/v4/v4.0\n```\n\nPublic consumers use `v4-alpha` for the current prerelease channel and `v4`\nfor stable, with matching stable and alpha contract locks. Exact commits and\nimmutable release tags identify retained evidence and explicitly admitted runtime\ninputs; tracked v4 reusable-workflow selectors remain `@v4` or `@v4-alpha`.\n\nBefore qualifying a new release, run `node scripts/check-universal-workflow-bootstrap.mjs`.\nThe required repository check rejects an expired or not-yet-valid candidate admission\npolicy before publication. Renew the bounded validity window through protected review;\nkeep its capability, permission, reviewer and exact-source requirements unchanged.\nHistorical publication receipts remain immutable when a later admission window expires.\n\nThe release transaction is fail-closed. The v4 provider-operation journal,\nactivation plan, stable publication fence, and partial-mutation recovery plan\nbind the exact source, qualification, policy, provider readback, protected\nancestry, and target roots. Confirmed operations are never replayed; uncertain\noperations require provider readback before retry; stable publication requires\nan N-1 or independently sealed qualification.\n\n## Public build qualification\n\nAfter a successful Alpha Self-Dogfood run, Stable Candidate Qualification reads\nits exact `buildchain-summary-<source SHA>` artifact. Protected default-branch\ncode verifies the source run, published alpha runtime, all three platform\nartifacts and install/build/verify evidence before writing\n`buildchain-canary/buildchain-zero-input` on that runtime commit. Manual replay\naccepts only the source run ID. This observation remains Buildchain-owned; it\nneither dispatches another repository nor grants stable publication authority.\n\n## Provider readback\n\nA stable release is complete only when all of these coordinates agree:\n\n- `release/v4/v4.0`, `v4`, `v4.0`, and the exact `v4.0.x` tag;\n- the GitHub Release tag and attached Release Passport evidence;\n- npm `@kungfu-tech/buildchain@4.0.x`, its `gitHead`, and the `latest` tag;\n- the protected source and release transaction roots.\n\nThe alpha channel applies the same rule to `alpha/v4/v4.0`, `v4-alpha`, the\nexact alpha tag, and npm's `alpha` tag.\n\n## Non-destructive rollback\n\nRollback never rewrites an exact tag, release, package version, Passport, or\nprovider journal. Stop forward promotion and select the last verified exact\nv4 runtime through an admitted, non-persistent recovery input; keep tracked v4\nworkflow selectors on their locked floating channel. Use `release/v3/v3.0`\ncoordinate only as an explicit compatibility rollback reference. Restoring v3\nas production authority requires a new reviewed cutover; it is not an implicit\nfallback.\n\nBefore any retry, compare the current provider state with the retained\ntransaction and operation roots. Resume only missing eligible operations.\nConflicting state remains `repair-required` or terminal and must not be\nconverted into success by moving a floating ref.\n\n## Publication settlement and binary recovery\n\nPublication, next-development advancement, and binary distribution have separate\nresults. A completed native ReleaseReceipt remains publication evidence when the\nlater generated Dev PR is still pending or its enqueue call fails. SETTLE verifies\nthe immutable invocation, transaction, both provider states, receipt and Passport\nroots even when APPLY fails after publication. It has no provider write permission.\n\nAPPLY retains that exact chain before waiting for next-development in the existing GitHub Release as\n`buildchain-publication-settlement.json`; it reads the exact tag and original\n`buildchain.release.json` before adding the packet. The APPLY artifact also retains\n`delivery-summary.json`, which reports publication and next-development separately.\nA green workflow label cannot substitute for this receipt verification.\n\nRecovery verifies both its current execution chain and any already published\nsettlement against the exact tag, source and original Passport. It preserves\nthe existing settlement bytes and uses that original receipt for development\nadvancement. A corrected runtime may produce different recovery observations;\nthey do not authorize replacing the completed publication packet. Ambiguous,\ntampered or mismatched retained evidence still blocks recovery.\n\nBinary Distribution reads this settlement and the original publication Passport.\nTag creation can precede settlement, so it waits at most 160 observations, 15 seconds\napart, for missing evidence. A mismatched source, tag, Passport or receipt fails\nimmediately. It no longer requires a legacy `buildchain/release-state/*` ref for v4.\n\nThe sealed binary publisher retains the publication Passport and writes its own\nPassport as `buildchain.binary.release.json`. All v4 asset collisions are checked\nbefore uploads: identical bytes are preserved, absent assets are added, and\nconflicting bytes are rejected. Each publication authorization is retained as\n`buildchain.binary.capability-<sha256>.json`, so a fresh recovery capability does\nnot overwrite an earlier grant. Existing assets are never clobbered. Recovery uses\nthe same exact successful Binary Distribution evidence run through\n`self-release-binary-assets.yml`; it does not rebuild already admitted archives or\ncreate another npm version. Read back all three platform archives, checksums,\nboth Passports and the settlement packet before declaring distribution complete.\n\nThe native publication receipt authorizes no stable promotion and makes no claim\nthat a pending next-development PR has merged. Inspect the exact PR head, protected\nbase and merge result independently. A retry of the publication phase must first\nread retained provider facts and resume only missing operations.\n\n## Protected stable finalization\n\nA successful protected `Verify` on the release branch starts the same floating\nalpha publisher used for prereleases. The publisher creates the stable version\nPR and waits within the original transaction for protected merge and the exact\nmerged commit's successful `Verify`, before moving floating tags and completing\nthe publication receipt. Generated finalization heads are classified from their\nrooted product state and exact source tag, so their checks do not publish again.\n\nThe independent version reviewer also handles generated stable finalization PRs.\nIt requires the exact protected source parent, the rooted version-state parent,\nthe matching immutable stable tag, and byte-for-byte regeneration of the complete\ndeclared version delta. Verification uses protected source code without approval\ncredentials. A separate step approves only the verified head and enables normal\nprotected auto-merge. Changed source/base, modified PR contents, requested changes,\nfailed final checks, and timeout remain failures. Recover an interrupted run using\nthe original source and retained provider evidence; never rewrite published bytes.\n\n## Automatic next-development review\n\nAfter stable completion, the producer generates the next patch at `alpha.0`\nfrom an isolated Git checkout of the exact current protected Dev commit. The\ncheckout explicitly fetches the exact Dev commit into its own object database;\nshallow local clones alone may omit commits fetched only into `FETCH_HEAD`.\nIt retains its own index so version verification can inspect the actual\ngenerated delta, and uses the admitted runtime dependency bridge. A source\narchive without Git metadata cannot perform that verification. The publication\nreceipt remains complete if development preparation fails; recover the original\ntransaction with corrected, reviewed tooling before publishing the next version.\n\n`self-release-next-development.yml` observes a successful exact `Verify` PR run\nfor a same-repository `chore/next-development/*` branch. It executes only the\nprotected default branch runtime. The PR must have one parent equal to the\ncurrent protected Dev head. The protected generator reconstructs every tracked\nbyte, permits only the declared immediate alpha version increment, and verifies\nthe completed alpha settlement against the exact tag and original Passport.\nThe published source tree must equal the protected development base tree.\n\nThe verification step receives no approval credential and never executes PR\ncode. A separate step uses `BUILDCHAIN_APPROVAL_TOKEN`, verifies that its identity\nis the independent `kungfu-origin` CODEOWNER, rereads the exact PR/run/base, and\napproves only that commit. Existing requests for changes stop automation.\nThe exact approval is read back before queue admission with the separate\n`BUILDCHAIN_PROMOTION_TOKEN`. Required checks, CODEOWNER protection and native\nmerge-group verification remain enforced. Missing credentials or evidence,\nforks, source changes and base/head drift fail closed.\n\nThe producer waits for pending independent review and required checks with a\nbounded retry budget. Publication evidence is already durable during this wait,\nso binaries can proceed independently. The reviewer also enqueues the verified\nhead idempotently, allowing a producer interruption to leave a recoverable PR.\nAn interrupted producer run remains failed; a successful later release is needed\nto establish an uninterrupted end-to-end publication."
|
|
5060
5065
|
},
|
|
5061
5066
|
{
|
|
5062
5067
|
"id": "manual:v4-publication-rehearsal",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"contract": "kungfu-buildchain-public-surface-reverse-audit",
|
|
22
22
|
"path": "dist/site/public-surface-audit.json",
|
|
23
23
|
"status": "passed",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "9df5d224c8690cb61eb7ea9a9a74d71de2b2a7fd9848763beeb16abeb0e8f964",
|
|
25
25
|
"summary": {
|
|
26
26
|
"cliCommandCount": 117,
|
|
27
27
|
"workflowCount": 116,
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
"contract": "kungfu-buildchain-public-surface-reverse-audit",
|
|
247
247
|
"path": "dist/site/public-surface-audit.json",
|
|
248
248
|
"status": "passed",
|
|
249
|
-
"sha256": "
|
|
249
|
+
"sha256": "9df5d224c8690cb61eb7ea9a9a74d71de2b2a7fd9848763beeb16abeb0e8f964",
|
|
250
250
|
"summary": {
|
|
251
251
|
"cliCommandCount": 117,
|
|
252
252
|
"workflowCount": 116,
|
|
@@ -4957,13 +4957,18 @@
|
|
|
4957
4957
|
],
|
|
4958
4958
|
"maturity": "stable",
|
|
4959
4959
|
"sourcePath": "docs/v4-production-release.md",
|
|
4960
|
-
"digest": "sha256:
|
|
4960
|
+
"digest": "sha256:078404ecd65922736de17039c43d160f6e3da971921a39c3fab10f437573e3ea",
|
|
4961
4961
|
"headings": [
|
|
4962
4962
|
{
|
|
4963
4963
|
"level": 1,
|
|
4964
4964
|
"title": "Buildchain v4 production release",
|
|
4965
4965
|
"anchor": "buildchain-v4-production-release"
|
|
4966
4966
|
},
|
|
4967
|
+
{
|
|
4968
|
+
"level": 2,
|
|
4969
|
+
"title": "Public build qualification",
|
|
4970
|
+
"anchor": "public-build-qualification"
|
|
4971
|
+
},
|
|
4967
4972
|
{
|
|
4968
4973
|
"level": 2,
|
|
4969
4974
|
"title": "Provider readback",
|
|
@@ -4990,7 +4995,7 @@
|
|
|
4990
4995
|
"anchor": "automatic-next-development-review"
|
|
4991
4996
|
}
|
|
4992
4997
|
],
|
|
4993
|
-
"markdown": "---\nstatus: active\nperiod: ongoing\ntheme: buildchain-v4-production-release\ndoc_type: runbook\nsource_level: repository-contracts + protected-provider-readback\nconfidence: high\nsensitivity: public\nevidence_grade: A\nreview_state: unreviewed\nlast_reviewed: 2026-09-08\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-08\n invisible_context: Provider credentials and private provider state were not read.\n---\n\n# Buildchain v4 production release\n\nBuildchain v4 is the production release authority for the `v4.0` line. The\nprotected source path is:\n\n```text\ndev/v4/v4.0 -> alpha/v4/v4.0 -> release/v4/v4.0\n```\n\nPublic consumers use `v4-alpha` for the current prerelease channel and `v4`\nfor stable, with matching stable and alpha contract locks. Exact commits and\nimmutable release tags identify retained evidence and explicitly admitted runtime\ninputs; tracked v4 reusable-workflow selectors remain `@v4` or `@v4-alpha`.\n\nBefore qualifying a new release, run `node scripts/check-universal-workflow-bootstrap.mjs`.\nThe required repository check rejects an expired or not-yet-valid candidate admission\npolicy before publication. Renew the bounded validity window through protected review;\nkeep its capability, permission, reviewer and exact-source requirements unchanged.\nHistorical publication receipts remain immutable when a later admission window expires.\n\nThe release transaction is fail-closed. The v4 provider-operation journal,\nactivation plan, stable publication fence, and partial-mutation recovery plan\nbind the exact source, qualification, policy, provider readback, protected\nancestry, and target roots. Confirmed operations are never replayed; uncertain\noperations require provider readback before retry; stable publication requires\nan N-1 or independently sealed qualification.\n\n## Provider readback\n\nA stable release is complete only when all of these coordinates agree:\n\n- `release/v4/v4.0`, `v4`, `v4.0`, and the exact `v4.0.x` tag;\n- the GitHub Release tag and attached Release Passport evidence;\n- npm `@kungfu-tech/buildchain@4.0.x`, its `gitHead`, and the `latest` tag;\n- the protected source and release transaction roots.\n\nThe alpha channel applies the same rule to `alpha/v4/v4.0`, `v4-alpha`, the\nexact alpha tag, and npm's `alpha` tag.\n\n## Non-destructive rollback\n\nRollback never rewrites an exact tag, release, package version, Passport, or\nprovider journal. Stop forward promotion and select the last verified exact\nv4 runtime through an admitted, non-persistent recovery input; keep tracked v4\nworkflow selectors on their locked floating channel. Use `release/v3/v3.0`\ncoordinate only as an explicit compatibility rollback reference. Restoring v3\nas production authority requires a new reviewed cutover; it is not an implicit\nfallback.\n\nBefore any retry, compare the current provider state with the retained\ntransaction and operation roots. Resume only missing eligible operations.\nConflicting state remains `repair-required` or terminal and must not be\nconverted into success by moving a floating ref.\n\n## Publication settlement and binary recovery\n\nPublication, next-development advancement, and binary distribution have separate\nresults. A completed native ReleaseReceipt remains publication evidence when the\nlater generated Dev PR is still pending or its enqueue call fails. SETTLE verifies\nthe immutable invocation, transaction, both provider states, receipt and Passport\nroots even when APPLY fails after publication. It has no provider write permission.\n\nAPPLY retains that exact chain before waiting for next-development in the existing GitHub Release as\n`buildchain-publication-settlement.json`; it reads the exact tag and original\n`buildchain.release.json` before adding the packet. The APPLY artifact also retains\n`delivery-summary.json`, which reports publication and next-development separately.\nA green workflow label cannot substitute for this receipt verification.\n\nRecovery verifies both its current execution chain and any already published\nsettlement against the exact tag, source and original Passport. It preserves\nthe existing settlement bytes and uses that original receipt for development\nadvancement. A corrected runtime may produce different recovery observations;\nthey do not authorize replacing the completed publication packet. Ambiguous,\ntampered or mismatched retained evidence still blocks recovery.\n\nBinary Distribution reads this settlement and the original publication Passport.\nTag creation can precede settlement, so it waits at most 160 observations, 15 seconds\napart, for missing evidence. A mismatched source, tag, Passport or receipt fails\nimmediately. It no longer requires a legacy `buildchain/release-state/*` ref for v4.\n\nThe sealed binary publisher retains the publication Passport and writes its own\nPassport as `buildchain.binary.release.json`. All v4 asset collisions are checked\nbefore uploads: identical bytes are preserved, absent assets are added, and\nconflicting bytes are rejected. Each publication authorization is retained as\n`buildchain.binary.capability-<sha256>.json`, so a fresh recovery capability does\nnot overwrite an earlier grant. Existing assets are never clobbered. Recovery uses\nthe same exact successful Binary Distribution evidence run through\n`self-release-binary-assets.yml`; it does not rebuild already admitted archives or\ncreate another npm version. Read back all three platform archives, checksums,\nboth Passports and the settlement packet before declaring distribution complete.\n\nThe native publication receipt authorizes no stable promotion and makes no claim\nthat a pending next-development PR has merged. Inspect the exact PR head, protected\nbase and merge result independently. A retry of the publication phase must first\nread retained provider facts and resume only missing operations.\n\n## Protected stable finalization\n\nA successful protected `Verify` on the release branch starts the same floating\nalpha publisher used for prereleases. The publisher creates the stable version\nPR and waits within the original transaction for protected merge and the exact\nmerged commit's successful `Verify`, before moving floating tags and completing\nthe publication receipt. Generated finalization heads are classified from their\nrooted product state and exact source tag, so their checks do not publish again.\n\nThe independent version reviewer also handles generated stable finalization PRs.\nIt requires the exact protected source parent, the rooted version-state parent,\nthe matching immutable stable tag, and byte-for-byte regeneration of the complete\ndeclared version delta. Verification uses protected source code without approval\ncredentials. A separate step approves only the verified head and enables normal\nprotected auto-merge. Changed source/base, modified PR contents, requested changes,\nfailed final checks, and timeout remain failures. Recover an interrupted run using\nthe original source and retained provider evidence; never rewrite published bytes.\n\n## Automatic next-development review\n\nAfter stable completion, the producer generates the next patch at `alpha.0`\nfrom an isolated Git checkout of the exact current protected Dev commit. The\ncheckout explicitly fetches the exact Dev commit into its own object database;\nshallow local clones alone may omit commits fetched only into `FETCH_HEAD`.\nIt retains its own index so version verification can inspect the actual\ngenerated delta, and uses the admitted runtime dependency bridge. A source\narchive without Git metadata cannot perform that verification. The publication\nreceipt remains complete if development preparation fails; recover the original\ntransaction with corrected, reviewed tooling before publishing the next version.\n\n`self-release-next-development.yml` observes a successful exact `Verify` PR run\nfor a same-repository `chore/next-development/*` branch. It executes only the\nprotected default branch runtime. The PR must have one parent equal to the\ncurrent protected Dev head. The protected generator reconstructs every tracked\nbyte, permits only the declared immediate alpha version increment, and verifies\nthe completed alpha settlement against the exact tag and original Passport.\nThe published source tree must equal the protected development base tree.\n\nThe verification step receives no approval credential and never executes PR\ncode. A separate step uses `BUILDCHAIN_APPROVAL_TOKEN`, verifies that its identity\nis the independent `kungfu-origin` CODEOWNER, rereads the exact PR/run/base, and\napproves only that commit. Existing requests for changes stop automation.\nThe exact approval is read back before queue admission with the separate\n`BUILDCHAIN_PROMOTION_TOKEN`. Required checks, CODEOWNER protection and native\nmerge-group verification remain enforced. Missing credentials or evidence,\nforks, source changes and base/head drift fail closed.\n\nThe producer waits for pending independent review and required checks with a\nbounded retry budget. Publication evidence is already durable during this wait,\nso binaries can proceed independently. The reviewer also enqueues the verified\nhead idempotently, allowing a producer interruption to leave a recoverable PR.\nAn interrupted producer run remains failed; a successful later release is needed\nto establish an uninterrupted end-to-end publication."
|
|
4998
|
+
"markdown": "---\nstatus: active\nperiod: ongoing\ntheme: buildchain-v4-production-release\ndoc_type: runbook\nsource_level: repository-contracts + protected-provider-readback\nconfidence: high\nsensitivity: public\nevidence_grade: A\nreview_state: unreviewed\nlast_reviewed: 2026-09-08\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-08\n invisible_context: Provider credentials and private provider state were not read.\n---\n\n# Buildchain v4 production release\n\nBuildchain v4 is the production release authority for the `v4.0` line. The\nprotected source path is:\n\n```text\ndev/v4/v4.0 -> alpha/v4/v4.0 -> release/v4/v4.0\n```\n\nPublic consumers use `v4-alpha` for the current prerelease channel and `v4`\nfor stable, with matching stable and alpha contract locks. Exact commits and\nimmutable release tags identify retained evidence and explicitly admitted runtime\ninputs; tracked v4 reusable-workflow selectors remain `@v4` or `@v4-alpha`.\n\nBefore qualifying a new release, run `node scripts/check-universal-workflow-bootstrap.mjs`.\nThe required repository check rejects an expired or not-yet-valid candidate admission\npolicy before publication. Renew the bounded validity window through protected review;\nkeep its capability, permission, reviewer and exact-source requirements unchanged.\nHistorical publication receipts remain immutable when a later admission window expires.\n\nThe release transaction is fail-closed. The v4 provider-operation journal,\nactivation plan, stable publication fence, and partial-mutation recovery plan\nbind the exact source, qualification, policy, provider readback, protected\nancestry, and target roots. Confirmed operations are never replayed; uncertain\noperations require provider readback before retry; stable publication requires\nan N-1 or independently sealed qualification.\n\n## Public build qualification\n\nAfter a successful Alpha Self-Dogfood run, Stable Candidate Qualification reads\nits exact `buildchain-summary-<source SHA>` artifact. Protected default-branch\ncode verifies the source run, published alpha runtime, all three platform\nartifacts and install/build/verify evidence before writing\n`buildchain-canary/buildchain-zero-input` on that runtime commit. Manual replay\naccepts only the source run ID. This observation remains Buildchain-owned; it\nneither dispatches another repository nor grants stable publication authority.\n\n## Provider readback\n\nA stable release is complete only when all of these coordinates agree:\n\n- `release/v4/v4.0`, `v4`, `v4.0`, and the exact `v4.0.x` tag;\n- the GitHub Release tag and attached Release Passport evidence;\n- npm `@kungfu-tech/buildchain@4.0.x`, its `gitHead`, and the `latest` tag;\n- the protected source and release transaction roots.\n\nThe alpha channel applies the same rule to `alpha/v4/v4.0`, `v4-alpha`, the\nexact alpha tag, and npm's `alpha` tag.\n\n## Non-destructive rollback\n\nRollback never rewrites an exact tag, release, package version, Passport, or\nprovider journal. Stop forward promotion and select the last verified exact\nv4 runtime through an admitted, non-persistent recovery input; keep tracked v4\nworkflow selectors on their locked floating channel. Use `release/v3/v3.0`\ncoordinate only as an explicit compatibility rollback reference. Restoring v3\nas production authority requires a new reviewed cutover; it is not an implicit\nfallback.\n\nBefore any retry, compare the current provider state with the retained\ntransaction and operation roots. Resume only missing eligible operations.\nConflicting state remains `repair-required` or terminal and must not be\nconverted into success by moving a floating ref.\n\n## Publication settlement and binary recovery\n\nPublication, next-development advancement, and binary distribution have separate\nresults. A completed native ReleaseReceipt remains publication evidence when the\nlater generated Dev PR is still pending or its enqueue call fails. SETTLE verifies\nthe immutable invocation, transaction, both provider states, receipt and Passport\nroots even when APPLY fails after publication. It has no provider write permission.\n\nAPPLY retains that exact chain before waiting for next-development in the existing GitHub Release as\n`buildchain-publication-settlement.json`; it reads the exact tag and original\n`buildchain.release.json` before adding the packet. The APPLY artifact also retains\n`delivery-summary.json`, which reports publication and next-development separately.\nA green workflow label cannot substitute for this receipt verification.\n\nRecovery verifies both its current execution chain and any already published\nsettlement against the exact tag, source and original Passport. It preserves\nthe existing settlement bytes and uses that original receipt for development\nadvancement. A corrected runtime may produce different recovery observations;\nthey do not authorize replacing the completed publication packet. Ambiguous,\ntampered or mismatched retained evidence still blocks recovery.\n\nBinary Distribution reads this settlement and the original publication Passport.\nTag creation can precede settlement, so it waits at most 160 observations, 15 seconds\napart, for missing evidence. A mismatched source, tag, Passport or receipt fails\nimmediately. It no longer requires a legacy `buildchain/release-state/*` ref for v4.\n\nThe sealed binary publisher retains the publication Passport and writes its own\nPassport as `buildchain.binary.release.json`. All v4 asset collisions are checked\nbefore uploads: identical bytes are preserved, absent assets are added, and\nconflicting bytes are rejected. Each publication authorization is retained as\n`buildchain.binary.capability-<sha256>.json`, so a fresh recovery capability does\nnot overwrite an earlier grant. Existing assets are never clobbered. Recovery uses\nthe same exact successful Binary Distribution evidence run through\n`self-release-binary-assets.yml`; it does not rebuild already admitted archives or\ncreate another npm version. Read back all three platform archives, checksums,\nboth Passports and the settlement packet before declaring distribution complete.\n\nThe native publication receipt authorizes no stable promotion and makes no claim\nthat a pending next-development PR has merged. Inspect the exact PR head, protected\nbase and merge result independently. A retry of the publication phase must first\nread retained provider facts and resume only missing operations.\n\n## Protected stable finalization\n\nA successful protected `Verify` on the release branch starts the same floating\nalpha publisher used for prereleases. The publisher creates the stable version\nPR and waits within the original transaction for protected merge and the exact\nmerged commit's successful `Verify`, before moving floating tags and completing\nthe publication receipt. Generated finalization heads are classified from their\nrooted product state and exact source tag, so their checks do not publish again.\n\nThe independent version reviewer also handles generated stable finalization PRs.\nIt requires the exact protected source parent, the rooted version-state parent,\nthe matching immutable stable tag, and byte-for-byte regeneration of the complete\ndeclared version delta. Verification uses protected source code without approval\ncredentials. A separate step approves only the verified head and enables normal\nprotected auto-merge. Changed source/base, modified PR contents, requested changes,\nfailed final checks, and timeout remain failures. Recover an interrupted run using\nthe original source and retained provider evidence; never rewrite published bytes.\n\n## Automatic next-development review\n\nAfter stable completion, the producer generates the next patch at `alpha.0`\nfrom an isolated Git checkout of the exact current protected Dev commit. The\ncheckout explicitly fetches the exact Dev commit into its own object database;\nshallow local clones alone may omit commits fetched only into `FETCH_HEAD`.\nIt retains its own index so version verification can inspect the actual\ngenerated delta, and uses the admitted runtime dependency bridge. A source\narchive without Git metadata cannot perform that verification. The publication\nreceipt remains complete if development preparation fails; recover the original\ntransaction with corrected, reviewed tooling before publishing the next version.\n\n`self-release-next-development.yml` observes a successful exact `Verify` PR run\nfor a same-repository `chore/next-development/*` branch. It executes only the\nprotected default branch runtime. The PR must have one parent equal to the\ncurrent protected Dev head. The protected generator reconstructs every tracked\nbyte, permits only the declared immediate alpha version increment, and verifies\nthe completed alpha settlement against the exact tag and original Passport.\nThe published source tree must equal the protected development base tree.\n\nThe verification step receives no approval credential and never executes PR\ncode. A separate step uses `BUILDCHAIN_APPROVAL_TOKEN`, verifies that its identity\nis the independent `kungfu-origin` CODEOWNER, rereads the exact PR/run/base, and\napproves only that commit. Existing requests for changes stop automation.\nThe exact approval is read back before queue admission with the separate\n`BUILDCHAIN_PROMOTION_TOKEN`. Required checks, CODEOWNER protection and native\nmerge-group verification remain enforced. Missing credentials or evidence,\nforks, source changes and base/head drift fail closed.\n\nThe producer waits for pending independent review and required checks with a\nbounded retry budget. Publication evidence is already durable during this wait,\nso binaries can proceed independently. The reviewer also enqueues the verified\nhead idempotently, allowing a producer interruption to leave a recoverable PR.\nAn interrupted producer run remains failed; a successful later release is needed\nto establish an uninterrupted end-to-end publication."
|
|
4994
4999
|
},
|
|
4995
5000
|
{
|
|
4996
5001
|
"id": "manual:v4-publication-rehearsal",
|
|
@@ -10639,8 +10639,8 @@
|
|
|
10639
10639
|
"workflowRegistryPath": "dist/site/workflow-registry.json",
|
|
10640
10640
|
"pageRegistryPath": "dist/site/page-registry.json",
|
|
10641
10641
|
"cliRegistryDigest": "547dde42a349a047f2aadcfc3ee9e3e31b6a7f6bfc75b7d37e5dcff7abd15308",
|
|
10642
|
-
"workflowRegistryDigest": "
|
|
10643
|
-
"pageRegistryDigest": "
|
|
10642
|
+
"workflowRegistryDigest": "19481dae8234daed9017d048c655b7a1b5b4099fe30113c9ff8275686b0caa8e",
|
|
10643
|
+
"pageRegistryDigest": "09db5cdb5969b1c411bb23297b1943f35e6150b1f878582b43bd11f897884c10"
|
|
10644
10644
|
},
|
|
10645
10645
|
"comparison": {
|
|
10646
10646
|
"missingCliRegistry": [],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-publication-release-registry",
|
|
4
|
-
"generatedAt": "2026-09-
|
|
5
|
-
"publishedAt": "2026-09-
|
|
4
|
+
"generatedAt": "2026-09-08T14:54:17.000Z",
|
|
5
|
+
"publishedAt": "2026-09-08T14:54:17.000Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "55827a43f38b1d75cb4903247c1e126fda4032cf",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"package": {
|
|
34
34
|
"name": "@kungfu-tech/buildchain",
|
|
35
|
-
"version": "4.0.9-alpha.
|
|
35
|
+
"version": "4.0.9-alpha.2",
|
|
36
36
|
"versionSource": "package.json#version"
|
|
37
37
|
},
|
|
38
38
|
"sourceKind": "package-site-bundle",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-manifest",
|
|
4
|
-
"generatedAt": "2026-09-
|
|
5
|
-
"publishedAt": "2026-09-
|
|
4
|
+
"generatedAt": "2026-09-08T14:54:17.000Z",
|
|
5
|
+
"publishedAt": "2026-09-08T14:54:17.000Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "55827a43f38b1d75cb4903247c1e126fda4032cf",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"package": {
|
|
39
39
|
"name": "@kungfu-tech/buildchain",
|
|
40
|
-
"version": "4.0.9-alpha.
|
|
40
|
+
"version": "4.0.9-alpha.2",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
|
@@ -2464,7 +2464,7 @@
|
|
|
2464
2464
|
"status": "preview",
|
|
2465
2465
|
"owner": "buildchain-workflows",
|
|
2466
2466
|
"maturity": "preview",
|
|
2467
|
-
"introducedVersion": "4.0.9-alpha.
|
|
2467
|
+
"introducedVersion": "4.0.9-alpha.2",
|
|
2468
2468
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
2469
2469
|
"deprecationReplacement": "",
|
|
2470
2470
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
|
@@ -3565,7 +3565,7 @@
|
|
|
3565
3565
|
"status": "preview",
|
|
3566
3566
|
"owner": "buildchain-workflows",
|
|
3567
3567
|
"maturity": "preview",
|
|
3568
|
-
"introducedVersion": "4.0.9-alpha.
|
|
3568
|
+
"introducedVersion": "4.0.9-alpha.2",
|
|
3569
3569
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
3570
3570
|
"deprecationReplacement": "",
|
|
3571
3571
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
|
@@ -5656,7 +5656,7 @@
|
|
|
5656
5656
|
"status": "preview",
|
|
5657
5657
|
"owner": "buildchain-workflows",
|
|
5658
5658
|
"maturity": "preview",
|
|
5659
|
-
"introducedVersion": "4.0.9-alpha.
|
|
5659
|
+
"introducedVersion": "4.0.9-alpha.2",
|
|
5660
5660
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
5661
5661
|
"deprecationReplacement": "",
|
|
5662
5662
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
|
@@ -5687,7 +5687,7 @@
|
|
|
5687
5687
|
"status": "preview",
|
|
5688
5688
|
"owner": "buildchain-workflows",
|
|
5689
5689
|
"maturity": "preview",
|
|
5690
|
-
"introducedVersion": "4.0.9-alpha.
|
|
5690
|
+
"introducedVersion": "4.0.9-alpha.2",
|
|
5691
5691
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
5692
5692
|
"deprecationReplacement": "",
|
|
5693
5693
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
|
@@ -5718,7 +5718,7 @@
|
|
|
5718
5718
|
"status": "preview",
|
|
5719
5719
|
"owner": "buildchain-workflows",
|
|
5720
5720
|
"maturity": "preview",
|
|
5721
|
-
"introducedVersion": "4.0.9-alpha.
|
|
5721
|
+
"introducedVersion": "4.0.9-alpha.2",
|
|
5722
5722
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
5723
5723
|
"deprecationReplacement": "",
|
|
5724
5724
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
|
@@ -43,6 +43,16 @@ ancestry, and target roots. Confirmed operations are never replayed; uncertain
|
|
|
43
43
|
operations require provider readback before retry; stable publication requires
|
|
44
44
|
an N-1 or independently sealed qualification.
|
|
45
45
|
|
|
46
|
+
## Public build qualification
|
|
47
|
+
|
|
48
|
+
After a successful Alpha Self-Dogfood run, Stable Candidate Qualification reads
|
|
49
|
+
its exact `buildchain-summary-<source SHA>` artifact. Protected default-branch
|
|
50
|
+
code verifies the source run, published alpha runtime, all three platform
|
|
51
|
+
artifacts and install/build/verify evidence before writing
|
|
52
|
+
`buildchain-canary/buildchain-zero-input` on that runtime commit. Manual replay
|
|
53
|
+
accepts only the source run ID. This observation remains Buildchain-owned; it
|
|
54
|
+
neither dispatches another repository nor grants stable publication authority.
|
|
55
|
+
|
|
46
56
|
## Provider readback
|
|
47
57
|
|
|
48
58
|
A stable release is complete only when all of these coordinates agree:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "4.0.9-alpha.
|
|
3
|
+
"version": "4.0.9-alpha.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
|
|
6
6
|
"repository": "https://github.com/kungfu-systems/buildchain",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
2
3
|
|
|
3
4
|
const DEFAULTS = {
|
|
4
5
|
buildWorkflowFile: "self-build-fixture.yml",
|
|
@@ -41,27 +42,49 @@ function optionalSha(value, label) {
|
|
|
41
42
|
return normalized;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
export function
|
|
45
|
-
if (
|
|
46
|
-
|
|
45
|
+
export function validatePublicBuildRun(run, workflow, repositoryName) {
|
|
46
|
+
if (run?.repository?.full_name !== repositoryName || run?.head_repository?.full_name !== repositoryName
|
|
47
|
+
|| run?.workflow_id !== workflow?.id || workflow?.path !== ".github/workflows/self-build-alpha-dogfood.yml"
|
|
48
|
+
|| run?.name !== "Buildchain Alpha Self-Dogfood" || !successful(run) || !optionalSha(run?.head_sha, "source SHA")) {
|
|
49
|
+
throw new Error("qualification requires the exact successful repository-owned public build run");
|
|
47
50
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|| evidence?.
|
|
55
|
-
|| evidence?.
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
return run;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function resolveStableCandidateQualificationCandidate({ sourceRun, buildSummary, repositoryName } = {}) {
|
|
55
|
+
const evidence = buildSummary, runtime = evidence?.runtime;
|
|
56
|
+
if (!successful(sourceRun) || sourceRun?.repository?.full_name !== repositoryName
|
|
57
|
+
|| evidence?.artifactName !== "buildchain" || evidence?.contract !== "kungfu-buildchain-build-summary" || evidence?.git?.repository !== repositoryName
|
|
58
|
+
|| evidence?.git?.sha !== sourceRun?.head_sha || String(evidence?.git?.runId) !== String(sourceRun?.id)
|
|
59
|
+
|| String(evidence?.git?.runAttempt) !== String(sourceRun?.run_attempt)
|
|
60
|
+
|| runtime?.ref !== "v4-alpha" || runtime?.workflowShellRef !== "v4-alpha" || runtime?.class !== "alpha"
|
|
61
|
+
|| runtime?.override !== false || runtime?.trustDecision !== "workflow-identity") {
|
|
62
|
+
throw new Error("public build summary does not bind the exact source run and alpha workflow identity");
|
|
58
63
|
}
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
|
|
64
|
+
const platforms = evidence.platforms || [];
|
|
65
|
+
const ids = platforms.map((entry) => entry.platform?.id).sort();
|
|
66
|
+
if (evidence.platformCount !== 3 || JSON.stringify(ids) !== JSON.stringify(["linux-x64", "macos", "windows-x64"])
|
|
67
|
+
|| platforms.some((entry) => entry.expectedArtifacts?.ok !== true || !/^[a-f0-9]{64}$/u.test(entry.summary?.digest || "")
|
|
68
|
+
|| ["install", "build", "verify"].some((stage) => !(entry.observability?.lifecycle?.stages?.[stage]?.eventCount > 0)))) {
|
|
69
|
+
throw new Error("public build summary requires verified artifacts for all three platforms");
|
|
63
70
|
}
|
|
64
|
-
|
|
71
|
+
const sha = optionalSha(runtime.sha, "observed alpha SHA");
|
|
72
|
+
if (!sha) throw new Error("public build summary is missing its runtime SHA");
|
|
73
|
+
return sha;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export async function qualifyPublicBuild({ repositoryName, sourceRun, buildSummary }, client) {
|
|
77
|
+
const sha = resolveStableCandidateQualificationCandidate({ repositoryName, sourceRun, buildSummary });
|
|
78
|
+
const candidate = await client.resolveExactAlpha(repositoryName, sha);
|
|
79
|
+
if (!candidate || candidate.sha !== sha) throw new Error("observed runtime must be an exact published alpha, never an ancestor");
|
|
80
|
+
const context = "buildchain-canary/buildchain-zero-input";
|
|
81
|
+
const status = await client.createCommitStatus({ repository: repositoryName, sha, context,
|
|
82
|
+
targetUrl: sourceRun.html_url, description: "Zero-input public build passed on all three platforms" });
|
|
83
|
+
if (status.state !== "success") throw new Error("public build qualification status readback failed");
|
|
84
|
+
return { contract: "kungfu-buildchain-public-build-qualification/v1", candidate, sourceSha: sourceRun.head_sha,
|
|
85
|
+
runId: sourceRun.id, runAttempt: sourceRun.run_attempt, context, status: status.state,
|
|
86
|
+
summaryRoot: `sha256:${createHash("sha256").update(JSON.stringify(buildSummary)).digest("hex")}`,
|
|
87
|
+
artifacts: buildSummary.platforms.map((entry) => ({ platform: entry.platform.id, digest: entry.summary.digest })) };
|
|
65
88
|
}
|
|
66
89
|
|
|
67
90
|
function optionalRef(value, label) {
|
|
@@ -253,6 +276,12 @@ export function createGitHubQualificationClient({
|
|
|
253
276
|
.sort((left, right) => String(right.created_at).localeCompare(String(left.created_at)))[0];
|
|
254
277
|
}
|
|
255
278
|
return {
|
|
279
|
+
async readPublicBuildRun(repositoryName, runId) {
|
|
280
|
+
if (!/^[1-9][0-9]*$/u.test(String(runId))) throw new Error("source run ID must be a positive integer");
|
|
281
|
+
const run = await api(`/repos/${repositoryName}/actions/runs/${runId}`);
|
|
282
|
+
const workflow = await api(`/repos/${repositoryName}/actions/workflows/self-build-alpha-dogfood.yml`);
|
|
283
|
+
return validatePublicBuildRun(run, workflow, repositoryName);
|
|
284
|
+
},
|
|
256
285
|
async resolveExactAlpha(repositoryName, candidateSha) {
|
|
257
286
|
const releases = (await api(`/repos/${repositoryName}/releases?per_page=100`)).sort((left, right) => right.tag_name.localeCompare(left.tag_name, "en", { numeric: true }));
|
|
258
287
|
for (const release of releases) {
|
|
@@ -297,22 +326,18 @@ export function createGitHubQualificationClient({
|
|
|
297
326
|
}
|
|
298
327
|
|
|
299
328
|
async function main() {
|
|
300
|
-
if (
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
process.stdout.write(`${sha}\n`);
|
|
313
|
-
if (process.env.GITHUB_OUTPUT) {
|
|
314
|
-
const fs = await import("node:fs");
|
|
315
|
-
fs.appendFileSync(process.env.GITHUB_OUTPUT, `sha=${sha}\n`);
|
|
329
|
+
if (["resolve-public-build", "qualify-public-build"].includes(process.argv[2])) {
|
|
330
|
+
const fs = await import("node:fs");
|
|
331
|
+
const repositoryName = repository(process.env.GITHUB_REPOSITORY);
|
|
332
|
+
const client = createGitHubQualificationClient({ token: process.env.GITHUB_TOKEN });
|
|
333
|
+
const sourceRun = await client.readPublicBuildRun(repositoryName, process.env.BUILDCHAIN_QUALIFICATION_RUN_ID);
|
|
334
|
+
if (process.argv[2] === "resolve-public-build") {
|
|
335
|
+
fs.appendFileSync(process.env.GITHUB_OUTPUT, `artifact-name=buildchain-summary-${sourceRun.head_sha}\n`);
|
|
336
|
+
} else {
|
|
337
|
+
const buildSummary = JSON.parse(fs.readFileSync(".buildchain/qualification/source/build-summary.json", "utf8"));
|
|
338
|
+
const result = await qualifyPublicBuild({ repositoryName, sourceRun, buildSummary }, client);
|
|
339
|
+
fs.writeFileSync(".buildchain/qualification/result.json", JSON.stringify(result, null, 2) + "\n");
|
|
340
|
+
process.stdout.write(JSON.stringify(result) + "\n");
|
|
316
341
|
}
|
|
317
342
|
return;
|
|
318
343
|
}
|