@kungfu-tech/buildchain 3.0.9-alpha.8 → 4.0.0-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 (255) hide show
  1. package/AGENTS.md +39 -0
  2. package/README.md +17 -13
  3. package/actions/promote-buildchain-ref/README.md +0 -10
  4. package/actions/release-tail/README.md +6 -10
  5. package/architecture/internal-capabilities.json +502 -0
  6. package/architecture/maintainability-baseline.json +59 -0
  7. package/architecture/maintainability-policy.json +1384 -0
  8. package/architecture/release-tail-contract-inventory.json +587 -0
  9. package/architecture/v3-core-mechanism-inventory.json +1043 -0
  10. package/architecture/v3-core-mechanism-inventory.md +67 -0
  11. package/architecture/v4-adopter-delivery-parity.json +47 -0
  12. package/architecture/v4-architecture-constitution.md +210 -0
  13. package/architecture/v4-bootstrap-authority.json +56 -0
  14. package/architecture/v4-canonical-contract-fixtures.json +105 -0
  15. package/architecture/v4-capability-state-machine-manifest.json +480 -0
  16. package/architecture/v4-capability-state-machine-manifest.schema.json +202 -0
  17. package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.json +830 -0
  18. package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.md +223 -0
  19. package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.schema.json +318 -0
  20. package/architecture/v4-delivery-warrant-shadow-fixtures.json +227 -0
  21. package/architecture/v4-delivery-warrant-shadow-fixtures.schema.json +67 -0
  22. package/architecture/v4-exception-ledger.json +5 -0
  23. package/architecture/v4-exception-ledger.schema.json +56 -0
  24. package/architecture/v4-partial-mutation-recovery-qualification.json +65 -0
  25. package/architecture/v4-platform-stage-checkpoints.json +97 -0
  26. package/architecture/v4-provider-operation-journal-contract.json +113 -0
  27. package/architecture/v4-release-activation-shadow-domain.json +61 -0
  28. package/architecture/v4-release-train-parity.json +68 -0
  29. package/architecture/v4-rust-libnode-bridge-evaluation.json +107 -0
  30. package/architecture/v4-rust-libnode-bridge-spike.md +85 -0
  31. package/architecture/v4-stable-publication-fence.json +66 -0
  32. package/architecture/v4-stage-capsule-contract.json +90 -0
  33. package/architecture/v4-stage-capsule-qualification.json +99 -0
  34. package/architecture/v4-stage-capsule-resume-planner.json +52 -0
  35. package/architecture/v4-stage-capsule-store-contract.json +72 -0
  36. package/bin/buildchain.mjs +15 -6
  37. package/contracts/auditable-demo-scenario-v1.schema.json +1 -1
  38. package/contracts/buildchain-v2-residuals-v1.json +2 -2
  39. package/contracts/fixtures/v4-delivery-warrant-trace-v1/golden.json +158 -0
  40. package/contracts/fixtures/v4-delivery-warrant-trace-v1/property.json +380 -0
  41. package/contracts/fixtures/v4-delivery-warrant-trace-v1/replay.json +163 -0
  42. package/contracts/fixtures/v4-partial-mutation-recovery-v1/shared.json +155 -0
  43. package/contracts/fixtures/v4-provider-operation-journal-v1/shared.json +457 -0
  44. package/contracts/fixtures/v4-provider-readback-idempotency-v1/shared.json +682 -0
  45. package/contracts/fixtures/v4-release-activation-shadow-v1/shared.json +53 -0
  46. package/contracts/fixtures/v4-stable-publication-fence-v1/shared.json +56 -0
  47. package/contracts/fixtures/v4-stage-capsule-resume-v1/late-platform-failure.json +176 -0
  48. package/contracts/fixtures/v4-stage-capsule-store-v1/shared.json +132 -0
  49. package/contracts/fixtures/v4-stage-capsule-v1/shared.json +111 -0
  50. package/contracts/v4-canonical-contracts-v1.schema.json +182 -0
  51. package/contracts/v4-delivery-warrant-semantic-diff-report-v1.schema.json +284 -0
  52. package/contracts/v4-delivery-warrant-trace-v1.schema.json +215 -0
  53. package/contracts/v4-host-contract-v1.schema.json +135 -0
  54. package/contracts/v4-partial-mutation-recovery-v1.schema.json +168 -0
  55. package/contracts/v4-provider-operation-journal-v1.schema.json +381 -0
  56. package/contracts/v4-release-activation-shadow-v1.schema.json +186 -0
  57. package/contracts/v4-stable-publication-fence-v1.schema.json +125 -0
  58. package/contracts/v4-stage-capsule-resume-v1.schema.json +225 -0
  59. package/contracts/v4-stage-capsule-store-v1.schema.json +154 -0
  60. package/contracts/v4-stage-capsule-v1.schema.json +178 -0
  61. package/crates/buildchain-v4-bridge/Cargo.lock +213 -0
  62. package/crates/buildchain-v4-bridge/Cargo.toml +12 -0
  63. package/crates/buildchain-v4-bridge/src/main.rs +495 -0
  64. package/dist/site/agent-index.json +0 -3
  65. package/dist/site/artifact-schemas.json +0 -6
  66. package/dist/site/buildchain-contract.json +103 -397
  67. package/dist/site/buildchain-site.json +302 -270
  68. package/dist/site/capability-registry.json +9 -11
  69. package/dist/site/cli-registry.json +8 -30
  70. package/dist/site/controller-registry.json +48 -8
  71. package/dist/site/kfd-claims.json +129 -142
  72. package/dist/site/kfd-upstream-aggregate.json +9 -9
  73. package/dist/site/manual-registry.json +18 -49
  74. package/dist/site/node-api-registry.json +1882 -4118
  75. package/dist/site/page-registry.json +278 -230
  76. package/dist/site/public-surface-audit.json +87 -185
  77. package/dist/site/publication-authority-registry.json +11 -1
  78. package/dist/site/publication-registry.json +4 -4
  79. package/dist/site/release-provenance.json +3 -7
  80. package/dist/site/schemas/kfd-support-projection-v1.schema.json +106 -0
  81. package/dist/site/site-manifest.json +22 -38
  82. package/dist/site/workflow-registry.json +80 -35
  83. package/docs/MAP.md +8 -4
  84. package/docs/auditable-demo.md +2 -2
  85. package/docs/aws-us-elastic-runner-burst-plane.md +7 -59
  86. package/docs/cli-reference.md +15 -92
  87. package/docs/cli.md +14 -14
  88. package/docs/dev-alpha-candidate-patrol.md +3 -11
  89. package/docs/dev-delivery-warrant.md +28 -100
  90. package/docs/engineering-housekeeper.md +12 -4
  91. package/docs/getting-started.md +1 -1
  92. package/docs/install.md +5 -5
  93. package/docs/kfd-support.md +2 -7
  94. package/docs/lifecycle-protocol.md +2 -4
  95. package/docs/node-api-reference.md +414 -523
  96. package/docs/release-flow.md +31 -31
  97. package/docs/release-governance.md +16 -28
  98. package/docs/release-passport.md +2 -15
  99. package/docs/release-tail-contract.md +13 -6
  100. package/docs/release-tail-provider-plane.md +13 -19
  101. package/docs/release-train.md +4 -4
  102. package/docs/reusable-build-surface.md +14 -27
  103. package/docs/site-bundle-contract.md +1 -5
  104. package/docs/stable-candidate-patrol.md +7 -7
  105. package/docs/v4-canonical-contracts.md +92 -0
  106. package/docs/v4-delivery-warrant-read-candidate.md +73 -0
  107. package/docs/v4-delivery-warrant-semantic-diff.md +75 -0
  108. package/docs/v4-production-release.md +63 -0
  109. package/docs/v4-stage-capsule.md +193 -0
  110. package/docs/versioning.md +3 -3
  111. package/package.json +19 -17
  112. package/packages/core/adopter-delivery-gate.js +576 -0
  113. package/packages/core/adopter-delivery-json.js +66 -0
  114. package/packages/core/artifact-signing.js +0 -61
  115. package/packages/core/artifact-verification-envelope.js +5 -5
  116. package/packages/core/build-facts.js +12 -4
  117. package/packages/core/buildchain-agent-manuals.js +0 -2
  118. package/packages/core/buildchain-config.js +4 -69
  119. package/packages/core/buildchain-contract.js +232 -46
  120. package/packages/core/buildchain-kfd-claims.js +1 -1
  121. package/packages/core/channel-candidate.js +0 -8
  122. package/packages/core/channel-promotion-baseline.js +0 -52
  123. package/packages/core/controller-evidence.js +3 -4
  124. package/packages/core/dev-alpha-candidate-selection.js +2 -10
  125. package/packages/core/dev-delivery-warrant-cancellation.js +0 -1
  126. package/packages/core/dev-delivery-warrant-settlement.js +1 -5
  127. package/packages/core/dev-delivery-warrant.js +12 -52
  128. package/packages/core/diagnostics.js +3 -8
  129. package/packages/core/github-governance-authority.js +3 -1
  130. package/packages/core/kfd-adopter-category-driver.js +167 -0
  131. package/packages/core/kfd-adopter-manifest.js +47 -46
  132. package/packages/core/kfd-gate.js +15 -45
  133. package/packages/core/paper-agent-entry.js +7 -16
  134. package/packages/core/paper-fleet.js +2 -2
  135. package/packages/core/paper-repository.js +2 -3
  136. package/packages/core/paper-scaffold-content.js +2 -23
  137. package/packages/core/paper.js +11 -43
  138. package/packages/core/publication-reproducibility.js +4 -4
  139. package/packages/core/release-line-bootstrap.js +21 -8
  140. package/packages/core/release-passport-contract.js +5 -5
  141. package/packages/core/release-passport.js +20 -131
  142. package/packages/core/self-dogfood-version.js +48 -35
  143. package/packages/core/spawn-command.js +232 -8
  144. package/packages/core/v4-adopter-delivery-parity.js +219 -0
  145. package/packages/core/v4-canonical-contracts.js +284 -0
  146. package/packages/core/v4-delivery-warrant-fixture-runner.js +371 -0
  147. package/packages/core/v4-delivery-warrant-read-candidate.js +279 -0
  148. package/packages/core/v4-delivery-warrant-semantic-diff-gate.js +352 -0
  149. package/packages/core/v4-delivery-warrant-shadow-adapter.js +447 -0
  150. package/packages/core/v4-partial-mutation-recovery-qualification.js +395 -0
  151. package/packages/core/v4-platform-stage-checkpoints.js +471 -0
  152. package/packages/core/v4-provider-operation-journal.js +531 -0
  153. package/packages/core/v4-provider-readback-idempotency.js +394 -0
  154. package/packages/core/v4-release-activation-shadow.js +519 -0
  155. package/packages/core/v4-stable-publication-fence.js +357 -0
  156. package/packages/core/v4-stage-capsule-local-store.js +426 -0
  157. package/packages/core/v4-stage-capsule-qualification-campaign.js +512 -0
  158. package/packages/core/v4-stage-capsule-qualification.js +456 -0
  159. package/packages/core/v4-stage-capsule-resume-planner.js +397 -0
  160. package/packages/core/v4-stage-capsule-store.js +401 -0
  161. package/packages/core/v4-stage-capsule.js +319 -0
  162. package/scripts/assemble-self-publication-admission.mjs +1 -1
  163. package/scripts/audit-publication-control-plane.mjs +5 -5
  164. package/scripts/auditable-demo-bundle-verification.mjs +3 -2
  165. package/scripts/auditable-demo-platform.mjs +2 -2
  166. package/scripts/auditable-demo-renditions.mjs +1 -1
  167. package/scripts/auditable-demo.mjs +2 -2
  168. package/scripts/aws-macos-jit-controller-core.mjs +13 -346
  169. package/scripts/aws-macos-jit-controller-runtime.mjs +2 -210
  170. package/scripts/aws-macos-jit-controller.mjs +37 -275
  171. package/scripts/aws-macos-jit-core.mjs +3 -41
  172. package/scripts/aws-macos-jit.mjs +0 -12
  173. package/scripts/aws-windows-jit-campaign.mjs +2 -2
  174. package/scripts/aws-windows-jit-controller-core.mjs +1 -1
  175. package/scripts/aws-windows-jit-controller.mjs +3 -3
  176. package/scripts/build-contract-core.mjs +3 -8
  177. package/scripts/build-standalone-binary.mjs +3 -14
  178. package/scripts/buildchain-channel-router.mjs +4 -0
  179. package/scripts/buildchain-cli-help.mjs +7 -13
  180. package/scripts/buildchain-contract-lock.mjs +0 -6
  181. package/scripts/check-action-bundles.mjs +3 -4
  182. package/scripts/check-internal-architecture.mjs +7 -6
  183. package/scripts/check-inventory.mjs +30 -25
  184. package/scripts/check-v4-public-dogfood-contract.mjs +270 -0
  185. package/scripts/create-release-bundle.mjs +8 -4
  186. package/scripts/dev-alpha-candidate-patrol.mjs +1 -22
  187. package/scripts/dev-delivery-proof.mjs +2 -54
  188. package/scripts/dev-delivery-warrant.mjs +59 -77
  189. package/scripts/dev-pr-auto-merge.mjs +4 -30
  190. package/scripts/dev-pr-delivery-warrant.mjs +0 -55
  191. package/scripts/dispatch-artifact-signing-authority.mjs +7 -4
  192. package/scripts/generate-buildchain-kfd-witnesses.mjs +94 -88
  193. package/scripts/generate-channel-build-workflow.mjs +54 -24
  194. package/scripts/generate-channel-promotion-workflow.mjs +15 -6
  195. package/scripts/generate-site-bundle.mjs +5 -21
  196. package/scripts/git-fetch-process-tree.mjs +34 -1
  197. package/scripts/init-repo.mjs +64 -159
  198. package/scripts/inspect-artifact-signing-requests.mjs +0 -6
  199. package/scripts/locked-source-checkout.mjs +3 -4
  200. package/scripts/maintainability-metrics.mjs +8 -2
  201. package/scripts/npm-publish-dry-run.mjs +2 -2
  202. package/scripts/npm-publish-transaction.mjs +2 -2
  203. package/scripts/publication-commit-evidence.mjs +23 -69
  204. package/scripts/release-candidate-resolver.mjs +11 -17
  205. package/scripts/release-tail.mjs +3 -49
  206. package/scripts/resume-from-candidate-run.mjs +9 -123
  207. package/scripts/run-lifecycle-core.mjs +12 -13
  208. package/scripts/seal-artifact-signing-requests.mjs +17 -21
  209. package/scripts/site-capability-metadata.mjs +2 -7
  210. package/scripts/stable-candidate-qualification.mjs +10 -10
  211. package/scripts/v4-architecture.mjs +12 -2
  212. package/scripts/v4-bridge-bootstrap.mjs +141 -0
  213. package/scripts/v4-bridge-evidence.mjs +141 -0
  214. package/scripts/v4-host-adapter.mjs +182 -0
  215. package/scripts/v4-platform-stage-checkpoint-rehearsal.mjs +207 -0
  216. package/scripts/v4-stage-capsule-qualification.mjs +528 -0
  217. package/scripts/v4-stage-capsule-resume-rehearsal.mjs +57 -0
  218. package/scripts/v4-warrant-shadow-plan.mjs +601 -0
  219. package/scripts/verify-golden-path.mjs +5 -5
  220. package/scripts/web-surface-cloudfront-rewrite.mjs +15 -15
  221. package/scripts/web-surface-core.mjs +2 -8
  222. package/scripts/workflow-call-contract.mjs +5 -184
  223. package/contracts/fixtures/kfd-adopter-release-v1/kfd-4-perspective.json +0 -16
  224. package/contracts/fixtures/kfd-adopter-release-v1/kfd-4-replay.json +0 -57
  225. package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +0 -47
  226. package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +0 -47
  227. package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +0 -40
  228. package/contracts/next-development-request-v1.schema.json +0 -66
  229. package/contracts/next-development-transition-v1.schema.json +0 -292
  230. package/contracts/publication-rehearsal-capsule-v1.schema.json +0 -173
  231. package/dist/site/schemas/publication-rehearsal-capsule-v1.schema.json +0 -269
  232. package/dist/site/schemas/release-tail-capabilities-v1.schema.json +0 -353
  233. package/dist/site/schemas/release-tail-provider-bindings-v1.schema.json +0 -94
  234. package/docs/next-development-transition.md +0 -119
  235. package/docs/publication-rehearsal.md +0 -94
  236. package/packages/core/buildchain-compatibility-proof.js +0 -631
  237. package/packages/core/dev-delivery-native-proof.js +0 -333
  238. package/packages/core/dev-delivery-warrant-shadow.js +0 -502
  239. package/packages/core/next-development-candidate-reservation.js +0 -186
  240. package/packages/core/next-development-controller.js +0 -726
  241. package/packages/core/next-development-projection.js +0 -288
  242. package/packages/core/next-development-transition.js +0 -738
  243. package/packages/core/publication-rehearsal-projection.js +0 -173
  244. package/packages/core/publication-rehearsal-runtime.js +0 -921
  245. package/scripts/aws-macos-jit-instance-rehydrate.mjs +0 -260
  246. package/scripts/aws-macos-jit-source-rebind.mjs +0 -724
  247. package/scripts/dev-delivery-native-run.mjs +0 -187
  248. package/scripts/dev-delivery-two-phase.mjs +0 -598
  249. package/scripts/generate-next-development-guidance.mjs +0 -49
  250. package/scripts/materialize-self-release-candidate-version.mjs +0 -137
  251. package/scripts/next-development-self-dogfood-harness.mjs +0 -409
  252. package/scripts/next-development-self-dogfood.mjs +0 -532
  253. package/scripts/next-development-transition.mjs +0 -47
  254. package/scripts/release-candidate-tail-reseal.mjs +0 -426
  255. package/templates/native-dev-delivery.yml +0 -82
@@ -343,11 +343,6 @@ JIT SecureString under `/kungfu/burst/macos/`, then runs GitHub Actions Runner
343
343
  2.336.0 for exactly one job. The runner archive is pinned to the official
344
344
  macOS ARM64 SHA256. No GitHub, signing, notarization, publication, SSH, or
345
345
  static AWS credential is admitted to the instance.
346
- The provider provenance step explicitly disables artifact-signing request
347
- sealing for these qualification jobs, so consumer signing declarations cannot
348
- turn a runner-profile smoke or full qualification into a signing-authority
349
- dispatch. All other Buildchain lanes retain the default fail-closed signing
350
- declaration behavior.
351
346
 
352
347
  The instance uses the exact retained Amazon EC2 macOS AMI, IMDSv2, an encrypted
353
348
  delete-on-termination root volume, no inbound security-group rule, and the
@@ -357,21 +352,13 @@ job must exercise the full native lifecycle.
357
352
 
358
353
  AWS imposes a 24-hour minimum Dedicated Host allocation. The contract therefore
359
354
  keeps the one host for at least 24 hours even if all three jobs finish earlier.
360
- At the recorded USD 0.65 hourly rate, the minimum commitment is USD 15.60. A
361
- 30-hour fail-closed ceiling is USD 19.50, below the dedicated
355
+ At the recorded USD 0.6498 hourly rate, the minimum commitment rounds to USD
356
+ 15.60. A 30-hour fail-closed ceiling rounds to USD 19.49, below the dedicated
362
357
  USD 25 budget. A ten-minute reaper terminates an expired campaign instance and
363
358
  retries host release after the minimum allocation and Apple scrub constraints
364
359
  allow it. Budget notifications at 80% and 95% invoke the same card-scoped kill
365
360
  switch.
366
361
 
367
- The launch controller defaults to `us-east-1` and admits only `us-east-2` as a
368
- capacity fallback. The regions use mutually exclusive control-plane stacks and
369
- one shared USD 25 Budget covering Virginia `HostUsage:mac2` and the AWS catalog
370
- identity `USE2-HostUsage:mac2` for Ohio. A requested region, availability zone,
371
- stack, and Budget must agree before allocation, and the controller checks both
372
- regions against one global Host and instance ceiling; no other region is
373
- accepted.
374
-
375
362
  Qualification requires three trusted exact-source one-job JIT runs on the one
376
363
  host, including at least one full run, plus proof that:
377
364
 
@@ -385,47 +372,17 @@ host, including at least one full run, plus proof that:
385
372
  ### Phase 3 lifecycle controller
386
373
 
387
374
  `scripts/aws-macos-jit-controller.mjs` is the operator boundary for the paid
388
- campaign. It has five explicit mutation modes:
375
+ campaign. It has three explicit mutation modes:
389
376
 
390
377
  - `launch-campaign` binds the exact repository source, AMI, availability zone,
391
- tagged Dedicated Host, and reusable instance. Before paid allocation it
392
- verifies the exact AWS account, disabled GitHub workflow, complete control
393
- plane stack, AWS-dimension-filtered USD 25 Budget, 80% and 95% SNS
394
- subscribers, and zero pre-existing Mac capacity. Because AWS does not expose
395
- a DryRun parameter for `AllocateHosts`, it requires an allowed IAM policy
396
- simulation for the exact tagged allocation before the real call, then a
397
- successful `RunInstances` DryRun before launching the instance.
398
- - `rehydrate-instance` creates a replacement instance on the one already-paid,
399
- empty campaign host after an interrupted or failed instance lifecycle. It
400
- rechecks the exact account, disabled workflow, Budget, source, host identity
401
- and allocation time, zero runner residue, zero active JIT instances, and no
402
- other active Mac host in either admitted region. It then requires a
403
- successful same-host `RunInstances` DryRun and never calls `AllocateHosts`.
378
+ tagged Dedicated Host, and reusable instance. It rejects pre-existing Mac
379
+ capacity and requires successful `AllocateHosts` and `RunInstances` DryRuns
380
+ before either real call.
404
381
  - `run-job` binds one queued exact-source GitHub job to the existing campaign
405
382
  host and instance. It writes the repository JIT configuration through a
406
383
  mode-0600 temporary file into a distinct SSM SecureString, sends only the
407
384
  credential-free bootstrap through SSM, and removes the parameter plus runner
408
385
  registration if command delivery fails.
409
- - `rebind-campaign` repairs the source of an allocated but unused campaign
410
- without buying another host. It requires the workflow to remain manually
411
- disabled, the replacement source to be a strict descendant on the same
412
- campaign ref, and every prior matching run to contain zero jobs and zero
413
- artifacts. It also requires no registered JIT runner, SSM parameter, or
414
- bootstrap evidence and verifies the one exact host, instance, and encrypted
415
- volume. The operation updates only those resources' source tags and the
416
- existing GitHub ref, emits a zero-allocation receipt, and compensates back to
417
- the prior source if the ref update or readback fails. It never calls
418
- `AllocateHosts`, `RunInstances`, or workflow dispatch.
419
- - `rebind-campaign-after-failure` advances that same host and instance only
420
- after the operator confirms the complete prior run-id inventory. Every named
421
- run must be terminal with conclusion `failure`, all of its jobs must be
422
- complete, and both GitHub artifacts and S3 bootstrap evidence must still be
423
- present. The replacement source must remain a strict descendant on the same
424
- ref, the workflow must be disabled, the next-source evidence prefix must be
425
- empty, and runner plus SSM residue must be zero. The old evidence is retained
426
- and included in the rebind receipt; the operation changes only the existing
427
- source ref and resource tags, with the same compensated rollback and zero
428
- allocation boundary as an unused-campaign rebind.
429
386
  - `close-campaign` refuses execution before the provider's 24-hour minimum,
430
387
  verifies the encrypted delete-on-termination root volume, removes scoped JIT
431
388
  residue, terminates the exact instance, and requires a `ReleaseHosts` DryRun
@@ -435,17 +392,8 @@ campaign. It has five explicit mutation modes:
435
392
 
436
393
  Every execute mode requires the exact source SHA and campaign id to be repeated
437
394
  through `--confirm-source-sha` and `--confirm-campaign-id`. `run-job` also
438
- requires `--confirm-run-id`; `launch-campaign` additionally requires the
439
- expected workload account through `--account-id`. `rebind-campaign`
440
- additionally repeats the prior source, host, and instance identities and
441
- requires `--confirm-zero-allocation`. `rehydrate-instance` additionally repeats
442
- the existing host and replaced instance identities and requires
443
- `--confirm-no-host-allocation`. Omitting `--execute` emits a deterministic plan
395
+ requires `--confirm-run-id`. Omitting `--execute` emits a deterministic plan
444
396
  without changing AWS or GitHub state.
445
- `rebind-campaign-after-failure` additionally requires matching
446
- `--terminal-failure-run-ids-json` and
447
- `--confirm-terminal-failure-run-ids-json` arrays so an unobserved or newly
448
- created run fails closed before any tag or ref mutation.
449
397
 
450
398
  ## Provider lifecycle
451
399
 
@@ -299,18 +299,7 @@ buildchain dev pr-admit --repository <owner/repo> --branch <dev/vN/vN.M> --pull-
299
299
  - Syntax:
300
300
 
301
301
  ```text
302
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
303
- ```
304
-
305
- ### `buildchain dev proof classify-native`
306
-
307
- - Help: `buildchain dev proof classify-native --help`
308
- - Canonical id: `dev`
309
- - Options: `--json`, `--output`
310
- - Syntax:
311
-
312
- ```text
313
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
302
+ buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
314
303
  ```
315
304
 
316
305
  ### `buildchain dev proof integration`
@@ -321,18 +310,7 @@ buildchain dev proof <source|verify-source|classify|native|verify-native|classif
321
310
  - Syntax:
322
311
 
323
312
  ```text
324
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
325
- ```
326
-
327
- ### `buildchain dev proof native`
328
-
329
- - Help: `buildchain dev proof native --help`
330
- - Canonical id: `dev`
331
- - Options: `--json`, `--output`
332
- - Syntax:
333
-
334
- ```text
335
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
313
+ buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
336
314
  ```
337
315
 
338
316
  ### `buildchain dev proof replay`
@@ -343,7 +321,7 @@ buildchain dev proof <source|verify-source|classify|native|verify-native|classif
343
321
  - Syntax:
344
322
 
345
323
  ```text
346
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
324
+ buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
347
325
  ```
348
326
 
349
327
  ### `buildchain dev proof source`
@@ -354,7 +332,7 @@ buildchain dev proof <source|verify-source|classify|native|verify-native|classif
354
332
  - Syntax:
355
333
 
356
334
  ```text
357
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
335
+ buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
358
336
  ```
359
337
 
360
338
  ### `buildchain dev proof verify-integration`
@@ -365,29 +343,7 @@ buildchain dev proof <source|verify-source|classify|native|verify-native|classif
365
343
  - Syntax:
366
344
 
367
345
  ```text
368
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
369
- ```
370
-
371
- ### `buildchain dev proof verify-native`
372
-
373
- - Help: `buildchain dev proof verify-native --help`
374
- - Canonical id: `dev`
375
- - Options: `--json`, `--output`
376
- - Syntax:
377
-
378
- ```text
379
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
380
- ```
381
-
382
- ### `buildchain dev proof verify-native-reuse`
383
-
384
- - Help: `buildchain dev proof verify-native-reuse --help`
385
- - Canonical id: `dev`
386
- - Options: `--json`, `--output`
387
- - Syntax:
388
-
389
- ```text
390
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
346
+ buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
391
347
  ```
392
348
 
393
349
  ### `buildchain dev proof verify-source`
@@ -398,18 +354,7 @@ buildchain dev proof <source|verify-source|classify|native|verify-native|classif
398
354
  - Syntax:
399
355
 
400
356
  ```text
401
- buildchain dev proof <source|verify-source|classify|native|verify-native|classify-native|verify-native-reuse|replay|integration|verify-integration> [--output <file>] [--json]
402
- ```
403
-
404
- ### `buildchain dev two-phase`
405
-
406
- - Help: `buildchain dev two-phase --help`
407
- - Canonical id: `dev`
408
- - Options: `--branch`, `--expected-head`, `--native-command`, `--native-proof`, `--pull-request`, `--repository`, `--warrant-result`
409
- - Syntax:
410
-
411
- ```text
412
- buildchain dev two-phase --repository <owner/repo> --branch <dev/vN/vN.M> --pull-request <n> --expected-head <sha> --warrant-result <file> [--native-proof <file>] [--native-command <command>]
357
+ buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
413
358
  ```
414
359
 
415
360
  ### `buildchain dev warrant cancel-queued`
@@ -420,7 +365,7 @@ buildchain dev two-phase --repository <owner/repo> --branch <dev/vN/vN.M> --pull
420
365
  - Syntax:
421
366
 
422
367
  ```text
423
- buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
368
+ buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
424
369
  ```
425
370
 
426
371
  ### `buildchain dev warrant close`
@@ -431,7 +376,7 @@ buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-que
431
376
  - Syntax:
432
377
 
433
378
  ```text
434
- buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
379
+ buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
435
380
  ```
436
381
 
437
382
  ### `buildchain dev warrant heartbeat`
@@ -442,7 +387,7 @@ buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-que
442
387
  - Syntax:
443
388
 
444
389
  ```text
445
- buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
390
+ buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
446
391
  ```
447
392
 
448
393
  ### `buildchain dev warrant observe`
@@ -453,18 +398,7 @@ buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-que
453
398
  - Syntax:
454
399
 
455
400
  ```text
456
- buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
457
- ```
458
-
459
- ### `buildchain dev warrant qualify`
460
-
461
- - Help: `buildchain dev warrant qualify --help`
462
- - Canonical id: `dev`
463
- - Options: `--branch`, `--execute`, `--json`, `--output`, `--repository`
464
- - Syntax:
465
-
466
- ```text
467
- buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
401
+ buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
468
402
  ```
469
403
 
470
404
  ### `buildchain dev warrant recover`
@@ -475,7 +409,7 @@ buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-que
475
409
  - Syntax:
476
410
 
477
411
  ```text
478
- buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
412
+ buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
479
413
  ```
480
414
 
481
415
  ### `buildchain dev warrant select`
@@ -486,7 +420,7 @@ buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-que
486
420
  - Syntax:
487
421
 
488
422
  ```text
489
- buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
423
+ buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
490
424
  ```
491
425
 
492
426
  ### `buildchain dev warrant submit`
@@ -497,7 +431,7 @@ buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-que
497
431
  - Syntax:
498
432
 
499
433
  ```text
500
- buildchain dev warrant <submit|select|heartbeat|qualify|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
434
+ buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
501
435
  ```
502
436
 
503
437
  ## `diagnostics`
@@ -1377,11 +1311,11 @@ buildchain lifecycle
1377
1311
 
1378
1312
  - Help: `buildchain lifecycle run --help`
1379
1313
  - Canonical id: `lifecycle`
1380
- - Options: `--artifact-name`, `--artifact-path`, `--cwd`, `--manifest-path`, `--process-summary`, `--required`, `--summary-path`
1314
+ - Options: `--artifact-name`, `--artifact-path`, `--cwd`, `--manifest-path`, `--platform-id`, `--platform-name`, `--process-summary`, `--required`, `--summary-path`
1381
1315
  - Syntax:
1382
1316
 
1383
1317
  ```text
1384
- buildchain lifecycle run <stage> [--cwd <dir>] [--required] [--artifact-name <name>] [--artifact-path <path>]... [--manifest-path <path>] [--summary-path <path>] [--process-summary <json>]
1318
+ buildchain lifecycle run <stage> [--cwd <dir>] [--required] [--artifact-name <name>] [--artifact-path <path>]... [--platform-id <id>] [--platform-name <name>] [--manifest-path <path>] [--summary-path <path>] [--process-summary <json>]
1385
1319
  ```
1386
1320
 
1387
1321
  ## `log`
@@ -2046,17 +1980,6 @@ buildchain release-tail init --declaration <json-or-path> [--state <path>]
2046
1980
  buildchain release-tail plan --declaration <json-or-path> [--output <path>]
2047
1981
  ```
2048
1982
 
2049
- ### `buildchain release-tail rehearse`
2050
-
2051
- - Help: `buildchain release-tail rehearse --help`
2052
- - Canonical id: `release-tail`
2053
- - Options: `--capsule`, `--capsule-root`, `--environment-json`, `--evidence`, `--mode`, `--state`
2054
- - Syntax:
2055
-
2056
- ```text
2057
- buildchain release-tail rehearse --capsule <path> --capsule-root <absolute-path> --mode <simulate|replay> --state <path> --evidence <path> [--environment-json <json-or-path>]
2058
- ```
2059
-
2060
1983
  ### `buildchain release-tail status`
2061
1984
 
2062
1985
  - Help: `buildchain release-tail status --help`
package/docs/cli.md CHANGED
@@ -49,7 +49,7 @@ Consumers should pin the exact Buildchain version that was validated in their
49
49
  repository. When dogfooding a fresh Buildchain release immediately after it is
50
50
  published, pnpm may block the install through a minimum release-age policy. In
51
51
  that case, add a temporary package/version-specific `minimumReleaseAgeExclude`
52
- entry, such as `@kungfu-tech/buildchain@3.0.0`, and remove it once the package
52
+ entry, such as `@kungfu-tech/buildchain@4.0.0`, and remove it once the package
53
53
  has aged past the normal policy window. Do not replace that with a broad
54
54
  registry or scope-wide exclude. Paper scaffold and migration maintain the
55
55
  exact current entry in `pnpm-workspace.yaml` before refreshing the lockfile.
@@ -110,7 +110,7 @@ import publicSurfaceAudit from "@kungfu-tech/buildchain/site/public-surface-audi
110
110
 
111
111
  Use `dist/site/manual-registry.json` to find the packaged operating manuals and
112
112
  their SHA-256 digests. Use `dist/site/buildchain-contract.json` to verify the
113
- floating-ref contract world for a runtime such as `@v3`.
113
+ floating-ref contract world for a runtime such as `@v4`.
114
114
 
115
115
  For exhaustive lookup, use the generated references rather than scanning this
116
116
  conceptual guide:
@@ -386,9 +386,9 @@ branch action, and initial version before any GitHub mutation happens:
386
386
 
387
387
  ```bash
388
388
  buildchain release line open \
389
- --major 3 \
389
+ --major 4 \
390
390
  --minor 1 \
391
- --source-ref release/v3/v3.0 \
391
+ --source-ref release/v4/v4.0 \
392
392
  --json
393
393
  ```
394
394
 
@@ -401,9 +401,9 @@ reconciliation succeeds, and opens the first dev-to-alpha channel PR:
401
401
 
402
402
  ```bash
403
403
  buildchain release line open \
404
- --major 3 \
404
+ --major 4 \
405
405
  --minor 1 \
406
- --source-ref release/v3/v3.0 \
406
+ --source-ref release/v4/v4.0 \
407
407
  --write \
408
408
  --json
409
409
  ```
@@ -994,10 +994,10 @@ even when the bundle hash has been refreshed.
994
994
  maintainer opens or merges a channel PR:
995
995
 
996
996
  ```bash
997
- buildchain release --dry-run --target-ref alpha/v3/v3.0
998
- buildchain release --dry-run --target-ref release/v3/v3.0 --sha <verified-sha>
999
- buildchain release dry-run --target-ref publish-gate/major --source-ref release/v3/v3.0
1000
- buildchain release explain --target-ref alpha/v3/v3.0 --json
997
+ buildchain release --dry-run --target-ref alpha/v4/v4.0
998
+ buildchain release --dry-run --target-ref release/v4/v4.0 --sha <verified-sha>
999
+ buildchain release dry-run --target-ref publish-gate/major --source-ref release/v4/v4.0
1000
+ buildchain release explain --target-ref alpha/v4/v4.0 --json
1001
1001
  ```
1002
1002
 
1003
1003
  This is a Buildchain-level dry-run, not an npm dry-run. It explains the legal
@@ -1012,7 +1012,7 @@ Pass `--json` for a machine-readable plan.
1012
1012
  for the publish transaction state:
1013
1013
 
1014
1014
  ```bash
1015
- buildchain transaction inspect --version v3.0.1-alpha.2
1015
+ buildchain transaction inspect --version v4.0.1-alpha.2
1016
1016
  ```
1017
1017
 
1018
1018
  It reads or locally initializes the durable transaction record and validates
@@ -1039,9 +1039,9 @@ Buildchain's own npm package is published from
1039
1039
  `.github/workflows/buildchain-ref-promotion.yml`, inside the same publish
1040
1040
  transaction that promotes release refs:
1041
1041
 
1042
- - `v3.0.3-alpha.0` publishes to npm with dist-tag `alpha`.
1043
- - `v3.0.2` publishes to npm with dist-tag `latest`.
1044
- - moving refs such as `v3`, `v3.0`, and `v3.0-alpha` do not match the publish
1042
+ - `v4.0.3-alpha.0` publishes to npm with dist-tag `alpha`.
1043
+ - `v4.0.2` publishes to npm with dist-tag `latest`.
1044
+ - moving refs such as `v4`, `v4.0`, and `v4.0-alpha` do not match the publish
1045
1045
  workflow and do not publish.
1046
1046
 
1047
1047
  The promotion workflow uses npm Trusted Publishing through GitHub Actions OIDC.
@@ -13,7 +13,7 @@ ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
15
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.
16
+ visible_context: Buildchain v4 parity of the proven 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
 
@@ -39,7 +39,7 @@ 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
42
+ Before any new selection, the v4 controller now resolves the open managed PR and
43
43
  validates its embedded authoritative Release Train. If one exists, the frozen
44
44
  Release Cut wins: Candidate Patrol does not scan for or retain a newer qualified
45
45
  candidate. It returns the cut's exact candidate commit, candidate tree,
@@ -59,14 +59,6 @@ controller then compares the selected SHA to the exact Alpha head before it can
59
59
  be eligible, so a bounded scan cannot turn a commit outside the promotion
60
60
  ancestry into a candidate.
61
61
 
62
- Generated next-development version preparation is not a product candidate. The
63
- observer skips both the signed `chore(release): prepare ...` commit and its
64
- two-parent integration commit. When later product work becomes qualified, the
65
- nearest preparation becomes a reservation: Patrol reads every path changed by
66
- that preparation at both exact SHAs and requires identical Git blob identities.
67
- A missing or stale reserved path blocks selection before the Release Cut and
68
- therefore before any heavy candidate build.
69
-
70
62
  The decision is `kungfu-buildchain-channel-candidate-decision/v1`. It records the
71
63
  source and target branches and SHAs, comparison distance, workflow paths, run
72
64
  identities and attempts, completion times, URLs, policy, and a canonical decision
@@ -88,7 +80,7 @@ The companion state is
88
80
  - `stale`: the available exact-SHA evidence pair is outside policy age; or
89
81
  - `blocked`: qualification or reconciliation failed closed.
90
82
 
91
- New v3 states embed the complete `kungfu-buildchain-release-train/v1` record.
83
+ New v4 states embed the complete `kungfu-buildchain-release-train/v1` record.
92
84
  `held` states include a rooted `kungfu-buildchain-release-train-hold/v1`
93
85
  receipt with the expected cut and observed coordinates. Dev movement alone is
94
86
  not an allowed supersession cause. Legacy markers remain readable by the core
@@ -1,5 +1,5 @@
1
1
  ---
2
- status: accepted
2
+ status: draft
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: self-reviewed
10
+ review_state: unreviewed
11
11
  last_reviewed: 2026-08-11
12
12
  ai_provenance:
13
13
  model_family: GPT-5
@@ -38,14 +38,10 @@ 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 `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.
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.
49
45
 
50
46
  A terminal event may cancel a candidate before selection without minting a
51
47
  Warrant. This transition is limited to an exact non-active queued candidate and
@@ -77,28 +73,23 @@ That lane outranks not-yet-leased ordinary work, but never preempts or rewrites
77
73
  an active Warrant; unrelated, conflicted, mismatched, or fabricated claims fail
78
74
  closed before selection.
79
75
 
80
- ## Three proof authorities
76
+ ## Split proof authority
81
77
 
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.
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.
87
81
 
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:
82
+ Before reuse, the consumer classifies the dev delta:
92
83
 
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`
84
+ - unchanged roots plus an unrelated attributed delta reuse source
85
+ qualification and run only a cheap Project Cut replay. GitHub's `behind`
95
86
  state is accepted only when a rooted replay proof binds the exact current
96
87
  protected base, unchanged PR head and source patch, replay tree, required
97
88
  context roots, and a qualified `project.cut.merge-queue-admission/v1`
98
89
  receipt;
99
- - an overlapping delta reruns affected native shards or the full native plan;
90
+ - an overlapping delta reruns the affected source shards;
100
91
  - an unknown graph or changed source, plan, closure, dependency, or toolchain
101
- root fails closed to full native qualification.
92
+ root fails closed to full source qualification.
102
93
 
103
94
  Integration Delivery Proof is separate and cannot be cached across candidates.
104
95
  It binds the exact current dev base, replay tree, GitHub `merge_group` head and
@@ -122,17 +113,6 @@ buildchain dev warrant submit --repository owner/repository \
122
113
  buildchain dev warrant select --repository owner/repository \
123
114
  --branch dev/v4/v4.0 --execute
124
115
 
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
-
136
116
  buildchain dev warrant cancel-queued --repository owner/repository \
137
117
  --branch dev/v4/v4.0 --candidate-id <root> --pull-request 123 \
138
118
  --expected-source-head <queued-sha> --observed-source-head <event-sha> \
@@ -140,10 +120,17 @@ buildchain dev warrant cancel-queued --repository owner/repository \
140
120
  --evidence-root <terminal-event-root> --execute
141
121
  ```
142
122
 
143
- `heartbeat`, `qualify`, `recover`, `close`, `settle`, `cancel-queued`, and `observe` use the same durable authority.
123
+ `heartbeat`, `recover`, `close`, `settle`, `cancel-queued`, and `observe` use the same durable authority.
144
124
  Warrant-scoped mutations require the exact fencing token and lease generation.
145
125
  `close` also requires a rooted terminal evidence object.
146
126
 
127
+ On the v4 preview line, `observe` alone has an explicit `--read-mode v4`
128
+ candidate. It requires a retained exact semantic-diff qualification and source
129
+ binding, invokes an effect-disabled Rust state projection, retains parity
130
+ evidence, and returns the existing v3 observation shape. The default and
131
+ rollback mode is `v3`; mutation commands ignore the read switch. See
132
+ [`v4-delivery-warrant-read-candidate.md`](v4-delivery-warrant-read-candidate.md).
133
+
147
134
  Proof commands create, verify, classify, and compose the two proof layers:
148
135
 
149
136
  ```sh
@@ -155,67 +142,15 @@ buildchain dev proof replay-proof \
155
142
  buildchain dev proof integration --warrant-result warrant.json ...
156
143
  ```
157
144
 
158
- ## Bounded-concurrency shadow qualification
159
-
160
- The production queue remains single-flight. A separate effect-disabled shadow
161
- planner can replay the same deterministic candidate order with a bound of one
162
- or two lanes. It does not issue, renew, supersede, close, or persist a Warrant;
163
- it cannot enqueue a pull request; and its output explicitly carries no
164
- production or rollout authority.
165
-
166
- Each lane binds the exact queue root and generation, protected-base head,
167
- source head, projected-base root, Project Cut, approval, required checks,
168
- status, and lease evidence. An active production candidate must additionally
169
- match its current fencing token and lease generation. A queued shadow lane must
170
- not carry either. Stale evidence, an occupied native queue, cross-lane evidence
171
- aliasing, shared conflict keys, or an incompatible projected base fails closed.
172
- A failure in one lane remains visible without converting or concealing the
173
- other lane's result.
174
-
175
- The planner and aggregate qualification command consume immutable JSON files:
176
-
177
- ```sh
178
- buildchain dev warrant shadow-plan --input observation.json \
179
- --max-concurrency 2 --output shadow-plan.json
180
-
181
- buildchain dev warrant shadow-qualify --input qualification-input.json \
182
- --output shadow-qualification.json
183
- ```
184
-
185
- Both commands reject `--execute`. Qualification reports compare explicit
186
- thresholds for sample count, eligible overlap, projected queue-wait benefit,
187
- additional runner cost, ambiguity, and false positives. A `proceed` result is
188
- only evidence for a separate reviewed rollout decision; it never changes the
189
- live Warrant schema, queue state, merge-queue policy, or protected branch.
190
-
191
145
  ## Workflow rollout and rollback
192
146
 
193
147
  The reusable `dev-pr-auto-merge.yml` supports three explicit rollout modes:
194
148
 
195
149
  - `off` preserves the previous exact-head admission controller;
196
150
  - `shadow` qualifies the source and emits a read-only queue submission plan;
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
200
- selected candidate all pass exact readback validation. Immediately before
201
- enqueue, the controller also rereads the current protected state ref and
202
- verifies the active candidate, fencing token, generation, pull request, and
203
- exact head. A previously valid result is not authority after terminal
204
- closeout. Re-running qualification for the same selected head may regenerate
205
- timestamped proof bytes, but it retains the immutable active Warrant and its
206
- originally selected proof instead of rewriting or rejecting that attempt.
207
- Each candidate also retains the exact successful source workflow run. If a
208
- controller discovers that another candidate owns the active Warrant, a
209
- configured consumer workflow is dispatched immediately for that exact PR,
210
- head, and source run; the candidate is not left waiting for a patrol cron.
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.
151
+ - `required` persists the submission, selects the Warrant, and refuses GitHub
152
+ enqueue unless the immutable queue commit, state root, active Warrant, and
153
+ selected candidate all pass exact readback validation.
219
154
 
220
155
  Consumers should deploy `shadow` first, inspect receipts, then change their
221
156
  protected caller to `required`. Rollback is a reviewed caller change back to
@@ -225,22 +160,15 @@ merged candidate (or accepts explicit evidence for another terminal outcome),
225
160
  then closes only the current fencing generation. The separate queued
226
161
  cancellation reusable workflow cannot close an active generation; it advances
227
162
  the state ref only when the caller's complete terminal binding and expected-old
228
- root still match. A delayed `dequeued` event is ignored when GitHub readback
229
- shows the same exact PR head is already queued again, so an earlier queue event
230
- cannot close a newer active Warrant generation.
163
+ root still match.
231
164
 
232
165
  Buildchain uses the same contract for its own protected dev line through
233
166
  `buildchain-dev-delivery.yml`. The manual caller requires the exact PR head and
234
- semantic source roots, accepts an optional reusable native proof, pins the runtime to the caller commit, selects
167
+ all native/source proof roots, pins the runtime to the caller commit, selects
235
168
  `delivery-warrant-mode: required`, and targets GitHub Merge Queue. It does not
236
169
  offer an `off` switch: rollback is a reviewed change to this caller, not an
237
170
  operator-time weakening of a specific delivery attempt.
238
171
 
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
-
244
172
  This mechanism schedules protected delivery only. It does not serialize local
245
173
  development, source-only checks, unrelated channels, release publication, or
246
174
  runner provisioning. It never grants authority to enable cloud runner