@kungfu-tech/buildchain 4.0.2-alpha.30 → 4.0.2-alpha.33

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 (44) hide show
  1. package/architecture/agent-change-map.md +4 -1
  2. package/architecture/maintainability-debt.json +90 -58
  3. package/architecture/maintainability-policy.json +22 -23
  4. package/architecture/v4-architecture-constitution.md +23 -20
  5. package/architecture/v4-partial-mutation-recovery-qualification.json +4 -1
  6. package/architecture/v4-provider-operation-journal-contract.json +5 -2
  7. package/architecture/v4-release-activation-shadow-domain.json +5 -2
  8. package/architecture/v4-release-topology.json +17 -2
  9. package/architecture/v4-rust-wasm-production-authority.json +57 -0
  10. package/architecture/v4-stable-publication-fence.json +5 -2
  11. package/dist/site/buildchain-contract.json +7 -7
  12. package/dist/site/buildchain-site.json +44 -8
  13. package/dist/site/capability-registry.json +1 -1
  14. package/dist/site/kfd-claims.json +17 -5
  15. package/dist/site/kfd-upstream-aggregate.json +1 -1
  16. package/dist/site/manual-registry.json +1 -1
  17. package/dist/site/node-api-registry.json +27 -27
  18. package/dist/site/page-registry.json +39 -3
  19. package/dist/site/public-surface-audit.json +7 -3
  20. package/dist/site/publication-registry.json +4 -4
  21. package/dist/site/site-manifest.json +5 -5
  22. package/dist/site/workflow-registry.json +4 -4
  23. package/docs/node-api-reference.md +60 -60
  24. package/docs/v4-rust-wasm-production-authority.md +58 -0
  25. package/package.json +5 -3
  26. package/packages/core/buildchain-v4-domain.wasm +0 -0
  27. package/packages/core/dev-delivery-candidate-identity.js +48 -11
  28. package/packages/core/release-tail-provider-plane.js +68 -1048
  29. package/packages/core/v4-canonical-contracts.js +9 -75
  30. package/packages/core/v4-domain-wasm-artifact.js +7 -0
  31. package/packages/core/v4-domain-wasm.js +216 -0
  32. package/packages/core/v4-partial-mutation-recovery-qualification.js +9 -386
  33. package/packages/core/v4-product-publication.js +18 -384
  34. package/packages/core/v4-provider-operation-journal.js +18 -487
  35. package/packages/core/v4-provider-readback-idempotency.js +12 -97
  36. package/packages/core/v4-release-activation-shadow.js +13 -500
  37. package/packages/core/v4-release-invocation.js +28 -389
  38. package/packages/core/v4-stable-publication-fence.js +13 -342
  39. package/scripts/build-v4-domain-wasm.mjs +189 -0
  40. package/scripts/check-action-bundles.mjs +12 -2
  41. package/scripts/check-v4-release-topology.mjs +50 -25
  42. package/scripts/copy-v4-domain-wasm.mjs +14 -0
  43. package/scripts/dev-delivery-warrant.mjs +7 -3
  44. package/scripts/generate-v4-universal-workflow-facades.mjs +28 -4
@@ -54,7 +54,6 @@ Safe change route: Reduce one owned responsibility behind the stable facade, run
54
54
  - sources: `packages/core/readme-badges.js`
55
55
  - sources: `packages/core/release-candidate.js`
56
56
  - sources: `packages/core/release-passport.js`
57
- - sources: `packages/core/release-tail-provider-plane.js`
58
57
  - sources: `packages/core/release-train.js`
59
58
  - sources: `packages/core/stable-release-gate.js`
60
59
  - sources: `packages/core/v4-runtime-ref-resume-authority.js`
@@ -93,6 +92,9 @@ Safe change route: Reduce one owned responsibility behind the stable facade, run
93
92
  - sources: `actions/promote-buildchain-ref/internal/promotion-operations.js`
94
93
  - rust: `crates/buildchain-v4-bridge/src/main.rs`
95
94
  - rust: `crates/buildchain-v4-contracts/src/main.rs`
95
+ - rust: `crates/buildchain-v4-contracts/src/product_publication.rs`
96
+ - rust: `crates/buildchain-v4-contracts/src/release_tail.rs`
97
+ - rust: `crates/buildchain-v4-contracts/src/wasm.rs`
96
98
  - rust: `crates/buildchain-v4-contracts/src/provider_operation_journal.rs`
97
99
  - rust: `crates/buildchain-v4-contracts/src/provider_operation_journal/fold.rs`
98
100
  - rust: `crates/buildchain-v4-contracts/src/warrant.rs`
@@ -162,6 +164,7 @@ Safe change route: Reduce one owned responsibility behind the stable facade, run
162
164
  - `tests/v4-publication-qualification.test.mjs`
163
165
  - `.github/workflows/v4-adopter-delivery.yml`
164
166
  - `.github/workflows/buildchain-ref-promotion.yml`
167
+ - `.github/workflows/dev-pr-auto-merge.yml`
165
168
  - `tests/release-candidate-recovery.test.mjs`
166
169
  - `tests/buildchain-ref-promotion-recovery-entry.test.mjs`
167
170
  - `.github/workflows/.release-candidate-promote.yml`
@@ -7,8 +7,8 @@
7
7
  },
8
8
  "totalExcessLedger": {
9
9
  "metric": "calibrated-full-dimensional-excess-v1",
10
- "measuredExcess": 64421,
11
- "current": 56360
10
+ "measuredExcess": 64779,
11
+ "current": 56718
12
12
  },
13
13
  "defaults": {
14
14
  "owner": "Buildchain architecture maintainers",
@@ -1090,62 +1090,6 @@
1090
1090
  }
1091
1091
  }
1092
1092
  },
1093
- "packages/core/release-tail-provider-plane.js": {
1094
- "baseline": {
1095
- "lines": 1228,
1096
- "functions": {
1097
- "normalizeCapability@235": {
1098
- "lines": 255
1099
- },
1100
- "validateReleaseTailEffectPlan@602": {
1101
- "complexity": 30
1102
- },
1103
- "validateReleaseTailTransaction@744": {
1104
- "complexity": 33
1105
- },
1106
- "executeReleaseTailTransaction@1016": {
1107
- "lines": 190,
1108
- "complexity": 27
1109
- }
1110
- }
1111
- },
1112
- "current": {
1113
- "lines": 1228,
1114
- "functions": {
1115
- "normalizeCapability@235": {
1116
- "lines": 255
1117
- },
1118
- "validateReleaseTailEffectPlan@602": {
1119
- "complexity": 30
1120
- },
1121
- "validateReleaseTailTransaction@744": {
1122
- "complexity": 33
1123
- },
1124
- "executeReleaseTailTransaction@1016": {
1125
- "lines": 190,
1126
- "complexity": 26
1127
- }
1128
- }
1129
- },
1130
- "target": {
1131
- "lines": 600,
1132
- "functions": {
1133
- "normalizeCapability@235": {
1134
- "lines": 180
1135
- },
1136
- "validateReleaseTailEffectPlan@602": {
1137
- "complexity": 25
1138
- },
1139
- "validateReleaseTailTransaction@744": {
1140
- "complexity": 25
1141
- },
1142
- "executeReleaseTailTransaction@1016": {
1143
- "lines": 180,
1144
- "complexity": 25
1145
- }
1146
- }
1147
- }
1148
- },
1149
1093
  "packages/core/release-train.js": {
1150
1094
  "baseline": {
1151
1095
  "lines": 740
@@ -2058,6 +2002,93 @@
2058
2002
  }
2059
2003
  }
2060
2004
  },
2005
+ "crates/buildchain-v4-contracts/src/product_publication.rs": {
2006
+ "baseline": {
2007
+ "functions": {
2008
+ "select_product_publication_intent@156": {
2009
+ "complexity": 38
2010
+ }
2011
+ }
2012
+ },
2013
+ "current": {
2014
+ "functions": {
2015
+ "select_product_publication_intent@156": {
2016
+ "complexity": 31
2017
+ }
2018
+ }
2019
+ },
2020
+ "target": {
2021
+ "functions": {
2022
+ "select_product_publication_intent@156": {
2023
+ "complexity": 30
2024
+ }
2025
+ }
2026
+ }
2027
+ },
2028
+ "crates/buildchain-v4-contracts/src/release_tail.rs": {
2029
+ "baseline": {
2030
+ "lines": 1399,
2031
+ "functions": {
2032
+ "normalize_capability@228": {
2033
+ "lines": 245,
2034
+ "complexity": 51
2035
+ },
2036
+ "advance_release_tail_execution@1205": {
2037
+ "lines": 193
2038
+ }
2039
+ }
2040
+ },
2041
+ "current": {
2042
+ "lines": 1397,
2043
+ "functions": {
2044
+ "normalize_capability@228": {
2045
+ "lines": 245,
2046
+ "complexity": 51
2047
+ },
2048
+ "advance_release_tail_execution@1205": {
2049
+ "lines": 193
2050
+ }
2051
+ }
2052
+ },
2053
+ "target": {
2054
+ "lines": 600,
2055
+ "functions": {
2056
+ "normalize_capability@228": {
2057
+ "lines": 140,
2058
+ "complexity": 30
2059
+ },
2060
+ "advance_release_tail_execution@1205": {
2061
+ "lines": 140
2062
+ }
2063
+ }
2064
+ }
2065
+ },
2066
+ "crates/buildchain-v4-contracts/src/wasm.rs": {
2067
+ "baseline": {
2068
+ "functions": {
2069
+ "dispatch@61": {
2070
+ "lines": 214,
2071
+ "complexity": 64
2072
+ }
2073
+ }
2074
+ },
2075
+ "current": {
2076
+ "functions": {
2077
+ "dispatch@61": {
2078
+ "lines": 214,
2079
+ "complexity": 64
2080
+ }
2081
+ }
2082
+ },
2083
+ "target": {
2084
+ "functions": {
2085
+ "dispatch@61": {
2086
+ "lines": 140,
2087
+ "complexity": 30
2088
+ }
2089
+ }
2090
+ }
2091
+ },
2061
2092
  "crates/buildchain-v4-contracts/src/provider_operation_journal.rs": {
2062
2093
  "baseline": {
2063
2094
  "functions": {
@@ -3105,6 +3136,7 @@
3105
3136
  "tests/v4-publication-qualification.test.mjs",
3106
3137
  ".github/workflows/v4-adopter-delivery.yml",
3107
3138
  ".github/workflows/buildchain-ref-promotion.yml",
3139
+ ".github/workflows/dev-pr-auto-merge.yml",
3108
3140
  "tests/release-candidate-recovery.test.mjs",
3109
3141
  "tests/buildchain-ref-promotion-recovery-entry.test.mjs",
3110
3142
  ".github/workflows/.release-candidate-promote.yml",
@@ -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": "2dd9950ec84795bba2f9c15d1ca91e8f1244259e",
29
- "maxHandMaintainedSourceFiles": 464,
30
- "maxHandMaintainedSourceLines": 170655,
28
+ "baselineRevision": "9569f69c2cb609372b8a3d65ce5dec8fb7b34a84",
29
+ "maxHandMaintainedSourceFiles": 472,
30
+ "maxHandMaintainedSourceLines": 170850,
31
31
  "maxWorkflowFiles": 80,
32
32
  "maxWorkflowLines": 26791,
33
- "latestTransition": "GitHub Output serialization preserves multiline release asset paths.",
34
- "latestTransitionRationale": "The shared writer now uses GitHub's delimiter form only when an output contains line breaks, while retaining the existing single-line form and public re-export. A focused regression test proves that the release asset list remains one output instead of being parsed as malformed file commands. Extracting the bounded serializer lowers the oversized build-contract core from 1229 to 1216 lines; the exact inventory grows by one hand-maintained source file and 18 lines to 464 files and 170655 lines, without adding workflow, credential, provider permission, merge authority, capability, or publication target.",
33
+ "latestTransition": "Alpha publishes the reviewed version and advances Dev afterward.",
34
+ "latestTransitionRationale": "The Rust/WASM publication authority now uses the exact reviewed Alpha candidate version and sealed npm tarball, keeps Dev outside release-ref convergence, and reuses the existing next-development transition to create and enqueue one successor-version Dev pull request only after publication succeeds. Candidate-input discovery remains inside the existing product provider, preserving the privileged module topology and adding no workflow, credential, provider permission, merge authority, capability, or publication scope.",
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": {
@@ -1654,25 +1652,26 @@
1654
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.",
1655
1653
  "governance": "legacy-debt-sunset-2026q4"
1656
1654
  },
1657
- "packages/core/release-tail-provider-plane.js#normalizeCapability": {
1658
- "maxLines": 255,
1659
- "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.",
1660
1658
  "governance": "legacy-debt-sunset-2026q4"
1661
1659
  },
1662
- "packages/core/release-tail-provider-plane.js#validateReleaseTailEffectPlan": {
1663
- "maxComplexity": 30,
1664
- "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.",
1665
1664
  "governance": "legacy-debt-sunset-2026q4"
1666
1665
  },
1667
- "packages/core/release-tail-provider-plane.js#validateReleaseTailTransaction": {
1668
- "maxComplexity": 33,
1669
- "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.",
1670
1669
  "governance": "legacy-debt-sunset-2026q4"
1671
1670
  },
1672
- "packages/core/release-tail-provider-plane.js#executeReleaseTailTransaction": {
1673
- "maxLines": 190,
1674
- "maxComplexity": 26,
1675
- "rationale": "The single transaction executor preserves bounded retry, pre-effect and post-effect readback, atomic checkpoints and provider non-authority while reconciling every attempted external effect without repeating its mutation; 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.",
1676
1675
  "governance": "legacy-debt-sunset-2026q4"
1677
1676
  },
1678
1677
  "actions/promote-buildchain-ref/internal/promotion-operations.js#updateBranch": {
@@ -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.
@@ -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",
@@ -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",
@@ -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",
@@ -74,7 +74,6 @@
74
74
  "packages/core/publication-rehearsal-runtime.js",
75
75
  "packages/core/release-tail-provider-adapters.js",
76
76
  "packages/core/release-tail-provider-plane.js",
77
- "packages/core/v4-product-publication.js",
78
77
  "packages/core/v4-publication-rehearsal-capsule.js",
79
78
  "packages/core/v4-publication-rehearsal.js"
80
79
  ],
@@ -141,6 +140,7 @@
141
140
  "packages/core/kfd-gate.js",
142
141
  "packages/core/kfd-product-gates.js",
143
142
  "packages/core/kungfu-temporal-fact.js",
143
+ "packages/core/next-development-transition.js",
144
144
  "packages/core/package-manager.js",
145
145
  "packages/core/public-surface-audit.js",
146
146
  "packages/core/public-surface-cli.js",
@@ -158,6 +158,8 @@
158
158
  "packages/core/spawn-command.js",
159
159
  "packages/core/surface-manifest.js",
160
160
  "packages/core/v4-canonical-contracts.js",
161
+ "packages/core/v4-domain-wasm-artifact.js",
162
+ "packages/core/v4-domain-wasm.js",
161
163
  "packages/core/v4-floating-consumer-evidence.js",
162
164
  "packages/core/v4-floating-consumer-policy.js",
163
165
  "packages/core/v4-floating-consumer-release-passport.js",
@@ -171,7 +173,20 @@
171
173
  "packages/core/workflow-yaml-contract.js",
172
174
  "scripts/ensure-github-release.mjs"
173
175
  ],
174
- "root": "sha256:31d13d74b8b3dadbfe4b5061c99f6f6711be6c3b06449114f2708427374f9c85"
176
+ "root": "sha256:288290a0da4e608869026688fc4981ded81cbc97b9e7bd7c031b9b8369653a39"
177
+ },
178
+ "rustWasmAuthority": {
179
+ "loader": "packages/core/v4-domain-wasm.js",
180
+ "metadata": "packages/core/v4-domain-wasm-artifact.js",
181
+ "artifact": "packages/core/buildchain-v4-domain.wasm",
182
+ "artifactRoot": "sha256:32a808ba9b749d1297c0ce4b7be1586afdae3d849e44f3f7ffb1742e572f5627",
183
+ "distributedArtifacts": [
184
+ "actions/promote-buildchain-ref/dist/buildchain-v4-domain.wasm",
185
+ "actions/release-tail/dist/buildchain-v4-domain.wasm",
186
+ "actions/v4-release-candidate-promote/dist/buildchain-v4-domain.wasm"
187
+ ],
188
+ "byteIdenticalDistributions": true,
189
+ "fallbackWriterCount": 0
175
190
  },
176
191
  "legacyEngineModules": [
177
192
  "actions/promote-buildchain-ref/internal/durable-transaction-operations.js",
@@ -0,0 +1,57 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "contract": "kungfu-buildchain-v4-rust-wasm-production-authority/v1",
4
+ "mode": "production",
5
+ "sourceAuthority": {
6
+ "crate": "crates/buildchain-v4-contracts",
7
+ "toolchain": "crates/buildchain-v4-contracts/rust-toolchain.toml",
8
+ "build": "scripts/build-v4-domain-wasm.mjs",
9
+ "reproducibilityCheck": "pnpm run check:v4-wasm"
10
+ },
11
+ "runtimeAuthority": {
12
+ "loader": "packages/core/v4-domain-wasm.js",
13
+ "metadata": "packages/core/v4-domain-wasm-artifact.js",
14
+ "artifact": "packages/core/buildchain-v4-domain.wasm",
15
+ "abiVersion": 1,
16
+ "fallbackWriterCount": 0,
17
+ "failurePolicy": "fail-closed"
18
+ },
19
+ "rustOwnedSemantics": [
20
+ "canonical-json-and-content-roots",
21
+ "release-invocation-plan-transaction-and-receipt",
22
+ "product-publication-plan-and-version-intent",
23
+ "provider-operation-journal-and-readback-fold",
24
+ "release-activation-plan-and-fold",
25
+ "stable-publication-fence",
26
+ "partial-mutation-recovery-plan",
27
+ "release-tail-plan-transaction-retry-readback-and-receipt"
28
+ ],
29
+ "nodeOwnedEffects": [
30
+ "provider-sdk-calls",
31
+ "filesystem-io",
32
+ "credential-and-environment-access",
33
+ "workflow-input-and-output-transport",
34
+ "provider-error-classification"
35
+ ],
36
+ "distribution": {
37
+ "npmPackage": "packages/core/buildchain-v4-domain.wasm",
38
+ "actionArtifacts": [
39
+ "actions/promote-buildchain-ref/dist/buildchain-v4-domain.wasm",
40
+ "actions/release-tail/dist/buildchain-v4-domain.wasm",
41
+ "actions/v4-release-candidate-promote/dist/buildchain-v4-domain.wasm"
42
+ ],
43
+ "artifactBinding": "sha256-metadata-before-instantiation",
44
+ "runtimeCompilation": false
45
+ },
46
+ "qualification": {
47
+ "platforms": ["linux-x64", "macos-arm64", "windows-x64"],
48
+ "productionRuntime": "node-24",
49
+ "checks": [
50
+ "tracked-artifact-reproducibility",
51
+ "abi-and-digest-binding",
52
+ "clean-process-loading-without-rust",
53
+ "missing-or-tampered-artifact-fails-closed",
54
+ "action-artifact-byte-identity"
55
+ ]
56
+ }
57
+ }
@@ -10,7 +10,7 @@
10
10
  "productionWriterCount": 1,
11
11
  "fenceAuthority": "rust-v4-core",
12
12
  "fenceWriterCount": 1,
13
- "typescript": "byte-equivalent-provider-adapter",
13
+ "typescript": "wasm-calling-provider-adapter",
14
14
  "candidateSelfQualification": false,
15
15
  "productionWriteChange": true
16
16
  },
@@ -29,7 +29,10 @@
29
29
  "publicationTargets": ["stable-ref", "npm-tag", "oci-tag", "github-release"],
30
30
  "implementations": {
31
31
  "rustDomain": "crates/buildchain-v4-contracts/src/stable_publication_fence.rs",
32
- "typescript": "packages/core/v4-stable-publication-fence.js"
32
+ "typescript": "packages/core/v4-stable-publication-fence.js",
33
+ "wasmRuntime": "packages/core/v4-domain-wasm.js",
34
+ "wasmArtifact": "packages/core/buildchain-v4-domain.wasm",
35
+ "artifactMetadata": "packages/core/v4-domain-wasm-artifact.js"
33
36
  },
34
37
  "roots": [
35
38
  "stable-publication-candidate",
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "4.0.2-alpha.30",
7
+ "version": "4.0.2-alpha.33",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v4",
@@ -1361,7 +1361,7 @@
1361
1361
  "retryable GitHub fallback fetches use a bounded attempt budget before exact source SHA and tree verification"
1362
1362
  ],
1363
1363
  "breakingDigest": "sha256:dfbedd543ae0c067982b5c8c02d98dd2f7f7df88752be97fb330da6b0ba30faa",
1364
- "auditDigest": "sha256:ce4fbf96de5b45c8b9e64645401175bef6f0d2dc96dc3d656615e6e44b92f1c0",
1364
+ "auditDigest": "sha256:20549663f5459414dcfb00aa9a3a549003bbc09159eeab6cea211db96ed0eab2",
1365
1365
  "compatibleBreakingDigests": [
1366
1366
  "sha256:a6a35370d6b0d0f46e1b2712dcc01961fe53c2febde95409a27a485c10a36650"
1367
1367
  ],
@@ -1492,7 +1492,7 @@
1492
1492
  "durable consumers call the public floating workflow and may route a train or exact runtime only through trusted non-persistent dispatch input"
1493
1493
  ],
1494
1494
  "breakingDigest": "sha256:21b65d0746d2e8b3e8a7df4c6fab295a85c8fd42cc405ec3bc5df5cdab0421f0",
1495
- "auditDigest": "sha256:88b3ff463686ee6dffc604886205f66d5f5f6fc445cd98c46623f0e6cc308839"
1495
+ "auditDigest": "sha256:d86830e186b6ec56816e875adfebd33d705ae309983cc37106717ce05ec9ccca"
1496
1496
  },
1497
1497
  {
1498
1498
  "contractVersion": 1,
@@ -2257,7 +2257,7 @@
2257
2257
  "manual entries carry source file digests so downstream sites and agents can detect stale hand-written documentation"
2258
2258
  ],
2259
2259
  "breakingDigest": "sha256:7d0d2819e3a3e72989d9c57b5efe9d0bc0a79bc0f2c82a0c7b9d6c5a211a91f2",
2260
- "auditDigest": "sha256:078a652a180550b349e37dfa2ae5389c384f7118541ffefaf43a3df9a28b5074"
2260
+ "auditDigest": "sha256:1a6a84869fc898263bb531ccfd6ec77260b618d16f0927f41d0da5ede708fab5"
2261
2261
  },
2262
2262
  {
2263
2263
  "contractVersion": 1,
@@ -2279,7 +2279,7 @@
2279
2279
  "agents can discover supported Node APIs without importing internal file paths"
2280
2280
  ],
2281
2281
  "breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945",
2282
- "auditDigest": "sha256:b64ca3023b9088ad5e7d77cd3e9c6a3e1a1c1861c1ee8d006354c77a1afb3ef5"
2282
+ "auditDigest": "sha256:318ce9c5c5ada815227a11e89418ab72854860cb61fd46ec58c6a69cd3dea58e"
2283
2283
  },
2284
2284
  {
2285
2285
  "contractVersion": 1,
@@ -2974,7 +2974,7 @@
2974
2974
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
2975
2975
  ],
2976
2976
  "breakingDigest": "sha256:6b8d38e92b2c67b5bc83fae0a3fd95bfa47582fbc176e6cdeebe7630a57534cb",
2977
- "auditDigest": "sha256:ce4fbf96de5b45c8b9e64645401175bef6f0d2dc96dc3d656615e6e44b92f1c0",
2977
+ "auditDigest": "sha256:20549663f5459414dcfb00aa9a3a549003bbc09159eeab6cea211db96ed0eab2",
2978
2978
  "compatibleBreakingDigests": [
2979
2979
  "sha256:30745921541e9b0f70475bb2178c2559f6aef248f6680670ccd44d8c5a69a6b1",
2980
2980
  "sha256:e264a79f9f399038c2fcfd21e4168c68c2e1485ee5c651c02242a02b622ac2be"
@@ -5444,5 +5444,5 @@
5444
5444
  "compatibilityFactCutRoot": "sha256:f61b975d4a96c921cc4bd37fb3ed9a0596b47004fe34dc7219979d697e3707f9",
5445
5445
  "compatibilityProofRegistryRoot": "sha256:b7194b811e4d3af2df4390bc4d1731e16a86215bd64ee18cb630dd5492f4fb63",
5446
5446
  "compatibilityDigest": "sha256:20411029d83211dff426fb6535a608902129844a5ccb4788db77d3f81becb839",
5447
- "contractDigest": "sha256:5a76cf045e2f9e7b14967526ce646d20e5e6d75ffca92e190313c0267bda852a"
5447
+ "contractDigest": "sha256:5627d46646cf2a5cfdbe86604e16938b108edb9a37a23b289695daa8d6a86fca"
5448
5448
  }