@kungfu-tech/buildchain 4.0.0 → 4.0.1-alpha.2

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 (69) hide show
  1. package/AGENTS.md +13 -5
  2. package/actions/promote-buildchain-ref/README.md +11 -6
  3. package/architecture/internal-capabilities.json +11 -2
  4. package/architecture/maintainability-policy.json +149 -17
  5. package/architecture/v4-floating-consumer-policy.json +75 -0
  6. package/architecture/v4-floating-consumer-policy.md +32 -0
  7. package/architecture/v4-runtime-ref-resume-authority.json +64 -0
  8. package/architecture/v4-stage-capsule-qualification.json +2 -2
  9. package/bin/internal/trust-release-release-handlers.mjs +5 -0
  10. package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +53 -0
  11. package/contracts/fixtures/v4-runtime-ref-resume-authority-v1/scenario.json +15 -0
  12. package/contracts/v4-floating-consumer-policy-receipt-v1.schema.json +105 -0
  13. package/contracts/v4-runtime-ref-resume-authority-v1.schema.json +235 -0
  14. package/dist/site/buildchain-contract.json +101 -31
  15. package/dist/site/buildchain-site.json +73 -27
  16. package/dist/site/capability-registry.json +3 -3
  17. package/dist/site/controller-registry.json +62 -6
  18. package/dist/site/kfd-claims.json +68 -13
  19. package/dist/site/kfd-upstream-aggregate.json +1 -1
  20. package/dist/site/manual-registry.json +6 -6
  21. package/dist/site/node-api-registry.json +799 -127
  22. package/dist/site/page-registry.json +63 -17
  23. package/dist/site/public-surface-audit.json +49 -17
  24. package/dist/site/publication-registry.json +4 -4
  25. package/dist/site/release-provenance.json +2 -0
  26. package/dist/site/site-manifest.json +10 -10
  27. package/dist/site/workflow-registry.json +46 -18
  28. package/docs/MAP.md +2 -0
  29. package/docs/dev-delivery-warrant.md +19 -1
  30. package/docs/lifecycle-protocol.md +41 -0
  31. package/docs/node-api-reference.md +207 -134
  32. package/docs/reusable-build-surface.md +41 -0
  33. package/docs/runtime-train-validation.md +10 -0
  34. package/docs/v4-runtime-ref-resume-authority.md +69 -0
  35. package/docs/versioning.md +1 -0
  36. package/package.json +6 -4
  37. package/packages/core/artifact-signing.js +61 -0
  38. package/packages/core/buildchain-config.js +66 -1
  39. package/packages/core/dev-delivery-proof.js +37 -3
  40. package/packages/core/dev-delivery-warrant.js +3 -3
  41. package/packages/core/index.js +2 -0
  42. package/packages/core/publication-authority.js +5 -5
  43. package/packages/core/release-candidate.js +79 -19
  44. package/packages/core/release-passport.js +239 -33
  45. package/packages/core/v4-floating-consumer-evidence.js +324 -0
  46. package/packages/core/v4-floating-consumer-policy.js +446 -0
  47. package/packages/core/v4-floating-consumer-release-passport.js +126 -0
  48. package/packages/core/v4-runtime-ref-resume-authority.js +625 -0
  49. package/packages/core/v4-runtime-selector-persistence.js +228 -0
  50. package/packages/core/workflow-yaml-contract.js +48 -0
  51. package/scripts/audit-publication-control-plane.mjs +31 -31
  52. package/scripts/check-inventory.mjs +1 -1
  53. package/scripts/check-v4-floating-consumer-policy-contract.mjs +198 -0
  54. package/scripts/check-v4-public-dogfood-contract.mjs +6 -11
  55. package/scripts/dev-delivery-source-proof-reuse.mjs +631 -0
  56. package/scripts/dev-pr-auto-merge.mjs +37 -48
  57. package/scripts/dev-pr-delivery-warrant.mjs +205 -2
  58. package/scripts/dev-pr-prequeue-guard.mjs +399 -0
  59. package/scripts/ensure-github-release.mjs +3 -3
  60. package/scripts/generate-channel-build-workflow.mjs +3 -0
  61. package/scripts/generate-channel-promotion-workflow.mjs +112 -12
  62. package/scripts/generate-release-candidate-passport.mjs +41 -33
  63. package/scripts/init-repo.mjs +5 -1
  64. package/scripts/inspect-artifact-signing-requests.mjs +6 -0
  65. package/scripts/npm-publish-transaction.mjs +101 -89
  66. package/scripts/resume-from-candidate-run.mjs +11 -14
  67. package/scripts/seal-artifact-signing-requests.mjs +6 -0
  68. package/scripts/site-capability-metadata.mjs +2 -0
  69. package/scripts/v4-consumer-policy.mjs +231 -0
@@ -215,6 +215,47 @@ acceptance without weakening promotion installs.
215
215
  The reusable job name remains `check`, and `upload-artifacts: false` disables
216
216
  evidence upload without changing the job conclusion used by branch protection.
217
217
 
218
+ Repositories with an expensive `lifecycle.check` may opt into exact source
219
+ qualification proof reuse for merge groups. Set `source-proof-reuse: true` and
220
+ provide non-empty JSON arrays for the policy, closure, dependency, and required
221
+ context inputs. A successful pull-request run seals its exact source head, base,
222
+ patch, runtime, plan, path-set roots, required contexts, controller receipt, and
223
+ workflow run into a content-addressed artifact. The corresponding merge-group
224
+ run downloads only an unexpired artifact from a successful run of the same
225
+ caller workflow and pull request, recomputes every predicate, and records a
226
+ merge-group-bound reuse decision. Reuse additionally requires the synthetic
227
+ merge-group commit to have exactly the qualified base and proved PR head as its
228
+ two parents; grouped or otherwise changed composition falls back. Exact
229
+ verification skips package setup and the duplicate lifecycle commands while
230
+ retaining the stable `check / check` context and an explicit non-executed
231
+ lifecycle evidence manifest.
232
+
233
+ The opt-in pull-request producer checks out `pull_request.head.sha`, not the
234
+ ephemeral pull-request merge ref. This keeps the controller receipt, proof
235
+ artifact name, and sealed source identity on the same exact PR head that the
236
+ merge-group verifier binds as its second parent. Other check modes and callers
237
+ retain their existing checkout behavior.
238
+
239
+ The optimization is fail closed. A missing artifact, API or download error,
240
+ base advance, source change, runtime change, contract change, configured path
241
+ change, file blob change, required-context change, malformed proof, or
242
+ non-qualifying producer receipt runs the full `lifecycle.install` plus
243
+ `lifecycle.check` path. Existing callers remain unchanged because proof reuse is
244
+ disabled by default.
245
+
246
+ ```yaml
247
+ jobs:
248
+ source-acceptance:
249
+ uses: kungfu-systems/buildchain/.github/workflows/check.yml@<exact-sha>
250
+ with:
251
+ mode: source
252
+ source-proof-reuse: true
253
+ source-proof-policy-paths-json: '[".github/workflows/source.yml"]'
254
+ source-proof-closure-paths-json: '[".buildchain/buildchain.toml","scripts/source-check.mjs"]'
255
+ source-proof-dependency-paths-json: '["pnpm-lock.yaml"]'
256
+ source-proof-required-contexts-json: '["Candidate source acceptance / check"]'
257
+ ```
258
+
218
259
  Shared environment variables can be declared once:
219
260
 
220
261
  ```toml