@kungfu-tech/buildchain 3.0.9-alpha.4 → 3.0.9-alpha.6

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 (42) hide show
  1. package/bin/buildchain.mjs +5 -1
  2. package/dist/site/buildchain-contract.json +9 -9
  3. package/dist/site/buildchain-site.json +56 -26
  4. package/dist/site/cli-registry.json +18 -2
  5. package/dist/site/kfd-claims.json +8 -5
  6. package/dist/site/kfd-upstream-aggregate.json +1 -1
  7. package/dist/site/manual-registry.json +6 -6
  8. package/dist/site/node-api-registry.json +290 -49
  9. package/dist/site/page-registry.json +46 -16
  10. package/dist/site/public-surface-audit.json +122 -6
  11. package/dist/site/publication-registry.json +4 -4
  12. package/dist/site/site-manifest.json +10 -10
  13. package/dist/site/workflow-registry.json +12 -6
  14. package/docs/cli-reference.md +79 -13
  15. package/docs/dev-delivery-warrant.md +53 -19
  16. package/docs/kfd-support.md +7 -2
  17. package/docs/node-api-reference.md +59 -51
  18. package/docs/release-governance.md +5 -4
  19. package/docs/release-passport.md +8 -2
  20. package/docs/versioning.md +1 -0
  21. package/package.json +3 -2
  22. package/packages/core/artifact-verification-envelope.js +5 -5
  23. package/packages/core/dev-delivery-native-proof.js +333 -0
  24. package/packages/core/dev-delivery-warrant-settlement.js +5 -1
  25. package/packages/core/dev-delivery-warrant.js +40 -6
  26. package/packages/core/kfd-adopter-manifest.js +46 -47
  27. package/packages/core/release-passport-contract.js +5 -5
  28. package/packages/core/release-passport.js +5 -4
  29. package/scripts/aws-macos-jit-controller-core.mjs +82 -2
  30. package/scripts/aws-macos-jit-controller.mjs +81 -1
  31. package/scripts/aws-macos-jit-source-rebind.mjs +147 -24
  32. package/scripts/buildchain-cli-help.mjs +6 -2
  33. package/scripts/check-internal-architecture.mjs +1 -0
  34. package/scripts/dev-delivery-native-run.mjs +187 -0
  35. package/scripts/dev-delivery-proof.mjs +54 -2
  36. package/scripts/dev-delivery-two-phase.mjs +598 -0
  37. package/scripts/dev-delivery-warrant.mjs +38 -3
  38. package/scripts/dev-pr-delivery-warrant.mjs +6 -1
  39. package/scripts/generate-channel-build-workflow.mjs +4 -0
  40. package/scripts/init-repo.mjs +16 -0
  41. package/scripts/release-candidate-tail-reseal.mjs +426 -0
  42. package/templates/native-dev-delivery.yml +82 -0
@@ -1,5 +1,5 @@
1
1
  ---
2
- status: draft
2
+ status: accepted
3
3
  period: ongoing
4
4
  theme: dev-delivery-warrant
5
5
  doc_type: technical-reference
@@ -7,7 +7,7 @@ source_level: local-files
7
7
  confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
- review_state: unreviewed
10
+ review_state: self-reviewed
11
11
  last_reviewed: 2026-08-11
12
12
  ai_provenance:
13
13
  model_family: GPT-5
@@ -38,10 +38,14 @@ and retained enqueue time.
38
38
 
39
39
  Selection is deterministic FIFO plus aging with bounded priority. Priority may
40
40
  reorder queued work, but it cannot preempt the active Warrant. Exactly one
41
- candidate receives a leased Warrant containing a fencing token, lease
42
- generation, expected-old state root, expiry, and the complete exact source
43
- binding. Heartbeat extends only that generation. Expiry recovery rejects the
44
- old token, retains queue age, and returns the candidate to selection.
41
+ candidate receives a `provisional` leased Warrant containing a fencing token,
42
+ lease generation, expected-old state root, expiry, and the complete exact
43
+ source binding. It reserves the next protected-dev landing before expensive
44
+ native shards start, but it is not GitHub Merge Queue admission authority.
45
+ Heartbeat extends only that generation. Native proof success atomically
46
+ upgrades the same token and generation to `qualified`; only then may enqueue
47
+ begin. Expiry recovery rejects the old token, retains queue age, and returns
48
+ the candidate to selection.
45
49
 
46
50
  A terminal event may cancel a candidate before selection without minting a
47
51
  Warrant. This transition is limited to an exact non-active queued candidate and
@@ -73,23 +77,28 @@ That lane outranks not-yet-leased ordinary work, but never preempts or rewrites
73
77
  an active Warrant; unrelated, conflicted, mismatched, or fabricated claims fail
74
78
  closed before selection.
75
79
 
76
- ## Split proof authority
80
+ ## Three proof authorities
77
81
 
78
- Source Qualification Proof is independent of the moving dev base. It binds the
79
- semantic source, exact source head and patch/tree intent, plan, affected
80
- closure, dependencies, toolchain, covered paths, and shard evidence.
82
+ Source Qualification Proof is created from the cheap source-acceptance gate. It
83
+ binds the semantic source, exact source head and patch/tree intent, plan,
84
+ affected closure, dependencies, toolchain, covered paths, and exact acceptance
85
+ evidence. Ready state and approval are established before provisional
86
+ selection.
81
87
 
82
- Before reuse, the consumer classifies the dev delta:
88
+ Native Qualification Proof is separate. It binds semantic source and patch,
89
+ plan, affected closure, dependency graph, toolchain, covered paths, native
90
+ shard evidence, and the exact dev base used by the native composition. Before
91
+ reuse, the consumer classifies the dev delta:
83
92
 
84
- - unchanged roots plus an unrelated attributed delta reuse source
85
- qualification and run only a cheap Project Cut replay. GitHub's `behind`
93
+ - unchanged semantic roots plus an unrelated fully attributed base delta reuse
94
+ native qualification and run only a cheap Project Cut replay. GitHub's `behind`
86
95
  state is accepted only when a rooted replay proof binds the exact current
87
96
  protected base, unchanged PR head and source patch, replay tree, required
88
97
  context roots, and a qualified `project.cut.merge-queue-admission/v1`
89
98
  receipt;
90
- - an overlapping delta reruns the affected source shards;
99
+ - an overlapping delta reruns affected native shards or the full native plan;
91
100
  - an unknown graph or changed source, plan, closure, dependency, or toolchain
92
- root fails closed to full source qualification.
101
+ root fails closed to full native qualification.
93
102
 
94
103
  Integration Delivery Proof is separate and cannot be cached across candidates.
95
104
  It binds the exact current dev base, replay tree, GitHub `merge_group` head and
@@ -113,6 +122,17 @@ buildchain dev warrant submit --repository owner/repository \
113
122
  buildchain dev warrant select --repository owner/repository \
114
123
  --branch dev/v4/v4.0 --execute
115
124
 
125
+ buildchain dev proof native --branch dev/v4/v4.0 \
126
+ --qualified-base <sha> --affected-paths-json '["packages/native"]' ...
127
+
128
+ buildchain dev proof classify-native --source-proof native-proof.json \
129
+ --current-base <sha> --graph-known true --changed-paths-json '[]' ...
130
+
131
+ buildchain dev warrant qualify --repository owner/repository \
132
+ --branch dev/v4/v4.0 --fencing-token <root> --lease-generation 1 \
133
+ --native-proof native-proof.json \
134
+ --native-reuse-decision native-reuse-decision.json --execute
135
+
116
136
  buildchain dev warrant cancel-queued --repository owner/repository \
117
137
  --branch dev/v4/v4.0 --candidate-id <root> --pull-request 123 \
118
138
  --expected-source-head <queued-sha> --observed-source-head <event-sha> \
@@ -120,7 +140,7 @@ buildchain dev warrant cancel-queued --repository owner/repository \
120
140
  --evidence-root <terminal-event-root> --execute
121
141
  ```
122
142
 
123
- `heartbeat`, `recover`, `close`, `settle`, `cancel-queued`, and `observe` use the same durable authority.
143
+ `heartbeat`, `qualify`, `recover`, `close`, `settle`, `cancel-queued`, and `observe` use the same durable authority.
124
144
  Warrant-scoped mutations require the exact fencing token and lease generation.
125
145
  `close` also requires a rooted terminal evidence object.
126
146
 
@@ -174,8 +194,9 @@ The reusable `dev-pr-auto-merge.yml` supports three explicit rollout modes:
174
194
 
175
195
  - `off` preserves the previous exact-head admission controller;
176
196
  - `shadow` qualifies the source and emits a read-only queue submission plan;
177
- - `required` persists the submission, selects the Warrant, and refuses GitHub
178
- enqueue unless the immutable queue commit, state root, active Warrant, and
197
+ - `required` persists the submission, selects a provisional Warrant, runs or
198
+ reuses semantic native proof under heartbeat, atomically qualifies the same
199
+ fence, and refuses GitHub enqueue unless the immutable queue commit, state root, active Warrant, and
179
200
  selected candidate all pass exact readback validation. Immediately before
180
201
  enqueue, the controller also rereads the current protected state ref and
181
202
  verifies the active candidate, fencing token, generation, pull request, and
@@ -188,6 +209,14 @@ The reusable `dev-pr-auto-merge.yml` supports three explicit rollout modes:
188
209
  configured consumer workflow is dispatched immediately for that exact PR,
189
210
  head, and source run; the candidate is not left waiting for a patrol cron.
190
211
 
212
+ The required controller checks the protected base again after native work. A
213
+ disjoint attributed delta reuses the proof. Overlap or unknown attribution
214
+ triggers one automatic revalidation on the latest base; continued overlap,
215
+ native failure, cancellation, semantic head movement, or an unrecoverable merge
216
+ conflict closes the exact fence. The next queued candidate is notified through
217
+ the `buildchain-dev-delivery-wake` repository event. If cancellation prevents
218
+ cleanup, lease expiry recovers retained queue age and mints a new fence.
219
+
191
220
  Consumers should deploy `shadow` first, inspect receipts, then change their
192
221
  protected caller to `required`. Rollback is a reviewed caller change back to
193
222
  `off`; it does not delete queue history or reinterpret old receipts. The
@@ -202,11 +231,16 @@ cannot close a newer active Warrant generation.
202
231
 
203
232
  Buildchain uses the same contract for its own protected dev line through
204
233
  `buildchain-dev-delivery.yml`. The manual caller requires the exact PR head and
205
- all native/source proof roots, pins the runtime to the caller commit, selects
234
+ semantic source roots, accepts an optional reusable native proof, pins the runtime to the caller commit, selects
206
235
  `delivery-warrant-mode: required`, and targets GitHub Merge Queue. It does not
207
236
  offer an `off` switch: rollback is a reviewed change to this caller, not an
208
237
  operator-time weakening of a specific delivery attempt.
209
238
 
239
+ `buildchain init --type native` generates the corresponding protected-dev
240
+ consumer workflow. It supports both explicit dispatch and the bounded wake
241
+ event, uses the same reusable controller, and keeps the native command in the
242
+ consumer repository rather than inventing provider-specific shards.
243
+
210
244
  This mechanism schedules protected delivery only. It does not serialize local
211
245
  development, source-only checks, unrelated channels, release publication, or
212
246
  runner provisioning. It never grants authority to enable cloud runner
@@ -77,8 +77,13 @@ KFD records and evidence by SHA-256. The result uses
77
77
  `buildchain kfd support project` derives a compatibility projection from the
78
78
  standard adopter manifest and its exact passing gate. The adopter manifest is
79
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.
80
+ source, witness, registry, verifier-set, and KFD-4/5/7 gate roots. Gate creation
81
+ accepts an explicit `expectedAdopterId`, `expectedSourceRepository`, and
82
+ `expectedSourceSha`; omitting the first two preserves the Buildchain
83
+ self-release default. The gate, every product-gate projection, the legacy
84
+ matrix, Release Passport, and artifact evidence all retain that exact
85
+ adopter/repository/source closure. The emitted matrix is not an independent
86
+ declaration and cannot widen adopter claims.
82
87
 
83
88
  ## KFD-1
84
89