@kungfu-tech/buildchain 4.0.2-alpha.5 → 4.0.2-alpha.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/AGENTS.md +10 -1
  2. package/CONTRIBUTING.md +24 -0
  3. package/README.md +2 -2
  4. package/actions/promote-buildchain-ref/README.md +1 -1
  5. package/actions/v4-release-candidate-promote/README.md +28 -0
  6. package/architecture/agent-change-map.md +70 -9
  7. package/architecture/ci-lane-change-budget.json +384 -0
  8. package/architecture/internal-capabilities.json +56 -9
  9. package/architecture/maintainability-debt.json +162 -107
  10. package/architecture/maintainability-policy.json +34 -30
  11. package/architecture/release-tail-contract-inventory.json +6 -6
  12. package/architecture/v4-architecture-constitution.md +23 -20
  13. package/architecture/v4-cross-platform-adopter-qualification.json +1 -1
  14. package/architecture/v4-delivery-authority-parity.json +2 -2
  15. package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.json +1 -1
  16. package/architecture/v4-floating-consumer-policy.json +2 -2
  17. package/architecture/v4-next-development-parity.json +5 -5
  18. package/architecture/v4-partial-mutation-recovery-qualification.json +4 -1
  19. package/architecture/v4-platform-stage-checkpoints.json +1 -1
  20. package/architecture/v4-provider-operation-journal-contract.json +5 -2
  21. package/architecture/v4-publication-facade-patches.json +64 -0
  22. package/architecture/v4-release-activation-shadow-domain.json +5 -2
  23. package/architecture/v4-release-topology.json +198 -38
  24. package/architecture/v4-rust-wasm-production-authority.json +58 -0
  25. package/architecture/v4-stable-publication-fence.json +5 -2
  26. package/architecture/v4-stage-capsule-qualification.json +2 -2
  27. package/architecture/v4-tail-reseal-parity.json +8 -6
  28. package/architecture/v4-universal-workflow-bootstrap.json +176 -0
  29. package/architecture/v4-universal-workflow-fault-campaign.json +72 -0
  30. package/architecture/v4-universal-workflow-train-admission.json +40 -0
  31. package/architecture/workflow-taxonomy.json +1462 -0
  32. package/bin/buildchain.mjs +7 -7
  33. package/contracts/buildchain-v2-residuals-v1.json +57 -48
  34. package/contracts/dev-delivery-authority-v2.schema.json +16 -2
  35. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  36. package/contracts/v4-canonical-contracts-v1.schema.json +1 -0
  37. package/dist/site/buildchain-contract.json +93 -48
  38. package/dist/site/buildchain-site.json +276 -72
  39. package/dist/site/capability-registry.json +5 -5
  40. package/dist/site/controller-registry.json +50 -13
  41. package/dist/site/kfd-claims.json +2610 -983
  42. package/dist/site/kfd-upstream-aggregate.json +1 -1
  43. package/dist/site/manual-registry.json +14 -14
  44. package/dist/site/node-api-registry.json +273 -127
  45. package/dist/site/page-registry.json +257 -53
  46. package/dist/site/public-surface-audit.json +3239 -1232
  47. package/dist/site/publication-authority-registry.json +1135 -363
  48. package/dist/site/publication-registry.json +4 -4
  49. package/dist/site/release-provenance.json +2 -1
  50. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +16 -2
  51. package/dist/site/site-manifest.json +18 -18
  52. package/dist/site/workflow-registry.json +5097 -1659
  53. package/docs/MAP.md +2 -0
  54. package/docs/auditable-demo.md +1 -1
  55. package/docs/cli.md +21 -8
  56. package/docs/dev-delivery-warrant.md +1 -1
  57. package/docs/engineering-housekeeper.md +3 -3
  58. package/docs/kfd-support.md +26 -2
  59. package/docs/next-development-transition.md +2 -2
  60. package/docs/node-api-reference.md +216 -205
  61. package/docs/oci-publication.md +160 -0
  62. package/docs/publication-authority.md +2 -2
  63. package/docs/publish-transaction.md +36 -3
  64. package/docs/release-candidate.md +3 -3
  65. package/docs/release-flow.md +67 -19
  66. package/docs/release-governance.md +8 -8
  67. package/docs/release-passport.md +27 -2
  68. package/docs/reusable-build-surface.md +16 -0
  69. package/docs/v4-adopter-delivery.md +2 -2
  70. package/docs/v4-production-release.md +71 -8
  71. package/docs/v4-rust-wasm-production-authority.md +58 -0
  72. package/docs/v4-stage-capsule.md +2 -2
  73. package/docs/v4-tail-reseal.md +1 -1
  74. package/docs/workflow-catalog.md +155 -0
  75. package/docs/workflow-path-migration.md +109 -0
  76. package/package.json +12 -7
  77. package/packages/core/artifact-verification-envelope.js +5 -5
  78. package/packages/core/buildchain-contract.js +1 -1
  79. package/packages/core/buildchain-kfd-claims.js +2 -2
  80. package/packages/core/buildchain-publication-authority.js +43 -26
  81. package/packages/core/buildchain-v4-domain.wasm +0 -0
  82. package/packages/core/ci-lane-change-budget.js +14 -1
  83. package/packages/core/controller-evidence.js +4 -1
  84. package/packages/core/dev-delivery-candidate-identity.js +40 -6
  85. package/packages/core/dev-delivery-warrant-state.js +3 -4
  86. package/packages/core/dev-delivery-warrant.js +12 -2
  87. package/packages/core/github-governance-authority.js +4 -4
  88. package/packages/core/kfd-adopter-manifest.js +46 -47
  89. package/packages/core/next-development-projection.js +2 -2
  90. package/packages/core/next-development-transition.js +5 -6
  91. package/packages/core/oci-compose-qualification.js +140 -0
  92. package/packages/core/oci-publication-bundle.js +281 -0
  93. package/packages/core/oci-publication-graph.js +206 -0
  94. package/packages/core/paper-agent-entry.js +30 -4
  95. package/packages/core/paper-fleet.js +1 -1
  96. package/packages/core/paper-runtime-channels.js +348 -0
  97. package/packages/core/paper-scaffold-content.js +10 -0
  98. package/packages/core/paper.js +37 -71
  99. package/packages/core/publication-sealed-bundle.js +78 -13
  100. package/packages/core/release-line-dry-run.js +1 -1
  101. package/packages/core/release-passport-contract.js +5 -5
  102. package/packages/core/release-passport.js +5 -4
  103. package/packages/core/release-tail-product-capabilities.js +38 -0
  104. package/packages/core/release-tail-provider-plane.js +68 -1048
  105. package/packages/core/v4-canonical-contracts.js +15 -75
  106. package/packages/core/v4-domain-wasm-artifact.js +7 -0
  107. package/packages/core/v4-domain-wasm.js +216 -0
  108. package/packages/core/v4-floating-consumer-evidence.js +1 -1
  109. package/packages/core/v4-floating-consumer-policy.js +1 -1
  110. package/packages/core/v4-partial-mutation-recovery-qualification.js +9 -386
  111. package/packages/core/v4-product-publication.js +59 -0
  112. package/packages/core/v4-protected-publication-source.js +19 -21
  113. package/packages/core/v4-provider-operation-journal.js +18 -487
  114. package/packages/core/v4-provider-readback-idempotency.js +12 -97
  115. package/packages/core/v4-release-activation-shadow.js +13 -500
  116. package/packages/core/v4-release-invocation.js +28 -389
  117. package/packages/core/v4-stable-publication-fence.js +13 -342
  118. package/packages/core/v4-universal-workflow-bootstrap.js +586 -0
  119. package/scripts/binary-publication-evidence.mjs +135 -0
  120. package/scripts/build-contract-core.mjs +1 -14
  121. package/scripts/build-v4-domain-wasm.mjs +189 -0
  122. package/scripts/check-action-bundles.mjs +12 -2
  123. package/scripts/check-ci-lane-change-budget.mjs +4 -1
  124. package/scripts/check-core-mechanism-inventory.mjs +4 -3
  125. package/scripts/check-inventory.mjs +35 -44
  126. package/scripts/check-maintainability.mjs +16 -113
  127. package/scripts/check-v4-floating-consumer-policy-contract.mjs +2 -2
  128. package/scripts/check-v4-public-dogfood-contract.mjs +22 -9
  129. package/scripts/check-v4-release-topology.mjs +236 -50
  130. package/scripts/check-v4-runtime-semantic-closure.mjs +4 -1
  131. package/scripts/check-v4-universal-workflow-bootstrap.mjs +266 -0
  132. package/scripts/check-workflow-taxonomy.mjs +6 -0
  133. package/scripts/copy-v4-domain-wasm.mjs +14 -0
  134. package/scripts/dev-delivery-authority-command-adapters.mjs +1 -1
  135. package/scripts/dev-delivery-authority.mjs +8 -8
  136. package/scripts/dev-delivery-source-proof-reuse.mjs +2 -1
  137. package/scripts/dev-delivery-warrant-options.mjs +14 -9
  138. package/scripts/dev-delivery-warrant-store.mjs +73 -7
  139. package/scripts/dev-delivery-warrant-transition.mjs +109 -0
  140. package/scripts/dev-delivery-warrant.mjs +76 -99
  141. package/scripts/dev-pr-auto-merge.mjs +15 -15
  142. package/scripts/generate-channel-build-workflow.mjs +7 -2
  143. package/scripts/generate-channel-promotion-workflow.mjs +10 -25
  144. package/scripts/generate-site-bundle.mjs +11 -11
  145. package/scripts/generate-v4-universal-workflow-facades.mjs +497 -0
  146. package/scripts/generate-workflow-taxonomy.mjs +25 -0
  147. package/scripts/github-output.mjs +31 -0
  148. package/scripts/maintainability-metrics.mjs +16 -5
  149. package/scripts/maintainability-public-surface.mjs +115 -0
  150. package/scripts/next-development-review.mjs +307 -0
  151. package/scripts/oci-compose-preview.mjs +250 -0
  152. package/scripts/paper-work-fleet-cli.mjs +2 -0
  153. package/scripts/publication-candidate-kind.mjs +93 -0
  154. package/scripts/publication-candidate-sealer.mjs +16 -1
  155. package/scripts/release-asset-client.mjs +91 -0
  156. package/scripts/release-candidate-resolver.mjs +23 -35
  157. package/scripts/resume-from-candidate-run.mjs +11 -18
  158. package/scripts/site-capability-metadata.mjs +1 -0
  159. package/scripts/source-verification-evidence.mjs +344 -0
  160. package/scripts/stable-candidate-qualification.mjs +1 -1
  161. package/scripts/universal-facade-maintainability.mjs +91 -0
  162. package/scripts/v4-product-publication-intent.mjs +129 -0
  163. package/scripts/v4-publication-settlement.mjs +211 -0
  164. package/scripts/v4-universal-workflow-backflow.mjs +212 -0
  165. package/scripts/v4-universal-workflow-engine.mjs +620 -0
  166. package/scripts/v4-universal-workflow-self-dogfood.mjs +205 -0
  167. package/scripts/verify-version-state-delta.mjs +173 -0
  168. package/scripts/workflow-taxonomy.mjs +507 -0
  169. package/templates/native-dev-delivery.yml +4 -7
  170. package/templates/universal-buildchain-bootstrap-recovery.yml +282 -0
  171. package/templates/universal-buildchain-bootstrap.yml +28 -0
@@ -13,10 +13,10 @@
13
13
  "rationale": "Preserve the accepted 66,712 governance ledger at the exact protected Wave 4 cut while charging every subsequent source, Rust, test, and workflow line, function, job, step, and decision excess one-for-one. The fixed calibration offset cannot hide new debt because both the measured ledger and calibrated total are recomputed from the complete exact debt map."
14
14
  },
15
15
  "exceptionBudget": {
16
- "maxTotal": 94,
16
+ "maxTotal": 95,
17
17
  "maxByCollection": {
18
18
  "approvedExistingDebtTransitions": 19,
19
- "approvedNewFileTransitions": 21,
19
+ "approvedNewFileTransitions": 22,
20
20
  "approvedExtractedDebt": 20,
21
21
  "approvedPublicSurfaceTransitions": 19,
22
22
  "approvedTestDebtTransitions": 9,
@@ -25,13 +25,13 @@
25
25
  "rationale": "Wave 4 freezes both the aggregate exception inventory and every exception class at the exact protected baseline; reductions may ratchet these ceilings downward, but entries cannot be moved between classes to create hidden headroom."
26
26
  },
27
27
  "repositoryBudgets": {
28
- "baselineRevision": "858dbe00b6206a8f356b4a12d2659bee7a72e71b",
29
- "maxHandMaintainedSourceFiles": 448,
30
- "maxHandMaintainedSourceLines": 165760,
31
- "maxWorkflowFiles": 77,
28
+ "baselineRevision": "9569f69c2cb609372b8a3d65ce5dec8fb7b34a84",
29
+ "maxHandMaintainedSourceFiles": 493,
30
+ "maxHandMaintainedSourceLines": 174638,
31
+ "maxWorkflowFiles": 80,
32
32
  "maxWorkflowLines": 26791,
33
- "latestTransition": "Legacy queued native candidates are quarantined from exact Warrant selection and heartbeat authority.",
34
- "latestTransitionRationale": "One bounded compatibility seam preserves immutable legacy queued evidence while excluding incomplete native candidates from ranking. New submissions and every selected, proving, waiting, blocked, or qualified native candidate still require the exact environment and command contract; a valid resubmission can repair the queued record without rewriting history, and a current exact Warrant heartbeat remains independent from incompatible followers.",
33
+ "latestTransition": "Verify bounded OCI embedded descriptor content without rewriting manifests.",
34
+ "latestTransitionRationale": "Charge six measured net production source lines for canonical embedded-content equality against the existing size- and digest-verified local blob, capped at 1 MiB. Reuse existing descriptor traversal and publication paths; split regression fixtures without increasing file, function, complexity, debt or exception limits. Require independent governance review and positive/negative OCI publication tests.",
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
  },
@@ -127,11 +127,9 @@
127
127
  "rationale": "The bounded GitHub engine keeps complete pagination, repository-wide protected-mainline discovery, one batched closed-PR inventory, exact association-only target selection, and fixed eight-way ancestry concurrency. Unassociated heads are retained without fallback comparisons; exact source and target revalidation, stale-PR labeling, provider receipts, and replay behavior remain in one public provider surface. This exact reviewed ceiling cannot grow implicitly.",
128
128
  "governance": "legacy-debt-sunset-2026q4"
129
129
  },
130
- "packages/core/release-tail-provider-plane.js": {
131
- "maxLines": 1228,
132
- "maxFunctionLines": 255,
133
- "maxFunctionComplexity": 33,
134
- "rationale": "The one versioned transaction authority keeps strict declaration normalization, deterministic effect planning, atomic checkpoints, rooted observations and receipts, and bounded recovery in one independently tested audit surface; this exact preview ceiling cannot grow implicitly.",
130
+ "crates/buildchain-v4-contracts/src/release_tail.rs": {
131
+ "maxLines": 1397,
132
+ "rationale": "The single provider-neutral Rust release-tail authority replaces the retired 1,228-line JavaScript state machine and keeps strict declaration normalization, deterministic effect planning, rooted observations and receipts, and bounded retry/readback transitions behind the checked WASM ABI. Node retains only provider effects; this exact Rust ceiling cannot grow implicitly.",
135
133
  "governance": "legacy-debt-sunset-2026q4"
136
134
  },
137
135
  "packages/core/v4-runtime-ref-resume-authority.js": {
@@ -144,6 +142,11 @@
144
142
  "rationale": "The isolated source scanner rejects persisted exact, train, authority, variable, secret, and environment selector authority while inventorying OIDC, IAM, and external authority metadata without reading credentials; this exact ceiling cannot grow implicitly.",
145
143
  "governance": "legacy-debt-sunset-2026q4"
146
144
  },
145
+ "scripts/v4-universal-workflow-engine.mjs": {
146
+ "maxLines": 620,
147
+ "rationale": "The exact candidate engine adds only a fail-closed OIDC preflight and a fixed npm 11.13.0 trusted-publishing shim under the already admitted ephemeral runtime path. This lets a reviewed Train candidate execute through an older floating Alpha Bootstrap shell without broadening capability, permission, provider, or mutation authority; this exact live-repair ceiling cannot grow implicitly.",
148
+ "governance": "legacy-debt-sunset-2026q4"
149
+ },
147
150
  "scripts/resume-from-candidate-run.mjs": {
148
151
  "maxLines": 1125,
149
152
  "rationale": "The candidate recovery adapter retains the existing artifact normalization and immutable recovery receipt boundary while adding fresh authorized cross-runtime Stage Capsule resume material, post-publication ref, tag, ancestry, and npm readback, and rooted Release Passport lineage. Its main orchestration remains below the default function length and complexity limits, and this exact file ceiling cannot grow implicitly.",
@@ -210,8 +213,8 @@
210
213
  "governance": "legacy-debt-sunset-2026q4"
211
214
  },
212
215
  "scripts/release-candidate-resolver.mjs": {
213
- "maxLines": 854,
214
- "maxFunctionLines": 309,
216
+ "maxLines": 853,
217
+ "maxFunctionLines": 308,
215
218
  "maxFunctionComplexity": 61,
216
219
  "rationale": "The shared candidate resolver retains bounded archive streaming, payload size and sha256 validation while locating and validating candidate-bound Stage Capsule and publication qualification evidence. Exact publication version selection now prefers the sealed npm bundle without widening the orchestration function, and these lower exact ceilings cannot grow implicitly.",
217
220
  "governance": "legacy-debt-sunset-2026q4"
@@ -1649,25 +1652,26 @@
1649
1652
  "rationale": "The validator adds one conjunctive terminal assertion that separates retained v3 comparison evidence from the live v4 writer and retired migration phase. This exact reviewed ceiling cannot grow implicitly.",
1650
1653
  "governance": "legacy-debt-sunset-2026q4"
1651
1654
  },
1652
- "packages/core/release-tail-provider-plane.js#normalizeCapability": {
1653
- "maxLines": 255,
1654
- "rationale": "The frozen capability normalizer keeps the four closed-world provider declarations, identity constraints and capability-specific target validation in one audited authority; this reviewed v3 implementation is forward-ported byte-for-byte and cannot grow implicitly.",
1655
+ "crates/buildchain-v4-contracts/src/product_publication.rs#select_product_publication_intent": {
1656
+ "maxComplexity": 38,
1657
+ "rationale": "The Rust publication selector jointly validates the closed channel, source, artifact, semantic-version, recovery, and observed-version coordinates before rooting one immutable intent. This exact complexity replaces the prior JavaScript decision tree and cannot grow implicitly.",
1655
1658
  "governance": "legacy-debt-sunset-2026q4"
1656
1659
  },
1657
- "packages/core/release-tail-provider-plane.js#validateReleaseTailEffectPlan": {
1658
- "maxComplexity": 30,
1659
- "rationale": "The rooted effect-plan validator preserves the reviewed v3 ordering, declaration binding and post-compilation tamper checks in one fail-closed function; this exact complexity ceiling cannot grow implicitly.",
1660
+ "crates/buildchain-v4-contracts/src/release_tail.rs#normalize_capability": {
1661
+ "maxLines": 245,
1662
+ "maxComplexity": 51,
1663
+ "rationale": "The Rust normalizer keeps the closed capability registry, exact fields, regex tag binding, operation identity, idempotency, retry, and evidence validation in one fail-closed audit surface. It replaces the retired JavaScript normalizer and this exact ceiling cannot grow implicitly.",
1660
1664
  "governance": "legacy-debt-sunset-2026q4"
1661
1665
  },
1662
- "packages/core/release-tail-provider-plane.js#validateReleaseTailTransaction": {
1663
- "maxComplexity": 33,
1664
- "rationale": "The transaction validator preserves the reviewed v3 state, observation, receipt, failure and checkpoint invariants in one audit surface; this exact complexity ceiling cannot grow implicitly.",
1666
+ "crates/buildchain-v4-contracts/src/release_tail.rs#advance_release_tail_execution": {
1667
+ "maxLines": 193,
1668
+ "rationale": "The Rust transition dispatcher owns the bounded readback-before-mutation, apply, reconciliation, retry exhaustion, terminal fault, and next-operation decisions. It performs no provider effect and this exact line ceiling cannot grow implicitly.",
1665
1669
  "governance": "legacy-debt-sunset-2026q4"
1666
1670
  },
1667
- "packages/core/release-tail-provider-plane.js#executeReleaseTailTransaction": {
1668
- "maxLines": 190,
1669
- "maxComplexity": 27,
1670
- "rationale": "The single transaction executor preserves bounded retry, pre-effect and post-effect readback, atomic checkpoints and provider non-authority from the reviewed v3 implementation; these exact ceilings cannot grow implicitly.",
1671
+ "crates/buildchain-v4-contracts/src/wasm.rs#dispatch": {
1672
+ "maxLines": 214,
1673
+ "maxComplexity": 64,
1674
+ "rationale": "The closed WASM ABI dispatcher maps a fixed operation vocabulary onto existing Rust domain functions and typed faults without adding provider, IO, credential, or fallback authority. This exact routing-only ceiling cannot grow implicitly.",
1671
1675
  "governance": "legacy-debt-sunset-2026q4"
1672
1676
  },
1673
1677
  "actions/promote-buildchain-ref/internal/promotion-operations.js#updateBranch": {
@@ -1851,8 +1855,8 @@
1851
1855
  "governance": "stage1-test-split-net-reduction"
1852
1856
  },
1853
1857
  "tests/dev-delivery-warrant-command.test.mjs": {
1854
- "maxLines": 626,
1855
- "rationale": "Twelve exact workflow assertions bind the newly public successor-wake output and fail closed unless the terminal controller dispatches only a successful non-null rooted wake. The existing command-store and provider fixtures remain unchanged, and this exact 626-line ceiling cannot grow implicitly.",
1858
+ "maxLines": 624,
1859
+ "rationale": "Exact command-store assertions cover raw GitHub media reads and JSON-envelope fallback for persisted Dev Delivery state. The test surface has reduced to an exact 624-line ceiling and cannot grow implicitly.",
1856
1860
  "governance": "legacy-debt-sunset-2026q4"
1857
1861
  },
1858
1862
  "tests/build-surface-reusable-build.test.mjs": {
@@ -427,7 +427,7 @@
427
427
  "repository": "kungfu-systems/buildchain",
428
428
  "sourceCommit": "7c8956e8babb521d3e743d40108f115a59a40427",
429
429
  "sourceTree": "7e24ca6bafe98b571d94c3bcf07a9d38b31092c5",
430
- "workflow": ".github/workflows/buildchain-ref-promotion.yml",
430
+ "workflow": ".github/workflows/self-release-promote.yml",
431
431
  "runtimeRef": "local exact checkout",
432
432
  "executableSurfaceIds": []
433
433
  },
@@ -454,7 +454,7 @@
454
454
  "repository": "kungfu-systems/kungfu",
455
455
  "sourceCommit": "445ec32d6bf53dd5ff502d685792406ad38dd4f5",
456
456
  "sourceTree": "4963b2f9deb0245f7277cea7224ab0d062a0cc54",
457
- "workflow": ".github/workflows/release-new-version.yml",
457
+ "workflow": ".github/workflows/self-release-new-version-compat.yml",
458
458
  "runtimeRef": "train/v3/v3.0/resume-candidate-run",
459
459
  "executableSurfaceIds": [
460
460
  "publication-admission-commands",
@@ -470,7 +470,7 @@
470
470
  "repository": "kungfu-systems/libnode",
471
471
  "sourceCommit": "4bef69b88a441f22024fa9f3d7bfd76a89963e8a",
472
472
  "sourceTree": "6c4dec7fd70cbdcfbc9ada19e66271654eb393af",
473
- "workflow": ".github/workflows/release-new-version.yml",
473
+ "workflow": ".github/workflows/self-release-new-version-compat.yml",
474
474
  "runtimeRef": "v3-alpha",
475
475
  "executableSurfaceIds": ["release-passport-producer-commands"]
476
476
  },
@@ -479,7 +479,7 @@
479
479
  "repository": "kungfu-systems/kfd",
480
480
  "sourceCommit": "e82fe11acecdbebfd0c42778c7a1bd6fdc54ab81",
481
481
  "sourceTree": "fe0ad4f4b98889c7c246fe16958e118ff79b193b",
482
- "workflow": ".github/workflows/buildchain-ref-promotion.yml",
482
+ "workflow": ".github/workflows/self-release-promote.yml",
483
483
  "runtimeRef": "v3-alpha",
484
484
  "executableSurfaceIds": []
485
485
  },
@@ -488,7 +488,7 @@
488
488
  "repository": "kungfu-systems/paper-kungfu-product-white-paper",
489
489
  "sourceCommit": "82dd748d6b0edf18d0074262cc8d8ac803e45c7e",
490
490
  "sourceTree": "a918f8840608931fdf88d007e20bc4f70ab7eb54",
491
- "workflow": ".github/workflows/buildchain-ref-promotion.yml",
491
+ "workflow": ".github/workflows/self-release-promote.yml",
492
492
  "runtimeRef": "v3",
493
493
  "executableSurfaceIds": []
494
494
  }
@@ -497,7 +497,7 @@
497
497
  {
498
498
  "repository": "kungfu-systems/agent-hub-demo",
499
499
  "sourceCommit": "633111450867919d5063298308cdbfcbd77a8d2e",
500
- "workflow": ".github/workflows/buildchain-ref-promotion.yml",
500
+ "workflow": ".github/workflows/self-release-promote.yml",
501
501
  "runtimeRef": "v2",
502
502
  "reason": "outside the Buildchain v3 contract inventory"
503
503
  }
@@ -43,8 +43,8 @@ ledger.
43
43
  Dependencies point inward only:
44
44
 
45
45
  ```text
46
- workflows -> TypeScript adapters -> libnode host -> Rust domain -> contracts
47
- legacy compatibility -> TypeScript adapters / contracts
46
+ workflows -> Node provider/IO adapters -> tracked Rust/WASM domain -> contracts
47
+ legacy compatibility -> Node facades / contracts
48
48
  ```
49
49
 
50
50
  Contracts contain serialization and compatibility facts, not provider SDK
@@ -55,12 +55,12 @@ or Rust domain are hard-zero violations. Cycles are forbidden.
55
55
  ## 3. Single-writer rule
56
56
 
57
57
  Every state machine has exactly one authoritative writer. The v4 cutover marks
58
- the TypeScript v4 control and provider plane authoritative and the legacy v3
59
- writer retired. Rust v4 owns the deterministic release-activation, journal,
60
- stable-fence, and recovery domain semantics while the TypeScript v4 adapter
61
- remains byte-equivalent at that boundary. A second writer, permanent dual
62
- write, cross-machine mutable file, or implicit compatibility authority has a
63
- hard-zero budget.
58
+ the Rust/WASM domain authoritative and the legacy v3 and duplicate TypeScript
59
+ semantic writers retired. Node owns provider and IO effects and exposes
60
+ compatibility facades, but every deterministic release plan, fold, root, retry,
61
+ and receipt decision crosses the checked WASM ABI. A second writer, permanent
62
+ dual write, semantic fallback, cross-machine mutable file, or implicit
63
+ compatibility authority has a hard-zero budget.
64
64
 
65
65
  ## 4. Explicit complexity budgets
66
66
 
@@ -85,10 +85,14 @@ second hand-maintained architecture list is authoritative.
85
85
  ## 6. Production cutover boundary
86
86
 
87
87
  The v4 line owns Delivery Warrant, Release Transaction, activation,
88
- publication, propagation, and release-tail state. This does not introduce a
89
- daemon, a service database, provider SDKs in contracts or Rust domain code, or
90
- a second writer. The retained `release/v3/v3.0` coordinate is rollback evidence
91
- only and cannot regain production authority without a new reviewed cutover.
88
+ publication, propagation, and release-tail state. Its production domain is the
89
+ tracked artifact governed by
90
+ [`v4-rust-wasm-production-authority.json`](v4-rust-wasm-production-authority.json):
91
+ Node verifies the artifact digest and ABI before use and fails closed without a
92
+ JavaScript semantic fallback. This does not introduce a daemon, a service
93
+ database, provider SDKs in contracts or Rust domain code, or a second writer.
94
+ The retained `release/v3/v3.0` coordinate is rollback evidence only and cannot
95
+ regain production authority without a new reviewed cutover.
92
96
 
93
97
  ## 7. Wave 0 host boundary
94
98
 
@@ -133,9 +137,8 @@ The executable provider operation journal contract is
133
137
  [`v4-provider-operation-journal-contract.json`](v4-provider-operation-journal-contract.json).
134
138
  It freezes one closed schema authority and one Rust v4 state-fold authority
135
139
  for append-only intent, attempt, rooted observation, confirmation, and
136
- reconciliation records. The TypeScript v4 plane performs provider adaptation
137
- and conformance projection against the same fixtures; v4 is the sole
138
- production writer.
140
+ reconciliation records. The Node v4 plane performs provider adaptation and
141
+ calls the tracked Rust/WASM authority; it contains no second state fold.
139
142
 
140
143
  Logical operation identity excludes attempt ordinals and mutable provider or
141
144
  runner facts. Every retry preserves `operationRoot`, while every attempt and
@@ -161,9 +164,9 @@ The executable release activation boundary is
161
164
  [`v4-release-activation-shadow-domain.json`](v4-release-activation-shadow-domain.json).
162
165
  It consumes an explicit qualification root, dependency graph, compensation
163
166
  boundaries, provider-operation identities, and append-only journal facts to
164
- derive one deterministic activation plan and resume state. Rust is the sole v4
165
- plan-and-fold authority; TypeScript must remain byte-equivalent against
166
- the same closed schema and fixture.
167
+ derive one deterministic activation plan and resume state. Rust/WASM is the
168
+ sole v4 plan-and-fold authority; the Node facade delegates through the checked
169
+ ABI and retains only provider adaptation.
167
170
 
168
171
  Confirmed operations are never eligible for replay. Attempting, observed, and
169
172
  confirmable operations require provider-neutral readback before any retry,
@@ -203,8 +206,8 @@ Every nonterminal operation maps deterministically to `retry`, `wait`,
203
206
  `terminal-noop` facts and never re-enter the next-operation set. Missing,
204
207
  expired, corrupt, conflicting, cross-boundary, or attempt-budget-exhausted
205
208
  evidence fails closed at an exact Stage Capsule or provider-operation
206
- checkpoint. The Rust domain is the sole v4 planner and TypeScript is a
207
- byte-equivalent projection. Both are pure: they perform zero provider,
209
+ checkpoint. The Rust/WASM domain is the sole v4 planner and the Node facade
210
+ delegates to it. The planner is pure: it performs zero provider,
208
211
  filesystem, network, credential, ref, package, image, or release mutation.
209
212
  Their exact plan is the only recovery authority consumed by the TypeScript v4
210
213
  provider adapter.
@@ -4,7 +4,7 @@
4
4
  "inventoryAuthority": "architecture/v3-v4-live-capability-inventory.json",
5
5
  "implementation": "packages/core/v4-cross-platform-adopter-qualification.js",
6
6
  "runner": "scripts/v4-cross-platform-adopter-qualification.mjs",
7
- "publicWorkflow": ".github/workflows/v4-adopter-delivery.yml",
7
+ "publicWorkflow": ".github/workflows/public-build-adopter-qualification.yml",
8
8
  "sourceBinding": {
9
9
  "runtime": "job.workflow_sha",
10
10
  "consumer": "exact checked-out consumer commit",
@@ -227,7 +227,7 @@
227
227
  "docs/dev-delivery-warrant.md",
228
228
  "docs/dev-delivery-qualification-landing-adr.md",
229
229
  "templates/native-dev-delivery.yml",
230
- ".github/workflows/buildchain-dev-delivery.yml",
230
+ ".github/workflows/self-ops-dev-delivery.yml",
231
231
  ".buildchain/contract-lock.json",
232
232
  ".buildchain/alpha-contract-lock.json"
233
233
  ],
@@ -246,5 +246,5 @@
246
246
  "verificationEvidence": []
247
247
  }
248
248
  ],
249
- "matrixRoot": "sha256:5be5abf70b982374f32a1400d4ec7c830017a0473d03165e831a506c94c8b881"
249
+ "matrixRoot": "sha256:85fc624f09abb2014601a9857dbcd07a59750b6dd6d77ab240ed037d3169ac69"
250
250
  }
@@ -9,7 +9,7 @@
9
9
  "legacyCore": "packages/core/dev-delivery-warrant.js",
10
10
  "legacyStore": "scripts/dev-delivery-warrant.mjs",
11
11
  "legacyWorkflows": [
12
- ".github/workflows/buildchain-dev-delivery.yml",
12
+ ".github/workflows/self-ops-dev-delivery.yml",
13
13
  ".github/workflows/dev-delivery-warrant-close.yml",
14
14
  ".github/workflows/dev-delivery-warrant-cancel.yml"
15
15
  ]
@@ -10,7 +10,7 @@
10
10
  ".github/workflows/.build.yml",
11
11
  ".github/workflows/publication-artifact.yml",
12
12
  ".github/workflows/release-candidate-promote.yml",
13
- ".github/workflows/v4-stage-capsule-canary.yml"
13
+ ".github/workflows/public-build-stage-capsule-canary.yml"
14
14
  ]
15
15
  },
16
16
  "contractLocks": {
@@ -38,7 +38,7 @@
38
38
  "persistedSelectorOverride": false,
39
39
  "protectedAlphaRecoveryBootstrap": {
40
40
  "selector": "alpha/v4/v4.0",
41
- "sourcePath": ".github/workflows/buildchain-ref-promotion-recovery.yml",
41
+ "sourcePath": ".github/workflows/self-ops-promotion-recovery.yml",
42
42
  "workflow": ".github/workflows/.release-candidate-promote.yml",
43
43
  "repository": "kungfu-systems/buildchain"
44
44
  },
@@ -11,8 +11,8 @@
11
11
  "target": {
12
12
  "branch": "dev/v4/v4.0",
13
13
  "implementationBaseline": "36ad1dc03a9d2785aca938a7a369e4b96707fa32",
14
- "publicConsumerCaller": ".github/workflows/v4-public-consumer-dogfood.yml",
15
- "publicConsumerReusable": "kungfu-systems/buildchain/.github/workflows/v4-stage-capsule-canary.yml@v4-alpha"
14
+ "publicConsumerCaller": ".github/workflows/self-build-public-consumer-dogfood.yml",
15
+ "publicConsumerReusable": "kungfu-systems/buildchain/.github/workflows/public-build-stage-capsule-canary.yml@v4-alpha"
16
16
  },
17
17
  "earlierContinuityDelta": {
18
18
  "assignment": "2026-08-11-buildchain-next-development-version-continuity",
@@ -152,8 +152,8 @@
152
152
  "claim": "V4 recovery proof runs as pure tests through the standard lifecycle.verify reached by the exact thin public consumer caller, while existing hosted dual-channel evidence keeps public v4-alpha and v4 routes.",
153
153
  "disposition": "implemented",
154
154
  "implementationEvidence": [
155
- ".github/workflows/v4-public-consumer-dogfood.yml",
156
- ".github/workflows/buildchain-alpha-self-dogfood.yml",
155
+ ".github/workflows/self-build-public-consumer-dogfood.yml",
156
+ ".github/workflows/self-build-alpha-dogfood.yml",
157
157
  ".buildchain/buildchain.toml",
158
158
  "scripts/next-development-self-dogfood.mjs",
159
159
  "scripts/next-development-self-dogfood-harness.mjs"
@@ -188,5 +188,5 @@
188
188
  "verificationEvidence": []
189
189
  }
190
190
  ],
191
- "matrixRoot": "sha256:0f0d69dd338cad33dc61870675cbedb8664e019e403f73a1ddcf8471d69df405"
191
+ "matrixRoot": "sha256:6affa0278532cfc96d3af04d113d7c509ec18df3a86d86945a2a5e7418d7c83e"
192
192
  }
@@ -39,7 +39,10 @@
39
39
  ],
40
40
  "implementations": {
41
41
  "rustDomain": "crates/buildchain-v4-contracts/src/partial_mutation_recovery.rs",
42
- "typescript": "packages/core/v4-partial-mutation-recovery-qualification.js"
42
+ "typescript": "packages/core/v4-partial-mutation-recovery-qualification.js",
43
+ "wasmRuntime": "packages/core/v4-domain-wasm.js",
44
+ "wasmArtifact": "packages/core/buildchain-v4-domain.wasm",
45
+ "artifactMetadata": "packages/core/v4-domain-wasm-artifact.js"
43
46
  },
44
47
  "roots": [
45
48
  "partial-mutation-recovery-checkpoint",
@@ -81,7 +81,7 @@
81
81
  }
82
82
  ],
83
83
  "projections": {
84
- "protectedWorkflow": ".github/workflows/verify.yml",
84
+ "protectedWorkflow": ".github/workflows/self-build-verify.yml",
85
85
  "generatedTemplate": "scripts/init-repo.mjs",
86
86
  "agentGuidance": "AGENTS.md",
87
87
  "manual": "docs/v4-stage-capsule.md"
@@ -9,7 +9,7 @@
9
9
  "productionWriterCount": 1,
10
10
  "stateFoldAuthority": "rust-v4-core",
11
11
  "stateFoldWriterCount": 1,
12
- "typescript": "provider-adapter-and-conformance-plane",
12
+ "typescript": "wasm-calling-provider-adapter-and-conformance-plane",
13
13
  "productionWriteChange": true
14
14
  },
15
15
  "implementations": {
@@ -17,7 +17,10 @@
17
17
  "rustFold": "crates/buildchain-v4-contracts/src/provider_operation_journal/fold.rs",
18
18
  "rustReadback": "crates/buildchain-v4-contracts/src/provider_readback_idempotency.rs",
19
19
  "typescript": "packages/core/v4-provider-operation-journal.js",
20
- "typescriptReadback": "packages/core/v4-provider-readback-idempotency.js"
20
+ "typescriptReadback": "packages/core/v4-provider-readback-idempotency.js",
21
+ "wasmRuntime": "packages/core/v4-domain-wasm.js",
22
+ "wasmArtifact": "packages/core/buildchain-v4-domain.wasm",
23
+ "artifactMetadata": "packages/core/v4-domain-wasm-artifact.js"
21
24
  },
22
25
  "activationDomain": {
23
26
  "architecture": "architecture/v4-release-activation-shadow-domain.json",
@@ -0,0 +1,64 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "sourceRevision": "a41c00a0c0b2dbd57c238cd9b326b167a1d27ca8",
4
+ "purpose": "Retain completed v4 publication receipt independently of next-development and preserve immutable binary publication assets. Scope publication checks to governed Paper repositories without changing generic report lifecycle contracts.",
5
+ "facades": [
6
+ {
7
+ "workflow": ".github/workflows/.binary-release-assets.yml",
8
+ "beforeSha256": "5dfaea0f9cf83500706f423eca08f43594fe3653fa139da359041e88fae49266",
9
+ "afterSha256": "06831b3ec8db28fbf96ffa8907fd58c1a77dd09e8d4fe02100a98febe10dba34",
10
+ "replacements": [
11
+ {
12
+ "before": " fs.writeFileSync(\".buildchain/publication-authority/capability.json\", `${JSON.stringify(capability, null, 2)}\\n`);\n NODE\n\n - name: Upload GitHub Release assets\n env:\n GH_TOKEN: ${{ github.token }}\n RELEASE_TAG: ${{ inputs.release-tag }}\n",
13
+ "after": " fs.writeFileSync(\".buildchain/publication-authority/capability.json\", `${JSON.stringify(capability, null, 2)}\\n`);\n NODE\n\n - uses: actions/setup-node@v6.4.0\n if: ${{ startsWith(inputs.release-tag, 'v4.') }}\n with:\n node-version: \"24\"\n\n - name: Install exact publication runtime dependencies\n if: ${{ startsWith(inputs.release-tag, 'v4.') }}\n run: corepack pnpm@11.7.0 install --frozen-lockfile --ignore-scripts\n\n - name: Upload immutable GitHub Release assets and verify readback\n if: ${{ startsWith(inputs.release-tag, 'v4.') }}\n env:\n GH_TOKEN: ${{ github.token }}\n RELEASE_TAG: ${{ inputs.release-tag }}\n run: node scripts/binary-publication-evidence.mjs publish\n\n - name: Retain binary publication readback\n if: ${{ startsWith(inputs.release-tag, 'v4.') }}\n uses: actions/upload-artifact@v7.0.1\n with:\n name: binary-publication-readback-${{ inputs.release-tag }}\n path: .buildchain/binary-publication/readback.json\n include-hidden-files: true\n if-no-files-found: error\n\n - name: Upload GitHub Release assets\n if: ${{ !startsWith(inputs.release-tag, 'v4.') }}\n env:\n GH_TOKEN: ${{ github.token }}\n RELEASE_TAG: ${{ inputs.release-tag }}\n"
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "workflow": ".github/workflows/.release-candidate-promote.yml",
19
+ "beforeSha256": "177b3c50685405e5ed2bf1ac893469fdb3a27e7b03d55025611b2985028cd8cf",
20
+ "afterSha256": "9c7f3586a3444cdad34d2a61be3cb9b0ae271fb56f9e371d9c37940e6b317780",
21
+ "replacements": [
22
+ {
23
+ "before": " release-candidate-artifact: ${{ needs.qualify.outputs.candidate-artifact }}\n release-candidate-action: canonical-release-invocation\n release-candidate-outcome: success\n promotion-outcome: success\n finalization-needed: \"false\"\n release-tail-transaction-state: ${{ steps.provider.outputs.transaction-state || steps.resume.outputs.transaction-state }}\n release-tail-declaration-root: ${{ steps.provider.outputs.declaration-root || steps.resume.outputs.declaration-root }}\n release-tail-transaction-root: ${{ steps.provider.outputs.transaction-root || steps.resume.outputs.transaction-root }}\n",
24
+ "after": " release-candidate-artifact: ${{ needs.qualify.outputs.candidate-artifact }}\n release-candidate-action: canonical-release-invocation\n release-candidate-outcome: success\n promotion-outcome: ${{ steps.publication-settlement.outputs.status == 'complete' && 'success' || 'failure' }}\n finalization-needed: ${{ steps.publication-settlement.outputs.status != 'complete' }}\n release-tail-transaction-state: ${{ steps.provider.outputs.transaction-state || steps.resume.outputs.transaction-state }}\n release-tail-declaration-root: ${{ steps.provider.outputs.declaration-root || steps.resume.outputs.declaration-root }}\n release-tail-transaction-root: ${{ steps.provider.outputs.transaction-root || steps.resume.outputs.transaction-root }}\n"
25
+ },
26
+ {
27
+ "before": " release-tail-receipt-roots-json: ${{ steps.provider.outputs.receipt-roots-json || steps.resume.outputs.receipt-roots-json }}\n release-invocation-root: ${{ steps.provider.outputs.release-invocation-root || steps.resume.outputs.release-invocation-root }}\n release-transaction-root: ${{ steps.provider.outputs.release-transaction-root || steps.resume.outputs.release-transaction-root }}\n release-receipt-root: ${{ steps.provider.outputs.release-receipt-root || steps.resume.outputs.release-receipt-root }}\n steps:\n - name: Checkout the admitted protected channel state\n uses: actions/checkout@v7.0.0\n",
28
+ "after": " release-tail-receipt-roots-json: ${{ steps.provider.outputs.receipt-roots-json || steps.resume.outputs.receipt-roots-json }}\n release-invocation-root: ${{ steps.provider.outputs.release-invocation-root || steps.resume.outputs.release-invocation-root }}\n release-transaction-root: ${{ steps.provider.outputs.release-transaction-root || steps.resume.outputs.release-transaction-root }}\n release-receipt-root: ${{ steps.publication-settlement.outputs.receipt-root || steps.provider.outputs.release-receipt-root || steps.resume.outputs.release-receipt-root }}\n steps:\n - name: Checkout the admitted protected channel state\n uses: actions/checkout@v7.0.0\n"
29
+ },
30
+ {
31
+ "before": " uses: ./.buildchain/runtime/actions/v4-release-candidate-promote\n with: *provider-inputs\n\n - name: Retain canonical APPLY and ReleaseReceipt evidence\n if: ${{ always() }}\n uses: actions/upload-artifact@v7.0.1\n",
32
+ "after": " uses: ./.buildchain/runtime/actions/v4-release-candidate-promote\n with: *provider-inputs\n\n - name: Retain completed publication independently of next-development\n id: publication-settlement\n if: ${{ always() && hashFiles('.buildchain/release-tail/release-receipt.json') != '' }}\n env:\n GH_TOKEN: ${{ github.token }}\n CANDIDATE_SHA: ${{ needs.qualify.outputs.requested-sha }}\n APPLY_OUTCOME: ${{ (steps.resume.outcome == 'success' || steps.resume.outcome == 'failure') && steps.resume.outcome || steps.provider.outcome }}\n run: node .buildchain/runtime/scripts/v4-publication-settlement.mjs .buildchain\n\n - name: Retain canonical APPLY and ReleaseReceipt evidence\n if: ${{ always() }}\n uses: actions/upload-artifact@v7.0.1\n"
33
+ },
34
+ {
35
+ "before": " controller-receipt-status: ${{ steps.verify.outputs.status || steps.projection-state.outputs.status }}\n steps:\n - name: Checkout the admitted receipt verifier\n if: ${{ needs.apply.result == 'success' }}\n uses: actions/checkout@v7.0.0\n with:\n repository: kungfu-systems/buildchain\n",
36
+ "after": " controller-receipt-status: ${{ steps.verify.outputs.status || steps.projection-state.outputs.status }}\n steps:\n - name: Checkout the admitted receipt verifier\n if: ${{ needs.qualify.outputs.action == 'promote' && !inputs.dry-run }}\n uses: actions/checkout@v7.0.0\n with:\n repository: kungfu-systems/buildchain\n"
37
+ },
38
+ {
39
+ "before": " persist-credentials: false\n\n - name: Restore canonical APPLY evidence\n if: ${{ needs.apply.result == 'success' }}\n uses: actions/download-artifact@v7.0.0\n with:\n name: buildchain-v4-release-apply-${{ needs.qualify.outputs.requested-sha }}\n",
40
+ "after": " persist-credentials: false\n\n - name: Restore canonical APPLY evidence\n if: ${{ needs.qualify.outputs.action == 'promote' && !inputs.dry-run }}\n uses: actions/download-artifact@v7.0.0\n with:\n name: buildchain-v4-release-apply-${{ needs.qualify.outputs.requested-sha }}\n"
41
+ },
42
+ {
43
+ "before": "\n - name: Verify the single terminal receipt\n id: verify\n if: ${{ needs.apply.result == 'success' }}\n shell: bash\n run: |\n node --input-type=module <<'NODE'\n import fs from \"node:fs\";\n import {\n createV4ReleaseInvocation,\n createV4ReleaseReceipt,\n createV4ReleaseTransaction,\n } from \"./.buildchain/runtime/packages/core/v4-release-invocation.js\";\n const base = \".buildchain/evidence/release-tail\";\n const invocation = JSON.parse(fs.readFileSync(`${base}/release-invocation.json`, \"utf8\"));\n const transaction = JSON.parse(fs.readFileSync(`${base}/release-transaction.json`, \"utf8\"));\n const storedReceipt = JSON.parse(fs.readFileSync(`${base}/release-receipt.json`, \"utf8\"));\n const invocationProjection = createV4ReleaseInvocation(invocation);\n const transactionProjection = createV4ReleaseTransaction({\n invocationRoot: transaction.invocationRoot,\n publisherRoot: transaction.publisherRoot,\n runtimeRoot: transaction.runtimeRoot,\n providerRoot: transaction.providerRoot,\n parentRoot: transaction.parentRoot,\n });\n const { receiptRoot, ...receipt } = storedReceipt;\n const receiptProjection = createV4ReleaseReceipt(receipt);\n if (transaction.invocationRoot !== invocationProjection.roots.invocationRoot ||\n transaction.transactionRoot !== transactionProjection.transactionRoot ||\n receipt.transactionRoot !== transactionProjection.transactionRoot ||\n receiptProjection.receiptRoot !== receiptRoot || receipt.outcome !== \"complete\") {\n throw new Error(\"terminal ReleaseReceipt lineage does not verify\");\n }\n fs.appendFileSync(process.env.GITHUB_OUTPUT,\n `receipt-json=${JSON.stringify(storedReceipt)}\\nreceipt-root=${receiptRoot}\\nstatus=complete\\n`);\n NODE\n\n - name: Record non-terminal projection state\n id: projection-state\n if: ${{ needs.apply.result != 'success' }}\n shell: bash\n run: |\n echo \"status=${{ inputs.dry-run && 'dry-run' || needs.qualify.outputs.action == 'noop' && 'noop' || 'blocked' }}\" >> \"$GITHUB_OUTPUT\"\n",
44
+ "after": "\n - name: Verify the single terminal receipt\n id: verify\n env:\n CANDIDATE_SHA: ${{ needs.qualify.outputs.requested-sha }}\n if: ${{ needs.qualify.outputs.action == 'promote' && !inputs.dry-run }}\n shell: bash\n run: |\n node --input-type=module <<'NODE'\n import fs from \"node:fs\";\n const { readApplyDocuments, verifyPublicationSettlement } = await import(\"./.buildchain/runtime/scripts/v4-publication-settlement.mjs\");\n const documents = readApplyDocuments(\".buildchain/evidence\");\n verifyPublicationSettlement(documents, {\n repository: process.env.GITHUB_REPOSITORY,\n candidateSha: process.env.CANDIDATE_SHA,\n tag: documents.invocation.target.tag,\n sourceSha: documents.product.publication.releaseSha,\n });\n const storedReceipt = documents.receipt;\n const receiptRoot = storedReceipt.receiptRoot;\n fs.appendFileSync(process.env.GITHUB_OUTPUT,\n `receipt-json=${JSON.stringify(storedReceipt)}\\nreceipt-root=${receiptRoot}\\nstatus=complete\\n`);\n NODE\n\n - name: Record non-terminal projection state\n id: projection-state\n if: ${{ always() && steps.verify.outcome != 'success' }}\n shell: bash\n run: |\n echo \"status=${{ inputs.dry-run && 'dry-run' || needs.qualify.outputs.action == 'noop' && 'noop' || 'blocked' }}\" >> \"$GITHUB_OUTPUT\"\n"
45
+ },
46
+ {
47
+ "before": " .buildchain/evidence/release-tail/release-invocation.json\n .buildchain/evidence/release-tail/release-transaction.json\n .buildchain/evidence/release-tail/release-receipt.json\n if-no-files-found: error\n",
48
+ "after": " .buildchain/evidence/release-tail/release-invocation.json\n .buildchain/evidence/release-tail/release-transaction.json\n .buildchain/evidence/release-tail/release-receipt.json\n .buildchain/evidence/release-tail/delivery-summary.json\n .buildchain/evidence/release-tail/buildchain-publication-settlement.json\n if-no-files-found: error\n"
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "workflow": ".github/workflows/check.yml",
54
+ "beforeSha256": "44797c1b64e54806e19cf401300a27e587d6a2f0730ee7509eb84aefb9b60f74",
55
+ "afterSha256": "fbf3549e4f4987733f53ff362bf49d2001d56ae5842bbd1ed343c0fba40d9429",
56
+ "replacements": [
57
+ {
58
+ "before": " config=\"${BUILDCHAIN_WORKING_DIRECTORY}/.buildchain/buildchain.toml\"\n if [ -f \"$config\" ] && grep -Eq '^[[:space:]]*type[[:space:]]*=[[:space:]]*\"publication-artifact\"[[:space:]]*$' \"$config\"; then\n node .buildchain/runtime/bin/buildchain.mjs paper preflight \\\n --cwd \"$BUILDCHAIN_WORKING_DIRECTORY\" \\\n --offline \\\n --ci \\\n --json\n else\n echo \"Buildchain Paper policy: not applicable\"\n fi\n",
59
+ "after": " node --input-type=module <<'NODE'\n import fs from \"node:fs\";\n import path from \"node:path\";\n import { loadBuildchainConfig } from \"./.buildchain/runtime/packages/core/buildchain-config.js\";\n import { spawnSyncCommand } from \"./.buildchain/runtime/packages/core/spawn-command.js\";\n const cwd = path.resolve(process.env.BUILDCHAIN_WORKING_DIRECTORY || \".\");\n // Validate before deciding applicability; malformed config never skips policy.\n const config = loadBuildchainConfig(cwd)?.config;\n const governedPaper = fs.existsSync(path.join(cwd, \".buildchain/paper\"))\n || config?.publish?.kind === \"npm-paper-package\"\n || (config?.project?.type === \"publication-artifact\"\n && (!config.publication || config.publication.kind === \"paper\"));\n if (governedPaper) {\n const result = spawnSyncCommand(process.execPath, [\n \".buildchain/runtime/bin/buildchain.mjs\", \"paper\", \"preflight\",\n \"--cwd\", cwd, \"--offline\", \"--ci\", \"--json\",\n ], { stdio: \"inherit\" });\n if (result.error) throw result.error;\n process.exitCode = result.status ?? 1;\n } else {\n console.log(\"Buildchain Paper policy: not applicable\");\n }\n NODE\n"
60
+ }
61
+ ]
62
+ }
63
+ ]
64
+ }
@@ -10,14 +10,17 @@
10
10
  "productionWriterCount": 1,
11
11
  "planAndFoldAuthority": "rust-v4-core",
12
12
  "planAndFoldWriterCount": 1,
13
- "typescript": "byte-equivalent-provider-adapter",
13
+ "typescript": "wasm-calling-provider-adapter",
14
14
  "productionWriteChange": true
15
15
  },
16
16
  "implementations": {
17
17
  "rustDomain": "crates/buildchain-v4-contracts/src/release_activation_shadow.rs",
18
18
  "rustModel": "crates/buildchain-v4-contracts/src/release_activation_shadow/model.rs",
19
19
  "rustJournalMaterializer": "crates/buildchain-v4-contracts/src/release_activation_shadow/journal.rs",
20
- "typescript": "packages/core/v4-release-activation-shadow.js"
20
+ "typescript": "packages/core/v4-release-activation-shadow.js",
21
+ "wasmRuntime": "packages/core/v4-domain-wasm.js",
22
+ "wasmArtifact": "packages/core/buildchain-v4-domain.wasm",
23
+ "artifactMetadata": "packages/core/v4-domain-wasm-artifact.js"
21
24
  },
22
25
  "roots": [
23
26
  "release-activation-step",