@kungfu-tech/buildchain 4.0.2 → 4.0.3-alpha.0

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 (233) hide show
  1. package/AGENTS.md +4 -4
  2. package/CONTRIBUTING.md +34 -0
  3. package/README.md +1 -1
  4. package/architecture/agent-change-map.md +154 -147
  5. package/architecture/{v4-architecture-constitution.md → architecture-constitution.md} +11 -11
  6. package/architecture/{v3-core-mechanism-inventory.md → baseline-core-mechanism-inventory.md} +1 -1
  7. package/architecture/{v4-bootstrap-authority.json → bootstrap-authority.json} +3 -3
  8. package/architecture/{v3-v4-capability-closure.md → capability-parity-closure.md} +3 -3
  9. package/architecture/{v3-v4-live-capability-inventory.json → capability-parity-live-capability-inventory.json} +4 -4
  10. package/architecture/{v4-capability-state-machine-manifest.json → capability-state-machine-manifest.json} +2 -2
  11. package/architecture/{v4-capability-state-machine-manifest.schema.json → capability-state-machine-manifest.schema.json} +2 -2
  12. package/architecture/ci-lane-change-budget.json +18 -0
  13. package/architecture/{v4-cross-platform-adopter-qualification.json → cross-platform-adopter-qualification.json} +3 -3
  14. package/architecture/{v4-delivery-authority-parity.json → delivery-authority-parity.json} +16 -16
  15. package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.json → delivery-warrant-shadow-bootstrap-plan.json} +3 -3
  16. package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.md → delivery-warrant-shadow-bootstrap-plan.md} +7 -7
  17. package/architecture/{v4-floating-consumer-policy.md → floating-consumer-policy.md} +1 -1
  18. package/architecture/implementation-naming.json +1273 -0
  19. package/architecture/internal-capabilities.json +171 -169
  20. package/architecture/maintainability-debt.json +87 -82
  21. package/architecture/maintainability-policy.json +15 -15
  22. package/architecture/{v4-next-development-parity.json → next-development-parity.json} +8 -8
  23. package/architecture/{v4-partial-mutation-recovery-qualification.json → partial-mutation-recovery-qualification.json} +8 -8
  24. package/architecture/{v4-platform-stage-checkpoints.json → platform-stage-checkpoints.json} +2 -2
  25. package/architecture/{v4-provider-operation-journal-contract.json → provider-operation-journal-contract.json} +9 -9
  26. package/architecture/{v4-publication-rehearsal-parity.json → publication-rehearsal-parity.json} +4 -4
  27. package/architecture/{v4-release-activation-shadow-domain.json → release-activation-shadow-domain.json} +8 -8
  28. package/architecture/{v4-release-topology.json → release-topology.json} +112 -56
  29. package/architecture/{v4-release-train-parity.json → release-train-parity.json} +2 -2
  30. package/architecture/{v4-runtime-ref-resume-authority.json → runtime-ref-resume-authority.json} +1 -1
  31. package/architecture/{v4-runtime-semantic-closure.json → runtime-semantic-closure.json} +2 -2
  32. package/architecture/{v4-rust-libnode-bridge-evaluation.json → rust-libnode-bridge-evaluation.json} +3 -3
  33. package/architecture/{v4-rust-libnode-bridge-spike.md → rust-libnode-bridge-spike.md} +6 -6
  34. package/architecture/{v4-rust-wasm-production-authority.json → rust-wasm-production-authority.json} +11 -11
  35. package/architecture/{v4-stable-publication-fence.json → stable-publication-fence.json} +6 -6
  36. package/architecture/{v4-stage-capsule-contract.json → stage-capsule-contract.json} +1 -1
  37. package/architecture/{v4-stage-capsule-qualification.json → stage-capsule-qualification.json} +6 -6
  38. package/architecture/{v4-stage-capsule-resume-planner.json → stage-capsule-resume-planner.json} +2 -2
  39. package/architecture/{v4-stage-capsule-store-contract.json → stage-capsule-store-contract.json} +4 -4
  40. package/architecture/{v4-tail-reseal-parity.json → tail-reseal-parity.json} +28 -28
  41. package/architecture/{v4-universal-workflow-bootstrap.json → universal-workflow-bootstrap.json} +9 -4
  42. package/architecture/{v4-universal-workflow-fault-campaign.json → universal-workflow-fault-campaign.json} +8 -8
  43. package/architecture/{v4-universal-workflow-train-admission.json → universal-workflow-train-admission.json} +8 -8
  44. package/architecture/workflow-taxonomy.json +11 -0
  45. package/bin/buildchain.mjs +3 -3
  46. package/bin/internal/adopter-delivery-cli.mjs +9 -9
  47. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  48. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.lock +1 -1
  49. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.toml +1 -1
  50. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/src/main.rs +3 -3
  51. package/dist/site/buildchain-contract.json +18 -18
  52. package/dist/site/buildchain-site.json +167 -71
  53. package/dist/site/capability-registry.json +5 -5
  54. package/dist/site/kfd-claims.json +226 -90
  55. package/dist/site/kfd-upstream-aggregate.json +1 -1
  56. package/dist/site/manual-registry.json +7 -7
  57. package/dist/site/node-api-registry.json +12929 -10491
  58. package/dist/site/page-registry.json +155 -59
  59. package/dist/site/public-surface-audit.json +65 -46
  60. package/dist/site/publication-authority-registry.json +27 -17
  61. package/dist/site/publication-registry.json +4 -4
  62. package/dist/site/release-provenance.json +18 -9
  63. package/dist/site/site-manifest.json +11 -11
  64. package/dist/site/workflow-registry.json +86 -52
  65. package/docs/MAP.md +4 -3
  66. package/docs/next-development-transition.md +24 -1
  67. package/docs/node-api-reference.md +435 -175
  68. package/docs/oci-publication.md +173 -0
  69. package/docs/publish-transaction.md +36 -3
  70. package/docs/release-flow.md +1 -1
  71. package/docs/reusable-build-surface.md +1 -1
  72. package/docs/v4-adopter-delivery.md +2 -2
  73. package/docs/v4-canonical-contracts.md +7 -7
  74. package/docs/v4-delivery-warrant-read-candidate.md +3 -3
  75. package/docs/v4-delivery-warrant-semantic-diff.md +3 -3
  76. package/docs/v4-production-release.md +8 -2
  77. package/docs/v4-publication-rehearsal.md +3 -3
  78. package/docs/v4-runtime-ref-resume-authority.md +2 -2
  79. package/docs/v4-rust-wasm-production-authority.md +6 -6
  80. package/docs/v4-stage-capsule.md +7 -7
  81. package/docs/v4-tail-reseal.md +1 -1
  82. package/docs/workflow-catalog.md +1 -0
  83. package/package.json +37 -26
  84. package/packages/compatibility/adopter-delivery.js +16 -0
  85. package/packages/compatibility/cross-platform-adopter-qualification.js +12 -0
  86. package/packages/compatibility/floating-consumer-policy.js +14 -0
  87. package/packages/compatibility/publication-qualification.js +11 -0
  88. package/packages/compatibility/publication-rehearsal.js +18 -0
  89. package/packages/compatibility/runtime-ref-resume-authority.js +13 -0
  90. package/packages/compatibility/tail-reseal-receipt.js +7 -0
  91. package/packages/compatibility/tail-reseal.js +11 -0
  92. package/packages/core/{v4-adopter-delivery-parity.js → adopter-delivery-parity.js} +12 -12
  93. package/packages/core/{v4-adopter-delivery.js → adopter-delivery.js} +24 -24
  94. package/packages/core/buildchain-contract.js +5 -5
  95. package/packages/core/buildchain-domain.wasm +0 -0
  96. package/packages/core/buildchain-publication-authority.js +1 -0
  97. package/packages/core/{v4-canonical-contracts.js → canonical-contracts.js} +32 -31
  98. package/packages/core/{v4-cross-platform-adopter-qualification.js → cross-platform-adopter-qualification.js} +19 -19
  99. package/packages/core/{v4-delivery-warrant-fixture-runner.js → delivery-warrant-fixture-runner.js} +36 -32
  100. package/packages/core/{v4-delivery-warrant-read-candidate.js → delivery-warrant-read-candidate.js} +40 -40
  101. package/packages/core/{v4-delivery-warrant-semantic-diff-gate.js → delivery-warrant-semantic-diff-gate.js} +58 -59
  102. package/packages/core/{v4-delivery-warrant-shadow-adapter.js → delivery-warrant-shadow-adapter.js} +15 -15
  103. package/packages/core/dev-delivery-execution-transfer.js +6 -6
  104. package/packages/core/dev-delivery-native-proof.js +12 -8
  105. package/packages/core/dev-delivery-warrant-legacy-recovery.js +1 -1
  106. package/packages/core/dev-delivery-warrant-native-compatibility.js +4 -4
  107. package/packages/core/dev-delivery-warrant-state.js +11 -11
  108. package/packages/core/dev-delivery-warrant.js +3 -3
  109. package/packages/core/domain-wasm-artifact.js +7 -0
  110. package/packages/core/{v4-domain-wasm.js → domain-wasm.js} +31 -31
  111. package/packages/core/{v4-floating-consumer-evidence.js → floating-consumer-evidence.js} +13 -13
  112. package/packages/core/{v4-floating-consumer-policy.js → floating-consumer-policy.js} +27 -29
  113. package/packages/core/{v4-floating-consumer-release-passport.js → floating-consumer-release-passport.js} +25 -25
  114. package/packages/core/index.js +4 -8
  115. package/packages/core/next-development-projection.js +24 -1
  116. package/packages/core/next-development-transition.js +5 -6
  117. package/packages/core/oci-compose-qualification.js +143 -0
  118. package/packages/core/oci-publication-bundle.js +281 -0
  119. package/packages/core/oci-publication-graph.js +206 -0
  120. package/packages/core/paper-runtime-channels.js +2 -2
  121. package/packages/core/paper.js +3 -3
  122. package/packages/core/partial-mutation-recovery-qualification.js +18 -0
  123. package/packages/core/{v4-platform-stage-checkpoints.js → platform-stage-checkpoints.js} +37 -37
  124. package/packages/core/{v4-product-publication.js → product-publication.js} +11 -9
  125. package/packages/core/{v4-protected-publication-source.js → protected-publication-source.js} +3 -3
  126. package/packages/core/provider-operation-journal.js +62 -0
  127. package/packages/core/{v4-provider-readback-idempotency.js → provider-readback-idempotency.js} +33 -33
  128. package/packages/core/public-export-compatibility.js +33 -0
  129. package/packages/core/publication-development.js +72 -0
  130. package/packages/core/{v4-publication-qualification.js → publication-qualification.js} +17 -17
  131. package/packages/core/{v4-publication-rehearsal-capsule.js → publication-rehearsal-capsule.js} +23 -23
  132. package/packages/core/publication-rehearsal-projection.js +2 -2
  133. package/packages/core/{v4-publication-rehearsal-provider-bindings.js → publication-rehearsal-provider-bindings.js} +4 -4
  134. package/packages/core/publication-rehearsal-runtime.js +21 -21
  135. package/packages/core/{v4-publication-rehearsal.js → publication-rehearsal.js} +33 -33
  136. package/packages/core/publication-sealed-bundle.js +78 -13
  137. package/packages/core/release-activation-shadow.js +32 -0
  138. package/packages/core/release-candidate.js +6 -6
  139. package/packages/core/{v4-release-invocation.js → release-invocation.js} +15 -15
  140. package/packages/core/release-passport.js +36 -36
  141. package/packages/core/release-tail-product-capabilities.js +9 -0
  142. package/packages/core/release-tail-provider-plane.js +10 -10
  143. package/packages/core/{v4-runtime-ref-resume-authority.js → runtime-ref-resume-authority.js} +36 -40
  144. package/packages/core/{v4-runtime-selector-persistence.js → runtime-selector-persistence.js} +7 -7
  145. package/packages/core/stable-publication-fence.js +28 -0
  146. package/packages/core/{v4-stage-capsule-local-store.js → stage-capsule-local-store.js} +56 -54
  147. package/packages/core/{v4-stage-capsule-qualification-campaign.js → stage-capsule-qualification-campaign.js} +37 -38
  148. package/packages/core/{v4-stage-capsule-qualification.js → stage-capsule-qualification.js} +28 -29
  149. package/packages/core/{v4-stage-capsule-resume-planner.js → stage-capsule-resume-planner.js} +29 -29
  150. package/packages/core/{v4-stage-capsule-store.js → stage-capsule-store.js} +59 -56
  151. package/packages/core/{v4-stage-capsule.js → stage-capsule.js} +45 -45
  152. package/packages/core/{v4-tail-reseal-contract.js → tail-reseal-contract.js} +6 -6
  153. package/packages/core/{v4-tail-reseal-github.js → tail-reseal-github.js} +12 -12
  154. package/packages/core/{v4-tail-reseal-receipt.js → tail-reseal-receipt.js} +22 -22
  155. package/packages/core/{v4-tail-reseal.js → tail-reseal.js} +29 -29
  156. package/packages/core/{v4-universal-workflow-bootstrap.js → universal-workflow-bootstrap.js} +23 -23
  157. package/scripts/{v4-architecture.mjs → architecture.mjs} +6 -6
  158. package/scripts/binary-publication-evidence.mjs +1 -1
  159. package/scripts/{v4-bridge-bootstrap.mjs → bridge-bootstrap.mjs} +14 -18
  160. package/scripts/{v4-bridge-evidence.mjs → bridge-evidence.mjs} +8 -8
  161. package/scripts/{build-v4-domain-wasm.mjs → build-domain-wasm.mjs} +6 -18
  162. package/scripts/{v3-v4-capability-catalog.mjs → capability-parity-catalog.mjs} +19 -19
  163. package/scripts/check-action-bundles.mjs +2 -2
  164. package/scripts/{check-v3-v4-capability-inventory.mjs → check-capability-parity-inventory.mjs} +42 -42
  165. package/scripts/check-core-mechanism-inventory.mjs +4 -1
  166. package/scripts/{check-v4-floating-consumer-policy-contract.mjs → check-floating-consumer-policy-contract.mjs} +8 -8
  167. package/scripts/check-implementation-naming.mjs +135 -0
  168. package/scripts/check-inventory.mjs +6 -5
  169. package/scripts/check-maintainability.mjs +9 -2
  170. package/scripts/{check-v4-public-dogfood-contract.mjs → check-public-dogfood-contract.mjs} +15 -15
  171. package/scripts/{check-v4-release-topology.mjs → check-release-topology.mjs} +53 -31
  172. package/scripts/{check-v4-runtime-semantic-closure.mjs → check-runtime-semantic-closure.mjs} +19 -16
  173. package/scripts/{check-v4-universal-workflow-bootstrap.mjs → check-universal-workflow-bootstrap.mjs} +14 -14
  174. package/scripts/{v4-consumer-policy.mjs → consumer-policy.mjs} +15 -15
  175. package/scripts/{copy-v4-domain-wasm.mjs → copy-domain-wasm.mjs} +3 -3
  176. package/scripts/{v4-cross-platform-adopter-qualification.mjs → cross-platform-adopter-qualification.mjs} +9 -9
  177. package/scripts/{v4-declarative-promotion-admission.mjs → declarative-promotion-admission.mjs} +4 -4
  178. package/scripts/dev-delivery-warrant-options.mjs +1 -1
  179. package/scripts/dev-delivery-warrant-store.mjs +29 -10
  180. package/scripts/dev-delivery-warrant.mjs +4 -4
  181. package/scripts/dev-pr-delivery-warrant.mjs +1 -1
  182. package/scripts/generate-channel-build-workflow.mjs +2 -2
  183. package/scripts/generate-channel-promotion-workflow.mjs +14 -31
  184. package/scripts/generate-release-candidate-passport.mjs +23 -23
  185. package/scripts/generate-site-bundle.mjs +17 -17
  186. package/scripts/{generate-v4-universal-workflow-facades.mjs → generate-universal-workflow-facades.mjs} +61 -21
  187. package/scripts/{v4-host-adapter.mjs → host-adapter.mjs} +1 -1
  188. package/scripts/implementation-references.mjs +25 -0
  189. package/scripts/init-repo.mjs +1 -1
  190. package/scripts/next-development-review.mjs +17 -11
  191. package/scripts/oci-compose-preview.mjs +261 -0
  192. package/scripts/{v4-platform-stage-checkpoint-rehearsal.mjs → platform-stage-checkpoint-rehearsal.mjs} +17 -17
  193. package/scripts/{v4-product-publication-intent.mjs → product-publication-intent.mjs} +16 -8
  194. package/scripts/publication-candidate-kind.mjs +93 -0
  195. package/scripts/publication-candidate-sealer.mjs +16 -1
  196. package/scripts/{v4-publication-rehearsal-fixture.mjs → publication-rehearsal-fixture.mjs} +5 -5
  197. package/scripts/{v4-publication-settlement.mjs → publication-settlement.mjs} +8 -8
  198. package/scripts/{v4-release-candidate-adapter.mjs → release-candidate-adapter.mjs} +4 -4
  199. package/scripts/release-candidate-resolver.mjs +15 -26
  200. package/scripts/release-tail.mjs +5 -5
  201. package/scripts/resume-from-candidate-run.mjs +35 -42
  202. package/scripts/site-capability-metadata.mjs +9 -0
  203. package/scripts/source-verification-evidence.mjs +7 -7
  204. package/scripts/{v4-stage-capsule-qualification.mjs → stage-capsule-qualification.mjs} +62 -62
  205. package/scripts/{v4-stage-capsule-resume-rehearsal.mjs → stage-capsule-resume-rehearsal.mjs} +6 -6
  206. package/scripts/{v4-tail-reseal-macos-rehearsal.mjs → tail-reseal-macos-rehearsal.mjs} +9 -9
  207. package/scripts/{v4-tail-reseal.mjs → tail-reseal.mjs} +19 -19
  208. package/scripts/universal-facade-maintainability.mjs +12 -3
  209. package/scripts/{v4-universal-workflow-backflow.mjs → universal-workflow-backflow.mjs} +10 -10
  210. package/scripts/{v4-universal-workflow-engine.mjs → universal-workflow-engine.mjs} +40 -38
  211. package/scripts/{v4-universal-workflow-self-dogfood.mjs → universal-workflow-self-dogfood.mjs} +12 -12
  212. package/scripts/verify-version-state-delta.mjs +4 -2
  213. package/scripts/{v4-warrant-shadow-plan.mjs → warrant-shadow-plan.mjs} +6 -6
  214. package/templates/universal-buildchain-bootstrap-recovery.yml +4 -4
  215. package/packages/core/buildchain-v4-domain.wasm +0 -0
  216. package/packages/core/v4-domain-wasm-artifact.js +0 -7
  217. package/packages/core/v4-partial-mutation-recovery-qualification.js +0 -18
  218. package/packages/core/v4-provider-operation-journal.js +0 -62
  219. package/packages/core/v4-release-activation-shadow.js +0 -32
  220. package/packages/core/v4-stable-publication-fence.js +0 -28
  221. /package/actions/{v4-release-candidate-promote → release-candidate-promote}/README.md +0 -0
  222. /package/architecture/{v4-adopter-delivery-parity.json → adopter-delivery-parity.json} +0 -0
  223. /package/architecture/{v3-core-mechanism-inventory.json → baseline-core-mechanism-inventory.json} +0 -0
  224. /package/architecture/{v4-canonical-contract-fixtures.json → canonical-contract-fixtures.json} +0 -0
  225. /package/architecture/{v4-compatibility-facts-parity.json → compatibility-facts-parity.json} +0 -0
  226. /package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.schema.json → delivery-warrant-shadow-bootstrap-plan.schema.json} +0 -0
  227. /package/architecture/{v4-delivery-warrant-shadow-fixtures.json → delivery-warrant-shadow-fixtures.json} +0 -0
  228. /package/architecture/{v4-delivery-warrant-shadow-fixtures.schema.json → delivery-warrant-shadow-fixtures.schema.json} +0 -0
  229. /package/architecture/{v4-exception-ledger.json → exception-ledger.json} +0 -0
  230. /package/architecture/{v4-exception-ledger.schema.json → exception-ledger.schema.json} +0 -0
  231. /package/architecture/{v4-floating-consumer-policy.json → floating-consumer-policy.json} +0 -0
  232. /package/architecture/{v4-publication-facade-patches.json → publication-facade-patches.json} +0 -0
  233. /package/architecture/{v4-release-invocation-fixtures.json → release-invocation-fixtures.json} +0 -0
@@ -11,11 +11,11 @@ const DEFAULT_ROOT = path.resolve(
11
11
  );
12
12
  const CALLER_PATH = ".github/workflows/self-build-public-consumer-dogfood.yml";
13
13
  const REUSABLE_PATH = ".github/workflows/public-build-stage-capsule-canary.yml";
14
- export const V4_PUBLIC_DOGFOOD_ALPHA_REF = "v4-alpha";
14
+ export const PUBLIC_DOGFOOD_ALPHA_REF = "v4-alpha";
15
15
  const PRIVATE_CONSUMER = ["buildchain", "self", "dogfood"].join("-");
16
16
  const PRIVATE_SHADOW = ["kungfu", "shadow"].join("-");
17
17
 
18
- export function expectedV4PublicDogfoodWorkflow(validationRef) {
18
+ export function expectedPublicDogfoodWorkflow(validationRef) {
19
19
  return `name: V4 Public Consumer Dogfood
20
20
 
21
21
  on:
@@ -109,7 +109,7 @@ function assertWorkflowInventory(root) {
109
109
  }
110
110
  if (
111
111
  relative !== REUSABLE_PATH &&
112
- text.includes("scripts/v4-stage-capsule-qualification.mjs")
112
+ text.includes("scripts/stage-capsule-qualification.mjs")
113
113
  )
114
114
  fail(`${relative} invokes the private qualification script directly`);
115
115
  if (
@@ -136,7 +136,7 @@ function assertProtectedVerify(root) {
136
136
  for (const forbidden of [
137
137
  "stage-capsule-qualification:",
138
138
  "stage-capsule-qualification-reconciliation:",
139
- "scripts/v4-stage-capsule-qualification.mjs",
139
+ "scripts/stage-capsule-qualification.mjs",
140
140
  ])
141
141
  if (verify.includes(forbidden))
142
142
  fail(`Verify retains private dogfood path ${forbidden}`);
@@ -145,14 +145,14 @@ function assertProtectedVerify(root) {
145
145
  function assertArchitecture(root) {
146
146
  const architecture = exactJson(
147
147
  root,
148
- "architecture/v4-stage-capsule-qualification.json",
148
+ "architecture/stage-capsule-qualification.json",
149
149
  );
150
150
  const dogfood = architecture.publicConsumerDogfood;
151
151
  const validationRef = dogfood?.validationRef;
152
- if (validationRef !== V4_PUBLIC_DOGFOOD_ALPHA_REF)
152
+ if (validationRef !== PUBLIC_DOGFOOD_ALPHA_REF)
153
153
  fail("architecture validationRef must use the floating v4-alpha channel");
154
154
  const caller = read(root, CALLER_PATH);
155
- if (caller !== expectedV4PublicDogfoodWorkflow(validationRef))
155
+ if (caller !== expectedPublicDogfoodWorkflow(validationRef))
156
156
  fail(`${CALLER_PATH} must remain the exact thin public consumer caller`);
157
157
  if (JSON.stringify(architecture.campaign?.consumers) !== '["buildchain"]')
158
158
  fail(
@@ -218,10 +218,10 @@ function assertConsumerLifecycle(root) {
218
218
 
219
219
  function assertPolicySources(root) {
220
220
  for (const relative of [
221
- "packages/core/v4-stage-capsule-qualification.js",
222
- "packages/core/v4-stage-capsule-qualification-campaign.js",
223
- "scripts/v4-stage-capsule-qualification.mjs",
224
- "architecture/v4-stage-capsule-qualification.json",
221
+ "packages/core/stage-capsule-qualification.js",
222
+ "packages/core/stage-capsule-qualification-campaign.js",
223
+ "scripts/stage-capsule-qualification.mjs",
224
+ "architecture/stage-capsule-qualification.json",
225
225
  "docs/v4-stage-capsule.md",
226
226
  ])
227
227
  assertNoPrivateMarkers(relative, read(root, relative));
@@ -231,7 +231,7 @@ function assertPolicySources(root) {
231
231
  "same public reusable-workflow contract as every other consumer",
232
232
  "No agent may add or restore a relative/self reusable-workflow call",
233
233
  "never solve recursion with an internal exception",
234
- "scripts/check-v4-public-dogfood-contract.mjs",
234
+ "scripts/check-public-dogfood-contract.mjs",
235
235
  "source-persisted exact commit SHA",
236
236
  "v4-alpha",
237
237
  ])
@@ -241,13 +241,13 @@ function assertPolicySources(root) {
241
241
  const packageJson = exactJson(root, "package.json");
242
242
  if (
243
243
  !String(packageJson.scripts?.check || "").includes(
244
- "node scripts/check-v4-public-dogfood-contract.mjs",
244
+ "node scripts/check-public-dogfood-contract.mjs",
245
245
  )
246
246
  )
247
247
  fail("pnpm run check does not include the public dogfood gate");
248
248
  }
249
249
 
250
- export function checkV4PublicDogfoodContract(root = DEFAULT_ROOT) {
250
+ export function checkPublicDogfoodContract(root = DEFAULT_ROOT) {
251
251
  assertReusableWorkflow(root);
252
252
  assertWorkflowInventory(root);
253
253
  assertProtectedVerify(root);
@@ -270,7 +270,7 @@ if (
270
270
  path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)
271
271
  ) {
272
272
  try {
273
- process.stdout.write(`${JSON.stringify(checkV4PublicDogfoodContract())}\n`);
273
+ process.stdout.write(`${JSON.stringify(checkPublicDogfoodContract())}\n`);
274
274
  } catch (error) {
275
275
  process.stderr.write(`${error.message}\n`);
276
276
  process.exitCode = 1;
@@ -14,7 +14,7 @@ import {
14
14
  } from "../packages/core/workflow-yaml-contract.js";
15
15
 
16
16
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
17
- const ledgerPath = path.join(root, "architecture/v4-release-topology.json");
17
+ const ledgerPath = path.join(root, "architecture/release-topology.json");
18
18
 
19
19
  function read(relative) {
20
20
  return fs.readFileSync(path.join(root, relative), "utf8");
@@ -22,10 +22,11 @@ function read(relative) {
22
22
 
23
23
  const LOCAL_MODULE_EXTENSIONS = ["", ".js", ".mjs", ".cjs"];
24
24
  const PRIVILEGED_ENTRYPOINTS = [
25
- "actions/v4-release-candidate-promote/index.js",
25
+ "actions/release-candidate-promote/index.js",
26
26
  "scripts/binary-publication-evidence.mjs",
27
27
  "scripts/next-development-review.mjs",
28
- "scripts/v4-publication-settlement.mjs",
28
+ "scripts/oci-compose-preview.mjs",
29
+ "scripts/publication-settlement.mjs",
29
30
  ];
30
31
 
31
32
  export function localModuleSpecifiers(source) {
@@ -137,12 +138,12 @@ function productionFiles(relative, extensions) {
137
138
  function matchingProductionFiles(roots, extensions, pattern) {
138
139
  return roots
139
140
  .flatMap((relative) => productionFiles(relative, extensions))
140
- .filter((relative) => relative !== "scripts/check-v4-release-topology.mjs")
141
+ .filter((relative) => relative !== "scripts/check-release-topology.mjs")
141
142
  .filter((relative) => pattern.test(read(relative)))
142
143
  .sort();
143
144
  }
144
145
 
145
- export function discoverV4ReleaseAuthorityClosure() {
146
+ export function discoverReleaseAuthorityClosure() {
146
147
  const providerPlane = matchingProductionFiles(
147
148
  ["actions", "packages/core"],
148
149
  [".js", ".mjs", ".cjs"],
@@ -151,19 +152,19 @@ export function discoverV4ReleaseAuthorityClosure() {
151
152
  const runtimeSelectors = matchingProductionFiles(
152
153
  [".github/workflows", "scripts", "packages/core"],
153
154
  [".yml", ".yaml", ".js", ".mjs", ".cjs"],
154
- /(?:promotion-runtime-sha|resume-buildchain-runtime-sha|BUILDCHAIN_(?:CURRENT_RUNTIME_SHA|RUNTIME_REF|RESUME_CANDIDATE_RUN_ID)|authorizeV4RuntimeSelection|scanV4RuntimeSelectorPersistence|v4-release-candidate-adapter)/u,
155
+ /(?:promotion-runtime-sha|resume-buildchain-runtime-sha|BUILDCHAIN_(?:CURRENT_RUNTIME_SHA|RUNTIME_REF|RESUME_CANDIDATE_RUN_ID)|authorizeRuntimeSelection|scanRuntimeSelectorPersistence|release-candidate-adapter)/u,
155
156
  );
156
157
  const terminalProjections = matchingProductionFiles(
157
158
  [".github/workflows", "actions", "packages/core", "scripts"],
158
159
  [".yml", ".yaml", ".js", ".mjs", ".cjs"],
159
- /(?:createV4ReleaseReceipt|release-receipt\.json|V4_RELEASE_RECEIPT_CONTRACT)/u,
160
+ /(?:createReleaseReceipt|release-receipt\.json|RELEASE_RECEIPT_CONTRACT)/u,
160
161
  );
161
162
  const privilegedModules = discoverStaticModuleClosure(PRIVILEGED_ENTRYPOINTS);
162
- const rustWasmArtifact = "packages/core/buildchain-v4-domain.wasm";
163
+ const rustWasmArtifact = "packages/core/buildchain-domain.wasm";
163
164
  const rustWasmDistributions = [
164
- "actions/promote-buildchain-ref/dist/buildchain-v4-domain.wasm",
165
- "actions/release-tail/dist/buildchain-v4-domain.wasm",
166
- "actions/v4-release-candidate-promote/dist/buildchain-v4-domain.wasm",
165
+ "actions/promote-buildchain-ref/dist/buildchain-domain.wasm",
166
+ "actions/release-tail/dist/buildchain-domain.wasm",
167
+ "actions/release-candidate-promote/dist/buildchain-domain.wasm",
167
168
  ];
168
169
  const legacyEngineModules = productionFiles(
169
170
  "actions/promote-buildchain-ref",
@@ -183,7 +184,7 @@ export function discoverV4ReleaseAuthorityClosure() {
183
184
  ]),
184
185
  ].sort(),
185
186
  runtimeSelectors,
186
- runtimeEngines: ["actions/v4-release-candidate-promote/index.js"],
187
+ runtimeEngines: ["actions/release-candidate-promote/index.js"],
187
188
  terminalProjections,
188
189
  privilegedExecutableClosure: {
189
190
  entrypoints: PRIVILEGED_ENTRYPOINTS,
@@ -191,8 +192,8 @@ export function discoverV4ReleaseAuthorityClosure() {
191
192
  root: rootedPathSet(privilegedModules),
192
193
  },
193
194
  rustWasmAuthority: {
194
- loader: "packages/core/v4-domain-wasm.js",
195
- metadata: "packages/core/v4-domain-wasm-artifact.js",
195
+ loader: "packages/core/domain-wasm.js",
196
+ metadata: "packages/core/domain-wasm-artifact.js",
196
197
  artifact: rustWasmArtifact,
197
198
  artifactRoot: fileSha256(rustWasmArtifact),
198
199
  distributedArtifacts: rustWasmDistributions,
@@ -233,13 +234,21 @@ function workflowSnapshot(relative) {
233
234
  .map((job) => {
234
235
  const block = jobBlock(source, job.id);
235
236
  const uses = job.uses || null;
237
+ // A built-in publisher still requires mutation authority when the caller supplies its envelope.
238
+ const inheritedPublisher =
239
+ !/^ permissions:/mu.test(block) &&
240
+ /uses:.*actions\/release-candidate-promote/u.test(block);
236
241
  return {
237
242
  id: job.id,
238
243
  kind: uses ? "reusable-call" : "runner",
239
244
  uses,
240
245
  permissions: {
241
- contents: permission(block, "contents"),
242
- idToken: permission(block, "id-token"),
246
+ contents:
247
+ permission(block, "contents") ||
248
+ (inheritedPublisher ? "inherited" : null),
249
+ idToken:
250
+ permission(block, "id-token") ||
251
+ (inheritedPublisher ? "inherited" : null),
243
252
  },
244
253
  carriers: {
245
254
  artifactDownload: /uses:\s+actions\/download-artifact@/u.test(block),
@@ -247,9 +256,11 @@ function workflowSnapshot(relative) {
247
256
  jobOutput: /GITHUB_OUTPUT/u.test(block),
248
257
  },
249
258
  mutationSignals: [
250
- /contents:\s*write/u.test(block) && "contents-write",
251
- /id-token:\s*write/u.test(block) && "oidc-write",
252
- /(?:promote-buildchain-ref|v4-release-candidate-promote)/u.test(
259
+ (/contents:\s*write/u.test(block) || inheritedPublisher) &&
260
+ "contents-write",
261
+ (/id-token:\s*write/u.test(block) || inheritedPublisher) &&
262
+ "oidc-write",
263
+ /(?:promote-buildchain-ref|actions\/release-candidate-promote)/u.test(
253
264
  block,
254
265
  ) && "promotion-runtime",
255
266
  /(?:git push|npm publish|gh release (?:create|upload))/u.test(
@@ -270,7 +281,7 @@ function workflowSnapshot(relative) {
270
281
  };
271
282
  }
272
283
 
273
- export function discoverV4ReleaseTopology(
284
+ export function discoverReleaseTopology(
274
285
  workflowPaths,
275
286
  semanticWorkflowPaths = workflowPaths,
276
287
  ) {
@@ -355,7 +366,7 @@ export function discoverV4ReleaseTopology(
355
366
  };
356
367
  }
357
368
 
358
- export function findUnknownV4ReleaseTopology(
369
+ export function findUnknownReleaseTopology(
359
370
  workflowPaths,
360
371
  allWorkflowPaths = fs
361
372
  .readdirSync(path.join(root, ".github/workflows"))
@@ -374,7 +385,7 @@ export function findUnknownV4ReleaseTopology(
374
385
  .filter((relative) => {
375
386
  const source = readWorkflow(relative);
376
387
  const usesReleaseAuthority = parseYamlUses(source).some(({ value }) =>
377
- /(?:release-candidate-promote|promote-buildchain-ref|v4-release-candidate-promote|release-tail)/u.test(
388
+ /(?:release-candidate-promote|promote-buildchain-ref|release-tail)/u.test(
378
389
  value,
379
390
  ),
380
391
  );
@@ -395,7 +406,7 @@ export function findUnknownV4ReleaseTopology(
395
406
  }
396
407
 
397
408
  function assertClosedWorld(workflowPaths) {
398
- const unknown = findUnknownV4ReleaseTopology(workflowPaths);
409
+ const unknown = findUnknownReleaseTopology(workflowPaths);
399
410
  assert.deepEqual(
400
411
  unknown,
401
412
  [],
@@ -426,7 +437,7 @@ function assertAuthorityClosure(ledger) {
426
437
  `authority closure path is not a file: ${relative}`,
427
438
  );
428
439
  }
429
- const discovered = discoverV4ReleaseAuthorityClosure();
440
+ const discovered = discoverReleaseAuthorityClosure();
430
441
  for (const className of Object.keys(discovered))
431
442
  assert.deepEqual(
432
443
  closure[className],
@@ -452,7 +463,7 @@ function assertAuthorityClosure(ledger) {
452
463
  `legacy release engines remain reachable from APPLY: ${reachableLegacyEngines.join(", ")}`,
453
464
  );
454
465
  assert.deepEqual(closure.runtimeEngines, [
455
- "actions/v4-release-candidate-promote/index.js",
466
+ "actions/release-candidate-promote/index.js",
456
467
  ]);
457
468
  assert.equal(
458
469
  closure.freshEntry,
@@ -479,7 +490,7 @@ function assertAuthorityClosure(ledger) {
479
490
  );
480
491
  assert.match(
481
492
  canonicalWorkflow,
482
- /scripts\/v4-release-candidate-adapter\.mjs/u,
493
+ /scripts\/release-candidate-adapter\.mjs/u,
483
494
  );
484
495
  assert.match(
485
496
  canonicalWorkflow,
@@ -487,12 +498,23 @@ function assertAuthorityClosure(ledger) {
487
498
  );
488
499
  }
489
500
 
490
- export function checkV4ReleaseTopology() {
501
+ export function checkReleaseTopology() {
491
502
  const ledger = JSON.parse(fs.readFileSync(ledgerPath, "utf8"));
492
503
  assert.equal(ledger.contract, "kungfu-buildchain-v4-release-topology/v1");
493
504
  assertClosedWorld(ledger.closedWorld.workflowPaths);
494
505
  assertAuthorityClosure(ledger);
495
- const actual = discoverV4ReleaseTopology(
506
+ const preview = ledger.postPublicationScope;
507
+ assert.deepEqual(preview.workflowPaths, [
508
+ ".github/workflows/public-release-oci-compose-preview.yml",
509
+ ]);
510
+ const previewTopology = discoverReleaseTopology(
511
+ preview.workflowPaths,
512
+ preview.workflowPaths,
513
+ );
514
+ assert.equal(previewTopology.semanticMetrics.contentsWriteJobCount, 1);
515
+ assert.equal(previewTopology.semanticMetrics.oidcWriteJobCount, 0);
516
+ assert.deepEqual(preview.observedTopology, previewTopology);
517
+ const actual = discoverReleaseTopology(
496
518
  ledger.closedWorld.workflowPaths,
497
519
  ledger.semanticScope.workflowPaths,
498
520
  );
@@ -526,13 +548,13 @@ if (
526
548
  ) {
527
549
  if (process.argv.includes("--print-closure")) {
528
550
  process.stdout.write(
529
- `${JSON.stringify(discoverV4ReleaseAuthorityClosure(), null, 2)}\n`,
551
+ `${JSON.stringify(discoverReleaseAuthorityClosure(), null, 2)}\n`,
530
552
  );
531
553
  } else if (process.argv.includes("--print")) {
532
554
  const ledger = JSON.parse(fs.readFileSync(ledgerPath, "utf8"));
533
555
  process.stdout.write(
534
556
  `${JSON.stringify(
535
- discoverV4ReleaseTopology(
557
+ discoverReleaseTopology(
536
558
  ledger.closedWorld.workflowPaths,
537
559
  ledger.semanticScope.workflowPaths,
538
560
  ),
@@ -541,7 +563,7 @@ if (
541
563
  )}\n`,
542
564
  );
543
565
  } else {
544
- checkV4ReleaseTopology();
566
+ checkReleaseTopology();
545
567
  process.stdout.write("v4 release topology: ok\n");
546
568
  }
547
569
  }
@@ -4,10 +4,10 @@ import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
7
- export const V4_RUNTIME_SEMANTIC_CLOSURE_CONTRACT =
7
+ export const RUNTIME_SEMANTIC_CLOSURE_CONTRACT =
8
8
  "kungfu-buildchain-v4-runtime-semantic-closure";
9
- export const V4_RUNTIME_SEMANTIC_CLOSURE_PATH =
10
- "architecture/v4-runtime-semantic-closure.json";
9
+ export const RUNTIME_SEMANTIC_CLOSURE_PATH =
10
+ "architecture/runtime-semantic-closure.json";
11
11
  export const REQUIRED_RUNTIME_EVIDENCE = Object.freeze([
12
12
  "positive",
13
13
  "negative",
@@ -159,17 +159,20 @@ function validateAuthority(capability, stateMachine, issues) {
159
159
 
160
160
  export function validateRuntimeSemanticClosure({
161
161
  root = process.cwd(),
162
- manifest = loadJson(root, V4_RUNTIME_SEMANTIC_CLOSURE_PATH),
163
- v3Inventory = loadJson(root, "architecture/v3-core-mechanism-inventory.json"),
164
- v4Manifest = loadJson(
162
+ manifest = loadJson(root, RUNTIME_SEMANTIC_CLOSURE_PATH),
163
+ v3Inventory: baselineInventory = loadJson(
165
164
  root,
166
- "architecture/v4-capability-state-machine-manifest.json",
165
+ "architecture/baseline-core-mechanism-inventory.json",
166
+ ),
167
+ v4Manifest: domainManifest = loadJson(
168
+ root,
169
+ "architecture/capability-state-machine-manifest.json",
167
170
  ),
168
171
  } = {}) {
169
172
  const issues = [];
170
173
  if (
171
174
  manifest?.schemaVersion !== 1 ||
172
- manifest?.contract !== V4_RUNTIME_SEMANTIC_CLOSURE_CONTRACT
175
+ manifest?.contract !== RUNTIME_SEMANTIC_CLOSURE_CONTRACT
173
176
  )
174
177
  issues.push(
175
178
  "runtime semantic closure contract or schemaVersion is invalid",
@@ -178,13 +181,13 @@ export function validateRuntimeSemanticClosure({
178
181
  issues.push("runtime semantic closure evidence dimensions drifted");
179
182
 
180
183
  const mechanisms = new Map(
181
- (v3Inventory.mechanisms || []).map((entry) => [entry.id, entry]),
184
+ (baselineInventory.mechanisms || []).map((entry) => [entry.id, entry]),
182
185
  );
183
- const v4Capabilities = new Map(
184
- (v4Manifest.capabilities || []).map((entry) => [entry.id, entry]),
186
+ const domainCapabilities = new Map(
187
+ (domainManifest.capabilities || []).map((entry) => [entry.id, entry]),
185
188
  );
186
189
  const stateMachines = new Map(
187
- (v4Manifest.stateMachines || []).map((entry) => [entry.id, entry]),
190
+ (domainManifest.stateMachines || []).map((entry) => [entry.id, entry]),
188
191
  );
189
192
  const capabilities = Array.isArray(manifest?.capabilities)
190
193
  ? manifest.capabilities
@@ -201,7 +204,7 @@ export function validateRuntimeSemanticClosure({
201
204
  if (
202
205
  !sameMembers(
203
206
  capabilities.map((entry) => entry.id),
204
- v4Capabilities.keys(),
207
+ domainCapabilities.keys(),
205
208
  )
206
209
  )
207
210
  issues.push(
@@ -219,15 +222,15 @@ export function validateRuntimeSemanticClosure({
219
222
  }
220
223
  ids.add(capability.id);
221
224
  const mechanism = mechanisms.get(capability.id);
222
- const v4Capability = v4Capabilities.get(capability.id);
223
- if (!mechanism || !v4Capability) continue;
225
+ const domainCapability = domainCapabilities.get(capability.id);
226
+ if (!mechanism || !domainCapability) continue;
224
227
  if (capability.sourceMechanismId !== capability.id)
225
228
  issues.push(`${capability.id}: source mechanism identity drifted`);
226
229
  validateImplementation(root, mechanism, capability, issues);
227
230
  validateResidualClosure(mechanism, capability, issues);
228
231
  validateEvidence(root, mechanism, capability, issues);
229
232
  validateAuthority(capability, stateMachines.get(capability.id), issues);
230
- for (const surface of v4Capability.surfaces || []) {
233
+ for (const surface of domainCapability.surfaces || []) {
231
234
  if (!surfaces.has(surface))
232
235
  issues.push(
233
236
  `${capability.id}: executable v4 surface is absent: ${surface}`,
@@ -8,16 +8,16 @@ import { fileURLToPath } from "node:url";
8
8
 
9
9
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
10
10
  const contract = JSON.parse(
11
- fs.readFileSync(
12
- path.join(root, "architecture/v4-universal-workflow-bootstrap.json"),
13
- "utf8",
14
- ),
11
+ fs.readFileSync(path.join(root, "architecture/universal-workflow-bootstrap.json"), "utf8"),
15
12
  );
16
13
  const admissionPolicy = JSON.parse(
17
- fs.readFileSync(
18
- path.join(root, "architecture/v4-universal-workflow-train-admission.json"),
19
- "utf8",
20
- ),
14
+ fs.readFileSync(path.join(root, "architecture/universal-workflow-train-admission.json"), "utf8"),
15
+ );
16
+ const admissionObservedAt = Date.now();
17
+ assert.ok(
18
+ admissionObservedAt >= Date.parse(admissionPolicy.validFrom) &&
19
+ admissionObservedAt < Date.parse(admissionPolicy.expiresAt),
20
+ `release admission policy is outside its validity window (${admissionPolicy.validFrom} to ${admissionPolicy.expiresAt}); renew it through protected review before publishing`,
21
21
  );
22
22
  const fileRoot = (relative) =>
23
23
  `sha256:${crypto
@@ -131,12 +131,12 @@ assert.ok(!admissionPolicy.allowedCapabilities.includes("workflow-contract"));
131
131
  assert.deepEqual(
132
132
  admissionPolicy.contractRoots,
133
133
  [
134
- fileRoot("architecture/v4-universal-workflow-bootstrap.json"),
134
+ fileRoot("architecture/universal-workflow-bootstrap.json"),
135
135
  fileRoot(contract.bootstrap.faultCampaign),
136
- fileRoot("packages/core/v4-universal-workflow-bootstrap.js"),
137
- fileRoot("scripts/v4-universal-workflow-backflow.mjs"),
138
- fileRoot("scripts/v4-universal-workflow-engine.mjs"),
139
- fileRoot("scripts/v4-universal-workflow-self-dogfood.mjs"),
136
+ fileRoot("packages/core/universal-workflow-bootstrap.js"),
137
+ fileRoot("scripts/universal-workflow-backflow.mjs"),
138
+ fileRoot("scripts/universal-workflow-engine.mjs"),
139
+ fileRoot("scripts/universal-workflow-self-dogfood.mjs"),
140
140
  fileRoot(contract.bootstrap.publicWorkflow),
141
141
  ].sort(),
142
142
  );
@@ -171,7 +171,7 @@ assert.match(
171
171
  assert.match(bootstrapSource, /settle:[\s\S]*needs: \[admit, execute\]/u);
172
172
  assert.match(
173
173
  bootstrapSource,
174
- /ascii_downcase\) == "kungfu-origin"[\s\S]*\.name == "check"[\s\S]*map\(select\(\.status == "completed" and \(\.conclusion \/\/ ""\) != ""\)\)[\s\S]*candidate\/architecture\/v4-universal-workflow-train-admission\.json/u,
174
+ /ascii_downcase\) == "kungfu-origin"[\s\S]*\.name == "check"[\s\S]*map\(select\(\.status == "completed" and \(\.conclusion \/\/ ""\) != ""\)\)[\s\S]*candidate\/architecture\/universal-workflow-train-admission\.json/u,
175
175
  );
176
176
  assert.match(
177
177
  bootstrapSource,
@@ -3,11 +3,11 @@ import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { pathToFileURL } from "node:url";
5
5
  import {
6
- certifyV4FloatingConsumerPolicyReceipt,
7
- resolveV4FloatingConsumerPolicyAuthority,
8
- scanV4FloatingConsumerPolicy,
9
- v4ConsumerPolicyScannerRoot,
10
- } from "../packages/core/v4-floating-consumer-policy.js";
6
+ certifyFloatingConsumerPolicyReceipt,
7
+ resolveFloatingConsumerPolicyAuthority,
8
+ scanFloatingConsumerPolicy,
9
+ consumerPolicyScannerRoot,
10
+ } from "../packages/core/floating-consumer-policy.js";
11
11
  import { writeGitHubOutputs } from "./build-contract-core.mjs";
12
12
  const RUNTIME_ROOT = path.resolve(import.meta.dirname, "..");
13
13
  function parseArgs(argv) {
@@ -36,7 +36,7 @@ function writeJson(file, value) {
36
36
  fs.mkdirSync(path.dirname(file), { recursive: true });
37
37
  fs.writeFileSync(file, `${JSON.stringify(value, null, 2)}\n`);
38
38
  }
39
- export { v4ConsumerPolicyScannerRoot };
39
+ export { consumerPolicyScannerRoot };
40
40
  export function scanCommand(options = {}) {
41
41
  const root = path.resolve(
42
42
  options.root || env("BUILDCHAIN_CONSUMER_ROOT", process.cwd()),
@@ -49,13 +49,13 @@ export function scanCommand(options = {}) {
49
49
  options.output ||
50
50
  env(
51
51
  "BUILDCHAIN_V4_POLICY_RECEIPT_PATH",
52
- ".buildchain/evidence/v4-consumer-policy-receipt.json",
52
+ ".buildchain/evidence/consumer-policy-receipt.json",
53
53
  ),
54
54
  );
55
55
  const policy = readJson(
56
- path.join(RUNTIME_ROOT, "architecture/v4-floating-consumer-policy.json"),
56
+ path.join(RUNTIME_ROOT, "architecture/floating-consumer-policy.json"),
57
57
  );
58
- const result = scanV4FloatingConsumerPolicy({
58
+ const result = scanFloatingConsumerPolicy({
59
59
  root,
60
60
  invocationRoot,
61
61
  repository: options.repository || env("GITHUB_REPOSITORY"),
@@ -86,7 +86,7 @@ export function scanCommand(options = {}) {
86
86
  ".buildchain/alpha-contract-lock.json",
87
87
  ),
88
88
  policy,
89
- scannerRoot: v4ConsumerPolicyScannerRoot(),
89
+ scannerRoot: consumerPolicyScannerRoot(),
90
90
  });
91
91
  writeJson(output, result);
92
92
  writeGitHubOutputs({
@@ -137,13 +137,13 @@ export function certifyCommand(options = {}) {
137
137
  receipt?.invocation?.workflow;
138
138
  const resolvedRuntimeSha =
139
139
  options.resolvedRuntimeSha || env("BUILDCHAIN_EXPECTED_RUNTIME_SHA");
140
- const authority = resolveV4FloatingConsumerPolicyAuthority({
140
+ const authority = resolveFloatingConsumerPolicyAuthority({
141
141
  runtimeRoot: RUNTIME_ROOT,
142
142
  callerRoot,
143
143
  stableLockPath,
144
144
  alphaLockPath,
145
145
  });
146
- const authorityScan = scanV4FloatingConsumerPolicy({
146
+ const authorityScan = scanFloatingConsumerPolicy({
147
147
  root: callerRoot,
148
148
  repository,
149
149
  sourceSha,
@@ -163,7 +163,7 @@ export function certifyCommand(options = {}) {
163
163
  scannerRoot: authority.scannerRoot,
164
164
  contractLocks: authority.contractLocks,
165
165
  };
166
- const result = certifyV4FloatingConsumerPolicyReceipt({
166
+ const result = certifyFloatingConsumerPolicyReceipt({
167
167
  receipt,
168
168
  receiptRoot,
169
169
  expectedReceiptRoot: authorityScan.receiptRoot,
@@ -183,7 +183,7 @@ export function certifyCommand(options = {}) {
183
183
  options.output ||
184
184
  env(
185
185
  "BUILDCHAIN_V4_POLICY_CERTIFICATION_PATH",
186
- ".buildchain/evidence/v4-consumer-policy-certification.json",
186
+ ".buildchain/evidence/consumer-policy-certification.json",
187
187
  ),
188
188
  );
189
189
  const documentWithAuthority = {
@@ -211,7 +211,7 @@ function main(argv = process.argv.slice(2)) {
211
211
  ? certifyCommand(options)
212
212
  : (() => {
213
213
  throw new Error(
214
- "usage: v4-consumer-policy.mjs <scan|certify> [--option value]",
214
+ "usage: consumer-policy.mjs <scan|certify> [--option value]",
215
215
  );
216
216
  })();
217
217
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
@@ -5,10 +5,10 @@ import { fileURLToPath } from "node:url";
5
5
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
6
6
  const destination = path.resolve(process.argv[2] || "");
7
7
  if (!process.argv[2] || path.basename(destination) !== "dist") {
8
- throw new Error("usage: copy-v4-domain-wasm.mjs ACTION_DIST_DIRECTORY");
8
+ throw new Error("usage: copy-domain-wasm.mjs ACTION_DIST_DIRECTORY");
9
9
  }
10
10
  fs.mkdirSync(destination, { recursive: true });
11
11
  fs.copyFileSync(
12
- path.join(root, "packages", "core", "buildchain-v4-domain.wasm"),
13
- path.join(destination, "buildchain-v4-domain.wasm"),
12
+ path.join(root, "packages", "core", "buildchain-domain.wasm"),
13
+ path.join(destination, "buildchain-domain.wasm"),
14
14
  );
@@ -5,10 +5,10 @@ import fs from "node:fs";
5
5
  import path from "node:path";
6
6
 
7
7
  import {
8
- createV4CrossPlatformAdopterReport,
9
- qualifyV4CrossPlatformAdopters,
10
- summarizeV3V4CapabilityInventory,
11
- } from "../packages/core/v4-cross-platform-adopter-qualification.js";
8
+ createCrossPlatformAdopterReport,
9
+ qualifyCrossPlatformAdopters,
10
+ summarizeBaselineCapabilityInventory,
11
+ } from "../packages/core/cross-platform-adopter-qualification.js";
12
12
 
13
13
  function flag(name, fallback = "") {
14
14
  const index = process.argv.indexOf(`--${name}`);
@@ -74,9 +74,9 @@ function runPlatform() {
74
74
  });
75
75
 
76
76
  const inventory = readJson(
77
- path.join(runtimeRoot, "architecture/v3-v4-live-capability-inventory.json"),
77
+ path.join(runtimeRoot, "architecture/capability-parity-live-capability-inventory.json"),
78
78
  );
79
- const inventoryEvidence = summarizeV3V4CapabilityInventory(inventory);
79
+ const inventoryEvidence = summarizeBaselineCapabilityInventory(inventory);
80
80
  fs.mkdirSync(workRoot, { recursive: true });
81
81
  const initialPath = path.join(workRoot, "initial-readback.json");
82
82
  const retryPath = path.join(workRoot, "retry-readback.json");
@@ -135,7 +135,7 @@ function runPlatform() {
135
135
  );
136
136
  expectPass(neutralDriver, "independent protocol-neutral driver");
137
137
 
138
- const report = createV4CrossPlatformAdopterReport({
138
+ const report = createCrossPlatformAdopterReport({
139
139
  platform: required("platform"),
140
140
  consumer: required("consumer"),
141
141
  sourceBinding: {
@@ -210,7 +210,7 @@ function collectReports(root) {
210
210
 
211
211
  function aggregate() {
212
212
  const reportsRoot = path.resolve(required("reports-root"));
213
- const qualification = qualifyV4CrossPlatformAdopters({
213
+ const qualification = qualifyCrossPlatformAdopters({
214
214
  reports: collectReports(reportsRoot),
215
215
  consumers: repeated("consumer"),
216
216
  });
@@ -224,5 +224,5 @@ if (mode === "run") runPlatform();
224
224
  else if (mode === "aggregate") aggregate();
225
225
  else
226
226
  throw new Error(
227
- "usage: v4-cross-platform-adopter-qualification.mjs <run|aggregate> ...",
227
+ "usage: cross-platform-adopter-qualification.mjs <run|aggregate> ...",
228
228
  );
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { pathToFileURL } from "node:url";
3
3
 
4
- import { assertV4DeclarativePromotionInputs } from "../packages/core/v4-publication-qualification.js";
4
+ import { assertDeclarativePromotionInputs } from "../packages/core/publication-qualification.js";
5
5
 
6
- export function admitV4DeclarativePromotion({
6
+ export function admitDeclarativePromotion({
7
7
  inputs,
8
8
  runtimeRef,
9
9
  declarative,
@@ -21,7 +21,7 @@ export function admitV4DeclarativePromotion({
21
21
  error.code = "v4-declarative-release-tail-required";
22
22
  throw error;
23
23
  }
24
- assertV4DeclarativePromotionInputs(inputs);
24
+ assertDeclarativePromotionInputs(inputs);
25
25
  return Object.freeze({ mode: "v4-declarative", admitted: true });
26
26
  }
27
27
 
@@ -30,7 +30,7 @@ if (
30
30
  import.meta.url === pathToFileURL(process.argv[1]).href
31
31
  ) {
32
32
  try {
33
- const result = admitV4DeclarativePromotion({
33
+ const result = admitDeclarativePromotion({
34
34
  inputs: JSON.parse(process.env.BUILDCHAIN_PROMOTION_INPUTS_JSON || "{}"),
35
35
  runtimeRef: process.env.BUILDCHAIN_RUNTIME_REF,
36
36
  declarative: process.env.BUILDCHAIN_DECLARATIVE_RELEASE_TAIL === "true",