@kungfu-tech/buildchain 4.0.2-alpha.35 → 4.0.2-alpha.36

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.
@@ -199,6 +199,7 @@ Safe change route: Reduce one owned responsibility behind the stable facade, run
199
199
  - `scripts/check-maintainability.mjs`
200
200
  - `tests/maintainability.test.mjs`
201
201
  - `scripts/generate-v4-universal-workflow-facades.mjs`
202
+ - `scripts/check-v4-release-topology.mjs`
202
203
 
203
204
  ## cli-command-registry
204
205
 
@@ -591,6 +591,23 @@
591
591
  "expectedContributionSeconds": 0,
592
592
  "rationale": "The opt-in universal path preserves the default compatibility lane and executes only an exact admitted runtime."
593
593
  }
594
+ },
595
+ {
596
+ "laneId": ".github/workflows/self-release-next-development.yml#review",
597
+ "authorityClass": "merge-critical-admission",
598
+ "triggerClass": "mixed",
599
+ "concurrencyPolicy": {
600
+ "mode": "ref-scoped",
601
+ "cancelInProgress": false
602
+ },
603
+ "expectedRunnerMinutes": 3,
604
+ "cancellationBehavior": "finish-started",
605
+ "sloImpact": {
606
+ "mergeCritical": true,
607
+ "metric": "generated next-development independent review latency",
608
+ "expectedContributionSeconds": 180,
609
+ "rationale": "Only successful same-repository version PRs regenerate from the protected base and read completed publication evidence; ordinary source PRs skip the lane. Native queue checks remain final merge authority."
610
+ }
594
611
  }
595
612
  ],
596
613
  "declarationFamilies": [
@@ -3170,7 +3170,8 @@
3170
3170
  "scripts/buildchain-cli-help.mjs",
3171
3171
  "scripts/check-maintainability.mjs",
3172
3172
  "tests/maintainability.test.mjs",
3173
- "scripts/generate-v4-universal-workflow-facades.mjs"
3173
+ "scripts/generate-v4-universal-workflow-facades.mjs",
3174
+ "scripts/check-v4-release-topology.mjs"
3174
3175
  ],
3175
3176
  "burnDownSlices": [
3176
3177
  {
@@ -26,12 +26,12 @@
26
26
  },
27
27
  "repositoryBudgets": {
28
28
  "baselineRevision": "9569f69c2cb609372b8a3d65ce5dec8fb7b34a84",
29
- "maxHandMaintainedSourceFiles": 482,
30
- "maxHandMaintainedSourceLines": 172476,
29
+ "maxHandMaintainedSourceFiles": 484,
30
+ "maxHandMaintainedSourceLines": 172859,
31
31
  "maxWorkflowFiles": 80,
32
32
  "maxWorkflowLines": 26791,
33
- "latestTransition": "Exact source verification reuse and independently retained v4 publication settlement. Preserve the separately reviewed workflow taxonomy source allowance. Retain protected PR 3508 called-workflow path admission.",
34
- "latestTransitionRationale": "Bounded evidence transport, exact base regeneration, native proof validation, immutable asset readback and publication settlement adapters preserve full-source test coverage and provider permissions. The aggregate source allowance records these modules at their measured size; existing file/function debt, exception counts and the frozen total-excess maximum do not widen. Exact facade patches remain reproducible against their recorded source and result digests. The combined source inventory is 171156 reviewed taxonomy lines plus this Work's 1309 lines against common source a41c00a0c; the two branches cannot each spend the same 228-line baseline slack. The resulting 482 files and 172465 lines retain both additions without changing complexity or debt ceilings. Protected PR 3508 adds 11 measured lines in the existing taxonomy generator, yielding 172476 combined source lines; its alias identity binding and every existing complexity, debt and exception ceiling are retained.",
33
+ "latestTransition": "Independently verified next-development review and publication-before-development persistence.",
34
+ "latestTransitionRationale": "Add two bounded provider orchestration modules and 383 measured source lines over protected dev c90a0f55cb10561a9a99090a0f412a7064418328. Exact protected-base regeneration, complete immutable publication readback, separate reviewer credentials and fresh provider observations qualify one generated version PR. Move publication persistence before development waiting. Existing file/function limits, exception inventories and calibrated debt ceilings remain unchanged; the new workflow fits the retained aggregate workflow allowance. The executable closure now follows parsed JavaScript imports and includes the independent review entrypoint; embedded generator program text is not mistaken for an import of the host script.",
35
35
  "rationale": "Bounded modules separate candidate, evidence, native proof and execution, canonical failure verification, closed-set execution transfer, process-boundary verification, Warrant state and qualification, authority state, qualification, Landing acquisition, verified-attempt admission, Landing settlement and fence validation, provider attempt and heartbeat readback, sealed terminal evidence, hosted heartbeat, resume, store, options, command-specific adapters, and CLI orchestration responsibilities. The protected delivery workflow gives candidate and seal jobs no provider write credential, recursively rejects transfer drift, scopes every transfer artifact to the exact provider run attempt, chains every durable heartbeat state and receipt root on a distinct hosted runner domain, and permits qualification or exact failure settlement only after the finalizer verifies live jobs and the latest durable authority state. Public Landing admission and heartbeat always perform non-injectable fresh exact-attempt provider readback, tolerate only a not-yet-materialized seal job while retaining exact native and duplicate-job rejection, and heartbeat-loss coordination never invokes GitHub's run-scoped cancellation API where a successor rerun could race. The hosted process boundary anchors trust in the kernel-resolved versioned Runner.Worker path while accepting an equivalent argv-zero spelling with the same basename; its public boundary marker is allowed only at the one exact non-secret value, so a forged value under the same credential-like name still fails closed. The credentialless transfer seal validates the rooted native reuse decision against the Warrant-bound source, closure, dependency, toolchain, environment and command inputs; qualifiedBase stays in the proof and decision where it is rooted and later independently rechecked, rather than being assumed on the Warrant schema. V2 mutation cannot initialize a second empty authority beside a legacy ref: migration reads and roots the canonical live v1 ref, rechecks it, applies the explicit configured v2 policy, and atomically replaces its bytes through one expected-old non-force update, so old v1 controllers fail closed while the prior commit remains immutable history. Candidate ancestry classifies the GitHub artifact runtime token as credential authority. Every Landing settlement, including an unexpired fence, requires product-owned terminal readback. Terminal cleanup reads the immutable historical attempt, derives workflow and hosted Landing job identity from live run data, reads the exact protected ref head and compares containment against that immutable SHA, and seals merged only when the admitted merge-group head is contained by that protected base; a later different-head merge settles the old attempt as dequeued. Terminal normalization preserves transfer, finalizer boundary, native and seal job, admitted provider attempt, protected-base head, containment result, and terminal readback coordinates. The public reusable workflow truthfully retains its single-flight v1 authority without advertising v2 migration, while bounded v2 remains a separate opt-in CLI, Node API, and schema contract; the tracked self-caller stays on public v4-alpha with matching stable and alpha locks, and transient train selection is dispatch-only. Next-development parity adds one versioned transition authority, one durable controller, one bounded reservation adapter, and pure public-contract recovery evidence while retaining the existing thin floating-channel callers byte-for-byte. The floating-consumer gate reuses the existing contract-world evaluator so SHA drift passes only under the selected lock's compatibility policy, breaking surface drift still fails closed, and external certification reconstructs the receipt from the observed workflow SHA rather than the lock's historical evidence SHA. Tail reseal adds no Stage Capsule effect or general rebuild authority: it verifies the exact retained four-platform bytes, admits one known macOS tail failure through live provider readback, fences signing and finalization to explicit credentials and Warrant identity, and requires standard candidate Passport plus provider and protected readback. Compatibility Facts parity isolates canonical encoding, temporal verification, lifecycle validation, fixture projection, public authority projection, and CLI adaptation into bounded modules; legacy digest and proof arrays are derived only from exact current Fact lineage. Publication Rehearsal adds no production release authority: the content-addressed capsule contract binds source, candidate, manifest, config, canonical data-only provider bindings, provider policy, observations and core version separately from filesystem, runtime and rehearsal-only provider authority; simulate, replay and explicitly authorized provider rehearsal all reuse the release-tail planner, while same-commit local dogfood resolves the new reusable contract and exact current runtime before external callers remain on floating v4-alpha. Cross-runtime candidate recovery preserves original runtime and provider roots and creates resume lineage only after exact public ref, tag, ancestry, npm version and integrity readback. Adopter Delivery restores the reviewed public v3 gate, drivers, Passport binding, N-1 bootstrap and exact archive loader through one public v4 surface while keeping provider and release authority explicit non-claims. Floating Alpha bootstrap uses only the existing exact resolver and protected Alpha private shell to move an otherwise stale floating shell, retains public v4 stable promotion, and removes itself after protected readback. CI lane change-budget enforcement adds a bounded parser, evaluator, guard, and tests without creating another merge authority.",
36
36
  "governance": "legacy-debt-sunset-2026q4"
37
37
  },
@@ -41,7 +41,8 @@
41
41
  ".github/workflows/release-tail.yml",
42
42
  ".github/workflows/stable-candidate-patrol.yml",
43
43
  ".github/workflows/self-release-rehearsal-dogfood.yml",
44
- ".github/workflows/self-release-tail-dogfood.yml"
44
+ ".github/workflows/self-release-tail-dogfood.yml",
45
+ ".github/workflows/self-release-next-development.yml"
45
46
  ],
46
47
  "unknownTopologyPolicy": "fail-closed"
47
48
  },
@@ -57,7 +58,8 @@
57
58
  "Paper product release",
58
59
  "npm dry-run",
59
60
  "v3 rollback workflows",
60
- "retired compatibility workflows"
61
+ "retired compatibility workflows",
62
+ "Post-publication protected development review: no package, tag or Release mutation; independently inventoried in closedWorld and privilegedExecutableClosure."
61
63
  ]
62
64
  },
63
65
  "authorityClosure": {
@@ -122,6 +124,7 @@
122
124
  "entrypoints": [
123
125
  "actions/v4-release-candidate-promote/index.js",
124
126
  "scripts/binary-publication-evidence.mjs",
127
+ "scripts/next-development-review.mjs",
125
128
  "scripts/v4-publication-settlement.mjs"
126
129
  ],
127
130
  "modules": [
@@ -134,6 +137,7 @@
134
137
  "actions/v4-release-candidate-promote/product-provider-adapters.js",
135
138
  "actions/v4-release-candidate-promote/product-provider-github-adapters.js",
136
139
  "actions/v4-release-candidate-promote/product-provider.js",
140
+ "actions/v4-release-candidate-promote/publication-completion.js",
137
141
  "packages/core/adopter-delivery-gate.js",
138
142
  "packages/core/adopter-delivery-json.js",
139
143
  "packages/core/adopter-delivery-passport.js",
@@ -187,10 +191,12 @@
187
191
  "packages/core/workflow-yaml-contract.js",
188
192
  "scripts/binary-publication-evidence.mjs",
189
193
  "scripts/ensure-github-release.mjs",
194
+ "scripts/next-development-review.mjs",
190
195
  "scripts/release-asset-client.mjs",
191
- "scripts/v4-publication-settlement.mjs"
196
+ "scripts/v4-publication-settlement.mjs",
197
+ "scripts/verify-version-state-delta.mjs"
192
198
  ],
193
- "root": "sha256:58d343a7ec944ebe2c12a04c389d362733de196b7d34e39e330d2b8053c5e3f6"
199
+ "root": "sha256:7a4de4f149edfdcced84267304aab1ccf9997badcaca899b7dc4fbe9288c34cb"
194
200
  },
195
201
  "rustWasmAuthority": {
196
202
  "loader": "packages/core/v4-domain-wasm.js",
@@ -329,10 +335,10 @@
329
335
  }
330
336
  ],
331
337
  "metrics": {
332
- "workflowCount": 33,
333
- "jobCount": 89,
338
+ "workflowCount": 34,
339
+ "jobCount": 90,
334
340
  "reusableEdgeCount": 23,
335
- "mutationRelevantNodeCount": 74,
341
+ "mutationRelevantNodeCount": 75,
336
342
  "contentsWriteJobCount": 14,
337
343
  "oidcWriteJobCount": 16
338
344
  },
@@ -861,6 +861,17 @@
861
861
  "compatibility": null,
862
862
  "rationale": "Classify the existing .github/workflows/github-governance-audit.yml capability without adding execution behavior."
863
863
  },
864
+ {
865
+ "id": "next-development-review",
866
+ "role": "self",
867
+ "category": "release",
868
+ "purpose": "next-development",
869
+ "summary": "Next Development Review",
870
+ "owner": "kungfu-origin",
871
+ "status": "active",
872
+ "invocation": "repository",
873
+ "rationale": "Independently regenerate the exact version-only delta from protected development, verify the completed alpha publication, then approve and enqueue the exact head under existing CODEOWNER and queue policy."
874
+ },
864
875
  {
865
876
  "id": "npm-publish",
866
877
  "role": "self",
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "4.0.2-alpha.35",
7
+ "version": "4.0.2-alpha.36",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v4",
@@ -5444,5 +5444,5 @@
5444
5444
  "compatibilityFactCutRoot": "sha256:f61b975d4a96c921cc4bd37fb3ed9a0596b47004fe34dc7219979d697e3707f9",
5445
5445
  "compatibilityProofRegistryRoot": "sha256:b7194b811e4d3af2df4390bc4d1731e16a86215bd64ee18cb630dd5492f4fb63",
5446
5446
  "compatibilityDigest": "sha256:20411029d83211dff426fb6535a608902129844a5ccb4788db77d3f81becb839",
5447
- "contractDigest": "sha256:8d9e16600d07bcf8dbd7989eaacb4f7d60e259c6483fe56f1d61d99bf8ccf8da"
5447
+ "contractDigest": "sha256:2f80e0906c63098cddd0975f6fee1a4af2c2ab239e5243e235bab18dc9b4de99"
5448
5448
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-bundle",
4
- "generatedAt": "2026-09-05T04:49:38.000Z",
5
- "publishedAt": "2026-09-05T04:49:38.000Z",
4
+ "generatedAt": "2026-09-05T13:36:53.000Z",
5
+ "publishedAt": "2026-09-05T13:36:53.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": "197aae1caff67cb0d02250d82b2d1e962d1a101c",
22
+ "sourceRevision": "70ec70ed62a826c7a6d9c29b61cd416b09b8629f",
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.2-alpha.35",
40
+ "version": "4.0.2-alpha.36",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "source": {
@@ -5032,7 +5032,7 @@
5032
5032
  ],
5033
5033
  "maturity": "stable",
5034
5034
  "sourcePath": "docs/v4-production-release.md",
5035
- "digest": "sha256:8b0d2592de6542ba316dc5c1e98a75f1ceb0c208150737f8aff14eaedfc1619b",
5035
+ "digest": "sha256:5627c4b6cc9bb11c8c19df7e1847b575b06ca18142ca8630d13c45c387406997",
5036
5036
  "headings": [
5037
5037
  {
5038
5038
  "level": 1,
@@ -5053,9 +5053,14 @@
5053
5053
  "level": 2,
5054
5054
  "title": "Publication settlement and binary recovery",
5055
5055
  "anchor": "publication-settlement-and-binary-recovery"
5056
+ },
5057
+ {
5058
+ "level": 2,
5059
+ "title": "Automatic next-development review",
5060
+ "anchor": "automatic-next-development-review"
5056
5061
  }
5057
5062
  ],
5058
- "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-05\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-05\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\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 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\nBinary Distribution reads this settlement and the original publication Passport.\nTag creation can precede settlement, so it waits at most 40 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."
5063
+ "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-05\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-05\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\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\nBinary Distribution reads this settlement and the original publication Passport.\nTag creation can precede settlement, so it waits at most 40 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## Automatic next-development review\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."
5059
5064
  },
5060
5065
  {
5061
5066
  "id": "manual:v4-publication-rehearsal",
@@ -5436,7 +5441,7 @@
5436
5441
  ],
5437
5442
  "maturity": "stable",
5438
5443
  "sourcePath": "docs/workflow-catalog.md",
5439
- "digest": "sha256:a33067c45ae0a6442c4e587c4da6a33fad538f19b93d83eabdc837ed1e579208",
5444
+ "digest": "sha256:84b15bda46df9ab7d2c1b1e728a2c6fbd2a82b7feac5d3fcf86b6f00442b81ba",
5440
5445
  "headings": [
5441
5446
  {
5442
5447
  "level": 1,
@@ -5474,7 +5479,7 @@
5474
5479
  "anchor": "self"
5475
5480
  }
5476
5481
  ],
5477
- "markdown": "---\nstatus: active\nperiod: ongoing\ntheme: workflow-taxonomy\ndoc_type: technical-reference\nsource_level: local-files\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-05\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-05\n visible_context: Repository workflow source and the approved naming scheme\n invisible_context_boundary: No credentials or unpublished provider configuration inspected\n---\n\n# Workflow catalog\n\nGenerated from `architecture/workflow-taxonomy.json`; edit that source, then run\n`pnpm run generate:workflows`. Every YAML file, including compatibility paths,\nis checked by the existing required workflow check.\n\n## Naming and ownership\n\n`public-<build|release|ops>-<purpose>.yml` is a consumer entry;\n`.<build|release|ops>-<purpose>.yml` is an advanced component;\n`self-<build|release|ops>-<purpose>.yml` is Buildchain's own automation.\nPublic is a product role, not GitHub access control. Dispatch services are\nmarked separately from reusable workflows. Keep workflow names, job IDs,\npermissions, and trigger semantics stable during path migration.\n\n## Channel rollout\n\nCanonical names become callable on a channel only after that channel publishes\nthem. Existing `@v4`/`@v4-alpha` consumers keep their exact registered legacy\npaths until provider readback proves canonical availability. New examples below\ndescribe the target surface, not a claim that both channels already publish it.\nCompatibility files are generated byte-identical projections, not independently\neditable implementations. They retain full jobs to preserve called-workflow\nidentity, permission envelopes, and required check names without extra nesting.\n\nThe controller registry records the actual source path separately from a migrated\nrepository controller contractPath. This preserves the established logical\ncontract identity while exposing its current execution source. New workflows\ndo not acquire historical identities. Public controllers retain their real\ncompatibility paths while those paths remain supported.\n\n## Adding or changing a workflow\n\nRegister a stable identity, role, category, purpose, owner, lifecycle status,\ninvocation and concrete summary before creating its derived path. A new entry\nmust explain its scope in review. New aliases cannot be invented: compatibility\nmust name an exact migration source with a reason and removal condition.\nThe policy, generator, checker, tests, required CI chain and CODEOWNERS require\nindependent `kungfu-origin` review. No wildcard compatibility admission is allowed.\n\nA role, category or implementation edit must preserve or deliberately update\nall related declarations. Run `pnpm run generate:workflows` and\n`pnpm run check:workflows`; the full `pnpm run check` remains required.\n\n## public\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [public-build-adopter-qualification.yml](../.github/workflows/public-build-adopter-qualification.yml) | build | reusable | active | V4 Adopter Delivery | `v4-adopter-delivery.yml` |\n| [public-build-candidate.yml](../.github/workflows/public-build-candidate.yml) | build | reusable | active | Buildchain Channel Build | `build.yml` |\n| [public-build-check.yml](../.github/workflows/public-build-check.yml) | build | reusable | active | Buildchain Check | `check.yml` |\n| [public-build-demo.yml](../.github/workflows/public-build-demo.yml) | build | reusable | active | Buildchain Declarative Binary Auditable Demo | `.declarative-auditable-demo.yml` |\n| [public-build-publication.yml](../.github/workflows/public-build-publication.yml) | build | reusable | active | Buildchain Publication Artifact | `publication-artifact.yml` |\n| [public-build-stage-capsule-canary.yml](../.github/workflows/public-build-stage-capsule-canary.yml) | build | reusable | active | V4 Stage Capsule Canary | `v4-stage-capsule-canary.yml` |\n| [public-ops-alpha-candidate-patrol.yml](../.github/workflows/public-ops-alpha-candidate-patrol.yml) | ops | reusable | active | Buildchain Dev to Alpha Candidate Patrol | `dev-alpha-candidate-patrol.yml` |\n| [public-ops-bootstrap-recovery.yml](../.github/workflows/public-ops-bootstrap-recovery.yml) | ops | reusable | active | Universal Buildchain Bootstrap Recovery | `universal-bootstrap-recovery.yml` |\n| [public-ops-bootstrap.yml](../.github/workflows/public-ops-bootstrap.yml) | ops | reusable | active | Buildchain Universal Bootstrap | `bootstrap.yml` |\n| [public-ops-dev-auto-merge.yml](../.github/workflows/public-ops-dev-auto-merge.yml) | ops | reusable | active | Dev PR Auto Merge | `dev-pr-auto-merge.yml` |\n| [public-ops-dev-qualification-patrol.yml](../.github/workflows/public-ops-dev-qualification-patrol.yml) | ops | reusable | active | Buildchain Dev Qualification Patrol | `dev-qualification-patrol.yml` |\n| [public-ops-housekeeping.yml](../.github/workflows/public-ops-housekeeping.yml) | ops | reusable | active | Engineering Housekeeper | `engineering-housekeeper.yml` |\n| [public-ops-observed-evidence.yml](../.github/workflows/public-ops-observed-evidence.yml) | ops | reusable | active | Patrol Observed Evidence | `patrol-observed-evidence.yml` |\n| [public-ops-patrol-daily.yml](../.github/workflows/public-ops-patrol-daily.yml) | ops | reusable | active | Buildchain Patrol Daily | `patrol-daily.yml` |\n| [public-ops-patrol-monthly.yml](../.github/workflows/public-ops-patrol-monthly.yml) | ops | reusable | active | Buildchain Patrol Monthly | `patrol-monthly.yml` |\n| [public-ops-patrol-weekly.yml](../.github/workflows/public-ops-patrol-weekly.yml) | ops | reusable | active | Buildchain Patrol Weekly | `patrol-weekly.yml` |\n| [public-ops-patrol.yml](../.github/workflows/public-ops-patrol.yml) | ops | reusable | active | Buildchain Patrol | `buildchain-patrol.yml` |\n| [public-ops-release-governance.yml](../.github/workflows/public-ops-release-governance.yml) | ops | reusable | active | Release Governance Reconcile | `release-governance-reconcile.yml` |\n| [public-ops-stable-candidate-patrol.yml](../.github/workflows/public-ops-stable-candidate-patrol.yml) | ops | reusable | active | Buildchain Stable Candidate Patrol | `stable-candidate-patrol.yml` |\n| [public-ops-tail-reseal.yml](../.github/workflows/public-ops-tail-reseal.yml) | ops | reusable | active | V4 Retained Candidate Tail Reseal | `v4-tail-reseal.yml` |\n| [public-ops-warrant-cancel.yml](../.github/workflows/public-ops-warrant-cancel.yml) | ops | reusable | active | Dev Delivery Warrant Queued Candidate Cancel | `dev-delivery-warrant-cancel.yml` |\n| [public-ops-warrant-close.yml](../.github/workflows/public-ops-warrant-close.yml) | ops | reusable | active | Dev Delivery Warrant Close | `dev-delivery-warrant-close.yml` |\n| [public-release-artifact-attestation.yml](../.github/workflows/public-release-artifact-attestation.yml) | release | reusable | active | Buildchain GitHub Artifact Attestation | `github-artifact-attestation.yml` |\n| [public-release-paper-sealed.yml](../.github/workflows/public-release-paper-sealed.yml) | release | reusable | active | Buildchain Sealed Paper Release | `paper-release-sealed.yml` |\n| [public-release-paper.yml](../.github/workflows/public-release-paper.yml) | release | reusable | active | Buildchain Paper Release | `paper-release.yml` |\n| [public-release-promote.yml](../.github/workflows/public-release-promote.yml) | release | reusable | active | Release Candidate Promote | `release-candidate-promote.yml` |\n| [public-release-propagation.yml](../.github/workflows/public-release-propagation.yml) | release | reusable | active | Release Propagation | `release-propagation.yml` |\n| [public-release-signing-authority.yml](../.github/workflows/public-release-signing-authority.yml) | release | dispatch-service | active | Buildchain Artifact Signing Authority | `artifact-signing-authority.yml` |\n| [public-release-tail.yml](../.github/workflows/public-release-tail.yml) | release | reusable | active | Declarative Release Tail | `release-tail.yml` |\n| [public-release-web.yml](../.github/workflows/public-release-web.yml) | release | reusable | active | Buildchain Web Surface | `.web-surface.yml` |\n\n## component\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [.build-demo-adapter.yml](../.github/workflows/.build-demo-adapter.yml) | build | reusable | active | Buildchain Auditable Demo | `.auditable-demo.yml` |\n| [.build-engine.yml](../.github/workflows/.build-engine.yml) | build | reusable | active | Buildchain Build | `.build.yml` |\n| [.build-gate-profile.yml](../.github/workflows/.build-gate-profile.yml) | build | reusable | active | Buildchain Shifu Gate Profile | `.gate-profile.yml` |\n| [.build-release-verify-compat.yml](../.github/workflows/.build-release-verify-compat.yml) | build | reusable | compatibility | release verify | `.release-verify.yml` |\n| [.build-sam-verify-compat.yml](../.github/workflows/.build-sam-verify-compat.yml) | build | reusable | compatibility | sam verify | `.sam-verify.yml` |\n| [.build-wheel-verify-compat.yml](../.github/workflows/.build-wheel-verify-compat.yml) | build | reusable | compatibility | wheel verify | `.wheel-verify.yml` |\n| [.ops-git-sync.yml](../.github/workflows/.ops-git-sync.yml) | ops | reusable | active | sync remote git | `.sync-remote-git.yml` |\n| [.release-authority.yml](../.github/workflows/.release-authority.yml) | release | reusable | active | Buildchain Sealed Publication Authority | `.publication-authority.yml` |\n| [.release-binary-assets.yml](../.github/workflows/.release-binary-assets.yml) | release | reusable | active | Buildchain Binary Release Assets | `.binary-release-assets.yml` |\n| [.release-minor-bump-compat.yml](../.github/workflows/.release-minor-bump-compat.yml) | release | reusable | compatibility | bump minor version | `.bump-minor-version.yml` |\n| [.release-page-sync-retired.yml](../.github/workflows/.release-page-sync-retired.yml) | release | reusable | retired | sync release page | `.sync-release-page.yml` |\n| [.release-promote.yml](../.github/workflows/.release-promote.yml) | release | reusable | active | Release Candidate Promote Advanced | `.release-candidate-promote.yml` |\n\n## self\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [self-build-adopter-dogfood.yml](../.github/workflows/self-build-adopter-dogfood.yml) | build | repository | active | V4 Adopter Delivery Dogfood | — |\n| [self-build-alpha-dogfood.yml](../.github/workflows/self-build-alpha-dogfood.yml) | build | repository | active | Buildchain Alpha Self-Dogfood | — |\n| [self-build-binary-distribution.yml](../.github/workflows/self-build-binary-distribution.yml) | build | repository | active | Binary Distribution | — |\n| [self-build-candidate-lab.yml](../.github/workflows/self-build-candidate-lab.yml) | build | repository | active | Candidate Lab | — |\n| [self-build-demo-dogfood.yml](../.github/workflows/self-build-demo-dogfood.yml) | build | repository | active | Buildchain Declarative Demo Dogfood | — |\n| [self-build-demo-media-qualification.yml](../.github/workflows/self-build-demo-media-qualification.yml) | build | repository | active | Auditable Demo Media Profile Qualification | — |\n| [self-build-fixture.yml](../.github/workflows/self-build-fixture.yml) | build | repository | active | Build Surface Fixture | — |\n| [self-build-public-consumer-dogfood.yml](../.github/workflows/self-build-public-consumer-dogfood.yml) | build | repository | active | V4 Public Consumer Dogfood | — |\n| [self-build-release-verify-compat.yml](../.github/workflows/self-build-release-verify-compat.yml) | build | repository | compatibility | Release - Verify | — |\n| [self-build-stable-candidate-qualification.yml](../.github/workflows/self-build-stable-candidate-qualification.yml) | build | repository | active | Buildchain Stable Candidate Qualification | — |\n| [self-build-verify.yml](../.github/workflows/self-build-verify.yml) | build | repository | active | Verify | — |\n| [self-ops-bootstrap-dogfood.yml](../.github/workflows/self-ops-bootstrap-dogfood.yml) | ops | repository | active | Universal Bootstrap Train-First Self-Dogfood | — |\n| [self-ops-dev-delivery.yml](../.github/workflows/self-ops-dev-delivery.yml) | ops | repository | active | Buildchain Dev Delivery | — |\n| [self-ops-governance-audit.yml](../.github/workflows/self-ops-governance-audit.yml) | ops | repository | active | GitHub Governance Authority Audit | — |\n| [self-ops-housekeeping-daily.yml](../.github/workflows/self-ops-housekeeping-daily.yml) | ops | repository | active | Engineering Housekeeper Daily | — |\n| [self-ops-housekeeping-monthly.yml](../.github/workflows/self-ops-housekeeping-monthly.yml) | ops | repository | active | Engineering Housekeeper Monthly | — |\n| [self-ops-housekeeping-weekly.yml](../.github/workflows/self-ops-housekeeping-weekly.yml) | ops | repository | active | Engineering Housekeeper Weekly | — |\n| [self-ops-merge-queue.yml](../.github/workflows/self-ops-merge-queue.yml) | ops | repository | active | Dev Merge Queue Governance | — |\n| [self-ops-patrol-daily.yml](../.github/workflows/self-ops-patrol-daily.yml) | ops | repository | active | Buildchain Dogfood Patrol Daily | — |\n| [self-ops-patrol-monthly.yml](../.github/workflows/self-ops-patrol-monthly.yml) | ops | repository | active | Buildchain Dogfood Patrol Monthly | — |\n| [self-ops-patrol-weekly.yml](../.github/workflows/self-ops-patrol-weekly.yml) | ops | repository | active | Buildchain Dogfood Patrol Weekly | — |\n| [self-ops-promotion-recovery.yml](../.github/workflows/self-ops-promotion-recovery.yml) | ops | repository | active | Buildchain Ref Promotion Recovery | — |\n| [self-ops-recovery-failure-dogfood.yml](../.github/workflows/self-ops-recovery-failure-dogfood.yml) | ops | repository | active | Buildchain Candidate Recovery Dogfood Startup Failure | — |\n| [self-ops-runner-smoke.yml](../.github/workflows/self-ops-runner-smoke.yml) | ops | repository | active | Self-hosted Runner Smoke | — |\n| [self-ops-stable-candidate-patrol.yml](../.github/workflows/self-ops-stable-candidate-patrol.yml) | ops | repository | active | Buildchain Dogfood Stable Candidate Patrol | — |\n| [self-release-binary-assets.yml](../.github/workflows/self-release-binary-assets.yml) | release | repository | active | Binary Release Assets | — |\n| [self-release-line-open.yml](../.github/workflows/self-release-line-open.yml) | release | repository | active | Release Line Bootstrap | — |\n| [self-release-new-version-compat.yml](../.github/workflows/self-release-new-version-compat.yml) | release | repository | compatibility | Release - New Version | — |\n| [self-release-npm-dry-run.yml](../.github/workflows/self-release-npm-dry-run.yml) | release | repository | active | Publish npm package | — |\n| [self-release-promote.yml](../.github/workflows/self-release-promote.yml) | release | repository | active | Buildchain Ref Promotion | — |\n| [self-release-rehearsal-dogfood.yml](../.github/workflows/self-release-rehearsal-dogfood.yml) | release | repository | active | V4 Publication Rehearsal Dogfood | — |\n| [self-release-tail-dogfood.yml](../.github/workflows/self-release-tail-dogfood.yml) | release | repository | active | V4 Declarative Release Tail Dogfood | — |"
5482
+ "markdown": "---\nstatus: active\nperiod: ongoing\ntheme: workflow-taxonomy\ndoc_type: technical-reference\nsource_level: local-files\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-05\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-05\n visible_context: Repository workflow source and the approved naming scheme\n invisible_context_boundary: No credentials or unpublished provider configuration inspected\n---\n\n# Workflow catalog\n\nGenerated from `architecture/workflow-taxonomy.json`; edit that source, then run\n`pnpm run generate:workflows`. Every YAML file, including compatibility paths,\nis checked by the existing required workflow check.\n\n## Naming and ownership\n\n`public-<build|release|ops>-<purpose>.yml` is a consumer entry;\n`.<build|release|ops>-<purpose>.yml` is an advanced component;\n`self-<build|release|ops>-<purpose>.yml` is Buildchain's own automation.\nPublic is a product role, not GitHub access control. Dispatch services are\nmarked separately from reusable workflows. Keep workflow names, job IDs,\npermissions, and trigger semantics stable during path migration.\n\n## Channel rollout\n\nCanonical names become callable on a channel only after that channel publishes\nthem. Existing `@v4`/`@v4-alpha` consumers keep their exact registered legacy\npaths until provider readback proves canonical availability. New examples below\ndescribe the target surface, not a claim that both channels already publish it.\nCompatibility files are generated byte-identical projections, not independently\neditable implementations. They retain full jobs to preserve called-workflow\nidentity, permission envelopes, and required check names without extra nesting.\n\nThe controller registry records the actual source path separately from a migrated\nrepository controller contractPath. This preserves the established logical\ncontract identity while exposing its current execution source. New workflows\ndo not acquire historical identities. Public controllers retain their real\ncompatibility paths while those paths remain supported.\n\n## Adding or changing a workflow\n\nRegister a stable identity, role, category, purpose, owner, lifecycle status,\ninvocation and concrete summary before creating its derived path. A new entry\nmust explain its scope in review. New aliases cannot be invented: compatibility\nmust name an exact migration source with a reason and removal condition.\nThe policy, generator, checker, tests, required CI chain and CODEOWNERS require\nindependent `kungfu-origin` review. No wildcard compatibility admission is allowed.\n\nA role, category or implementation edit must preserve or deliberately update\nall related declarations. Run `pnpm run generate:workflows` and\n`pnpm run check:workflows`; the full `pnpm run check` remains required.\n\n## public\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [public-build-adopter-qualification.yml](../.github/workflows/public-build-adopter-qualification.yml) | build | reusable | active | V4 Adopter Delivery | `v4-adopter-delivery.yml` |\n| [public-build-candidate.yml](../.github/workflows/public-build-candidate.yml) | build | reusable | active | Buildchain Channel Build | `build.yml` |\n| [public-build-check.yml](../.github/workflows/public-build-check.yml) | build | reusable | active | Buildchain Check | `check.yml` |\n| [public-build-demo.yml](../.github/workflows/public-build-demo.yml) | build | reusable | active | Buildchain Declarative Binary Auditable Demo | `.declarative-auditable-demo.yml` |\n| [public-build-publication.yml](../.github/workflows/public-build-publication.yml) | build | reusable | active | Buildchain Publication Artifact | `publication-artifact.yml` |\n| [public-build-stage-capsule-canary.yml](../.github/workflows/public-build-stage-capsule-canary.yml) | build | reusable | active | V4 Stage Capsule Canary | `v4-stage-capsule-canary.yml` |\n| [public-ops-alpha-candidate-patrol.yml](../.github/workflows/public-ops-alpha-candidate-patrol.yml) | ops | reusable | active | Buildchain Dev to Alpha Candidate Patrol | `dev-alpha-candidate-patrol.yml` |\n| [public-ops-bootstrap-recovery.yml](../.github/workflows/public-ops-bootstrap-recovery.yml) | ops | reusable | active | Universal Buildchain Bootstrap Recovery | `universal-bootstrap-recovery.yml` |\n| [public-ops-bootstrap.yml](../.github/workflows/public-ops-bootstrap.yml) | ops | reusable | active | Buildchain Universal Bootstrap | `bootstrap.yml` |\n| [public-ops-dev-auto-merge.yml](../.github/workflows/public-ops-dev-auto-merge.yml) | ops | reusable | active | Dev PR Auto Merge | `dev-pr-auto-merge.yml` |\n| [public-ops-dev-qualification-patrol.yml](../.github/workflows/public-ops-dev-qualification-patrol.yml) | ops | reusable | active | Buildchain Dev Qualification Patrol | `dev-qualification-patrol.yml` |\n| [public-ops-housekeeping.yml](../.github/workflows/public-ops-housekeeping.yml) | ops | reusable | active | Engineering Housekeeper | `engineering-housekeeper.yml` |\n| [public-ops-observed-evidence.yml](../.github/workflows/public-ops-observed-evidence.yml) | ops | reusable | active | Patrol Observed Evidence | `patrol-observed-evidence.yml` |\n| [public-ops-patrol-daily.yml](../.github/workflows/public-ops-patrol-daily.yml) | ops | reusable | active | Buildchain Patrol Daily | `patrol-daily.yml` |\n| [public-ops-patrol-monthly.yml](../.github/workflows/public-ops-patrol-monthly.yml) | ops | reusable | active | Buildchain Patrol Monthly | `patrol-monthly.yml` |\n| [public-ops-patrol-weekly.yml](../.github/workflows/public-ops-patrol-weekly.yml) | ops | reusable | active | Buildchain Patrol Weekly | `patrol-weekly.yml` |\n| [public-ops-patrol.yml](../.github/workflows/public-ops-patrol.yml) | ops | reusable | active | Buildchain Patrol | `buildchain-patrol.yml` |\n| [public-ops-release-governance.yml](../.github/workflows/public-ops-release-governance.yml) | ops | reusable | active | Release Governance Reconcile | `release-governance-reconcile.yml` |\n| [public-ops-stable-candidate-patrol.yml](../.github/workflows/public-ops-stable-candidate-patrol.yml) | ops | reusable | active | Buildchain Stable Candidate Patrol | `stable-candidate-patrol.yml` |\n| [public-ops-tail-reseal.yml](../.github/workflows/public-ops-tail-reseal.yml) | ops | reusable | active | V4 Retained Candidate Tail Reseal | `v4-tail-reseal.yml` |\n| [public-ops-warrant-cancel.yml](../.github/workflows/public-ops-warrant-cancel.yml) | ops | reusable | active | Dev Delivery Warrant Queued Candidate Cancel | `dev-delivery-warrant-cancel.yml` |\n| [public-ops-warrant-close.yml](../.github/workflows/public-ops-warrant-close.yml) | ops | reusable | active | Dev Delivery Warrant Close | `dev-delivery-warrant-close.yml` |\n| [public-release-artifact-attestation.yml](../.github/workflows/public-release-artifact-attestation.yml) | release | reusable | active | Buildchain GitHub Artifact Attestation | `github-artifact-attestation.yml` |\n| [public-release-paper-sealed.yml](../.github/workflows/public-release-paper-sealed.yml) | release | reusable | active | Buildchain Sealed Paper Release | `paper-release-sealed.yml` |\n| [public-release-paper.yml](../.github/workflows/public-release-paper.yml) | release | reusable | active | Buildchain Paper Release | `paper-release.yml` |\n| [public-release-promote.yml](../.github/workflows/public-release-promote.yml) | release | reusable | active | Release Candidate Promote | `release-candidate-promote.yml` |\n| [public-release-propagation.yml](../.github/workflows/public-release-propagation.yml) | release | reusable | active | Release Propagation | `release-propagation.yml` |\n| [public-release-signing-authority.yml](../.github/workflows/public-release-signing-authority.yml) | release | dispatch-service | active | Buildchain Artifact Signing Authority | `artifact-signing-authority.yml` |\n| [public-release-tail.yml](../.github/workflows/public-release-tail.yml) | release | reusable | active | Declarative Release Tail | `release-tail.yml` |\n| [public-release-web.yml](../.github/workflows/public-release-web.yml) | release | reusable | active | Buildchain Web Surface | `.web-surface.yml` |\n\n## component\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [.build-demo-adapter.yml](../.github/workflows/.build-demo-adapter.yml) | build | reusable | active | Buildchain Auditable Demo | `.auditable-demo.yml` |\n| [.build-engine.yml](../.github/workflows/.build-engine.yml) | build | reusable | active | Buildchain Build | `.build.yml` |\n| [.build-gate-profile.yml](../.github/workflows/.build-gate-profile.yml) | build | reusable | active | Buildchain Shifu Gate Profile | `.gate-profile.yml` |\n| [.build-release-verify-compat.yml](../.github/workflows/.build-release-verify-compat.yml) | build | reusable | compatibility | release verify | `.release-verify.yml` |\n| [.build-sam-verify-compat.yml](../.github/workflows/.build-sam-verify-compat.yml) | build | reusable | compatibility | sam verify | `.sam-verify.yml` |\n| [.build-wheel-verify-compat.yml](../.github/workflows/.build-wheel-verify-compat.yml) | build | reusable | compatibility | wheel verify | `.wheel-verify.yml` |\n| [.ops-git-sync.yml](../.github/workflows/.ops-git-sync.yml) | ops | reusable | active | sync remote git | `.sync-remote-git.yml` |\n| [.release-authority.yml](../.github/workflows/.release-authority.yml) | release | reusable | active | Buildchain Sealed Publication Authority | `.publication-authority.yml` |\n| [.release-binary-assets.yml](../.github/workflows/.release-binary-assets.yml) | release | reusable | active | Buildchain Binary Release Assets | `.binary-release-assets.yml` |\n| [.release-minor-bump-compat.yml](../.github/workflows/.release-minor-bump-compat.yml) | release | reusable | compatibility | bump minor version | `.bump-minor-version.yml` |\n| [.release-page-sync-retired.yml](../.github/workflows/.release-page-sync-retired.yml) | release | reusable | retired | sync release page | `.sync-release-page.yml` |\n| [.release-promote.yml](../.github/workflows/.release-promote.yml) | release | reusable | active | Release Candidate Promote Advanced | `.release-candidate-promote.yml` |\n\n## self\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [self-build-adopter-dogfood.yml](../.github/workflows/self-build-adopter-dogfood.yml) | build | repository | active | V4 Adopter Delivery Dogfood | — |\n| [self-build-alpha-dogfood.yml](../.github/workflows/self-build-alpha-dogfood.yml) | build | repository | active | Buildchain Alpha Self-Dogfood | — |\n| [self-build-binary-distribution.yml](../.github/workflows/self-build-binary-distribution.yml) | build | repository | active | Binary Distribution | — |\n| [self-build-candidate-lab.yml](../.github/workflows/self-build-candidate-lab.yml) | build | repository | active | Candidate Lab | — |\n| [self-build-demo-dogfood.yml](../.github/workflows/self-build-demo-dogfood.yml) | build | repository | active | Buildchain Declarative Demo Dogfood | — |\n| [self-build-demo-media-qualification.yml](../.github/workflows/self-build-demo-media-qualification.yml) | build | repository | active | Auditable Demo Media Profile Qualification | — |\n| [self-build-fixture.yml](../.github/workflows/self-build-fixture.yml) | build | repository | active | Build Surface Fixture | — |\n| [self-build-public-consumer-dogfood.yml](../.github/workflows/self-build-public-consumer-dogfood.yml) | build | repository | active | V4 Public Consumer Dogfood | — |\n| [self-build-release-verify-compat.yml](../.github/workflows/self-build-release-verify-compat.yml) | build | repository | compatibility | Release - Verify | — |\n| [self-build-stable-candidate-qualification.yml](../.github/workflows/self-build-stable-candidate-qualification.yml) | build | repository | active | Buildchain Stable Candidate Qualification | — |\n| [self-build-verify.yml](../.github/workflows/self-build-verify.yml) | build | repository | active | Verify | — |\n| [self-ops-bootstrap-dogfood.yml](../.github/workflows/self-ops-bootstrap-dogfood.yml) | ops | repository | active | Universal Bootstrap Train-First Self-Dogfood | — |\n| [self-ops-dev-delivery.yml](../.github/workflows/self-ops-dev-delivery.yml) | ops | repository | active | Buildchain Dev Delivery | — |\n| [self-ops-governance-audit.yml](../.github/workflows/self-ops-governance-audit.yml) | ops | repository | active | GitHub Governance Authority Audit | — |\n| [self-ops-housekeeping-daily.yml](../.github/workflows/self-ops-housekeeping-daily.yml) | ops | repository | active | Engineering Housekeeper Daily | — |\n| [self-ops-housekeeping-monthly.yml](../.github/workflows/self-ops-housekeeping-monthly.yml) | ops | repository | active | Engineering Housekeeper Monthly | — |\n| [self-ops-housekeeping-weekly.yml](../.github/workflows/self-ops-housekeeping-weekly.yml) | ops | repository | active | Engineering Housekeeper Weekly | — |\n| [self-ops-merge-queue.yml](../.github/workflows/self-ops-merge-queue.yml) | ops | repository | active | Dev Merge Queue Governance | — |\n| [self-ops-patrol-daily.yml](../.github/workflows/self-ops-patrol-daily.yml) | ops | repository | active | Buildchain Dogfood Patrol Daily | — |\n| [self-ops-patrol-monthly.yml](../.github/workflows/self-ops-patrol-monthly.yml) | ops | repository | active | Buildchain Dogfood Patrol Monthly | — |\n| [self-ops-patrol-weekly.yml](../.github/workflows/self-ops-patrol-weekly.yml) | ops | repository | active | Buildchain Dogfood Patrol Weekly | — |\n| [self-ops-promotion-recovery.yml](../.github/workflows/self-ops-promotion-recovery.yml) | ops | repository | active | Buildchain Ref Promotion Recovery | — |\n| [self-ops-recovery-failure-dogfood.yml](../.github/workflows/self-ops-recovery-failure-dogfood.yml) | ops | repository | active | Buildchain Candidate Recovery Dogfood Startup Failure | — |\n| [self-ops-runner-smoke.yml](../.github/workflows/self-ops-runner-smoke.yml) | ops | repository | active | Self-hosted Runner Smoke | — |\n| [self-ops-stable-candidate-patrol.yml](../.github/workflows/self-ops-stable-candidate-patrol.yml) | ops | repository | active | Buildchain Dogfood Stable Candidate Patrol | — |\n| [self-release-binary-assets.yml](../.github/workflows/self-release-binary-assets.yml) | release | repository | active | Binary Release Assets | — |\n| [self-release-line-open.yml](../.github/workflows/self-release-line-open.yml) | release | repository | active | Release Line Bootstrap | — |\n| [self-release-new-version-compat.yml](../.github/workflows/self-release-new-version-compat.yml) | release | repository | compatibility | Release - New Version | — |\n| [self-release-next-development.yml](../.github/workflows/self-release-next-development.yml) | release | repository | active | Next Development Review | — |\n| [self-release-npm-dry-run.yml](../.github/workflows/self-release-npm-dry-run.yml) | release | repository | active | Publish npm package | — |\n| [self-release-promote.yml](../.github/workflows/self-release-promote.yml) | release | repository | active | Buildchain Ref Promotion | — |\n| [self-release-rehearsal-dogfood.yml](../.github/workflows/self-release-rehearsal-dogfood.yml) | release | repository | active | V4 Publication Rehearsal Dogfood | — |\n| [self-release-tail-dogfood.yml](../.github/workflows/self-release-tail-dogfood.yml) | release | repository | active | V4 Declarative Release Tail Dogfood | — |"
5478
5483
  },
5479
5484
  {
5480
5485
  "id": "fixture:infra-contract-aws-cdk-shaped",
@@ -298,7 +298,7 @@
298
298
  "pageCount": 12,
299
299
  "cliCommandCount": 0,
300
300
  "nodeApiCount": 2,
301
- "workflowCount": 86,
301
+ "workflowCount": 87,
302
302
  "actionCount": 2
303
303
  },
304
304
  "manuals": [
@@ -21,10 +21,10 @@
21
21
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
22
22
  "path": "dist/site/public-surface-audit.json",
23
23
  "status": "passed",
24
- "sha256": "b204ab8cbca8d112938c12e6541faa85256f1a85671574ff3fd8907b11de7dc6",
24
+ "sha256": "d69e70b731468429f3d2c7b762ef9be27a39b45d118a990413dec7c8bf727593",
25
25
  "summary": {
26
26
  "cliCommandCount": 117,
27
- "workflowCount": 116,
27
+ "workflowCount": 117,
28
28
  "actionCount": 8,
29
29
  "sitePageCount": 86,
30
30
  "docCommandRefCount": 1050,
@@ -246,10 +246,10 @@
246
246
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
247
247
  "path": "dist/site/public-surface-audit.json",
248
248
  "status": "passed",
249
- "sha256": "b204ab8cbca8d112938c12e6541faa85256f1a85671574ff3fd8907b11de7dc6",
249
+ "sha256": "d69e70b731468429f3d2c7b762ef9be27a39b45d118a990413dec7c8bf727593",
250
250
  "summary": {
251
251
  "cliCommandCount": 117,
252
- "workflowCount": 116,
252
+ "workflowCount": 117,
253
253
  "actionCount": 8,
254
254
  "sitePageCount": 86,
255
255
  "docCommandRefCount": 1050,
@@ -7404,6 +7404,20 @@
7404
7404
  "inputs": [],
7405
7405
  "reverseAuditSource": ".github/workflows"
7406
7406
  },
7407
+ {
7408
+ "id": "workflow:self-release-next-development",
7409
+ "name": "workflow:self-release-next-development",
7410
+ "kind": "workflow",
7411
+ "sourcePath": ".github/workflows/self-release-next-development.yml",
7412
+ "evidencePath": ".github/workflows/self-release-next-development.yml",
7413
+ "availability": "shipped",
7414
+ "visibility": "public",
7415
+ "participantFacing": true,
7416
+ "public": true,
7417
+ "inputCount": 0,
7418
+ "inputs": [],
7419
+ "reverseAuditSource": ".github/workflows"
7420
+ },
7407
7421
  {
7408
7422
  "id": "workflow:self-release-npm-dry-run",
7409
7423
  "name": "workflow:self-release-npm-dry-run",
@@ -9132,6 +9146,6 @@
9132
9146
  }
9133
9147
  }
9134
9148
  ],
9135
- "publicSurfaceCount": 522
9149
+ "publicSurfaceCount": 523
9136
9150
  }
9137
9151
  }
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "id": "kungfu-tech-buildchain",
6
6
  "name": "@kungfu-tech/buildchain",
7
- "version": "4.0.2-alpha.35",
7
+ "version": "4.0.2-alpha.36",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "source": {
@@ -4966,7 +4966,7 @@
4966
4966
  ],
4967
4967
  "maturity": "stable",
4968
4968
  "sourcePath": "docs/v4-production-release.md",
4969
- "digest": "sha256:8b0d2592de6542ba316dc5c1e98a75f1ceb0c208150737f8aff14eaedfc1619b",
4969
+ "digest": "sha256:5627c4b6cc9bb11c8c19df7e1847b575b06ca18142ca8630d13c45c387406997",
4970
4970
  "headings": [
4971
4971
  {
4972
4972
  "level": 1,
@@ -4987,9 +4987,14 @@
4987
4987
  "level": 2,
4988
4988
  "title": "Publication settlement and binary recovery",
4989
4989
  "anchor": "publication-settlement-and-binary-recovery"
4990
+ },
4991
+ {
4992
+ "level": 2,
4993
+ "title": "Automatic next-development review",
4994
+ "anchor": "automatic-next-development-review"
4990
4995
  }
4991
4996
  ],
4992
- "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-05\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-05\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\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 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\nBinary Distribution reads this settlement and the original publication Passport.\nTag creation can precede settlement, so it waits at most 40 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."
4997
+ "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-05\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-05\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\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\nBinary Distribution reads this settlement and the original publication Passport.\nTag creation can precede settlement, so it waits at most 40 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## Automatic next-development review\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."
4993
4998
  },
4994
4999
  {
4995
5000
  "id": "manual:v4-publication-rehearsal",
@@ -5370,7 +5375,7 @@
5370
5375
  ],
5371
5376
  "maturity": "stable",
5372
5377
  "sourcePath": "docs/workflow-catalog.md",
5373
- "digest": "sha256:a33067c45ae0a6442c4e587c4da6a33fad538f19b93d83eabdc837ed1e579208",
5378
+ "digest": "sha256:84b15bda46df9ab7d2c1b1e728a2c6fbd2a82b7feac5d3fcf86b6f00442b81ba",
5374
5379
  "headings": [
5375
5380
  {
5376
5381
  "level": 1,
@@ -5408,7 +5413,7 @@
5408
5413
  "anchor": "self"
5409
5414
  }
5410
5415
  ],
5411
- "markdown": "---\nstatus: active\nperiod: ongoing\ntheme: workflow-taxonomy\ndoc_type: technical-reference\nsource_level: local-files\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-05\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-05\n visible_context: Repository workflow source and the approved naming scheme\n invisible_context_boundary: No credentials or unpublished provider configuration inspected\n---\n\n# Workflow catalog\n\nGenerated from `architecture/workflow-taxonomy.json`; edit that source, then run\n`pnpm run generate:workflows`. Every YAML file, including compatibility paths,\nis checked by the existing required workflow check.\n\n## Naming and ownership\n\n`public-<build|release|ops>-<purpose>.yml` is a consumer entry;\n`.<build|release|ops>-<purpose>.yml` is an advanced component;\n`self-<build|release|ops>-<purpose>.yml` is Buildchain's own automation.\nPublic is a product role, not GitHub access control. Dispatch services are\nmarked separately from reusable workflows. Keep workflow names, job IDs,\npermissions, and trigger semantics stable during path migration.\n\n## Channel rollout\n\nCanonical names become callable on a channel only after that channel publishes\nthem. Existing `@v4`/`@v4-alpha` consumers keep their exact registered legacy\npaths until provider readback proves canonical availability. New examples below\ndescribe the target surface, not a claim that both channels already publish it.\nCompatibility files are generated byte-identical projections, not independently\neditable implementations. They retain full jobs to preserve called-workflow\nidentity, permission envelopes, and required check names without extra nesting.\n\nThe controller registry records the actual source path separately from a migrated\nrepository controller contractPath. This preserves the established logical\ncontract identity while exposing its current execution source. New workflows\ndo not acquire historical identities. Public controllers retain their real\ncompatibility paths while those paths remain supported.\n\n## Adding or changing a workflow\n\nRegister a stable identity, role, category, purpose, owner, lifecycle status,\ninvocation and concrete summary before creating its derived path. A new entry\nmust explain its scope in review. New aliases cannot be invented: compatibility\nmust name an exact migration source with a reason and removal condition.\nThe policy, generator, checker, tests, required CI chain and CODEOWNERS require\nindependent `kungfu-origin` review. No wildcard compatibility admission is allowed.\n\nA role, category or implementation edit must preserve or deliberately update\nall related declarations. Run `pnpm run generate:workflows` and\n`pnpm run check:workflows`; the full `pnpm run check` remains required.\n\n## public\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [public-build-adopter-qualification.yml](../.github/workflows/public-build-adopter-qualification.yml) | build | reusable | active | V4 Adopter Delivery | `v4-adopter-delivery.yml` |\n| [public-build-candidate.yml](../.github/workflows/public-build-candidate.yml) | build | reusable | active | Buildchain Channel Build | `build.yml` |\n| [public-build-check.yml](../.github/workflows/public-build-check.yml) | build | reusable | active | Buildchain Check | `check.yml` |\n| [public-build-demo.yml](../.github/workflows/public-build-demo.yml) | build | reusable | active | Buildchain Declarative Binary Auditable Demo | `.declarative-auditable-demo.yml` |\n| [public-build-publication.yml](../.github/workflows/public-build-publication.yml) | build | reusable | active | Buildchain Publication Artifact | `publication-artifact.yml` |\n| [public-build-stage-capsule-canary.yml](../.github/workflows/public-build-stage-capsule-canary.yml) | build | reusable | active | V4 Stage Capsule Canary | `v4-stage-capsule-canary.yml` |\n| [public-ops-alpha-candidate-patrol.yml](../.github/workflows/public-ops-alpha-candidate-patrol.yml) | ops | reusable | active | Buildchain Dev to Alpha Candidate Patrol | `dev-alpha-candidate-patrol.yml` |\n| [public-ops-bootstrap-recovery.yml](../.github/workflows/public-ops-bootstrap-recovery.yml) | ops | reusable | active | Universal Buildchain Bootstrap Recovery | `universal-bootstrap-recovery.yml` |\n| [public-ops-bootstrap.yml](../.github/workflows/public-ops-bootstrap.yml) | ops | reusable | active | Buildchain Universal Bootstrap | `bootstrap.yml` |\n| [public-ops-dev-auto-merge.yml](../.github/workflows/public-ops-dev-auto-merge.yml) | ops | reusable | active | Dev PR Auto Merge | `dev-pr-auto-merge.yml` |\n| [public-ops-dev-qualification-patrol.yml](../.github/workflows/public-ops-dev-qualification-patrol.yml) | ops | reusable | active | Buildchain Dev Qualification Patrol | `dev-qualification-patrol.yml` |\n| [public-ops-housekeeping.yml](../.github/workflows/public-ops-housekeeping.yml) | ops | reusable | active | Engineering Housekeeper | `engineering-housekeeper.yml` |\n| [public-ops-observed-evidence.yml](../.github/workflows/public-ops-observed-evidence.yml) | ops | reusable | active | Patrol Observed Evidence | `patrol-observed-evidence.yml` |\n| [public-ops-patrol-daily.yml](../.github/workflows/public-ops-patrol-daily.yml) | ops | reusable | active | Buildchain Patrol Daily | `patrol-daily.yml` |\n| [public-ops-patrol-monthly.yml](../.github/workflows/public-ops-patrol-monthly.yml) | ops | reusable | active | Buildchain Patrol Monthly | `patrol-monthly.yml` |\n| [public-ops-patrol-weekly.yml](../.github/workflows/public-ops-patrol-weekly.yml) | ops | reusable | active | Buildchain Patrol Weekly | `patrol-weekly.yml` |\n| [public-ops-patrol.yml](../.github/workflows/public-ops-patrol.yml) | ops | reusable | active | Buildchain Patrol | `buildchain-patrol.yml` |\n| [public-ops-release-governance.yml](../.github/workflows/public-ops-release-governance.yml) | ops | reusable | active | Release Governance Reconcile | `release-governance-reconcile.yml` |\n| [public-ops-stable-candidate-patrol.yml](../.github/workflows/public-ops-stable-candidate-patrol.yml) | ops | reusable | active | Buildchain Stable Candidate Patrol | `stable-candidate-patrol.yml` |\n| [public-ops-tail-reseal.yml](../.github/workflows/public-ops-tail-reseal.yml) | ops | reusable | active | V4 Retained Candidate Tail Reseal | `v4-tail-reseal.yml` |\n| [public-ops-warrant-cancel.yml](../.github/workflows/public-ops-warrant-cancel.yml) | ops | reusable | active | Dev Delivery Warrant Queued Candidate Cancel | `dev-delivery-warrant-cancel.yml` |\n| [public-ops-warrant-close.yml](../.github/workflows/public-ops-warrant-close.yml) | ops | reusable | active | Dev Delivery Warrant Close | `dev-delivery-warrant-close.yml` |\n| [public-release-artifact-attestation.yml](../.github/workflows/public-release-artifact-attestation.yml) | release | reusable | active | Buildchain GitHub Artifact Attestation | `github-artifact-attestation.yml` |\n| [public-release-paper-sealed.yml](../.github/workflows/public-release-paper-sealed.yml) | release | reusable | active | Buildchain Sealed Paper Release | `paper-release-sealed.yml` |\n| [public-release-paper.yml](../.github/workflows/public-release-paper.yml) | release | reusable | active | Buildchain Paper Release | `paper-release.yml` |\n| [public-release-promote.yml](../.github/workflows/public-release-promote.yml) | release | reusable | active | Release Candidate Promote | `release-candidate-promote.yml` |\n| [public-release-propagation.yml](../.github/workflows/public-release-propagation.yml) | release | reusable | active | Release Propagation | `release-propagation.yml` |\n| [public-release-signing-authority.yml](../.github/workflows/public-release-signing-authority.yml) | release | dispatch-service | active | Buildchain Artifact Signing Authority | `artifact-signing-authority.yml` |\n| [public-release-tail.yml](../.github/workflows/public-release-tail.yml) | release | reusable | active | Declarative Release Tail | `release-tail.yml` |\n| [public-release-web.yml](../.github/workflows/public-release-web.yml) | release | reusable | active | Buildchain Web Surface | `.web-surface.yml` |\n\n## component\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [.build-demo-adapter.yml](../.github/workflows/.build-demo-adapter.yml) | build | reusable | active | Buildchain Auditable Demo | `.auditable-demo.yml` |\n| [.build-engine.yml](../.github/workflows/.build-engine.yml) | build | reusable | active | Buildchain Build | `.build.yml` |\n| [.build-gate-profile.yml](../.github/workflows/.build-gate-profile.yml) | build | reusable | active | Buildchain Shifu Gate Profile | `.gate-profile.yml` |\n| [.build-release-verify-compat.yml](../.github/workflows/.build-release-verify-compat.yml) | build | reusable | compatibility | release verify | `.release-verify.yml` |\n| [.build-sam-verify-compat.yml](../.github/workflows/.build-sam-verify-compat.yml) | build | reusable | compatibility | sam verify | `.sam-verify.yml` |\n| [.build-wheel-verify-compat.yml](../.github/workflows/.build-wheel-verify-compat.yml) | build | reusable | compatibility | wheel verify | `.wheel-verify.yml` |\n| [.ops-git-sync.yml](../.github/workflows/.ops-git-sync.yml) | ops | reusable | active | sync remote git | `.sync-remote-git.yml` |\n| [.release-authority.yml](../.github/workflows/.release-authority.yml) | release | reusable | active | Buildchain Sealed Publication Authority | `.publication-authority.yml` |\n| [.release-binary-assets.yml](../.github/workflows/.release-binary-assets.yml) | release | reusable | active | Buildchain Binary Release Assets | `.binary-release-assets.yml` |\n| [.release-minor-bump-compat.yml](../.github/workflows/.release-minor-bump-compat.yml) | release | reusable | compatibility | bump minor version | `.bump-minor-version.yml` |\n| [.release-page-sync-retired.yml](../.github/workflows/.release-page-sync-retired.yml) | release | reusable | retired | sync release page | `.sync-release-page.yml` |\n| [.release-promote.yml](../.github/workflows/.release-promote.yml) | release | reusable | active | Release Candidate Promote Advanced | `.release-candidate-promote.yml` |\n\n## self\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [self-build-adopter-dogfood.yml](../.github/workflows/self-build-adopter-dogfood.yml) | build | repository | active | V4 Adopter Delivery Dogfood | — |\n| [self-build-alpha-dogfood.yml](../.github/workflows/self-build-alpha-dogfood.yml) | build | repository | active | Buildchain Alpha Self-Dogfood | — |\n| [self-build-binary-distribution.yml](../.github/workflows/self-build-binary-distribution.yml) | build | repository | active | Binary Distribution | — |\n| [self-build-candidate-lab.yml](../.github/workflows/self-build-candidate-lab.yml) | build | repository | active | Candidate Lab | — |\n| [self-build-demo-dogfood.yml](../.github/workflows/self-build-demo-dogfood.yml) | build | repository | active | Buildchain Declarative Demo Dogfood | — |\n| [self-build-demo-media-qualification.yml](../.github/workflows/self-build-demo-media-qualification.yml) | build | repository | active | Auditable Demo Media Profile Qualification | — |\n| [self-build-fixture.yml](../.github/workflows/self-build-fixture.yml) | build | repository | active | Build Surface Fixture | — |\n| [self-build-public-consumer-dogfood.yml](../.github/workflows/self-build-public-consumer-dogfood.yml) | build | repository | active | V4 Public Consumer Dogfood | — |\n| [self-build-release-verify-compat.yml](../.github/workflows/self-build-release-verify-compat.yml) | build | repository | compatibility | Release - Verify | — |\n| [self-build-stable-candidate-qualification.yml](../.github/workflows/self-build-stable-candidate-qualification.yml) | build | repository | active | Buildchain Stable Candidate Qualification | — |\n| [self-build-verify.yml](../.github/workflows/self-build-verify.yml) | build | repository | active | Verify | — |\n| [self-ops-bootstrap-dogfood.yml](../.github/workflows/self-ops-bootstrap-dogfood.yml) | ops | repository | active | Universal Bootstrap Train-First Self-Dogfood | — |\n| [self-ops-dev-delivery.yml](../.github/workflows/self-ops-dev-delivery.yml) | ops | repository | active | Buildchain Dev Delivery | — |\n| [self-ops-governance-audit.yml](../.github/workflows/self-ops-governance-audit.yml) | ops | repository | active | GitHub Governance Authority Audit | — |\n| [self-ops-housekeeping-daily.yml](../.github/workflows/self-ops-housekeeping-daily.yml) | ops | repository | active | Engineering Housekeeper Daily | — |\n| [self-ops-housekeeping-monthly.yml](../.github/workflows/self-ops-housekeeping-monthly.yml) | ops | repository | active | Engineering Housekeeper Monthly | — |\n| [self-ops-housekeeping-weekly.yml](../.github/workflows/self-ops-housekeeping-weekly.yml) | ops | repository | active | Engineering Housekeeper Weekly | — |\n| [self-ops-merge-queue.yml](../.github/workflows/self-ops-merge-queue.yml) | ops | repository | active | Dev Merge Queue Governance | — |\n| [self-ops-patrol-daily.yml](../.github/workflows/self-ops-patrol-daily.yml) | ops | repository | active | Buildchain Dogfood Patrol Daily | — |\n| [self-ops-patrol-monthly.yml](../.github/workflows/self-ops-patrol-monthly.yml) | ops | repository | active | Buildchain Dogfood Patrol Monthly | — |\n| [self-ops-patrol-weekly.yml](../.github/workflows/self-ops-patrol-weekly.yml) | ops | repository | active | Buildchain Dogfood Patrol Weekly | — |\n| [self-ops-promotion-recovery.yml](../.github/workflows/self-ops-promotion-recovery.yml) | ops | repository | active | Buildchain Ref Promotion Recovery | — |\n| [self-ops-recovery-failure-dogfood.yml](../.github/workflows/self-ops-recovery-failure-dogfood.yml) | ops | repository | active | Buildchain Candidate Recovery Dogfood Startup Failure | — |\n| [self-ops-runner-smoke.yml](../.github/workflows/self-ops-runner-smoke.yml) | ops | repository | active | Self-hosted Runner Smoke | — |\n| [self-ops-stable-candidate-patrol.yml](../.github/workflows/self-ops-stable-candidate-patrol.yml) | ops | repository | active | Buildchain Dogfood Stable Candidate Patrol | — |\n| [self-release-binary-assets.yml](../.github/workflows/self-release-binary-assets.yml) | release | repository | active | Binary Release Assets | — |\n| [self-release-line-open.yml](../.github/workflows/self-release-line-open.yml) | release | repository | active | Release Line Bootstrap | — |\n| [self-release-new-version-compat.yml](../.github/workflows/self-release-new-version-compat.yml) | release | repository | compatibility | Release - New Version | — |\n| [self-release-npm-dry-run.yml](../.github/workflows/self-release-npm-dry-run.yml) | release | repository | active | Publish npm package | — |\n| [self-release-promote.yml](../.github/workflows/self-release-promote.yml) | release | repository | active | Buildchain Ref Promotion | — |\n| [self-release-rehearsal-dogfood.yml](../.github/workflows/self-release-rehearsal-dogfood.yml) | release | repository | active | V4 Publication Rehearsal Dogfood | — |\n| [self-release-tail-dogfood.yml](../.github/workflows/self-release-tail-dogfood.yml) | release | repository | active | V4 Declarative Release Tail Dogfood | — |"
5416
+ "markdown": "---\nstatus: active\nperiod: ongoing\ntheme: workflow-taxonomy\ndoc_type: technical-reference\nsource_level: local-files\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-05\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-05\n visible_context: Repository workflow source and the approved naming scheme\n invisible_context_boundary: No credentials or unpublished provider configuration inspected\n---\n\n# Workflow catalog\n\nGenerated from `architecture/workflow-taxonomy.json`; edit that source, then run\n`pnpm run generate:workflows`. Every YAML file, including compatibility paths,\nis checked by the existing required workflow check.\n\n## Naming and ownership\n\n`public-<build|release|ops>-<purpose>.yml` is a consumer entry;\n`.<build|release|ops>-<purpose>.yml` is an advanced component;\n`self-<build|release|ops>-<purpose>.yml` is Buildchain's own automation.\nPublic is a product role, not GitHub access control. Dispatch services are\nmarked separately from reusable workflows. Keep workflow names, job IDs,\npermissions, and trigger semantics stable during path migration.\n\n## Channel rollout\n\nCanonical names become callable on a channel only after that channel publishes\nthem. Existing `@v4`/`@v4-alpha` consumers keep their exact registered legacy\npaths until provider readback proves canonical availability. New examples below\ndescribe the target surface, not a claim that both channels already publish it.\nCompatibility files are generated byte-identical projections, not independently\neditable implementations. They retain full jobs to preserve called-workflow\nidentity, permission envelopes, and required check names without extra nesting.\n\nThe controller registry records the actual source path separately from a migrated\nrepository controller contractPath. This preserves the established logical\ncontract identity while exposing its current execution source. New workflows\ndo not acquire historical identities. Public controllers retain their real\ncompatibility paths while those paths remain supported.\n\n## Adding or changing a workflow\n\nRegister a stable identity, role, category, purpose, owner, lifecycle status,\ninvocation and concrete summary before creating its derived path. A new entry\nmust explain its scope in review. New aliases cannot be invented: compatibility\nmust name an exact migration source with a reason and removal condition.\nThe policy, generator, checker, tests, required CI chain and CODEOWNERS require\nindependent `kungfu-origin` review. No wildcard compatibility admission is allowed.\n\nA role, category or implementation edit must preserve or deliberately update\nall related declarations. Run `pnpm run generate:workflows` and\n`pnpm run check:workflows`; the full `pnpm run check` remains required.\n\n## public\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [public-build-adopter-qualification.yml](../.github/workflows/public-build-adopter-qualification.yml) | build | reusable | active | V4 Adopter Delivery | `v4-adopter-delivery.yml` |\n| [public-build-candidate.yml](../.github/workflows/public-build-candidate.yml) | build | reusable | active | Buildchain Channel Build | `build.yml` |\n| [public-build-check.yml](../.github/workflows/public-build-check.yml) | build | reusable | active | Buildchain Check | `check.yml` |\n| [public-build-demo.yml](../.github/workflows/public-build-demo.yml) | build | reusable | active | Buildchain Declarative Binary Auditable Demo | `.declarative-auditable-demo.yml` |\n| [public-build-publication.yml](../.github/workflows/public-build-publication.yml) | build | reusable | active | Buildchain Publication Artifact | `publication-artifact.yml` |\n| [public-build-stage-capsule-canary.yml](../.github/workflows/public-build-stage-capsule-canary.yml) | build | reusable | active | V4 Stage Capsule Canary | `v4-stage-capsule-canary.yml` |\n| [public-ops-alpha-candidate-patrol.yml](../.github/workflows/public-ops-alpha-candidate-patrol.yml) | ops | reusable | active | Buildchain Dev to Alpha Candidate Patrol | `dev-alpha-candidate-patrol.yml` |\n| [public-ops-bootstrap-recovery.yml](../.github/workflows/public-ops-bootstrap-recovery.yml) | ops | reusable | active | Universal Buildchain Bootstrap Recovery | `universal-bootstrap-recovery.yml` |\n| [public-ops-bootstrap.yml](../.github/workflows/public-ops-bootstrap.yml) | ops | reusable | active | Buildchain Universal Bootstrap | `bootstrap.yml` |\n| [public-ops-dev-auto-merge.yml](../.github/workflows/public-ops-dev-auto-merge.yml) | ops | reusable | active | Dev PR Auto Merge | `dev-pr-auto-merge.yml` |\n| [public-ops-dev-qualification-patrol.yml](../.github/workflows/public-ops-dev-qualification-patrol.yml) | ops | reusable | active | Buildchain Dev Qualification Patrol | `dev-qualification-patrol.yml` |\n| [public-ops-housekeeping.yml](../.github/workflows/public-ops-housekeeping.yml) | ops | reusable | active | Engineering Housekeeper | `engineering-housekeeper.yml` |\n| [public-ops-observed-evidence.yml](../.github/workflows/public-ops-observed-evidence.yml) | ops | reusable | active | Patrol Observed Evidence | `patrol-observed-evidence.yml` |\n| [public-ops-patrol-daily.yml](../.github/workflows/public-ops-patrol-daily.yml) | ops | reusable | active | Buildchain Patrol Daily | `patrol-daily.yml` |\n| [public-ops-patrol-monthly.yml](../.github/workflows/public-ops-patrol-monthly.yml) | ops | reusable | active | Buildchain Patrol Monthly | `patrol-monthly.yml` |\n| [public-ops-patrol-weekly.yml](../.github/workflows/public-ops-patrol-weekly.yml) | ops | reusable | active | Buildchain Patrol Weekly | `patrol-weekly.yml` |\n| [public-ops-patrol.yml](../.github/workflows/public-ops-patrol.yml) | ops | reusable | active | Buildchain Patrol | `buildchain-patrol.yml` |\n| [public-ops-release-governance.yml](../.github/workflows/public-ops-release-governance.yml) | ops | reusable | active | Release Governance Reconcile | `release-governance-reconcile.yml` |\n| [public-ops-stable-candidate-patrol.yml](../.github/workflows/public-ops-stable-candidate-patrol.yml) | ops | reusable | active | Buildchain Stable Candidate Patrol | `stable-candidate-patrol.yml` |\n| [public-ops-tail-reseal.yml](../.github/workflows/public-ops-tail-reseal.yml) | ops | reusable | active | V4 Retained Candidate Tail Reseal | `v4-tail-reseal.yml` |\n| [public-ops-warrant-cancel.yml](../.github/workflows/public-ops-warrant-cancel.yml) | ops | reusable | active | Dev Delivery Warrant Queued Candidate Cancel | `dev-delivery-warrant-cancel.yml` |\n| [public-ops-warrant-close.yml](../.github/workflows/public-ops-warrant-close.yml) | ops | reusable | active | Dev Delivery Warrant Close | `dev-delivery-warrant-close.yml` |\n| [public-release-artifact-attestation.yml](../.github/workflows/public-release-artifact-attestation.yml) | release | reusable | active | Buildchain GitHub Artifact Attestation | `github-artifact-attestation.yml` |\n| [public-release-paper-sealed.yml](../.github/workflows/public-release-paper-sealed.yml) | release | reusable | active | Buildchain Sealed Paper Release | `paper-release-sealed.yml` |\n| [public-release-paper.yml](../.github/workflows/public-release-paper.yml) | release | reusable | active | Buildchain Paper Release | `paper-release.yml` |\n| [public-release-promote.yml](../.github/workflows/public-release-promote.yml) | release | reusable | active | Release Candidate Promote | `release-candidate-promote.yml` |\n| [public-release-propagation.yml](../.github/workflows/public-release-propagation.yml) | release | reusable | active | Release Propagation | `release-propagation.yml` |\n| [public-release-signing-authority.yml](../.github/workflows/public-release-signing-authority.yml) | release | dispatch-service | active | Buildchain Artifact Signing Authority | `artifact-signing-authority.yml` |\n| [public-release-tail.yml](../.github/workflows/public-release-tail.yml) | release | reusable | active | Declarative Release Tail | `release-tail.yml` |\n| [public-release-web.yml](../.github/workflows/public-release-web.yml) | release | reusable | active | Buildchain Web Surface | `.web-surface.yml` |\n\n## component\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [.build-demo-adapter.yml](../.github/workflows/.build-demo-adapter.yml) | build | reusable | active | Buildchain Auditable Demo | `.auditable-demo.yml` |\n| [.build-engine.yml](../.github/workflows/.build-engine.yml) | build | reusable | active | Buildchain Build | `.build.yml` |\n| [.build-gate-profile.yml](../.github/workflows/.build-gate-profile.yml) | build | reusable | active | Buildchain Shifu Gate Profile | `.gate-profile.yml` |\n| [.build-release-verify-compat.yml](../.github/workflows/.build-release-verify-compat.yml) | build | reusable | compatibility | release verify | `.release-verify.yml` |\n| [.build-sam-verify-compat.yml](../.github/workflows/.build-sam-verify-compat.yml) | build | reusable | compatibility | sam verify | `.sam-verify.yml` |\n| [.build-wheel-verify-compat.yml](../.github/workflows/.build-wheel-verify-compat.yml) | build | reusable | compatibility | wheel verify | `.wheel-verify.yml` |\n| [.ops-git-sync.yml](../.github/workflows/.ops-git-sync.yml) | ops | reusable | active | sync remote git | `.sync-remote-git.yml` |\n| [.release-authority.yml](../.github/workflows/.release-authority.yml) | release | reusable | active | Buildchain Sealed Publication Authority | `.publication-authority.yml` |\n| [.release-binary-assets.yml](../.github/workflows/.release-binary-assets.yml) | release | reusable | active | Buildchain Binary Release Assets | `.binary-release-assets.yml` |\n| [.release-minor-bump-compat.yml](../.github/workflows/.release-minor-bump-compat.yml) | release | reusable | compatibility | bump minor version | `.bump-minor-version.yml` |\n| [.release-page-sync-retired.yml](../.github/workflows/.release-page-sync-retired.yml) | release | reusable | retired | sync release page | `.sync-release-page.yml` |\n| [.release-promote.yml](../.github/workflows/.release-promote.yml) | release | reusable | active | Release Candidate Promote Advanced | `.release-candidate-promote.yml` |\n\n## self\n\n| Canonical workflow | Category | Invocation | Status | Purpose | Compatibility path |\n| --- | --- | --- | --- | --- | --- |\n| [self-build-adopter-dogfood.yml](../.github/workflows/self-build-adopter-dogfood.yml) | build | repository | active | V4 Adopter Delivery Dogfood | — |\n| [self-build-alpha-dogfood.yml](../.github/workflows/self-build-alpha-dogfood.yml) | build | repository | active | Buildchain Alpha Self-Dogfood | — |\n| [self-build-binary-distribution.yml](../.github/workflows/self-build-binary-distribution.yml) | build | repository | active | Binary Distribution | — |\n| [self-build-candidate-lab.yml](../.github/workflows/self-build-candidate-lab.yml) | build | repository | active | Candidate Lab | — |\n| [self-build-demo-dogfood.yml](../.github/workflows/self-build-demo-dogfood.yml) | build | repository | active | Buildchain Declarative Demo Dogfood | — |\n| [self-build-demo-media-qualification.yml](../.github/workflows/self-build-demo-media-qualification.yml) | build | repository | active | Auditable Demo Media Profile Qualification | — |\n| [self-build-fixture.yml](../.github/workflows/self-build-fixture.yml) | build | repository | active | Build Surface Fixture | — |\n| [self-build-public-consumer-dogfood.yml](../.github/workflows/self-build-public-consumer-dogfood.yml) | build | repository | active | V4 Public Consumer Dogfood | — |\n| [self-build-release-verify-compat.yml](../.github/workflows/self-build-release-verify-compat.yml) | build | repository | compatibility | Release - Verify | — |\n| [self-build-stable-candidate-qualification.yml](../.github/workflows/self-build-stable-candidate-qualification.yml) | build | repository | active | Buildchain Stable Candidate Qualification | — |\n| [self-build-verify.yml](../.github/workflows/self-build-verify.yml) | build | repository | active | Verify | — |\n| [self-ops-bootstrap-dogfood.yml](../.github/workflows/self-ops-bootstrap-dogfood.yml) | ops | repository | active | Universal Bootstrap Train-First Self-Dogfood | — |\n| [self-ops-dev-delivery.yml](../.github/workflows/self-ops-dev-delivery.yml) | ops | repository | active | Buildchain Dev Delivery | — |\n| [self-ops-governance-audit.yml](../.github/workflows/self-ops-governance-audit.yml) | ops | repository | active | GitHub Governance Authority Audit | — |\n| [self-ops-housekeeping-daily.yml](../.github/workflows/self-ops-housekeeping-daily.yml) | ops | repository | active | Engineering Housekeeper Daily | — |\n| [self-ops-housekeeping-monthly.yml](../.github/workflows/self-ops-housekeeping-monthly.yml) | ops | repository | active | Engineering Housekeeper Monthly | — |\n| [self-ops-housekeeping-weekly.yml](../.github/workflows/self-ops-housekeeping-weekly.yml) | ops | repository | active | Engineering Housekeeper Weekly | — |\n| [self-ops-merge-queue.yml](../.github/workflows/self-ops-merge-queue.yml) | ops | repository | active | Dev Merge Queue Governance | — |\n| [self-ops-patrol-daily.yml](../.github/workflows/self-ops-patrol-daily.yml) | ops | repository | active | Buildchain Dogfood Patrol Daily | — |\n| [self-ops-patrol-monthly.yml](../.github/workflows/self-ops-patrol-monthly.yml) | ops | repository | active | Buildchain Dogfood Patrol Monthly | — |\n| [self-ops-patrol-weekly.yml](../.github/workflows/self-ops-patrol-weekly.yml) | ops | repository | active | Buildchain Dogfood Patrol Weekly | — |\n| [self-ops-promotion-recovery.yml](../.github/workflows/self-ops-promotion-recovery.yml) | ops | repository | active | Buildchain Ref Promotion Recovery | — |\n| [self-ops-recovery-failure-dogfood.yml](../.github/workflows/self-ops-recovery-failure-dogfood.yml) | ops | repository | active | Buildchain Candidate Recovery Dogfood Startup Failure | — |\n| [self-ops-runner-smoke.yml](../.github/workflows/self-ops-runner-smoke.yml) | ops | repository | active | Self-hosted Runner Smoke | — |\n| [self-ops-stable-candidate-patrol.yml](../.github/workflows/self-ops-stable-candidate-patrol.yml) | ops | repository | active | Buildchain Dogfood Stable Candidate Patrol | — |\n| [self-release-binary-assets.yml](../.github/workflows/self-release-binary-assets.yml) | release | repository | active | Binary Release Assets | — |\n| [self-release-line-open.yml](../.github/workflows/self-release-line-open.yml) | release | repository | active | Release Line Bootstrap | — |\n| [self-release-new-version-compat.yml](../.github/workflows/self-release-new-version-compat.yml) | release | repository | compatibility | Release - New Version | — |\n| [self-release-next-development.yml](../.github/workflows/self-release-next-development.yml) | release | repository | active | Next Development Review | — |\n| [self-release-npm-dry-run.yml](../.github/workflows/self-release-npm-dry-run.yml) | release | repository | active | Publish npm package | — |\n| [self-release-promote.yml](../.github/workflows/self-release-promote.yml) | release | repository | active | Buildchain Ref Promotion | — |\n| [self-release-rehearsal-dogfood.yml](../.github/workflows/self-release-rehearsal-dogfood.yml) | release | repository | active | V4 Publication Rehearsal Dogfood | — |\n| [self-release-tail-dogfood.yml](../.github/workflows/self-release-tail-dogfood.yml) | release | repository | active | V4 Declarative Release Tail Dogfood | — |"
5412
5417
  },
5413
5418
  {
5414
5419
  "id": "fixture:infra-contract-aws-cdk-shaped",
@@ -4,7 +4,7 @@
4
4
  "status": "passed",
5
5
  "summary": {
6
6
  "cliCommandCount": 117,
7
- "workflowCount": 116,
7
+ "workflowCount": 117,
8
8
  "actionCount": 8,
9
9
  "sitePageCount": 86,
10
10
  "docCommandRefCount": 1050,
@@ -4914,6 +4914,17 @@
4914
4914
  "outputs": [],
4915
4915
  "outputCount": 0
4916
4916
  },
4917
+ {
4918
+ "id": "self-release-next-development",
4919
+ "path": ".github/workflows/self-release-next-development.yml",
4920
+ "reusable": false,
4921
+ "inputs": [],
4922
+ "inputCount": 0,
4923
+ "secrets": [],
4924
+ "secretCount": 0,
4925
+ "outputs": [],
4926
+ "outputCount": 0
4927
+ },
4917
4928
  {
4918
4929
  "id": "self-release-npm-dry-run",
4919
4930
  "path": ".github/workflows/self-release-npm-dry-run.yml",
@@ -10977,8 +10988,8 @@
10977
10988
  "workflowRegistryPath": "dist/site/workflow-registry.json",
10978
10989
  "pageRegistryPath": "dist/site/page-registry.json",
10979
10990
  "cliRegistryDigest": "fbc23073bbae240489a2f826b2c26daadc58e704050c5f8df366509f5c5a1c3e",
10980
- "workflowRegistryDigest": "dd6a9caaa7e04097d6ae6c4a0c5a3548e7c6c0ace00efdd2909f9b7c0c9056b2",
10981
- "pageRegistryDigest": "220e121eb5755d5a75c2abcbc0cab623f5afa3be59251dbd5f5336142d4c8c98"
10991
+ "workflowRegistryDigest": "c2211bd7f743a77687654b34c3e29c0031fd640f80556a602d50795b09d4c905",
10992
+ "pageRegistryDigest": "b364becac376349506fff141bbaf1749d6ed14c68ca42435706bec57d5ea1ae0"
10982
10993
  },
10983
10994
  "comparison": {
10984
10995
  "missingCliRegistry": [],
@@ -1971,6 +1971,11 @@
1971
1971
  "signals": [],
1972
1972
  "classified": false
1973
1973
  },
1974
+ {
1975
+ "path": ".github/workflows/self-release-next-development.yml",
1976
+ "signals": [],
1977
+ "classified": false
1978
+ },
1974
1979
  {
1975
1980
  "path": ".github/workflows/self-release-npm-dry-run.yml",
1976
1981
  "signals": [
@@ -2031,5 +2036,5 @@
2031
2036
  "classified": false
2032
2037
  }
2033
2038
  ],
2034
- "registryDigest": "508282f0bd7a505e47e35c390a08b66bc249e72a3f52c81ed72bf8f21cd9f459"
2039
+ "registryDigest": "e6b298f281da2f4bd79d44d4a106dabf8294194d4f68dd28eee13d35eaf05d11"
2035
2040
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-09-05T04:49:38.000Z",
5
- "publishedAt": "2026-09-05T04:49:38.000Z",
4
+ "generatedAt": "2026-09-05T13:36:53.000Z",
5
+ "publishedAt": "2026-09-05T13:36:53.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": "197aae1caff67cb0d02250d82b2d1e962d1a101c",
22
+ "sourceRevision": "70ec70ed62a826c7a6d9c29b61cd416b09b8629f",
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.2-alpha.35",
35
+ "version": "4.0.2-alpha.36",
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-05T04:49:38.000Z",
5
- "publishedAt": "2026-09-05T04:49:38.000Z",
4
+ "generatedAt": "2026-09-05T13:36:53.000Z",
5
+ "publishedAt": "2026-09-05T13:36:53.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": "197aae1caff67cb0d02250d82b2d1e962d1a101c",
22
+ "sourceRevision": "70ec70ed62a826c7a6d9c29b61cd416b09b8629f",
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.2-alpha.35",
40
+ "version": "4.0.2-alpha.36",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -2746,7 +2746,7 @@
2746
2746
  "status": "preview",
2747
2747
  "owner": "buildchain-workflows",
2748
2748
  "maturity": "preview",
2749
- "introducedVersion": "4.0.2-alpha.35",
2749
+ "introducedVersion": "4.0.2-alpha.36",
2750
2750
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2751
2751
  "deprecationReplacement": "",
2752
2752
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -3943,7 +3943,7 @@
3943
3943
  "status": "preview",
3944
3944
  "owner": "buildchain-workflows",
3945
3945
  "maturity": "preview",
3946
- "introducedVersion": "4.0.2-alpha.35",
3946
+ "introducedVersion": "4.0.2-alpha.36",
3947
3947
  "compatibilityPromise": "preserved-through-the-v3-major-line",
3948
3948
  "deprecationReplacement": "",
3949
3949
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -5970,7 +5970,7 @@
5970
5970
  "status": "preview",
5971
5971
  "owner": "buildchain-workflows",
5972
5972
  "maturity": "preview",
5973
- "introducedVersion": "4.0.2-alpha.35",
5973
+ "introducedVersion": "4.0.2-alpha.36",
5974
5974
  "compatibilityPromise": "preserved-through-the-v3-major-line",
5975
5975
  "deprecationReplacement": "",
5976
5976
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -6001,7 +6001,7 @@
6001
6001
  "status": "preview",
6002
6002
  "owner": "buildchain-workflows",
6003
6003
  "maturity": "preview",
6004
- "introducedVersion": "4.0.2-alpha.35",
6004
+ "introducedVersion": "4.0.2-alpha.36",
6005
6005
  "compatibilityPromise": "preserved-through-the-v3-major-line",
6006
6006
  "deprecationReplacement": "",
6007
6007
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -6032,7 +6032,7 @@
6032
6032
  "status": "preview",
6033
6033
  "owner": "buildchain-workflows",
6034
6034
  "maturity": "preview",
6035
- "introducedVersion": "4.0.2-alpha.35",
6035
+ "introducedVersion": "4.0.2-alpha.36",
6036
6036
  "compatibilityPromise": "preserved-through-the-v3-major-line",
6037
6037
  "deprecationReplacement": "",
6038
6038
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -6379,6 +6379,36 @@
6379
6379
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
6380
6380
  "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
6381
6381
  },
6382
+ {
6383
+ "id": "self-release-next-development",
6384
+ "path": ".github/workflows/self-release-next-development.yml",
6385
+ "reusable": false,
6386
+ "inputs": [],
6387
+ "inputCount": 0,
6388
+ "secrets": [],
6389
+ "secretCount": 0,
6390
+ "outputs": [],
6391
+ "outputCount": 0,
6392
+ "taxonomy": {
6393
+ "id": "next-development-review",
6394
+ "role": "self",
6395
+ "category": "release",
6396
+ "purpose": "next-development",
6397
+ "status": "active",
6398
+ "canonicalPath": ".github/workflows/self-release-next-development.yml",
6399
+ "compatibilityAlias": false
6400
+ },
6401
+ "surface": "repository-workflow",
6402
+ "capabilityGroup": "api-cli-reference",
6403
+ "status": "active",
6404
+ "owner": "buildchain-workflows",
6405
+ "maturity": "active",
6406
+ "introducedVersion": "pre-3.0.2-alpha.4",
6407
+ "compatibilityPromise": "preserved-through-the-v3-major-line",
6408
+ "deprecationReplacement": "",
6409
+ "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
6410
+ "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
6411
+ },
6382
6412
  {
6383
6413
  "id": "self-release-npm-dry-run",
6384
6414
  "path": ".github/workflows/self-release-npm-dry-run.yml",
@@ -72,7 +72,7 @@ later generated Dev PR is still pending or its enqueue call fails. SETTLE verifi
72
72
  the immutable invocation, transaction, both provider states, receipt and Passport
73
73
  roots even when APPLY fails after publication. It has no provider write permission.
74
74
 
75
- APPLY retains that exact chain in the existing GitHub Release as
75
+ APPLY retains that exact chain before waiting for next-development in the existing GitHub Release as
76
76
  `buildchain-publication-settlement.json`; it reads the exact tag and original
77
77
  `buildchain.release.json` before adding the packet. The APPLY artifact also retains
78
78
  `delivery-summary.json`, which reports publication and next-development separately.
@@ -98,3 +98,29 @@ The native publication receipt authorizes no stable promotion and makes no claim
98
98
  that a pending next-development PR has merged. Inspect the exact PR head, protected
99
99
  base and merge result independently. A retry of the publication phase must first
100
100
  read retained provider facts and resume only missing operations.
101
+
102
+ ## Automatic next-development review
103
+
104
+ `self-release-next-development.yml` observes a successful exact `Verify` PR run
105
+ for a same-repository `chore/next-development/*` branch. It executes only the
106
+ protected default branch runtime. The PR must have one parent equal to the
107
+ current protected Dev head. The protected generator reconstructs every tracked
108
+ byte, permits only the declared immediate alpha version increment, and verifies
109
+ the completed alpha settlement against the exact tag and original Passport.
110
+ The published source tree must equal the protected development base tree.
111
+
112
+ The verification step receives no approval credential and never executes PR
113
+ code. A separate step uses `BUILDCHAIN_APPROVAL_TOKEN`, verifies that its identity
114
+ is the independent `kungfu-origin` CODEOWNER, rereads the exact PR/run/base, and
115
+ approves only that commit. Existing requests for changes stop automation.
116
+ The exact approval is read back before queue admission with the separate
117
+ `BUILDCHAIN_PROMOTION_TOKEN`. Required checks, CODEOWNER protection and native
118
+ merge-group verification remain enforced. Missing credentials or evidence,
119
+ forks, source changes and base/head drift fail closed.
120
+
121
+ The producer waits for pending independent review and required checks with a
122
+ bounded retry budget. Publication evidence is already durable during this wait,
123
+ so binaries can proceed independently. The reviewer also enqueues the verified
124
+ head idempotently, allowing a producer interruption to leave a recoverable PR.
125
+ An interrupted producer run remains failed; a successful later release is needed
126
+ to establish an uninterrupted end-to-end publication.
@@ -145,6 +145,7 @@ all related declarations. Run `pnpm run generate:workflows` and
145
145
  | [self-release-binary-assets.yml](../.github/workflows/self-release-binary-assets.yml) | release | repository | active | Binary Release Assets | — |
146
146
  | [self-release-line-open.yml](../.github/workflows/self-release-line-open.yml) | release | repository | active | Release Line Bootstrap | — |
147
147
  | [self-release-new-version-compat.yml](../.github/workflows/self-release-new-version-compat.yml) | release | repository | compatibility | Release - New Version | — |
148
+ | [self-release-next-development.yml](../.github/workflows/self-release-next-development.yml) | release | repository | active | Next Development Review | — |
148
149
  | [self-release-npm-dry-run.yml](../.github/workflows/self-release-npm-dry-run.yml) | release | repository | active | Publish npm package | — |
149
150
  | [self-release-promote.yml](../.github/workflows/self-release-promote.yml) | release | repository | active | Buildchain Ref Promotion | — |
150
151
  | [self-release-rehearsal-dogfood.yml](../.github/workflows/self-release-rehearsal-dogfood.yml) | release | repository | active | V4 Publication Rehearsal Dogfood | — |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "4.0.2-alpha.35",
3
+ "version": "4.0.2-alpha.36",
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",
@@ -3,6 +3,7 @@
3
3
  import assert from "node:assert/strict";
4
4
  import crypto from "node:crypto";
5
5
  import fs from "node:fs";
6
+ import ts from "typescript";
6
7
  import { workflowCompatibilityIdentity } from "./workflow-taxonomy.mjs";
7
8
  import path from "node:path";
8
9
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -23,14 +24,34 @@ const LOCAL_MODULE_EXTENSIONS = ["", ".js", ".mjs", ".cjs"];
23
24
  const PRIVILEGED_ENTRYPOINTS = [
24
25
  "actions/v4-release-candidate-promote/index.js",
25
26
  "scripts/binary-publication-evidence.mjs",
27
+ "scripts/next-development-review.mjs",
26
28
  "scripts/v4-publication-settlement.mjs",
27
29
  ];
28
30
 
29
- function localModuleSpecifiers(source) {
31
+ export function localModuleSpecifiers(source) {
30
32
  const specifiers = [];
31
- const expression =
32
- /(?:\bfrom\s+|\bimport\s*\(\s*|\bimport\s+)["'](\.[^"']+)["']/gu;
33
- for (const match of source.matchAll(expression)) specifiers.push(match[1]);
33
+ const visit = (node) => {
34
+ let value;
35
+ if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node))
36
+ value = node.moduleSpecifier;
37
+ else if (
38
+ ts.isCallExpression(node) &&
39
+ node.expression.kind === ts.SyntaxKind.ImportKeyword
40
+ )
41
+ value = node.arguments[0];
42
+ if (value && ts.isStringLiteral(value) && value.text.startsWith("."))
43
+ specifiers.push(value.text);
44
+ ts.forEachChild(node, visit);
45
+ };
46
+ visit(
47
+ ts.createSourceFile(
48
+ "module.mjs",
49
+ source,
50
+ ts.ScriptTarget.Latest,
51
+ true,
52
+ ts.ScriptKind.JS,
53
+ ),
54
+ );
34
55
  return [...new Set(specifiers)].sort();
35
56
  }
36
57
 
@@ -344,7 +365,12 @@ export function findUnknownV4ReleaseTopology(
344
365
  ) {
345
366
  const declared = new Set(workflowPaths);
346
367
  return allWorkflowPaths
347
- .filter((relative) => !declared.has(workflowCompatibilityIdentity(root, relative, readWorkflow(relative))))
368
+ .filter(
369
+ (relative) =>
370
+ !declared.has(
371
+ workflowCompatibilityIdentity(root, relative, readWorkflow(relative)),
372
+ ),
373
+ )
348
374
  .filter((relative) => {
349
375
  const source = readWorkflow(relative);
350
376
  const usesReleaseAuthority = parseYamlUses(source).some(({ value }) =>
@@ -0,0 +1,307 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { execFileSync } from "node:child_process";
4
+ import { pathToFileURL } from "node:url";
5
+ import { verifyVersionStateDelta } from "./verify-version-state-delta.mjs";
6
+ import { readBinaryPublicationEvidence } from "./binary-publication-evidence.mjs";
7
+ import { releaseAssetClient } from "./release-asset-client.mjs";
8
+ import { enqueueNextDevelopmentPullRequest } from "../actions/v4-release-candidate-promote/next-development-queue.js";
9
+
10
+ const REPOSITORY = "kungfu-systems/buildchain";
11
+ const WORKFLOW = ".github/workflows/self-build-verify.yml";
12
+ const REVIEWER = "kungfu-origin";
13
+ const SHA = /^[a-f0-9]{40}$/u;
14
+ const BRANCH =
15
+ /^chore\/next-development\/(4\.\d+\.\d+-alpha\.\d+)-[a-f0-9]{16}$/u;
16
+
17
+ export function assertReviewRun(run, { repository, runId, headSha } = {}) {
18
+ if (
19
+ repository !== REPOSITORY ||
20
+ run.repository?.full_name !== repository ||
21
+ String(run.id) !== String(runId) ||
22
+ run.path !== WORKFLOW ||
23
+ run.name !== "Verify" ||
24
+ run.event !== "pull_request" ||
25
+ run.status !== "completed" ||
26
+ run.conclusion !== "success" ||
27
+ !SHA.test(run.head_sha || "") ||
28
+ !BRANCH.test(run.head_branch || "") ||
29
+ (headSha && run.head_sha !== headSha)
30
+ )
31
+ throw new Error("unqualified next-development verification run");
32
+ }
33
+
34
+ export function assertReviewPull(
35
+ pull,
36
+ { repository, headSha, baseSha, branch },
37
+ ) {
38
+ if (
39
+ repository !== REPOSITORY ||
40
+ pull.head?.repo?.full_name !== repository ||
41
+ pull.base?.repo?.full_name !== repository ||
42
+ pull.head?.sha !== headSha ||
43
+ pull.base?.sha !== baseSha ||
44
+ pull.head?.ref !== branch ||
45
+ !BRANCH.test(branch || "") ||
46
+ !/^dev\/v4\/v4\.\d+$/u.test(pull.base?.ref || "") ||
47
+ pull.state !== "open" ||
48
+ pull.draft ||
49
+ pull.merged_at ||
50
+ !SHA.test(baseSha || "") ||
51
+ !SHA.test(headSha || "") ||
52
+ pull.user?.login === REVIEWER
53
+ )
54
+ throw new Error(
55
+ "next-development review identity or protected base changed",
56
+ );
57
+ }
58
+
59
+ function observe(client, repository, runId, expected = {}) {
60
+ const prefix = `repos/${repository}`;
61
+ const run = client.json(`${prefix}/actions/runs/${runId}`);
62
+ assertReviewRun(run, { repository, runId, headSha: expected.headSha });
63
+ const associated = client.pages(`${prefix}/commits/${run.head_sha}/pulls`);
64
+ const matches = associated.filter(
65
+ (pull) =>
66
+ pull.head?.sha === run.head_sha &&
67
+ pull.head?.ref === run.head_branch &&
68
+ pull.head?.repo?.full_name === repository &&
69
+ pull.state === "open",
70
+ );
71
+ if (matches.length !== 1) throw new Error("ambiguous next-development PR");
72
+ const pull = client.json(`${prefix}/pulls/${matches[0].number}`);
73
+ const baseSha = client.json(`${prefix}/git/ref/heads/${pull.base.ref}`).object
74
+ .sha;
75
+ assertReviewPull(pull, {
76
+ repository,
77
+ headSha: run.head_sha,
78
+ baseSha,
79
+ branch: run.head_branch,
80
+ });
81
+ if (
82
+ expected.baseSha &&
83
+ (baseSha !== expected.baseSha || pull.number !== expected.number)
84
+ )
85
+ throw new Error("next-development review plan became stale");
86
+ const checks = client.pages(
87
+ `${prefix}/actions/runs/${runId}/jobs?filter=latest`,
88
+ "jobs",
89
+ );
90
+ const check = checks.filter((job) => job.name === "check");
91
+ if (
92
+ check.length !== 1 ||
93
+ check[0].status !== "completed" ||
94
+ check[0].conclusion !== "success"
95
+ )
96
+ throw new Error("exact Verify check did not succeed");
97
+ return { run, pull, baseSha };
98
+ }
99
+
100
+ export async function verifyNextDevelopmentReview({
101
+ client,
102
+ repository,
103
+ runId,
104
+ git,
105
+ verifyDelta,
106
+ publication,
107
+ }) {
108
+ const { run, pull, baseSha } = observe(client, repository, runId);
109
+ if (git("rev-parse", "HEAD") !== baseSha)
110
+ throw new Error(
111
+ "review runtime is not the exact protected development base",
112
+ );
113
+ git("fetch", "--no-tags", "origin", run.head_sha);
114
+ const parents = git("show", "-s", "--format=%P", run.head_sha).split(" ");
115
+ if (parents.length !== 1 || parents[0] !== baseSha)
116
+ throw new Error("next-development must have one exact protected parent");
117
+ const projection = verifyDelta({ baseSha, headSha: run.head_sha });
118
+ if (BRANCH.exec(run.head_branch)[1] !== projection.version)
119
+ throw new Error(
120
+ "next-development branch version differs from regenerated version",
121
+ );
122
+ const version = JSON.parse(git("show", `${baseSha}:package.json`)).version;
123
+ const tag = `v${version}`;
124
+ const sourceSha = client.json(`repos/${repository}/commits/${tag}`).sha;
125
+ const settlement = await publication({ repository, tag, sourceSha });
126
+ const publishedTree = settlement.documents.passport.source.treeHash;
127
+ if (publishedTree !== git("rev-parse", `${baseSha}^{tree}`))
128
+ throw new Error("development base is not the completed alpha source tree");
129
+ observe(client, repository, runId, {
130
+ headSha: run.head_sha,
131
+ baseSha,
132
+ number: pull.number,
133
+ });
134
+ return {
135
+ schema: "buildchain.next-development-review/v1",
136
+ repository,
137
+ runId,
138
+ number: pull.number,
139
+ headSha: run.head_sha,
140
+ baseSha,
141
+ branch: run.head_branch,
142
+ publicationReceiptRoot: settlement.documents.receipt.receiptRoot,
143
+ projection,
144
+ };
145
+ }
146
+
147
+ export async function approveNextDevelopment({ client, reviewer, plan }) {
148
+ if (plan.schema !== "buildchain.next-development-review/v1")
149
+ throw new Error("missing verified next-development plan");
150
+ const { pull } = observe(client, plan.repository, plan.runId, plan);
151
+ const identity = reviewer.json("user");
152
+ if (identity.login !== REVIEWER || identity.login === pull.user?.login)
153
+ throw new Error(
154
+ "next-development requires the independent CODEOWNER identity",
155
+ );
156
+ const endpoint = `repos/${plan.repository}/pulls/${plan.number}/reviews`;
157
+ const approved = (review) =>
158
+ review.user?.login === REVIEWER &&
159
+ review.commit_id === plan.headSha &&
160
+ review.state === "APPROVED";
161
+ const reviews = client.pages(endpoint);
162
+ const latest = reviews
163
+ .filter(
164
+ (review) =>
165
+ review.user?.login === REVIEWER &&
166
+ ["APPROVED", "CHANGES_REQUESTED", "DISMISSED"].includes(review.state),
167
+ )
168
+ .at(-1);
169
+ if (latest?.state === "CHANGES_REQUESTED")
170
+ throw new Error(
171
+ "independent reviewer requested changes; automation cannot override it",
172
+ );
173
+ if (!latest || !approved(latest)) {
174
+ observe(client, plan.repository, plan.runId, plan);
175
+ await reviewer.post(endpoint, {
176
+ event: "APPROVE",
177
+ commit_id: plan.headSha,
178
+ body: `Verified the exact version-only transition by regenerating all tracked bytes from protected base ${plan.baseSha}. Completed alpha receipt: ${plan.publicationReceiptRoot}. Verification run: https://github.com/${plan.repository}/actions/runs/${plan.runId}.`,
179
+ });
180
+ }
181
+ observe(client, plan.repository, plan.runId, plan);
182
+ const readback = client.pages(endpoint).filter(approved).at(-1);
183
+ if (!readback)
184
+ throw new Error("independent exact-head approval readback failed");
185
+ return { ...plan, reviewId: readback.id, reviewUrl: readback.html_url };
186
+ }
187
+
188
+ function api(token) {
189
+ const call = (endpoint, args = [], input) =>
190
+ JSON.parse(
191
+ execFileSync("gh", ["api", endpoint, ...args], {
192
+ encoding: "utf8",
193
+ input,
194
+ env: { ...process.env, GH_TOKEN: token },
195
+ maxBuffer: 8 * 1024 * 1024,
196
+ stdio: ["pipe", "pipe", "pipe"],
197
+ }),
198
+ );
199
+ return {
200
+ json: (endpoint) => call(endpoint),
201
+ pages: (endpoint, field) =>
202
+ call(endpoint, ["--paginate", "--slurp"]).flatMap((page) =>
203
+ field ? page[field] : page,
204
+ ),
205
+ post: (endpoint, body) =>
206
+ call(
207
+ endpoint,
208
+ ["--method", "POST", "--input", "-"],
209
+ JSON.stringify(body),
210
+ ),
211
+ };
212
+ }
213
+
214
+ async function main(mode) {
215
+ const repository = process.env.GITHUB_REPOSITORY;
216
+ const runId = process.env.VERIFY_RUN_ID;
217
+ if (!/^\d+$/u.test(runId || "") || repository !== REPOSITORY)
218
+ throw new Error("exact repository and verification run required");
219
+ const client = api(process.env.GH_TOKEN);
220
+ const file = ".buildchain/next-development-review.json";
221
+ if (mode === "verify") {
222
+ if (process.env.BUILDCHAIN_APPROVAL_TOKEN)
223
+ throw new Error("verification must not receive the approval credential");
224
+ const git = (...args) =>
225
+ execFileSync("git", args, {
226
+ encoding: "utf8",
227
+ maxBuffer: 8 * 1024 * 1024,
228
+ stdio: ["ignore", "pipe", "pipe"],
229
+ }).trim();
230
+ const plan = await verifyNextDevelopmentReview({
231
+ client,
232
+ repository,
233
+ runId,
234
+ git,
235
+ verifyDelta: verifyVersionStateDelta,
236
+ publication: (args) =>
237
+ readBinaryPublicationEvidence({
238
+ ...args,
239
+ client: releaseAssetClient(repository),
240
+ attempts: 1,
241
+ }),
242
+ });
243
+ fs.mkdirSync(path.dirname(file), { recursive: true });
244
+ fs.writeFileSync(file, `${JSON.stringify(plan, null, 2)}\n`);
245
+ } else if (mode === "approve") {
246
+ if (!process.env.BUILDCHAIN_APPROVAL_TOKEN)
247
+ throw new Error("independent approval credential missing");
248
+ const plan = JSON.parse(fs.readFileSync(file));
249
+ if (plan.repository !== repository || String(plan.runId) !== runId)
250
+ throw new Error("review plan is from another invocation");
251
+ const result = await approveNextDevelopment({
252
+ client,
253
+ plan,
254
+ reviewer: api(process.env.BUILDCHAIN_APPROVAL_TOKEN),
255
+ });
256
+ fs.writeFileSync(file, `${JSON.stringify(result, null, 2)}\n`);
257
+ console.log(
258
+ JSON.stringify({ reviewId: result.reviewId, headSha: result.headSha }),
259
+ );
260
+ } else if (mode === "enqueue") {
261
+ const plan = JSON.parse(fs.readFileSync(file));
262
+ if (
263
+ plan.repository !== repository ||
264
+ String(plan.runId) !== runId ||
265
+ !plan.reviewId
266
+ )
267
+ throw new Error(
268
+ "exact independent review readback required before enqueue",
269
+ );
270
+ const { pull } = observe(client, repository, runId, plan);
271
+ const reviews = client.pages(
272
+ `repos/${repository}/pulls/${plan.number}/reviews`,
273
+ );
274
+ if (
275
+ !reviews.some(
276
+ (review) =>
277
+ review.id === plan.reviewId &&
278
+ review.user?.login === REVIEWER &&
279
+ review.commit_id === plan.headSha &&
280
+ review.state === "APPROVED",
281
+ )
282
+ )
283
+ throw new Error("independent approval no longer qualifies enqueue");
284
+ await enqueueNextDevelopmentPullRequest({
285
+ pull,
286
+ headSha: plan.headSha,
287
+ mutationOctokit: {
288
+ graphql: async (query, variables) => {
289
+ const result = client.post("graphql", { query, variables });
290
+ if (result.errors?.length)
291
+ throw new Error(
292
+ result.errors.map((error) => error.message).join("; "),
293
+ );
294
+ return result.data;
295
+ },
296
+ },
297
+ wait: (delay) => new Promise((resolve) => setTimeout(resolve, delay)),
298
+ maxPolls: 20,
299
+ });
300
+ } else throw new Error("expected verify, approve or enqueue");
301
+ }
302
+
303
+ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
304
+ main(process.argv[2]).catch((error) => {
305
+ console.error(error.message);
306
+ process.exitCode = 1;
307
+ });
@@ -8,7 +8,7 @@ import {
8
8
 
9
9
  export function releaseAssetClient(
10
10
  repository,
11
- { execute = execFileSync } = {},
11
+ { execute = execFileSync, token } = {},
12
12
  ) {
13
13
  if (!/^[\w.-]+\/[\w.-]+$/u.test(repository))
14
14
  throw new Error("exact repository required");
@@ -17,6 +17,7 @@ export function releaseAssetClient(
17
17
  execute("gh", ["api", endpoint, ...args], {
18
18
  maxBuffer: 128 * 1024 * 1024,
19
19
  stdio: ["ignore", "pipe", "pipe"],
20
+ ...(token ? { env: { ...process.env, GH_TOKEN: token } } : {}),
20
21
  });
21
22
  const json = (endpoint) => JSON.parse(raw(endpoint));
22
23
  const assetBytes = (asset) =>
@@ -200,7 +200,11 @@ async function main() {
200
200
  );
201
201
  }
202
202
 
203
- if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
203
+ if (
204
+ process.argv[1] &&
205
+ path.basename(process.argv[1]) === "v4-publication-settlement.mjs" &&
206
+ import.meta.url === pathToFileURL(process.argv[1]).href
207
+ )
204
208
  main().catch((error) => {
205
209
  console.error(error.message);
206
210
  process.exitCode = 1;