@kungfu-tech/buildchain 4.0.2-alpha.4 → 4.0.2-alpha.40

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 (153) hide show
  1. package/AGENTS.md +10 -1
  2. package/CONTRIBUTING.md +24 -0
  3. package/README.md +2 -2
  4. package/actions/promote-buildchain-ref/README.md +1 -1
  5. package/actions/v4-release-candidate-promote/README.md +28 -0
  6. package/architecture/agent-change-map.md +66 -7
  7. package/architecture/ci-lane-change-budget.json +366 -0
  8. package/architecture/internal-capabilities.json +52 -8
  9. package/architecture/maintainability-debt.json +148 -92
  10. package/architecture/maintainability-policy.json +34 -30
  11. package/architecture/release-tail-contract-inventory.json +6 -6
  12. package/architecture/v4-architecture-constitution.md +23 -20
  13. package/architecture/v4-cross-platform-adopter-qualification.json +1 -1
  14. package/architecture/v4-delivery-authority-parity.json +2 -2
  15. package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.json +1 -1
  16. package/architecture/v4-floating-consumer-policy.json +2 -2
  17. package/architecture/v4-next-development-parity.json +5 -5
  18. package/architecture/v4-partial-mutation-recovery-qualification.json +4 -1
  19. package/architecture/v4-platform-stage-checkpoints.json +1 -1
  20. package/architecture/v4-provider-operation-journal-contract.json +5 -2
  21. package/architecture/v4-publication-facade-patches.json +53 -0
  22. package/architecture/v4-release-activation-shadow-domain.json +5 -2
  23. package/architecture/v4-release-topology.json +143 -35
  24. package/architecture/v4-rust-wasm-production-authority.json +58 -0
  25. package/architecture/v4-stable-publication-fence.json +5 -2
  26. package/architecture/v4-stage-capsule-qualification.json +2 -2
  27. package/architecture/v4-tail-reseal-parity.json +8 -6
  28. package/architecture/v4-universal-workflow-bootstrap.json +171 -0
  29. package/architecture/v4-universal-workflow-fault-campaign.json +72 -0
  30. package/architecture/v4-universal-workflow-train-admission.json +40 -0
  31. package/architecture/workflow-taxonomy.json +1451 -0
  32. package/bin/buildchain.mjs +7 -7
  33. package/contracts/buildchain-v2-residuals-v1.json +57 -48
  34. package/contracts/dev-delivery-authority-v2.schema.json +16 -2
  35. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  36. package/contracts/v4-canonical-contracts-v1.schema.json +1 -0
  37. package/dist/site/buildchain-contract.json +93 -48
  38. package/dist/site/buildchain-site.json +222 -69
  39. package/dist/site/capability-registry.json +4 -4
  40. package/dist/site/controller-registry.json +50 -13
  41. package/dist/site/kfd-claims.json +2569 -982
  42. package/dist/site/kfd-upstream-aggregate.json +1 -1
  43. package/dist/site/manual-registry.json +13 -13
  44. package/dist/site/node-api-registry.json +88 -83
  45. package/dist/site/page-registry.json +204 -51
  46. package/dist/site/public-surface-audit.json +3207 -1219
  47. package/dist/site/publication-authority-registry.json +1124 -362
  48. package/dist/site/publication-registry.json +4 -4
  49. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +16 -2
  50. package/dist/site/site-manifest.json +17 -17
  51. package/dist/site/workflow-registry.json +5063 -1659
  52. package/docs/MAP.md +1 -0
  53. package/docs/auditable-demo.md +1 -1
  54. package/docs/cli.md +3 -3
  55. package/docs/dev-delivery-warrant.md +1 -1
  56. package/docs/engineering-housekeeper.md +3 -3
  57. package/docs/kfd-support.md +26 -2
  58. package/docs/next-development-transition.md +2 -2
  59. package/docs/node-api-reference.md +129 -129
  60. package/docs/publication-authority.md +2 -2
  61. package/docs/release-candidate.md +3 -3
  62. package/docs/release-flow.md +67 -19
  63. package/docs/release-governance.md +8 -8
  64. package/docs/release-passport.md +27 -2
  65. package/docs/reusable-build-surface.md +16 -0
  66. package/docs/v4-adopter-delivery.md +2 -2
  67. package/docs/v4-production-release.md +71 -8
  68. package/docs/v4-rust-wasm-production-authority.md +58 -0
  69. package/docs/v4-stage-capsule.md +2 -2
  70. package/docs/v4-tail-reseal.md +1 -1
  71. package/docs/workflow-catalog.md +154 -0
  72. package/docs/workflow-path-migration.md +109 -0
  73. package/package.json +10 -6
  74. package/packages/core/artifact-verification-envelope.js +5 -5
  75. package/packages/core/buildchain-contract.js +1 -1
  76. package/packages/core/buildchain-kfd-claims.js +2 -2
  77. package/packages/core/buildchain-publication-authority.js +42 -26
  78. package/packages/core/buildchain-v4-domain.wasm +0 -0
  79. package/packages/core/ci-lane-change-budget.js +14 -1
  80. package/packages/core/controller-evidence.js +4 -1
  81. package/packages/core/dev-delivery-candidate-identity.js +40 -6
  82. package/packages/core/dev-delivery-warrant-state.js +3 -4
  83. package/packages/core/dev-delivery-warrant.js +12 -2
  84. package/packages/core/github-governance-authority.js +4 -4
  85. package/packages/core/kfd-adopter-manifest.js +46 -47
  86. package/packages/core/next-development-projection.js +2 -2
  87. package/packages/core/release-line-dry-run.js +1 -1
  88. package/packages/core/release-passport-contract.js +5 -5
  89. package/packages/core/release-passport.js +5 -4
  90. package/packages/core/release-tail-product-capabilities.js +29 -0
  91. package/packages/core/release-tail-provider-plane.js +68 -1048
  92. package/packages/core/v4-canonical-contracts.js +14 -75
  93. package/packages/core/v4-domain-wasm-artifact.js +7 -0
  94. package/packages/core/v4-domain-wasm.js +216 -0
  95. package/packages/core/v4-floating-consumer-evidence.js +1 -1
  96. package/packages/core/v4-floating-consumer-policy.js +1 -1
  97. package/packages/core/v4-partial-mutation-recovery-qualification.js +9 -386
  98. package/packages/core/v4-product-publication.js +57 -0
  99. package/packages/core/v4-protected-publication-source.js +19 -21
  100. package/packages/core/v4-provider-operation-journal.js +18 -487
  101. package/packages/core/v4-provider-readback-idempotency.js +12 -97
  102. package/packages/core/v4-release-activation-shadow.js +13 -500
  103. package/packages/core/v4-release-invocation.js +28 -389
  104. package/packages/core/v4-stable-publication-fence.js +13 -342
  105. package/packages/core/v4-universal-workflow-bootstrap.js +586 -0
  106. package/scripts/binary-publication-evidence.mjs +135 -0
  107. package/scripts/build-contract-core.mjs +1 -14
  108. package/scripts/build-v4-domain-wasm.mjs +189 -0
  109. package/scripts/check-action-bundles.mjs +12 -2
  110. package/scripts/check-ci-lane-change-budget.mjs +4 -1
  111. package/scripts/check-core-mechanism-inventory.mjs +4 -3
  112. package/scripts/check-inventory.mjs +35 -44
  113. package/scripts/check-maintainability.mjs +16 -113
  114. package/scripts/check-v4-floating-consumer-policy-contract.mjs +2 -2
  115. package/scripts/check-v4-public-dogfood-contract.mjs +22 -9
  116. package/scripts/check-v4-release-topology.mjs +214 -50
  117. package/scripts/check-v4-runtime-semantic-closure.mjs +4 -1
  118. package/scripts/check-v4-universal-workflow-bootstrap.mjs +266 -0
  119. package/scripts/check-workflow-taxonomy.mjs +6 -0
  120. package/scripts/copy-v4-domain-wasm.mjs +14 -0
  121. package/scripts/dev-delivery-authority-command-adapters.mjs +1 -1
  122. package/scripts/dev-delivery-authority.mjs +8 -8
  123. package/scripts/dev-delivery-source-proof-reuse.mjs +2 -1
  124. package/scripts/dev-delivery-warrant-options.mjs +14 -9
  125. package/scripts/dev-delivery-warrant-store.mjs +73 -7
  126. package/scripts/dev-delivery-warrant-transition.mjs +109 -0
  127. package/scripts/dev-delivery-warrant.mjs +76 -99
  128. package/scripts/dev-pr-auto-merge.mjs +15 -15
  129. package/scripts/generate-channel-build-workflow.mjs +7 -2
  130. package/scripts/generate-channel-promotion-workflow.mjs +7 -5
  131. package/scripts/generate-site-bundle.mjs +11 -11
  132. package/scripts/generate-v4-universal-workflow-facades.mjs +458 -0
  133. package/scripts/generate-workflow-taxonomy.mjs +25 -0
  134. package/scripts/github-output.mjs +31 -0
  135. package/scripts/maintainability-metrics.mjs +16 -5
  136. package/scripts/maintainability-public-surface.mjs +115 -0
  137. package/scripts/next-development-review.mjs +307 -0
  138. package/scripts/release-asset-client.mjs +91 -0
  139. package/scripts/release-candidate-resolver.mjs +17 -18
  140. package/scripts/resume-from-candidate-run.mjs +1 -1
  141. package/scripts/source-verification-evidence.mjs +344 -0
  142. package/scripts/stable-candidate-qualification.mjs +1 -1
  143. package/scripts/universal-facade-maintainability.mjs +82 -0
  144. package/scripts/v4-product-publication-intent.mjs +121 -0
  145. package/scripts/v4-publication-settlement.mjs +211 -0
  146. package/scripts/v4-universal-workflow-backflow.mjs +212 -0
  147. package/scripts/v4-universal-workflow-engine.mjs +618 -0
  148. package/scripts/v4-universal-workflow-self-dogfood.mjs +205 -0
  149. package/scripts/verify-version-state-delta.mjs +173 -0
  150. package/scripts/workflow-taxonomy.mjs +507 -0
  151. package/templates/native-dev-delivery.yml +4 -7
  152. package/templates/universal-buildchain-bootstrap-recovery.yml +282 -0
  153. package/templates/universal-buildchain-bootstrap.yml +28 -0
package/docs/MAP.md CHANGED
@@ -37,6 +37,7 @@ running artifact), *use* (consume / extend) - and a **status**:
37
37
  | First-time repository adopter | [Golden Path](getting-started.md) | [Lifecycle Protocol](lifecycle-protocol.md) only when the generated defaults need changes |
38
38
  | CLI operator or agent | [Generated CLI Reference](cli-reference.md) | [CLI guide](cli.md) for concepts and worked examples |
39
39
  | Node toolkit developer | [Generated Node API Reference](node-api-reference.md) | [Core package guide](../packages/core/README.md) for recipes |
40
+ | Workflow contributor | [Workflow Catalog](workflow-catalog.md) | [Contribution rules](../CONTRIBUTING.md#workflow-organization) and the [exact registry](../architecture/workflow-taxonomy.json) |
40
41
  | Build/release operator | [Reusable Build Surface](reusable-build-surface.md) | [Release Flow](release-flow.md) and [Release Passport](release-passport.md) |
41
42
  | Product/trust reviewer | [Product Mechanism](product-mechanism.md) | [Release Passport](release-passport.md) and [KFD Support](kfd-support.md) |
42
43
 
@@ -139,7 +139,7 @@ jobs:
139
139
  ```
140
140
 
141
141
  Buildchain recursively consumes this surface in
142
- `.github/workflows/auditable-demo.yml` using its own exact standalone binary
142
+ `.github/workflows/self-build-demo-dogfood.yml` using its own exact standalone binary
143
143
  and the beginner bootstrap scenario in `.buildchain/auditable-demo.json`.
144
144
 
145
145
  ## Authority Boundary
package/docs/cli.md CHANGED
@@ -1044,7 +1044,7 @@ and package identity. See [`v4-adopter-delivery.md`](v4-adopter-delivery.md).
1044
1044
  ## npm Publish Gate
1045
1045
 
1046
1046
  Buildchain's own npm package is published from
1047
- `.github/workflows/buildchain-ref-promotion.yml`, inside the same publish
1047
+ `.github/workflows/self-release-promote.yml`, inside the same publish
1048
1048
  transaction that promotes release refs:
1049
1049
 
1050
1050
  - `v4.0.3-alpha.0` publishes to npm with dist-tag `alpha`.
@@ -1070,9 +1070,9 @@ Before the first real release, configure npm Trusted Publishing for:
1070
1070
 
1071
1071
  - package: `@kungfu-tech/buildchain`
1072
1072
  - repository: `kungfu-systems/buildchain`
1073
- - workflow: `.github/workflows/buildchain-ref-promotion.yml`
1073
+ - workflow: `.github/workflows/self-release-promote.yml`
1074
1074
 
1075
1075
  No npm package is published by manual dispatch or ordinary branch builds.
1076
- Manual dispatch on `.github/workflows/npm-publish.yml` remains dry-run only, so
1076
+ Manual dispatch on `.github/workflows/self-release-npm-dry-run.yml` remains dry-run only, so
1077
1077
  maintainers can verify package contents and npm publish shape before opening or
1078
1078
  merging the release PR.
@@ -506,7 +506,7 @@ shows the same exact PR head is already queued again, so an earlier queue event
506
506
  cannot close a newer active Warrant generation.
507
507
 
508
508
  Buildchain uses the same contract for its own protected dev line through
509
- `buildchain-dev-delivery.yml`. The manual caller requires the exact PR head and
509
+ `self-ops-dev-delivery.yml`. The manual caller requires the exact PR head and
510
510
  semantic source roots, accepts an optional reusable native proof, keeps both
511
511
  the durable public selector and explicit runtime input on `v4-alpha`, selects
512
512
  `delivery-warrant-mode: required`, and targets GitHub Merge Queue. It does not
@@ -158,9 +158,9 @@ to plans, reports, receipts, summaries, or artifacts.
158
158
 
159
159
  Buildchain dogfoods the reusable contract through three thin callers:
160
160
 
161
- - `engineering-housekeeper-daily.yml` uses a 30-day window and a 10-action cap;
162
- - `engineering-housekeeper-weekly.yml` uses a 45-day window and a 20-action cap;
163
- - `engineering-housekeeper-monthly.yml` uses a 60-day window and a 50-action cap.
161
+ - `self-ops-housekeeping-daily.yml` uses a 30-day window and a 10-action cap;
162
+ - `self-ops-housekeeping-weekly.yml` uses a 45-day window and a 20-action cap;
163
+ - `self-ops-housekeeping-monthly.yml` uses a 60-day window and a 50-action cap.
164
164
 
165
165
  All three schedules run unattended apply with repository-wide mainline
166
166
  discovery. They delete only exact merged heads from the positive temporary
@@ -1,3 +1,22 @@
1
+ ---
2
+ status: active
3
+ period: ongoing
4
+ theme: generic-kfd-adopter-binding
5
+ doc_type: reference
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-06
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-06
16
+ visible_context: Buildchain v3 implementation and v4 source and regression tests.
17
+ invisible_context_boundary: No credentials or private runtime evidence inspected.
18
+ ---
19
+
1
20
  # KFD Support
2
21
 
3
22
  Buildchain implements KFD support as release evidence and product capability
@@ -77,8 +96,13 @@ KFD records and evidence by SHA-256. The result uses
77
96
  `buildchain kfd support project` derives a compatibility projection from the
78
97
  standard adopter manifest and its exact passing gate. The adopter manifest is
79
98
  the sole KFD-1..13 declaration authority; the command rejects stale package,
80
- source, witness, registry, verifier-set, and KFD-4/5/7 gate roots. The emitted
81
- matrix is not an independent declaration and cannot widen adopter claims.
99
+ source, witness, registry, verifier-set, and KFD-4/5/7 gate roots. Gate creation
100
+ accepts an explicit `expectedAdopterId`, `expectedSourceRepository`, and
101
+ `expectedSourceSha`; omitting the first two preserves the Buildchain
102
+ self-release default. The gate, every product-gate projection, the legacy
103
+ matrix, Release Passport, and artifact evidence all retain that exact
104
+ adopter/repository/source closure. The emitted matrix is not an independent
105
+ declaration and cannot widen adopter claims.
82
106
 
83
107
  ## KFD-1
84
108
 
@@ -76,8 +76,8 @@ invalid.
76
76
 
77
77
  ## Public self-dogfood and adoption
78
78
 
79
- `.github/workflows/v4-public-consumer-dogfood.yml` remains the exact thin
80
- consumer of the public `v4-stage-capsule-canary.yml@v4-alpha` contract. Its
79
+ `.github/workflows/self-build-public-consumer-dogfood.yml` remains the exact thin
80
+ consumer of the public `public-build-stage-capsule-canary.yml@v4-alpha` contract. Its
81
81
  declared `lifecycle.verify` runs `pnpm run check`, so the same public path
82
82
  executes pure recovery tests that inject a transient durable-state write
83
83
  failure, restore the adapter operation on a fresh runner, supersede stale work