@kungfu-tech/buildchain 3.0.8 → 3.0.9-alpha.1

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 (79) hide show
  1. package/actions/promote-buildchain-ref/README.md +8 -7
  2. package/bin/buildchain.mjs +34 -33
  3. package/bin/internal/trust-release-release-handlers.mjs +5 -0
  4. package/contracts/fixtures/kfd-adopter-release-v1/kfd-4-perspective.json +16 -0
  5. package/contracts/fixtures/kfd-adopter-release-v1/kfd-4-replay.json +57 -0
  6. package/contracts/release-cut-v1.schema.json +1 -0
  7. package/contracts/release-train-transition-v1.schema.json +1 -0
  8. package/dist/site/agent-index.json +0 -1
  9. package/dist/site/artifact-schemas.json +0 -2
  10. package/dist/site/badge-endpoint-registry.json +9 -9
  11. package/dist/site/badges/v1/kfd-8/aligned.json +1 -1
  12. package/dist/site/badges/v1/kfd-8/declared.json +1 -1
  13. package/dist/site/badges/v1/kfd-8/downgraded.json +1 -1
  14. package/dist/site/badges/v1/kfd-8/draft.json +1 -1
  15. package/dist/site/badges/v1/kfd-8/failed.json +1 -1
  16. package/dist/site/badges/v1/kfd-8/missing.json +1 -1
  17. package/dist/site/badges/v1/kfd-8/passed.json +1 -1
  18. package/dist/site/badges/v1/kfd-8/planned.json +1 -1
  19. package/dist/site/buildchain-contract.json +38 -34
  20. package/dist/site/buildchain-site.json +59 -39
  21. package/dist/site/capability-registry.json +1 -1
  22. package/dist/site/cli-registry.json +8 -7
  23. package/dist/site/controller-registry.json +13 -5
  24. package/dist/site/kfd-claims.json +35 -8
  25. package/dist/site/kfd-upstream-aggregate.json +10 -10
  26. package/dist/site/manual-registry.json +9 -9
  27. package/dist/site/node-api-registry.json +1143 -320
  28. package/dist/site/page-registry.json +46 -26
  29. package/dist/site/public-surface-audit.json +19 -9
  30. package/dist/site/publication-registry.json +4 -4
  31. package/dist/site/release-passport-check-manifest.json +33 -5
  32. package/dist/site/release-provenance.json +2 -1
  33. package/dist/site/schemas/release-passport-v1.schema.json +3 -0
  34. package/dist/site/site-manifest.json +13 -13
  35. package/dist/site/workflow-registry.json +19 -9
  36. package/docs/aws-us-elastic-runner-burst-plane.md +15 -3
  37. package/docs/cli-reference.md +6 -6
  38. package/docs/cli.md +2 -3
  39. package/docs/dev-alpha-candidate-patrol.md +45 -20
  40. package/docs/dev-delivery-warrant.md +12 -2
  41. package/docs/kfd-support.md +7 -7
  42. package/docs/node-api-reference.md +295 -246
  43. package/docs/release-passport.md +25 -12
  44. package/docs/release-train.md +54 -4
  45. package/docs/reusable-build-surface.md +26 -9
  46. package/docs/runtime-train-validation.md +6 -0
  47. package/docs/versioning.md +3 -2
  48. package/package.json +4 -3
  49. package/packages/core/artifact-verification-envelope.js +114 -0
  50. package/packages/core/buildchain-channel-identity.js +119 -0
  51. package/packages/core/buildchain-compatibility-proof.js +32 -0
  52. package/packages/core/buildchain-contract.js +7 -0
  53. package/packages/core/controller-evidence.js +2 -1
  54. package/packages/core/dev-alpha-active-release-train.js +460 -0
  55. package/packages/core/dev-alpha-candidate-selection.js +181 -0
  56. package/packages/core/dev-delivery-warrant.js +15 -4
  57. package/packages/core/index.js +4 -5
  58. package/packages/core/kfd-adopter-manifest.js +390 -0
  59. package/packages/core/kfd-product-gates.js +0 -300
  60. package/packages/core/release-blocker-priority.js +192 -0
  61. package/packages/core/release-passport-contract.js +219 -6
  62. package/packages/core/release-passport.js +139 -242
  63. package/packages/core/release-train.js +220 -0
  64. package/scripts/aws-macos-jit-controller-core.mjs +76 -0
  65. package/scripts/aws-macos-jit-controller.mjs +29 -0
  66. package/scripts/aws-macos-jit-source-rebind.mjs +503 -0
  67. package/scripts/buildchain-channel-router.mjs +18 -2
  68. package/scripts/buildchain-cli-help.mjs +4 -2
  69. package/scripts/buildchain-contract-lock.mjs +11 -1
  70. package/scripts/check-inventory.mjs +4 -4
  71. package/scripts/dev-alpha-candidate-patrol.mjs +196 -201
  72. package/scripts/generate-buildchain-kfd-witnesses.mjs +88 -94
  73. package/scripts/generate-channel-build-workflow.mjs +78 -31
  74. package/scripts/generate-site-bundle.mjs +1 -8
  75. package/scripts/promotion-channel-router.mjs +5 -3
  76. package/scripts/release-train-self-dogfood.mjs +579 -0
  77. package/scripts/runtime-ref-core.mjs +4 -17
  78. package/scripts/site-capability-metadata.mjs +3 -1
  79. package/dist/site/schemas/kfd-support-projection-v1.schema.json +0 -106
@@ -8,12 +8,12 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: self-reviewed
11
- last_reviewed: 2026-08-04
11
+ last_reviewed: 2026-08-11
12
12
  ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
15
- generated_at: 2026-08-04
16
- visible_context: Existing Buildchain source locks, Kungfu exact-source Alpha preflight, Dev Patrol, cancelled duplicate runs, protected auto-merge policy, repository release governance, and the consumer-owned settlement renderer threat model.
15
+ generated_at: 2026-08-11
16
+ visible_context: Buildchain v3 Release Train and Release Cut contracts, existing source locks, exact-source Alpha preflight, Dev Patrol, cancelled duplicate runs, protected auto-merge policy, repository release governance, and the consumer-owned settlement renderer threat model.
17
17
  invisible_context_boundary: No credentials, private logs, or private configuration were used.
18
18
  ---
19
19
 
@@ -33,12 +33,21 @@ head), and selects the newest commit that satisfies all of these conditions:
33
33
  succeeded; and
34
34
  - both runs are within the caller's evidence age limit.
35
35
 
36
- The selected commit can be behind the observed development head when newer
36
+ When no managed candidate is active, the selected commit can be behind the observed development head when newer
37
37
  commits have not completed both workflows yet. The decision binds the observed
38
38
  head, selected SHA, and count of skipped newer commits. This makes a slow native
39
39
  verification lane live under continuous development without silently treating
40
40
  an unqualified head as releasable.
41
41
 
42
+ Before any new selection, the v3 controller now resolves the open managed PR and
43
+ validates its embedded authoritative Release Train. If one exists, the frozen
44
+ Release Cut wins: Candidate Patrol does not scan for or retain a newer qualified
45
+ candidate. It returns the cut's exact candidate commit, candidate tree,
46
+ generation, Alpha base, Buildchain runtime and authority roots. A newer dev head
47
+ is appended once as a rooted, non-invalidating observation. Repeated webhooks or
48
+ a restarted controller observing the same dev head reuse the existing
49
+ observation and do not change the candidate identity.
50
+
42
51
  A cancelled workflow run carries no qualification verdict, so a newer
43
52
  cancelled duplicate does not erase the prior completed verdict for the same
44
53
  workflow and source SHA. Other non-success conclusions remain authoritative:
@@ -64,15 +73,19 @@ The companion state is
64
73
  - `eligible-for-settlement`: a qualified candidate exists and no managed Alpha
65
74
  candidate PR is active;
66
75
  - `active`: exactly one managed candidate PR is open;
67
- - `retained-next`: an active PR remains authoritative and the newest different
68
- qualified SHA is retained as `nextCandidate`;
76
+ - `held`: the active Release Cut failed exact candidate, tree, Alpha-base,
77
+ runtime or route readback and cannot resume;
78
+ - `superseded`: the embedded train contains a valid explicit supersession
79
+ transition;
69
80
  - `stale`: the available exact-SHA evidence pair is outside policy age; or
70
81
  - `blocked`: qualification or reconciliation failed closed.
71
82
 
72
- When a newer qualified SHA replaces an earlier `nextCandidate`, the state also
73
- records that earlier SHA as `supersededCandidate`. Every state carries exact
74
- repository, source/target refs and SHAs, workflow-run evidence through the
75
- candidate decision, and canonical decision/state roots.
83
+ New v3 states embed the complete `kungfu-buildchain-release-train/v1` record.
84
+ `held` states include a rooted `kungfu-buildchain-release-train-hold/v1`
85
+ receipt with the expected cut and observed coordinates. Dev movement alone is
86
+ not an allowed supersession cause. Legacy markers remain readable by the core
87
+ contract, but the active-train workflow refuses to manufacture missing Release
88
+ Cut authority for an already-open legacy PR.
76
89
 
77
90
  ## Reusable workflow
78
91
 
@@ -107,20 +120,32 @@ the rendered bytes. Concurrent qualification progress therefore fails closed
107
120
  and is recomputed by the next patrol instead of attaching a declaration to the
108
121
  wrong candidate.
109
122
 
110
- The separately permissioned `settle` job re-runs the exact observation before
111
- any write. With no active managed candidate, it creates one branch named from
123
+ The separately permissioned `settle` job checks out the exact Buildchain runtime
124
+ commit used by `observe`, re-runs the exact observation, and compare-and-swap
125
+ checks the selected SHA, prior controller root and Release Cut root before any
126
+ write. With no active managed candidate, it reads the candidate tree and creates
127
+ one rooted Release Cut before it creates one branch named from
112
128
  the target branch and the first 12 characters of the full source SHA. An
113
129
  existing branch must point to the same full SHA or the run fails. With one
114
- active managed candidate, it only updates the machine-readable state marker in
115
- that PR body so repeated events and rapid dev progress cannot create another
116
- candidate PR or another heavy candidate build. Foreign human-authored Alpha PRs
117
- are ignored. More than one open Buildchain-managed candidate fails closed.
130
+ active managed candidate, it validates the candidate ref, tree, Alpha base and
131
+ runtime before returning that same SHA to every checkout/build consumer. It only
132
+ updates the machine-readable state marker when a new dev observation or hold
133
+ receipt must be persisted. Repeated events and rapid dev progress cannot create
134
+ another candidate PR or another heavy candidate build. Foreign human-authored
135
+ Alpha PRs are ignored. More than one open Buildchain-managed candidate fails
136
+ closed.
118
137
 
119
138
  The PR body is the bounded durable controller state: it preserves the active
120
- candidate and newest retained `nextCandidate` without introducing an always-on
121
- service. Once the active PR settles or is abandoned, the next execution
122
- recomputes current exact-SHA qualification and creates only the newest still
123
- fresh candidate. It never trusts a `workflow_run` trigger SHA as evidence.
139
+ Release Train without introducing an always-on service. Once the active PR
140
+ settles, is explicitly superseded, or is abandoned, the next execution may
141
+ recompute current exact-SHA qualification and cut a new generation under the
142
+ Release Train contract. It never trusts a `workflow_run` trigger SHA as
143
+ evidence.
144
+
145
+ The workflow exposes `train-root`, `cut-root`, `candidate-generation`,
146
+ `candidate-tree-sha`, `runtime-sha`, `drift-root` and `hold-root` alongside the
147
+ selected SHA. Alpha build orchestration should bind to those outputs and treat
148
+ a non-empty hold root as a fail-closed result.
124
149
 
125
150
  The caller may additionally set `auto-merge: true` and choose `merge-method`
126
151
  from `merge`, `squash`, or `rebase`. Buildchain only arms GitHub auto-merge for
@@ -8,11 +8,11 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-08-09
11
+ last_reviewed: 2026-08-11
12
12
  ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
15
- generated_at: 2026-08-09
15
+ generated_at: 2026-08-11
16
16
  invisible_context: not asserted
17
17
  ---
18
18
 
@@ -63,6 +63,16 @@ The queue does not infer an emergency: callers must choose it explicitly under
63
63
  their reviewed policy. Delivery classes are `non-native-fast`,
64
64
  `native-proof-required`, `cross-platform`, and `release`.
65
65
 
66
+ A release-blocker candidate may additionally carry a rooted priority claim
67
+ created from a settled Release Train dual landing. The claim binds the exact
68
+ Assignment, Initiative, repair, prior and successor cuts, candidate generation,
69
+ cut candidate, Dev head, semantic patch, both landing evidence roots, and
70
+ publication gate. Only a claim whose repository, protected base, Work roots,
71
+ head, patch, and claim root match the queued candidate enters the blocker lane.
72
+ That lane outranks not-yet-leased ordinary work, but never preempts or rewrites
73
+ an active Warrant; unrelated, conflicted, mismatched, or fabricated claims fail
74
+ closed before selection.
75
+
66
76
  ## Split proof authority
67
77
 
68
78
  Source Qualification Proof is independent of the moving dev base. It binds the
@@ -45,9 +45,8 @@ buildchain kfd 4 schema --json
45
45
  buildchain kfd 4 gate --input-json kfd-4-gate-input.json --json
46
46
  buildchain kfd 5 gate --input-json kfd-5-gate-input.json --json
47
47
  buildchain kfd 7 gate --input-json kfd-7-gate-input.json --json
48
- buildchain kfd support project --matrix-json support-matrix.json \
49
- --gate-json kfd-4-gate.json --gate-json kfd-5-gate.json \
50
- --gate-json kfd-7-gate.json --json
48
+ buildchain kfd support project --manifest-json adopter-manifest.json \
49
+ --manifest-gate-json adopter-manifest-gate.json --json
51
50
  ```
52
51
 
53
52
  KFD-1, KFD-2, and KFD-3 have concrete Buildchain workflows. KFD-4, KFD-5, and
@@ -75,10 +74,11 @@ KFD records and evidence by SHA-256. The result uses
75
74
  - KFD-7 requires a qualified and activated Domain Profile, independent review,
76
75
  product witnesses, all 13 evidence obligations, and negative evidence.
77
76
 
78
- `buildchain kfd support project` joins the three gate results with the
79
- product-owned KFD-1..13 matrix. It rejects normative metadata drift, source or
80
- freshness mismatch, gate/matrix disagreement, KFD-4/5 candidate widening,
81
- KFD-6 support, KFD-8..13 promotion, or any unsupported shipped-support claim.
77
+ `buildchain kfd support project` derives a compatibility projection from the
78
+ standard adopter manifest and its exact passing gate. The adopter manifest is
79
+ 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.
82
82
 
83
83
  ## KFD-1
84
84