@kungfu-tech/buildchain 4.0.2-alpha.9 → 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 (281) hide show
  1. package/AGENTS.md +14 -5
  2. package/CONTRIBUTING.md +58 -0
  3. package/README.md +3 -3
  4. package/actions/promote-buildchain-ref/README.md +1 -1
  5. package/actions/release-candidate-promote/README.md +31 -0
  6. package/architecture/agent-change-map.md +190 -126
  7. package/architecture/{v4-architecture-constitution.md → architecture-constitution.md} +33 -30
  8. package/architecture/{v3-core-mechanism-inventory.md → baseline-core-mechanism-inventory.md} +1 -1
  9. package/architecture/{v4-bootstrap-authority.json → bootstrap-authority.json} +3 -3
  10. package/architecture/{v3-v4-capability-closure.md → capability-parity-closure.md} +3 -3
  11. package/architecture/{v3-v4-live-capability-inventory.json → capability-parity-live-capability-inventory.json} +4 -4
  12. package/architecture/{v4-capability-state-machine-manifest.json → capability-state-machine-manifest.json} +2 -2
  13. package/architecture/{v4-capability-state-machine-manifest.schema.json → capability-state-machine-manifest.schema.json} +2 -2
  14. package/architecture/ci-lane-change-budget.json +384 -0
  15. package/architecture/{v4-cross-platform-adopter-qualification.json → cross-platform-adopter-qualification.json} +4 -4
  16. package/architecture/{v4-delivery-authority-parity.json → delivery-authority-parity.json} +17 -17
  17. package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.json → delivery-warrant-shadow-bootstrap-plan.json} +4 -4
  18. package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.md → delivery-warrant-shadow-bootstrap-plan.md} +7 -7
  19. package/architecture/{v4-floating-consumer-policy.json → floating-consumer-policy.json} +2 -2
  20. package/architecture/{v4-floating-consumer-policy.md → floating-consumer-policy.md} +1 -1
  21. package/architecture/implementation-naming.json +1273 -0
  22. package/architecture/internal-capabilities.json +201 -154
  23. package/architecture/maintainability-debt.json +205 -146
  24. package/architecture/maintainability-policy.json +37 -33
  25. package/architecture/{v4-next-development-parity.json → next-development-parity.json} +12 -12
  26. package/architecture/{v4-partial-mutation-recovery-qualification.json → partial-mutation-recovery-qualification.json} +8 -5
  27. package/architecture/{v4-platform-stage-checkpoints.json → platform-stage-checkpoints.json} +3 -3
  28. package/architecture/{v4-provider-operation-journal-contract.json → provider-operation-journal-contract.json} +10 -7
  29. package/architecture/publication-facade-patches.json +64 -0
  30. package/architecture/{v4-publication-rehearsal-parity.json → publication-rehearsal-parity.json} +4 -4
  31. package/architecture/{v4-release-activation-shadow-domain.json → release-activation-shadow-domain.json} +9 -6
  32. package/architecture/release-tail-contract-inventory.json +6 -6
  33. package/architecture/{v4-release-topology.json → release-topology.json} +163 -72
  34. package/architecture/{v4-release-train-parity.json → release-train-parity.json} +2 -2
  35. package/architecture/{v4-runtime-ref-resume-authority.json → runtime-ref-resume-authority.json} +1 -1
  36. package/architecture/{v4-runtime-semantic-closure.json → runtime-semantic-closure.json} +2 -2
  37. package/architecture/{v4-rust-libnode-bridge-evaluation.json → rust-libnode-bridge-evaluation.json} +3 -3
  38. package/architecture/{v4-rust-libnode-bridge-spike.md → rust-libnode-bridge-spike.md} +6 -6
  39. package/architecture/rust-wasm-production-authority.json +58 -0
  40. package/architecture/{v4-stable-publication-fence.json → stable-publication-fence.json} +7 -4
  41. package/architecture/{v4-stage-capsule-contract.json → stage-capsule-contract.json} +1 -1
  42. package/architecture/{v4-stage-capsule-qualification.json → stage-capsule-qualification.json} +8 -8
  43. package/architecture/{v4-stage-capsule-resume-planner.json → stage-capsule-resume-planner.json} +2 -2
  44. package/architecture/{v4-stage-capsule-store-contract.json → stage-capsule-store-contract.json} +4 -4
  45. package/architecture/{v4-tail-reseal-parity.json → tail-reseal-parity.json} +35 -33
  46. package/architecture/universal-workflow-bootstrap.json +176 -0
  47. package/architecture/universal-workflow-fault-campaign.json +72 -0
  48. package/architecture/universal-workflow-train-admission.json +40 -0
  49. package/architecture/workflow-taxonomy.json +1462 -0
  50. package/bin/buildchain.mjs +10 -10
  51. package/bin/internal/adopter-delivery-cli.mjs +9 -9
  52. package/contracts/buildchain-v2-residuals-v1.json +57 -48
  53. package/contracts/dev-delivery-authority-v2.schema.json +16 -2
  54. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  55. package/contracts/v4-canonical-contracts-v1.schema.json +1 -0
  56. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.lock +1 -1
  57. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.toml +1 -1
  58. package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/src/main.rs +3 -3
  59. package/dist/site/buildchain-contract.json +98 -53
  60. package/dist/site/buildchain-site.json +351 -102
  61. package/dist/site/capability-registry.json +7 -7
  62. package/dist/site/controller-registry.json +50 -13
  63. package/dist/site/kfd-claims.json +2773 -1052
  64. package/dist/site/kfd-upstream-aggregate.json +1 -1
  65. package/dist/site/manual-registry.json +14 -14
  66. package/dist/site/node-api-registry.json +13176 -10733
  67. package/dist/site/page-registry.json +332 -83
  68. package/dist/site/public-surface-audit.json +3227 -1222
  69. package/dist/site/publication-authority-registry.json +1135 -363
  70. package/dist/site/publication-registry.json +4 -4
  71. package/dist/site/release-provenance.json +18 -9
  72. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +16 -2
  73. package/dist/site/site-manifest.json +18 -18
  74. package/dist/site/workflow-registry.json +5367 -1931
  75. package/docs/MAP.md +5 -3
  76. package/docs/auditable-demo.md +1 -1
  77. package/docs/cli.md +21 -8
  78. package/docs/dev-delivery-warrant.md +1 -1
  79. package/docs/engineering-housekeeper.md +3 -3
  80. package/docs/kfd-support.md +26 -2
  81. package/docs/next-development-transition.md +26 -3
  82. package/docs/node-api-reference.md +618 -358
  83. package/docs/oci-publication.md +173 -0
  84. package/docs/publication-authority.md +2 -2
  85. package/docs/publish-transaction.md +36 -3
  86. package/docs/release-candidate.md +3 -3
  87. package/docs/release-flow.md +67 -19
  88. package/docs/release-governance.md +8 -8
  89. package/docs/release-passport.md +27 -2
  90. package/docs/reusable-build-surface.md +17 -1
  91. package/docs/v4-adopter-delivery.md +4 -4
  92. package/docs/v4-canonical-contracts.md +7 -7
  93. package/docs/v4-delivery-warrant-read-candidate.md +3 -3
  94. package/docs/v4-delivery-warrant-semantic-diff.md +3 -3
  95. package/docs/v4-production-release.md +77 -8
  96. package/docs/v4-publication-rehearsal.md +3 -3
  97. package/docs/v4-runtime-ref-resume-authority.md +2 -2
  98. package/docs/v4-rust-wasm-production-authority.md +58 -0
  99. package/docs/v4-stage-capsule.md +9 -9
  100. package/docs/v4-tail-reseal.md +2 -2
  101. package/docs/workflow-catalog.md +155 -0
  102. package/docs/workflow-path-migration.md +109 -0
  103. package/package.json +39 -24
  104. package/packages/compatibility/adopter-delivery.js +16 -0
  105. package/packages/compatibility/cross-platform-adopter-qualification.js +12 -0
  106. package/packages/compatibility/floating-consumer-policy.js +14 -0
  107. package/packages/compatibility/publication-qualification.js +11 -0
  108. package/packages/compatibility/publication-rehearsal.js +18 -0
  109. package/packages/compatibility/runtime-ref-resume-authority.js +13 -0
  110. package/packages/compatibility/tail-reseal-receipt.js +7 -0
  111. package/packages/compatibility/tail-reseal.js +11 -0
  112. package/packages/core/{v4-adopter-delivery-parity.js → adopter-delivery-parity.js} +12 -12
  113. package/packages/core/{v4-adopter-delivery.js → adopter-delivery.js} +24 -24
  114. package/packages/core/artifact-verification-envelope.js +5 -5
  115. package/packages/core/buildchain-contract.js +6 -6
  116. package/packages/core/buildchain-domain.wasm +0 -0
  117. package/packages/core/buildchain-kfd-claims.js +2 -2
  118. package/packages/core/buildchain-publication-authority.js +43 -26
  119. package/packages/core/{v4-canonical-contracts.js → canonical-contracts.js} +39 -103
  120. package/packages/core/ci-lane-change-budget.js +14 -1
  121. package/packages/core/controller-evidence.js +4 -1
  122. package/packages/core/{v4-cross-platform-adopter-qualification.js → cross-platform-adopter-qualification.js} +19 -19
  123. package/packages/core/{v4-delivery-warrant-fixture-runner.js → delivery-warrant-fixture-runner.js} +36 -32
  124. package/packages/core/{v4-delivery-warrant-read-candidate.js → delivery-warrant-read-candidate.js} +40 -40
  125. package/packages/core/{v4-delivery-warrant-semantic-diff-gate.js → delivery-warrant-semantic-diff-gate.js} +58 -59
  126. package/packages/core/{v4-delivery-warrant-shadow-adapter.js → delivery-warrant-shadow-adapter.js} +15 -15
  127. package/packages/core/dev-delivery-candidate-identity.js +40 -6
  128. package/packages/core/dev-delivery-execution-transfer.js +6 -6
  129. package/packages/core/dev-delivery-native-proof.js +12 -8
  130. package/packages/core/dev-delivery-warrant-legacy-recovery.js +1 -1
  131. package/packages/core/dev-delivery-warrant-native-compatibility.js +4 -4
  132. package/packages/core/dev-delivery-warrant-state.js +14 -15
  133. package/packages/core/dev-delivery-warrant.js +15 -5
  134. package/packages/core/domain-wasm-artifact.js +7 -0
  135. package/packages/core/domain-wasm.js +216 -0
  136. package/packages/core/{v4-floating-consumer-evidence.js → floating-consumer-evidence.js} +14 -14
  137. package/packages/core/{v4-floating-consumer-policy.js → floating-consumer-policy.js} +28 -30
  138. package/packages/core/{v4-floating-consumer-release-passport.js → floating-consumer-release-passport.js} +25 -25
  139. package/packages/core/github-governance-authority.js +4 -4
  140. package/packages/core/index.js +4 -8
  141. package/packages/core/kfd-adopter-manifest.js +46 -47
  142. package/packages/core/next-development-projection.js +26 -3
  143. package/packages/core/next-development-transition.js +5 -6
  144. package/packages/core/oci-compose-qualification.js +143 -0
  145. package/packages/core/oci-publication-bundle.js +281 -0
  146. package/packages/core/oci-publication-graph.js +206 -0
  147. package/packages/core/paper-agent-entry.js +30 -4
  148. package/packages/core/paper-fleet.js +1 -1
  149. package/packages/core/paper-runtime-channels.js +348 -0
  150. package/packages/core/paper-scaffold-content.js +10 -0
  151. package/packages/core/paper.js +37 -71
  152. package/packages/core/partial-mutation-recovery-qualification.js +18 -0
  153. package/packages/core/{v4-platform-stage-checkpoints.js → platform-stage-checkpoints.js} +37 -37
  154. package/packages/core/product-publication.js +59 -0
  155. package/packages/core/{v4-protected-publication-source.js → protected-publication-source.js} +22 -24
  156. package/packages/core/provider-operation-journal.js +62 -0
  157. package/packages/core/{v4-provider-readback-idempotency.js → provider-readback-idempotency.js} +40 -125
  158. package/packages/core/public-export-compatibility.js +33 -0
  159. package/packages/core/publication-development.js +72 -0
  160. package/packages/core/{v4-publication-qualification.js → publication-qualification.js} +17 -17
  161. package/packages/core/{v4-publication-rehearsal-capsule.js → publication-rehearsal-capsule.js} +23 -23
  162. package/packages/core/publication-rehearsal-projection.js +2 -2
  163. package/packages/core/{v4-publication-rehearsal-provider-bindings.js → publication-rehearsal-provider-bindings.js} +4 -4
  164. package/packages/core/publication-rehearsal-runtime.js +21 -21
  165. package/packages/core/{v4-publication-rehearsal.js → publication-rehearsal.js} +33 -33
  166. package/packages/core/publication-sealed-bundle.js +78 -13
  167. package/packages/core/release-activation-shadow.js +32 -0
  168. package/packages/core/release-candidate.js +6 -6
  169. package/packages/core/release-invocation.js +64 -0
  170. package/packages/core/release-line-dry-run.js +1 -1
  171. package/packages/core/release-passport-contract.js +5 -5
  172. package/packages/core/release-passport.js +41 -40
  173. package/packages/core/release-tail-product-capabilities.js +9 -0
  174. package/packages/core/release-tail-provider-plane.js +68 -1048
  175. package/packages/core/{v4-runtime-ref-resume-authority.js → runtime-ref-resume-authority.js} +36 -40
  176. package/packages/core/{v4-runtime-selector-persistence.js → runtime-selector-persistence.js} +7 -7
  177. package/packages/core/stable-publication-fence.js +28 -0
  178. package/packages/core/{v4-stage-capsule-local-store.js → stage-capsule-local-store.js} +56 -54
  179. package/packages/core/{v4-stage-capsule-qualification-campaign.js → stage-capsule-qualification-campaign.js} +37 -38
  180. package/packages/core/{v4-stage-capsule-qualification.js → stage-capsule-qualification.js} +28 -29
  181. package/packages/core/{v4-stage-capsule-resume-planner.js → stage-capsule-resume-planner.js} +29 -29
  182. package/packages/core/{v4-stage-capsule-store.js → stage-capsule-store.js} +59 -56
  183. package/packages/core/{v4-stage-capsule.js → stage-capsule.js} +45 -45
  184. package/packages/core/{v4-tail-reseal-contract.js → tail-reseal-contract.js} +6 -6
  185. package/packages/core/{v4-tail-reseal-github.js → tail-reseal-github.js} +12 -12
  186. package/packages/core/{v4-tail-reseal-receipt.js → tail-reseal-receipt.js} +22 -22
  187. package/packages/core/{v4-tail-reseal.js → tail-reseal.js} +29 -29
  188. package/packages/core/universal-workflow-bootstrap.js +586 -0
  189. package/scripts/{v4-architecture.mjs → architecture.mjs} +6 -6
  190. package/scripts/binary-publication-evidence.mjs +135 -0
  191. package/scripts/{v4-bridge-bootstrap.mjs → bridge-bootstrap.mjs} +14 -18
  192. package/scripts/{v4-bridge-evidence.mjs → bridge-evidence.mjs} +8 -8
  193. package/scripts/build-contract-core.mjs +1 -14
  194. package/scripts/build-domain-wasm.mjs +177 -0
  195. package/scripts/{v3-v4-capability-catalog.mjs → capability-parity-catalog.mjs} +19 -19
  196. package/scripts/check-action-bundles.mjs +12 -2
  197. package/scripts/{check-v3-v4-capability-inventory.mjs → check-capability-parity-inventory.mjs} +42 -42
  198. package/scripts/check-ci-lane-change-budget.mjs +4 -1
  199. package/scripts/check-core-mechanism-inventory.mjs +8 -4
  200. package/scripts/{check-v4-floating-consumer-policy-contract.mjs → check-floating-consumer-policy-contract.mjs} +10 -10
  201. package/scripts/check-implementation-naming.mjs +135 -0
  202. package/scripts/check-inventory.mjs +39 -47
  203. package/scripts/check-maintainability.mjs +25 -115
  204. package/scripts/{check-v4-public-dogfood-contract.mjs → check-public-dogfood-contract.mjs} +37 -24
  205. package/scripts/{check-v4-release-topology.mjs → check-release-topology.mjs} +131 -52
  206. package/scripts/{check-v4-runtime-semantic-closure.mjs → check-runtime-semantic-closure.mjs} +23 -17
  207. package/scripts/check-universal-workflow-bootstrap.mjs +266 -0
  208. package/scripts/check-workflow-taxonomy.mjs +6 -0
  209. package/scripts/{v4-consumer-policy.mjs → consumer-policy.mjs} +15 -15
  210. package/scripts/copy-domain-wasm.mjs +14 -0
  211. package/scripts/{v4-cross-platform-adopter-qualification.mjs → cross-platform-adopter-qualification.mjs} +9 -9
  212. package/scripts/{v4-declarative-promotion-admission.mjs → declarative-promotion-admission.mjs} +4 -4
  213. package/scripts/dev-delivery-authority-command-adapters.mjs +1 -1
  214. package/scripts/dev-delivery-authority.mjs +8 -8
  215. package/scripts/dev-delivery-source-proof-reuse.mjs +2 -1
  216. package/scripts/dev-delivery-warrant-options.mjs +15 -10
  217. package/scripts/dev-delivery-warrant-store.mjs +98 -13
  218. package/scripts/dev-delivery-warrant-transition.mjs +109 -0
  219. package/scripts/dev-delivery-warrant.mjs +80 -103
  220. package/scripts/dev-pr-auto-merge.mjs +15 -15
  221. package/scripts/dev-pr-delivery-warrant.mjs +1 -1
  222. package/scripts/generate-channel-build-workflow.mjs +7 -2
  223. package/scripts/generate-channel-promotion-workflow.mjs +19 -34
  224. package/scripts/generate-release-candidate-passport.mjs +23 -23
  225. package/scripts/generate-site-bundle.mjs +28 -28
  226. package/scripts/generate-universal-workflow-facades.mjs +498 -0
  227. package/scripts/generate-workflow-taxonomy.mjs +25 -0
  228. package/scripts/github-output.mjs +31 -0
  229. package/scripts/{v4-host-adapter.mjs → host-adapter.mjs} +1 -1
  230. package/scripts/implementation-references.mjs +25 -0
  231. package/scripts/init-repo.mjs +1 -1
  232. package/scripts/maintainability-metrics.mjs +16 -5
  233. package/scripts/maintainability-public-surface.mjs +115 -0
  234. package/scripts/next-development-review.mjs +313 -0
  235. package/scripts/oci-compose-preview.mjs +261 -0
  236. package/scripts/paper-work-fleet-cli.mjs +2 -0
  237. package/scripts/{v4-platform-stage-checkpoint-rehearsal.mjs → platform-stage-checkpoint-rehearsal.mjs} +17 -17
  238. package/scripts/{v4-product-publication-intent.mjs → product-publication-intent.mjs} +28 -13
  239. package/scripts/publication-candidate-kind.mjs +93 -0
  240. package/scripts/publication-candidate-sealer.mjs +16 -1
  241. package/scripts/{v4-publication-rehearsal-fixture.mjs → publication-rehearsal-fixture.mjs} +5 -5
  242. package/scripts/publication-settlement.mjs +211 -0
  243. package/scripts/release-asset-client.mjs +91 -0
  244. package/scripts/{v4-release-candidate-adapter.mjs → release-candidate-adapter.mjs} +4 -4
  245. package/scripts/release-candidate-resolver.mjs +24 -35
  246. package/scripts/release-tail.mjs +5 -5
  247. package/scripts/resume-from-candidate-run.mjs +35 -42
  248. package/scripts/site-capability-metadata.mjs +9 -0
  249. package/scripts/source-verification-evidence.mjs +344 -0
  250. package/scripts/stable-candidate-qualification.mjs +1 -1
  251. package/scripts/{v4-stage-capsule-qualification.mjs → stage-capsule-qualification.mjs} +62 -62
  252. package/scripts/{v4-stage-capsule-resume-rehearsal.mjs → stage-capsule-resume-rehearsal.mjs} +6 -6
  253. package/scripts/{v4-tail-reseal-macos-rehearsal.mjs → tail-reseal-macos-rehearsal.mjs} +9 -9
  254. package/scripts/{v4-tail-reseal.mjs → tail-reseal.mjs} +19 -19
  255. package/scripts/universal-facade-maintainability.mjs +91 -0
  256. package/scripts/universal-workflow-backflow.mjs +212 -0
  257. package/scripts/universal-workflow-engine.mjs +620 -0
  258. package/scripts/universal-workflow-self-dogfood.mjs +205 -0
  259. package/scripts/verify-version-state-delta.mjs +175 -0
  260. package/scripts/{v4-warrant-shadow-plan.mjs → warrant-shadow-plan.mjs} +6 -6
  261. package/scripts/workflow-taxonomy.mjs +507 -0
  262. package/templates/native-dev-delivery.yml +4 -7
  263. package/templates/universal-buildchain-bootstrap-recovery.yml +282 -0
  264. package/templates/universal-buildchain-bootstrap.yml +28 -0
  265. package/actions/v4-release-candidate-promote/README.md +0 -3
  266. package/packages/core/v4-partial-mutation-recovery-qualification.js +0 -395
  267. package/packages/core/v4-product-publication.js +0 -387
  268. package/packages/core/v4-provider-operation-journal.js +0 -531
  269. package/packages/core/v4-release-activation-shadow.js +0 -519
  270. package/packages/core/v4-release-invocation.js +0 -425
  271. package/packages/core/v4-stable-publication-fence.js +0 -357
  272. /package/architecture/{v4-adopter-delivery-parity.json → adopter-delivery-parity.json} +0 -0
  273. /package/architecture/{v3-core-mechanism-inventory.json → baseline-core-mechanism-inventory.json} +0 -0
  274. /package/architecture/{v4-canonical-contract-fixtures.json → canonical-contract-fixtures.json} +0 -0
  275. /package/architecture/{v4-compatibility-facts-parity.json → compatibility-facts-parity.json} +0 -0
  276. /package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.schema.json → delivery-warrant-shadow-bootstrap-plan.schema.json} +0 -0
  277. /package/architecture/{v4-delivery-warrant-shadow-fixtures.json → delivery-warrant-shadow-fixtures.json} +0 -0
  278. /package/architecture/{v4-delivery-warrant-shadow-fixtures.schema.json → delivery-warrant-shadow-fixtures.schema.json} +0 -0
  279. /package/architecture/{v4-exception-ledger.json → exception-ledger.json} +0 -0
  280. /package/architecture/{v4-exception-ledger.schema.json → exception-ledger.schema.json} +0 -0
  281. /package/architecture/{v4-release-invocation-fixtures.json → release-invocation-fixtures.json} +0 -0
@@ -58,7 +58,7 @@ const WORKFLOW_AND_ACTION_FILES = Object.freeze([
58
58
  ".github/workflows/.build.yml",
59
59
  ".github/workflows/.release-candidate-promote.yml",
60
60
  ".github/workflows/release-candidate-promote.yml",
61
- ".github/workflows/buildchain-ref-promotion.yml",
61
+ ".github/workflows/self-release-promote.yml",
62
62
  ".github/workflows/github-artifact-attestation.yml",
63
63
  "actions/github-artifact-attestation/action.yml",
64
64
  "actions/github-artifact-attestation/index.js",
@@ -446,7 +446,7 @@ export function createBuildchainKfdSurfaceRegistry({ root = process.cwd() } = {}
446
446
  {
447
447
  name: "Buildchain standalone binary distribution",
448
448
  artifactPath: "dist/binary",
449
- evidencePath: ".github/workflows/binary-distribution.yml",
449
+ evidencePath: ".github/workflows/self-build-binary-distribution.yml",
450
450
  distribution: normalizeKfd3DistributionDeclaration({
451
451
  registrar: "shifu",
452
452
  tasks: ["binary:build"],
@@ -4,47 +4,47 @@ import path from "node:path";
4
4
  import { createPublicationAuthorityRegistry } from "./publication-authority.js";
5
5
 
6
6
  const DESCRIPTORS = Object.freeze([
7
+ [".github/workflows/public-release-oci-compose-preview.yml", "product-publication", true, ["oci-compose-preview"], "caller-secrets", "none", "fixed", "caller-bound"],
7
8
  [".github/workflows/.auditable-demo.yml", "non-publication-oidc"],
8
9
  [".github/workflows/.declarative-auditable-demo.yml", "governance-write"],
9
10
  [".github/workflows/.build.yml", "non-publication-oidc"],
10
11
  [".github/workflows/.release-candidate-promote.yml", "product-publication", true, ["npm-publish", "github-release", "channel-ref"], "trusted-publishing", "none", "fixed", "caller-bound"],
11
12
  [".github/workflows/.publication-authority.yml", "evidence-publication"],
12
13
  [".github/workflows/.release-verify.yml", "governance-write"],
13
- [".github/workflows/.sam-release.yml", "retired-deny"],
14
14
  [".github/workflows/.sam-verify.yml", "retired-deny"],
15
15
  [".github/workflows/.sync-remote-git.yml", "governance-write"],
16
16
  [".github/workflows/.web-surface.yml", "product-publication", true, ["web-production"], "oidc", "consumer-defined", "caller-bound", "caller-bound"],
17
- [".github/workflows/.wheel-release.yml", "retired-deny"],
18
17
  [".github/workflows/.wheel-verify.yml", "retired-deny"],
19
18
  [".github/workflows/.binary-release-assets.yml", "product-publication", true, ["github-release"], "github-token", "buildchain-release-assets"],
20
- [".github/workflows/binary-distribution.yml", "evidence-publication"],
21
- [".github/workflows/binary-release-assets.yml", "governance-write"],
19
+ [".github/workflows/self-build-binary-distribution.yml", "evidence-publication"],
20
+ [".github/workflows/self-release-binary-assets.yml", "governance-write"],
22
21
  [".github/workflows/artifact-signing-authority.yml", "evidence-publication"],
23
- [".github/workflows/auditable-demo.yml", "governance-write"],
24
- [".github/workflows/build-surface-fixture.yml", "non-publication-oidc"],
22
+ [".github/workflows/self-build-demo-dogfood.yml", "governance-write"],
23
+ [".github/workflows/self-build-fixture.yml", "non-publication-oidc"],
25
24
  [".github/workflows/build.yml", "non-publication-oidc"],
26
- [".github/workflows/buildchain-alpha-self-dogfood.yml", "non-publication-oidc"],
27
- [".github/workflows/buildchain-dev-delivery.yml", "governance-write"],
28
- [".github/workflows/buildchain-patrol-daily.yml", "governance-write"],
29
- [".github/workflows/buildchain-patrol-monthly.yml", "governance-write"],
30
- [".github/workflows/buildchain-patrol-weekly.yml", "governance-write"],
25
+ [".github/workflows/bootstrap.yml", "product-publication", true, ["universal-candidate-execution"], "caller-secrets", "none", "fixed", "caller-bound"],
26
+ [".github/workflows/self-build-alpha-dogfood.yml", "non-publication-oidc"],
27
+ [".github/workflows/self-ops-dev-delivery.yml", "governance-write"],
28
+ [".github/workflows/self-ops-patrol-daily.yml", "governance-write"],
29
+ [".github/workflows/self-ops-patrol-monthly.yml", "governance-write"],
30
+ [".github/workflows/self-ops-patrol-weekly.yml", "governance-write"],
31
31
  [".github/workflows/buildchain-patrol.yml", "governance-write"],
32
- [".github/workflows/buildchain-ref-promotion-recovery.yml", "governance-write"],
33
- [".github/workflows/buildchain-ref-promotion.yml", "governance-write"],
34
- [".github/workflows/buildchain-stable-candidate-patrol.yml", "governance-write"],
32
+ [".github/workflows/self-ops-promotion-recovery.yml", "governance-write"],
33
+ [".github/workflows/self-release-promote.yml", "governance-write"],
34
+ [".github/workflows/self-ops-stable-candidate-patrol.yml", "governance-write"],
35
35
  [".github/workflows/dev-qualification-patrol.yml", "governance-write"],
36
36
  [".github/workflows/dev-alpha-candidate-patrol.yml", "governance-write"],
37
37
  [".github/workflows/dev-delivery-warrant-close.yml", "governance-write"],
38
38
  [".github/workflows/dev-delivery-warrant-cancel.yml", "governance-write"],
39
- [".github/workflows/dev-merge-queue-governance.yml", "governance-write"],
39
+ [".github/workflows/self-ops-merge-queue.yml", "governance-write"],
40
40
  [".github/workflows/dev-pr-auto-merge.yml", "governance-write"],
41
- [".github/workflows/engineering-housekeeper-daily.yml", "governance-write"],
42
- [".github/workflows/engineering-housekeeper-monthly.yml", "governance-write"],
43
- [".github/workflows/engineering-housekeeper-weekly.yml", "governance-write"],
41
+ [".github/workflows/self-ops-housekeeping-daily.yml", "governance-write"],
42
+ [".github/workflows/self-ops-housekeeping-monthly.yml", "governance-write"],
43
+ [".github/workflows/self-ops-housekeeping-weekly.yml", "governance-write"],
44
44
  [".github/workflows/engineering-housekeeper.yml", "governance-write"],
45
- [".github/workflows/github-governance-audit.yml", "governance-write"],
45
+ [".github/workflows/self-ops-governance-audit.yml", "governance-write"],
46
46
  [".github/workflows/github-artifact-attestation.yml", "evidence-publication", true, ["github-artifact-attestation"], "oidc", "consumer-defined", "caller-bound", "caller-bound"],
47
- [".github/workflows/npm-publish.yml", "dry-run-only"],
47
+ [".github/workflows/self-release-npm-dry-run.yml", "dry-run-only"],
48
48
  [".github/workflows/paper-release-sealed.yml", "product-publication", true, ["npm-publish", "github-release"], "trusted-publishing", "none", "fixed", "caller-bound"],
49
49
  [".github/workflows/paper-release.yml", "product-publication", true, ["npm-publish", "github-release"], "trusted-publishing", "none", "fixed", "caller-bound"],
50
50
  [".github/workflows/patrol-daily.yml", "governance-write"],
@@ -53,16 +53,18 @@ const DESCRIPTORS = Object.freeze([
53
53
  [".github/workflows/patrol-weekly.yml", "governance-write"],
54
54
  [".github/workflows/publication-artifact.yml", "evidence-publication"],
55
55
  [".github/workflows/release-candidate-promote.yml", "product-publication", true, ["npm-publish", "github-release", "channel-ref"], "trusted-publishing", "none", "fixed", "caller-bound"],
56
- [".github/workflows/release-line-bootstrap.yml", "governance-write"],
56
+ [".github/workflows/self-release-line-open.yml", "governance-write"],
57
57
  [".github/workflows/release-propagation.yml", "governance-write"],
58
58
  [".github/workflows/release-tail.yml", "product-publication", true, ["artifact.publish", "signed-channel.commit", "release.activate", "released-evidence.synthesize"], "caller-secrets", "caller-bound", "caller-bound", "fixed"],
59
- [".github/workflows/release-verify.yml", "governance-write"],
59
+ [".github/workflows/self-build-release-verify-compat.yml", "governance-write"],
60
60
  [".github/workflows/stable-candidate-patrol.yml", "governance-write"],
61
- [".github/workflows/v4-declarative-release-tail-dogfood.yml", "product-publication", true, ["artifact.publish", "signed-channel.commit", "release.activate", "released-evidence.synthesize"], "caller-secrets", "none", "fixed", "fixed"],
61
+ [".github/workflows/universal-bootstrap-recovery.yml", "product-publication", true, ["universal-candidate-execution"], "caller-secrets", "none", "fixed", "caller-bound"],
62
+ [".github/workflows/self-ops-bootstrap-dogfood.yml", "product-publication", true, ["universal-candidate-execution"], "caller-secrets", "none", "fixed", "caller-bound"],
63
+ [".github/workflows/self-release-tail-dogfood.yml", "product-publication", true, ["artifact.publish", "signed-channel.commit", "release.activate", "released-evidence.synthesize"], "caller-secrets", "none", "fixed", "fixed"],
62
64
  ]);
63
65
 
64
- export function buildchainPublicationAuthorityDescriptors() {
65
- return DESCRIPTORS.map(([
66
+ export function buildchainPublicationAuthorityDescriptors({ root = process.cwd() } = {}) {
67
+ const descriptors = DESCRIPTORS.map(([
66
68
  workflowPath,
67
69
  authorityClass,
68
70
  publicationCapable = false,
@@ -84,6 +86,21 @@ export function buildchainPublicationAuthorityDescriptors() {
84
86
  environmentMode,
85
87
  runnerPolicy: publicationCapable ? "qualified-measured" : "unqualified",
86
88
  }));
89
+ const taxonomyPath = path.join(root, "architecture/workflow-taxonomy.json");
90
+ if (!fs.existsSync(taxonomyPath)) return descriptors;
91
+ const taxonomy = JSON.parse(fs.readFileSync(taxonomyPath, "utf8"));
92
+ for (const entry of taxonomy.entries) {
93
+ if (!entry.compatibility) continue;
94
+ const previous = descriptors.find((item) => item.workflowPath === entry.compatibility.path);
95
+ if (!previous) continue;
96
+ const prefix = entry.role === "component" ? "." : `${entry.role}-`;
97
+ const workflowPath = `.github/workflows/${prefix}${entry.category}-${entry.purpose}.yml`;
98
+ if (fs.readFileSync(path.join(root, workflowPath), "utf8") !== fs.readFileSync(path.join(root, entry.compatibility.path), "utf8")) {
99
+ throw new Error(`publication authority alias differs from canonical workflow: ${workflowPath}`);
100
+ }
101
+ descriptors.push({ ...previous, workflowPath, publisherWorkflowPath: previous.publisherWorkflowPath === previous.workflowPath ? workflowPath : previous.publisherWorkflowPath });
102
+ }
103
+ return descriptors;
87
104
  }
88
105
  export function createBuildchainPublicationAuthorityRegistry({ root = process.cwd() } = {}) {
89
106
  const workflowsDir = path.join(root, ".github", "workflows");
@@ -94,7 +111,7 @@ export function createBuildchainPublicationAuthorityRegistry({ root = process.cw
94
111
  text: fs.readFileSync(path.join(workflowsDir, name), "utf8"),
95
112
  }));
96
113
  return createPublicationAuthorityRegistry({
97
- descriptors: buildchainPublicationAuthorityDescriptors(),
114
+ descriptors: buildchainPublicationAuthorityDescriptors({ root }),
98
115
  workflows,
99
116
  });
100
117
  }
@@ -1,9 +1,9 @@
1
- import crypto from "node:crypto";
1
+ import { DomainWasmFault, invokeDomainWasm } from "./domain-wasm.js";
2
2
 
3
- export const V4_CANONICAL_JSON_CONTRACT = "buildchain-canonical-json/v1";
4
- export const V4_EVENT_ENVELOPE_CONTRACT = "buildchain-v4-event-envelope/v1";
5
- export const V4_RECEIPT_ENVELOPE_CONTRACT = "buildchain-v4-receipt-envelope/v1";
6
- export const V4_CONTRACT_FAULT_CONTRACT = "buildchain-v4-contract-fault/v1";
3
+ export const CANONICAL_JSON_CONTRACT = "buildchain-canonical-json/v1";
4
+ export const EVENT_ENVELOPE_CONTRACT = "buildchain-v4-event-envelope/v1";
5
+ export const RECEIPT_ENVELOPE_CONTRACT = "buildchain-v4-receipt-envelope/v1";
6
+ export const CONTRACT_FAULT_CONTRACT = "buildchain-v4-contract-fault/v1";
7
7
 
8
8
  const ROOT_PATTERN = /^sha256:[0-9a-f]{64}$/u;
9
9
  const CLOCK_PATTERN = /^(?!0000)\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u;
@@ -28,6 +28,7 @@ const ROOT_DOMAINS = new Set([
28
28
  "stage-capsule-quarantine",
29
29
  "stage-capsule-resume-observation",
30
30
  "stage-capsule-resume-plan",
31
+ "source-verification-evidence",
31
32
  "stage-capsule-artifact-manifest",
32
33
  "stage-capsule-artifact-content",
33
34
  "stage-capsule-fault-campaign",
@@ -57,6 +58,7 @@ const ROOT_DOMAINS = new Set([
57
58
  "partial-mutation-recovery-checkpoint",
58
59
  "partial-mutation-recovery-plan",
59
60
  "v4-product-required-artifacts",
61
+ "oci-publication-family",
60
62
  "v4-product-publication-intent",
61
63
  "v4-product-publication-operation",
62
64
  "v4-product-publication-plan",
@@ -85,17 +87,17 @@ const FAULT_CLASSES = new Set([
85
87
  const RETRY_DECISIONS = new Set(["stop", "reread", "redecide", "reselect"]);
86
88
  const RECEIPT_OUTCOMES = new Set(["accepted", "rejected", "noop"]);
87
89
 
88
- export class V4ContractFault extends Error {
90
+ export class ContractFault extends Error {
89
91
  constructor(code, path, message) {
90
92
  super(message);
91
- this.name = "V4ContractFault";
93
+ this.name = "ContractFault";
92
94
  this.code = code;
93
95
  this.path = path;
94
96
  }
95
97
  }
96
98
 
97
99
  function fault(code, path, message) {
98
- throw new V4ContractFault(code, path, message);
100
+ throw new ContractFault(code, path, message);
99
101
  }
100
102
 
101
103
  function exactKeys(value, keys, path) {
@@ -110,98 +112,32 @@ function exactKeys(value, keys, path) {
110
112
  fault("invalid-envelope-shape", path, `${path} keys are not canonical`);
111
113
  }
112
114
 
113
- function canonicalize(value, path, active) {
114
- if (value === null || typeof value === "boolean") return value;
115
- if (typeof value === "string") {
116
- for (let index = 0; index < value.length; index += 1) {
117
- const code = value.charCodeAt(index);
118
- if (code >= 0xd800 && code <= 0xdbff) {
119
- const next = value.charCodeAt(index + 1);
120
- if (!(next >= 0xdc00 && next <= 0xdfff))
121
- fault(
122
- "unsupported-string",
123
- path,
124
- `${path} contains an unpaired surrogate`,
125
- );
126
- index += 1;
127
- } else if (code >= 0xdc00 && code <= 0xdfff) {
128
- fault(
129
- "unsupported-string",
130
- path,
131
- `${path} contains an unpaired surrogate`,
132
- );
133
- }
134
- }
135
- return value;
136
- }
137
- if (typeof value === "number") {
138
- if (!Number.isSafeInteger(value) || Object.is(value, -0))
139
- fault(
140
- "unsupported-number",
141
- path,
142
- `${path} must be a safe base-10 integer and must not be negative zero`,
143
- );
144
- return value;
145
- }
146
- if (!value || typeof value !== "object")
147
- fault("unsupported-json-value", path, `${path} is not a JSON value`);
148
- if (active.has(value))
149
- fault("cyclic-json-value", path, `${path} contains a cycle`);
150
- active.add(value);
115
+ function wasm(operation, payload) {
151
116
  try {
152
- if (Array.isArray(value))
153
- return Array.from(value, (entry, index) =>
154
- canonicalize(entry, `${path}/${index}`, active),
155
- );
156
- const prototype = Object.getPrototypeOf(value);
157
- if (prototype !== Object.prototype && prototype !== null)
158
- fault("unsupported-json-value", path, `${path} must be a plain object`);
159
- const result = Object.create(null);
160
- for (const key of Object.keys(value).sort((left, right) =>
161
- left < right ? -1 : left > right ? 1 : 0,
162
- )) {
163
- if (!ASCII_KEY_PATTERN.test(key))
164
- fault(
165
- "unsupported-object-key",
166
- `${path}/${key}`,
167
- "object keys must be non-empty printable ASCII",
168
- );
169
- result[key] = canonicalize(value[key], `${path}/${key}`, active);
117
+ return invokeDomainWasm(operation, payload);
118
+ } catch (error) {
119
+ if (error instanceof DomainWasmFault) {
120
+ fault(error.code, error.path, error.message);
170
121
  }
171
- return result;
172
- } finally {
173
- active.delete(value);
122
+ throw error;
174
123
  }
175
124
  }
176
125
 
177
- export function v4CanonicalBytes(value) {
178
- return Buffer.from(
179
- `${JSON.stringify(canonicalize(value, "$", new Set()))}\n`,
180
- "utf8",
181
- );
126
+ export function domainCanonicalBytes(value) {
127
+ return Buffer.from(wasm("canonical-json", value).canonicalUtf8, "utf8");
182
128
  }
183
129
 
184
- export function v4ContentRoot(domain, value) {
185
- if (!ROOT_DOMAINS.has(domain))
186
- fault(
187
- "unsupported-root-domain",
188
- "$.domain",
189
- `unsupported root domain: ${domain}`,
190
- );
191
- const hash = crypto.createHash("sha256");
192
- hash.update(domain, "ascii");
193
- hash.update(Buffer.from([0]));
194
- hash.update(v4CanonicalBytes(value));
195
- return `sha256:${hash.digest("hex")}`;
130
+ export function domainContentRoot(domain, value) {
131
+ return wasm("content-root", { domain, value }).root;
196
132
  }
197
133
 
198
- export function validateV4Root(value, path = "$.root") {
134
+ export function validateRoot(value, path = "$.root") {
199
135
  if (typeof value !== "string" || !ROOT_PATTERN.test(value))
200
136
  fault("invalid-root", path, `${path} must be a lowercase sha256 root`);
201
137
  return value;
202
138
  }
203
139
 
204
- export function validateV4Clock(value, path = "$.clock") {
140
+ export function validateClock(value, path = "$.clock") {
205
141
  if (typeof value !== "string" || !CLOCK_PATTERN.test(value))
206
142
  fault(
207
143
  "invalid-clock",
@@ -214,13 +150,13 @@ export function validateV4Clock(value, path = "$.clock") {
214
150
  return value;
215
151
  }
216
152
 
217
- export function validateV4ContractFault(value, path = "$.fault") {
153
+ export function validateContractFault(value, path = "$.fault") {
218
154
  exactKeys(
219
155
  value,
220
156
  ["schema", "code", "class", "path", "message", "retry"],
221
157
  path,
222
158
  );
223
- if (value.schema !== V4_CONTRACT_FAULT_CONTRACT)
159
+ if (value.schema !== CONTRACT_FAULT_CONTRACT)
224
160
  fault("invalid-fault", `${path}/schema`, "unsupported fault schema");
225
161
  if (!ASCII_TOKEN_PATTERN.test(value.code))
226
162
  fault("invalid-fault", `${path}/code`, "fault code must be an ASCII token");
@@ -236,28 +172,28 @@ export function validateV4ContractFault(value, path = "$.fault") {
236
172
  `${path}/retry`,
237
173
  "fault retry decision is unsupported",
238
174
  );
239
- v4CanonicalBytes(value);
175
+ domainCanonicalBytes(value);
240
176
  return value;
241
177
  }
242
178
 
243
- export function validateV4EventEnvelope(value) {
179
+ export function validateEventEnvelope(value) {
244
180
  exactKeys(
245
181
  value,
246
182
  ["schema", "eventId", "eventType", "occurredAt", "subjectRoot", "payload"],
247
183
  "$",
248
184
  );
249
- if (value.schema !== V4_EVENT_ENVELOPE_CONTRACT)
185
+ if (value.schema !== EVENT_ENVELOPE_CONTRACT)
250
186
  fault("invalid-event", "$/schema", "unsupported event schema");
251
- validateV4Root(value.eventId, "$/eventId");
252
- validateV4Root(value.subjectRoot, "$/subjectRoot");
253
- validateV4Clock(value.occurredAt, "$/occurredAt");
187
+ validateRoot(value.eventId, "$/eventId");
188
+ validateRoot(value.subjectRoot, "$/subjectRoot");
189
+ validateClock(value.occurredAt, "$/occurredAt");
254
190
  if (!ASCII_TOKEN_PATTERN.test(value.eventType))
255
191
  fault("invalid-event", "$/eventType", "event type must be an ASCII token");
256
- v4CanonicalBytes(value.payload);
192
+ domainCanonicalBytes(value.payload);
257
193
  return value;
258
194
  }
259
195
 
260
- export function validateV4ReceiptEnvelope(value) {
196
+ export function validateReceiptEnvelope(value) {
261
197
  exactKeys(
262
198
  value,
263
199
  [
@@ -272,7 +208,7 @@ export function validateV4ReceiptEnvelope(value) {
272
208
  ],
273
209
  "$",
274
210
  );
275
- if (value.schema !== V4_RECEIPT_ENVELOPE_CONTRACT)
211
+ if (value.schema !== RECEIPT_ENVELOPE_CONTRACT)
276
212
  fault("invalid-receipt", "$/schema", "unsupported receipt schema");
277
213
  if (!ASCII_TOKEN_PATTERN.test(value.receiptType))
278
214
  fault(
@@ -280,15 +216,15 @@ export function validateV4ReceiptEnvelope(value) {
280
216
  "$/receiptType",
281
217
  "receipt type must be an ASCII token",
282
218
  );
283
- validateV4Clock(value.recordedAt, "$/recordedAt");
284
- validateV4Root(value.eventRoot, "$/eventRoot");
219
+ validateClock(value.recordedAt, "$/recordedAt");
220
+ validateRoot(value.eventRoot, "$/eventRoot");
285
221
  if (value.priorStateRoot !== null)
286
- validateV4Root(value.priorStateRoot, "$/priorStateRoot");
222
+ validateRoot(value.priorStateRoot, "$/priorStateRoot");
287
223
  if (value.nextStateRoot !== null)
288
- validateV4Root(value.nextStateRoot, "$/nextStateRoot");
224
+ validateRoot(value.nextStateRoot, "$/nextStateRoot");
289
225
  if (!RECEIPT_OUTCOMES.has(value.outcome))
290
226
  fault("invalid-receipt", "$/outcome", "receipt outcome is unsupported");
291
- if (value.fault !== null) validateV4ContractFault(value.fault);
227
+ if (value.fault !== null) validateContractFault(value.fault);
292
228
  if ((value.outcome === "rejected") !== (value.fault !== null))
293
229
  fault(
294
230
  "invalid-receipt",
@@ -298,6 +234,6 @@ export function validateV4ReceiptEnvelope(value) {
298
234
  return value;
299
235
  }
300
236
 
301
- export function v4ContractDomains() {
237
+ export function contractDomains() {
302
238
  return [...ROOT_DOMAINS];
303
239
  }
@@ -10,6 +10,7 @@ const AUTHORITY_CLASSES = new Set([
10
10
  "post-merge-advisory",
11
11
  "diagnostic",
12
12
  "evidence",
13
+ "governed-delegation",
13
14
  "release",
14
15
  ]);
15
16
  const TRIGGER_CLASSES = new Set([
@@ -196,7 +197,19 @@ export function evaluateCiLaneChangeBudget({
196
197
  }
197
198
  const declarations = new Map();
198
199
  const diagnostics = [];
199
- for (const declaration of policy.declarations || []) {
200
+ const familyDeclarations = (policy.declarationFamilies || []).flatMap(
201
+ ({ laneIds, ...declaration }) => {
202
+ if (!Array.isArray(laneIds) || laneIds.length === 0)
203
+ throw new Error("CI lane declaration family requires laneIds");
204
+ if (new Set(laneIds).size !== laneIds.length)
205
+ throw new Error("CI lane declaration family laneIds must be unique");
206
+ return laneIds.map((laneId) => ({ ...declaration, laneId }));
207
+ },
208
+ );
209
+ for (const declaration of [
210
+ ...(policy.declarations || []),
211
+ ...familyDeclarations,
212
+ ]) {
200
213
  const laneId = String(declaration?.laneId || "").trim();
201
214
  if (!laneId) throw new Error("CI lane declaration laneId is required");
202
215
  if (declarations.has(laneId))
@@ -196,6 +196,9 @@ function descriptorDigest(descriptor) {
196
196
 
197
197
  export function createControllerRegistry({ workflows = [] } = {}) {
198
198
  const workflowById = new Map(workflows.map((entry) => [entry.id, entry]));
199
+ for (const entry of workflows) {
200
+ if (entry.taxonomy && !entry.taxonomy.compatibilityAlias && !workflowById.has(entry.taxonomy.id)) workflowById.set(entry.taxonomy.id, entry);
201
+ }
199
202
  const controllers = CONTROLLER_SPECS.map((spec) => {
200
203
  const workflow = workflowById.get(spec.workflowId);
201
204
  if (!workflow) throw new Error(`controller ${spec.id} requires workflow descriptor ${spec.workflowId}`);
@@ -215,7 +218,7 @@ export function createControllerRegistry({ workflows = [] } = {}) {
215
218
  contract: BUILDCHAIN_CONTROLLER_DESCRIPTOR_CONTRACT,
216
219
  id: spec.id,
217
220
  version: spec.version,
218
- workflow: { id: workflow.id, path: workflow.path },
221
+ workflow: { id: workflow.id, path: workflow.path, ...(workflow.taxonomy?.contractPath ? { contractPath: workflow.taxonomy.contractPath } : {}) },
219
222
  inputs,
220
223
  expected: {
221
224
  stages: spec.stages.map((id) => ({ id, required: !optionalStages.has(id) })),
@@ -1,15 +1,15 @@
1
1
  import { adopterDeliveryGateDigest } from "./adopter-delivery-json.js";
2
2
 
3
- export const V4_CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT =
3
+ export const CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT =
4
4
  "kungfu-buildchain-v4-cross-platform-adopter-report/v1";
5
- export const V4_CROSS_PLATFORM_ADOPTER_QUALIFICATION_CONTRACT =
5
+ export const CROSS_PLATFORM_ADOPTER_QUALIFICATION_CONTRACT =
6
6
  "kungfu-buildchain-v4-cross-platform-adopter-qualification/v1";
7
- export const V4_CROSS_PLATFORM_ADOPTER_PLATFORMS = Object.freeze([
7
+ export const CROSS_PLATFORM_ADOPTER_PLATFORMS = Object.freeze([
8
8
  "linux-x64",
9
9
  "macos-arm64",
10
10
  "windows-x64",
11
11
  ]);
12
- export const V4_CROSS_PLATFORM_NEUTRAL_DRIVER = "ledger-specification-driver";
12
+ export const CROSS_PLATFORM_NEUTRAL_DRIVER = "ledger-specification-driver";
13
13
 
14
14
  const SHA = /^[0-9a-f]{40}$/u;
15
15
  const ROOT = /^sha256:[0-9a-f]{64}$/u;
@@ -36,7 +36,7 @@ function same(left, right) {
36
36
  return adopterDeliveryGateDigest(left) === adopterDeliveryGateDigest(right);
37
37
  }
38
38
 
39
- export function summarizeV3V4CapabilityInventory(inventory) {
39
+ export function summarizeBaselineCapabilityInventory(inventory) {
40
40
  exactKeys(
41
41
  inventory,
42
42
  [
@@ -197,7 +197,7 @@ function validateExecutionEvidence(execution) {
197
197
  execution.retryRun.readbackRoot &&
198
198
  execution.bootstrap?.status === "passed" &&
199
199
  ROOT.test(execution.bootstrap?.resultRoot || "") &&
200
- execution.neutralDriver?.id === V4_CROSS_PLATFORM_NEUTRAL_DRIVER &&
200
+ execution.neutralDriver?.id === CROSS_PLATFORM_NEUTRAL_DRIVER &&
201
201
  execution.neutralDriver?.status === "passed" &&
202
202
  execution.neutralDriver?.kfdDependencyPresent === false;
203
203
  if (!complete)
@@ -219,7 +219,7 @@ function validateAuthorityCeiling(authority) {
219
219
  fail("qualification report must not grant production or release authority");
220
220
  }
221
221
 
222
- export function validateV4CrossPlatformAdopterReport(report) {
222
+ export function validateCrossPlatformAdopterReport(report) {
223
223
  exactKeys(
224
224
  report,
225
225
  [
@@ -237,10 +237,10 @@ export function validateV4CrossPlatformAdopterReport(report) {
237
237
  );
238
238
  if (
239
239
  report.schemaVersion !== 1 ||
240
- report.contract !== V4_CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT
240
+ report.contract !== CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT
241
241
  )
242
242
  fail("platform report contract is unsupported");
243
- if (!V4_CROSS_PLATFORM_ADOPTER_PLATFORMS.includes(report.platform))
243
+ if (!CROSS_PLATFORM_ADOPTER_PLATFORMS.includes(report.platform))
244
244
  fail(`undeclared platform ${report.platform}`);
245
245
  if (!CONSUMER.test(report.consumer || ""))
246
246
  fail("consumer must be a stable lowercase identity");
@@ -256,18 +256,18 @@ export function validateV4CrossPlatformAdopterReport(report) {
256
256
  return structuredClone(report);
257
257
  }
258
258
 
259
- export function createV4CrossPlatformAdopterReport(input) {
259
+ export function createCrossPlatformAdopterReport(input) {
260
260
  const body = structuredClone(input);
261
261
  const report = {
262
262
  schemaVersion: 1,
263
- contract: V4_CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT,
263
+ contract: CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT,
264
264
  ...body,
265
265
  };
266
266
  report.reportRoot = adopterDeliveryGateDigest(report);
267
- return validateV4CrossPlatformAdopterReport(report);
267
+ return validateCrossPlatformAdopterReport(report);
268
268
  }
269
269
 
270
- export function qualifyV4CrossPlatformAdopters({ reports, consumers }) {
270
+ export function qualifyCrossPlatformAdopters({ reports, consumers }) {
271
271
  if (!Array.isArray(reports) || reports.length === 0)
272
272
  fail("at least one raw platform report is required");
273
273
  if (
@@ -277,9 +277,9 @@ export function qualifyV4CrossPlatformAdopters({ reports, consumers }) {
277
277
  new Set(consumers).size !== consumers.length
278
278
  )
279
279
  fail("required consumers must be unique stable lowercase identities");
280
- const normalized = reports.map(validateV4CrossPlatformAdopterReport);
280
+ const normalized = reports.map(validateCrossPlatformAdopterReport);
281
281
  const expectedKeys = consumers.flatMap((consumer) =>
282
- V4_CROSS_PLATFORM_ADOPTER_PLATFORMS.map(
282
+ CROSS_PLATFORM_ADOPTER_PLATFORMS.map(
283
283
  (platform) => `${consumer}:${platform}`,
284
284
  ),
285
285
  );
@@ -310,14 +310,14 @@ export function qualifyV4CrossPlatformAdopters({ reports, consumers }) {
310
310
  const orderedReports = expectedKeys.map((key) => reportByKey.get(key));
311
311
  const body = {
312
312
  schemaVersion: 1,
313
- contract: V4_CROSS_PLATFORM_ADOPTER_QUALIFICATION_CONTRACT,
313
+ contract: CROSS_PLATFORM_ADOPTER_QUALIFICATION_CONTRACT,
314
314
  sourceBinding: {
315
315
  runtimeSha: reference.runtimeSha,
316
316
  inventoryRoot: reference.inventoryRoot,
317
317
  sourceCuts: structuredClone(reference.sourceCuts),
318
318
  },
319
319
  consumers: [...consumers],
320
- platforms: [...V4_CROSS_PLATFORM_ADOPTER_PLATFORMS],
320
+ platforms: [...CROSS_PLATFORM_ADOPTER_PLATFORMS],
321
321
  capabilityMatrix: structuredClone(normalized[0].capabilityMatrix),
322
322
  reports: orderedReports.map(({ consumer, platform, reportRoot }) => ({
323
323
  consumer,
@@ -325,8 +325,8 @@ export function qualifyV4CrossPlatformAdopters({ reports, consumers }) {
325
325
  reportRoot,
326
326
  })),
327
327
  neutralDriver: {
328
- id: V4_CROSS_PLATFORM_NEUTRAL_DRIVER,
329
- platformCoverage: [...V4_CROSS_PLATFORM_ADOPTER_PLATFORMS],
328
+ id: CROSS_PLATFORM_NEUTRAL_DRIVER,
329
+ platformCoverage: [...CROSS_PLATFORM_ADOPTER_PLATFORMS],
330
330
  status: "passed",
331
331
  },
332
332
  authority: {