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

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 (203) hide show
  1. package/actions/release-tail/README.md +8 -0
  2. package/architecture/ci-lane-change-budget.json +187 -0
  3. package/architecture/decisions/0002-next-development-transition.md +101 -0
  4. package/architecture/decisions/0003-two-phase-delivery-warrant.md +152 -0
  5. package/architecture/internal-capabilities.json +211 -8
  6. package/architecture/maintainability-policy.json +113 -28
  7. package/architecture/release-tail-contract-inventory.json +5 -2
  8. package/architecture/v3-core-mechanism-inventory.json +91 -0
  9. package/architecture/v4-adopter-delivery-parity.json +32 -5
  10. package/architecture/v4-capability-state-machine-manifest.json +73 -0
  11. package/architecture/v4-compatibility-facts-parity.json +77 -0
  12. package/architecture/v4-delivery-authority-parity.json +250 -0
  13. package/architecture/v4-delivery-warrant-shadow-fixtures.json +41 -9
  14. package/architecture/v4-floating-consumer-policy.json +6 -0
  15. package/architecture/v4-next-development-parity.json +192 -0
  16. package/architecture/v4-publication-rehearsal-parity.json +84 -0
  17. package/architecture/v4-release-train-parity.json +1 -0
  18. package/architecture/v4-tail-reseal-parity.json +150 -0
  19. package/bin/buildchain.mjs +32 -3
  20. package/bin/internal/adopter-delivery-cli.mjs +70 -0
  21. package/bin/internal/command-registry.mjs +3 -0
  22. package/bin/internal/compatibility-facts-cli.mjs +101 -0
  23. package/contracts/dev-delivery-authority-v2.schema.json +662 -0
  24. package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +47 -0
  25. package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +47 -0
  26. package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +40 -0
  27. package/contracts/fixtures/v4-adopter-delivery-v1/archive-template.json +19 -0
  28. package/contracts/fixtures/v4-adopter-delivery-v1/bootstrap-positive.json +93 -0
  29. package/contracts/fixtures/v4-adopter-delivery-v1/gate-positive.json +29 -0
  30. package/contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json +26 -0
  31. package/contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json +50 -0
  32. package/contracts/fixtures/v4-compatibility-facts-v1/shared.json +1129 -0
  33. package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +7 -1
  34. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/artifacts/product.bin +1 -0
  35. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/config/buildchain.toml +5 -0
  36. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/release-activation.json +1 -0
  37. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/signed-channel.json +1 -0
  38. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/evidence/qualification.json +1 -0
  39. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/candidate.json +5 -0
  40. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/release-passport.json +1 -0
  41. package/contracts/fixtures/v4-publication-rehearsal-v1/capsule.json +707 -0
  42. package/contracts/fixtures/v4-publication-rehearsal-v1/offline-vectors.json +27 -0
  43. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +229 -0
  44. package/contracts/next-development-request-v1.schema.json +66 -0
  45. package/contracts/next-development-transition-v1.schema.json +292 -0
  46. package/contracts/v4-adopter-delivery-v1.schema.json +81 -0
  47. package/contracts/v4-compatibility-facts-v1.schema.json +230 -0
  48. package/contracts/v4-floating-consumer-policy-receipt-v1.schema.json +4 -2
  49. package/contracts/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  50. package/contracts/v4-tail-reseal-v1.schema.json +276 -0
  51. package/dist/site/agent-index.json +5 -0
  52. package/dist/site/artifact-schemas.json +10 -0
  53. package/dist/site/buildchain-contract.json +1475 -27
  54. package/dist/site/buildchain-site.json +627 -31
  55. package/dist/site/capability-registry.json +17 -14
  56. package/dist/site/cli-registry.json +205 -3
  57. package/dist/site/kfd-claims.json +490 -16
  58. package/dist/site/kfd-upstream-aggregate.json +1 -1
  59. package/dist/site/manual-registry.json +52 -6
  60. package/dist/site/node-api-registry.json +14736 -8851
  61. package/dist/site/page-registry.json +593 -21
  62. package/dist/site/public-surface-audit.json +837 -48
  63. package/dist/site/publication-authority-registry.json +44 -8
  64. package/dist/site/publication-registry.json +4 -4
  65. package/dist/site/release-provenance.json +24 -0
  66. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +662 -0
  67. package/dist/site/schemas/release-tail-capabilities-v1.schema.json +199 -0
  68. package/dist/site/schemas/v4-adopter-delivery-v1.schema.json +81 -0
  69. package/dist/site/schemas/v4-compatibility-facts-v1.schema.json +230 -0
  70. package/dist/site/schemas/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  71. package/dist/site/site-manifest.json +34 -10
  72. package/dist/site/workflow-registry.json +160 -10
  73. package/docs/MAP.md +8 -2
  74. package/docs/cli-reference.md +404 -13
  75. package/docs/cli.md +8 -0
  76. package/docs/dev-alpha-candidate-patrol.md +8 -0
  77. package/docs/dev-delivery-qualification-landing-adr.md +251 -0
  78. package/docs/dev-delivery-warrant.md +351 -38
  79. package/docs/next-development-transition.md +118 -0
  80. package/docs/node-api-reference.md +646 -293
  81. package/docs/release-tail-provider-plane.md +30 -0
  82. package/docs/v4-adopter-delivery.md +133 -0
  83. package/docs/v4-compatibility-facts.md +91 -0
  84. package/docs/v4-publication-rehearsal.md +130 -0
  85. package/docs/v4-tail-reseal.md +73 -0
  86. package/docs/versioning.md +4 -3
  87. package/package.json +34 -6
  88. package/packages/core/adopter-delivery-passport.js +259 -0
  89. package/packages/core/adopter-delivery-vectors.js +158 -0
  90. package/packages/core/adopter-delivery-vectors.json +77 -0
  91. package/packages/core/buildchain-agent-manuals.js +3 -0
  92. package/packages/core/buildchain-compatibility-authority.js +336 -0
  93. package/packages/core/buildchain-compatibility-fact.js +394 -0
  94. package/packages/core/buildchain-compatibility-facts.json +217 -0
  95. package/packages/core/buildchain-compatibility-proof.js +566 -0
  96. package/packages/core/buildchain-config.js +84 -0
  97. package/packages/core/buildchain-contract.js +96 -143
  98. package/packages/core/buildchain-delivery-bootstrap.js +240 -0
  99. package/packages/core/buildchain-delivery-infrastructure.js +164 -0
  100. package/packages/core/buildchain-delivery-self-dogfood.js +395 -0
  101. package/packages/core/buildchain-publication-authority.js +1 -0
  102. package/packages/core/channel-candidate.js +8 -0
  103. package/packages/core/channel-promotion-baseline.js +55 -0
  104. package/packages/core/ci-lane-change-budget.js +247 -0
  105. package/packages/core/dev-alpha-candidate-selection.js +10 -2
  106. package/packages/core/dev-delivery-authority-candidate.js +270 -0
  107. package/packages/core/dev-delivery-authority-evidence.js +146 -0
  108. package/packages/core/dev-delivery-authority-landing.js +461 -0
  109. package/packages/core/dev-delivery-authority-observation.js +48 -0
  110. package/packages/core/dev-delivery-authority-qualification.js +591 -0
  111. package/packages/core/dev-delivery-authority-settlement.js +213 -0
  112. package/packages/core/dev-delivery-authority-state.js +583 -0
  113. package/packages/core/dev-delivery-candidate-identity.js +13 -0
  114. package/packages/core/dev-delivery-contract-surface.js +76 -0
  115. package/packages/core/dev-delivery-execution-failure.js +133 -0
  116. package/packages/core/dev-delivery-execution-transfer.js +592 -0
  117. package/packages/core/dev-delivery-landing-admission-core.js +119 -0
  118. package/packages/core/dev-delivery-landing-readback.js +598 -0
  119. package/packages/core/dev-delivery-landing-terminal-evidence.js +271 -0
  120. package/packages/core/dev-delivery-landing-testing-port.js +6 -0
  121. package/packages/core/dev-delivery-native-execution.js +110 -0
  122. package/packages/core/dev-delivery-native-proof.js +562 -0
  123. package/packages/core/dev-delivery-process-boundary.js +563 -0
  124. package/packages/core/dev-delivery-provider-attempt.js +127 -0
  125. package/packages/core/dev-delivery-provider-heartbeat.js +382 -0
  126. package/packages/core/dev-delivery-warrant-cancellation.js +1 -0
  127. package/packages/core/dev-delivery-warrant-qualification.js +145 -0
  128. package/packages/core/dev-delivery-warrant-settlement.js +237 -36
  129. package/packages/core/dev-delivery-warrant-state.js +587 -0
  130. package/packages/core/dev-delivery-warrant.js +328 -370
  131. package/packages/core/github-governance-authority.js +1 -0
  132. package/packages/core/index.js +5 -0
  133. package/packages/core/kungfu-temporal-fact.js +557 -0
  134. package/packages/core/legacy-kfd-adopter-driver.js +167 -0
  135. package/packages/core/next-development-candidate-reservation.js +186 -0
  136. package/packages/core/next-development-controller.js +728 -0
  137. package/packages/core/next-development-projection.js +287 -0
  138. package/packages/core/next-development-transition.js +738 -0
  139. package/packages/core/paper-agent-entry.js +11 -5
  140. package/packages/core/paper.js +16 -5
  141. package/packages/core/published-delivery-authority.js +266 -0
  142. package/packages/core/release-candidate-recovery.js +70 -15
  143. package/packages/core/release-candidate.js +2 -2
  144. package/packages/core/release-passport.js +36 -9
  145. package/packages/core/v4-adopter-delivery-parity.js +3 -3
  146. package/packages/core/v4-adopter-delivery.js +359 -0
  147. package/packages/core/v4-canonical-contracts.js +5 -0
  148. package/packages/core/v4-delivery-warrant-read-candidate.js +10 -3
  149. package/packages/core/v4-floating-consumer-evidence.js +18 -4
  150. package/packages/core/v4-floating-consumer-policy.js +143 -20
  151. package/packages/core/v4-floating-consumer-release-passport.js +32 -5
  152. package/packages/core/v4-publication-rehearsal-capsule.js +468 -0
  153. package/packages/core/v4-publication-rehearsal-provider-bindings.js +212 -0
  154. package/packages/core/v4-publication-rehearsal.js +481 -0
  155. package/packages/core/v4-tail-reseal-contract.js +26 -0
  156. package/packages/core/v4-tail-reseal-github.js +178 -0
  157. package/packages/core/v4-tail-reseal-receipt.js +225 -0
  158. package/packages/core/v4-tail-reseal.js +594 -0
  159. package/packages/core/workflow-yaml-contract.js +24 -2
  160. package/scripts/buildchain-cli-help.mjs +41 -2
  161. package/scripts/check-ci-lane-change-budget.mjs +100 -0
  162. package/scripts/check-inventory.mjs +14 -3
  163. package/scripts/check-v4-floating-consumer-policy-contract.mjs +23 -4
  164. package/scripts/dev-alpha-candidate-patrol.mjs +22 -1
  165. package/scripts/dev-delivery-authority-command-adapters.mjs +206 -0
  166. package/scripts/dev-delivery-authority-provider.mjs +28 -0
  167. package/scripts/dev-delivery-authority.mjs +490 -0
  168. package/scripts/dev-delivery-native-run.mjs +177 -0
  169. package/scripts/dev-delivery-process-boundary.mjs +260 -0
  170. package/scripts/dev-delivery-proof.mjs +67 -2
  171. package/scripts/dev-delivery-provider-heartbeat.mjs +215 -0
  172. package/scripts/dev-delivery-source-proof-replay.mjs +153 -0
  173. package/scripts/dev-delivery-source-proof-reuse.mjs +13 -97
  174. package/scripts/dev-delivery-two-phase-resume.mjs +345 -0
  175. package/scripts/dev-delivery-two-phase.mjs +573 -0
  176. package/scripts/dev-delivery-warrant-options.mjs +266 -0
  177. package/scripts/dev-delivery-warrant-store.mjs +231 -0
  178. package/scripts/dev-delivery-warrant.mjs +232 -194
  179. package/scripts/dev-pr-auto-merge.mjs +1 -1
  180. package/scripts/dev-pr-delivery-warrant.mjs +11 -0
  181. package/scripts/dev-qualification-patrol.mjs +9 -9
  182. package/scripts/dispatch-artifact-signing-authority.mjs +1 -1
  183. package/scripts/generate-channel-promotion-workflow.mjs +2 -2
  184. package/scripts/generate-next-development-guidance.mjs +49 -0
  185. package/scripts/generate-release-candidate-passport.mjs +152 -0
  186. package/scripts/generate-site-bundle.mjs +69 -4
  187. package/scripts/init-repo.mjs +22 -4
  188. package/scripts/next-development-self-dogfood-harness.mjs +460 -0
  189. package/scripts/next-development-self-dogfood.mjs +597 -0
  190. package/scripts/next-development-transition.mjs +47 -0
  191. package/scripts/npm-publish-transaction.mjs +2 -2
  192. package/scripts/promotion-channel-router.mjs +4 -4
  193. package/scripts/release-candidate-anchor-provenance.mjs +99 -0
  194. package/scripts/release-tail.mjs +51 -3
  195. package/scripts/release-train-self-dogfood.mjs +94 -92
  196. package/scripts/resume-from-candidate-run.mjs +557 -30
  197. package/scripts/site-capability-metadata.mjs +41 -0
  198. package/scripts/stable-candidate-qualification.mjs +9 -10
  199. package/scripts/v4-consumer-policy.mjs +5 -5
  200. package/scripts/v4-publication-rehearsal-fixture.mjs +144 -0
  201. package/scripts/v4-tail-reseal-macos-rehearsal.mjs +134 -0
  202. package/scripts/v4-tail-reseal.mjs +416 -0
  203. package/templates/native-dev-delivery.yml +143 -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,8 +7,8 @@ source_level: local-files
7
7
  confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
- review_state: unreviewed
11
- last_reviewed: 2026-08-11
10
+ review_state: self-reviewed
11
+ last_reviewed: 2026-08-17
12
12
  ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
@@ -38,10 +38,17 @@ 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 fences further mutations by the old token, but it does not prove
48
+ that the old native process stopped. The active Warrant therefore remains in
49
+ place until bounded termination is proven by rooted terminal evidence. Only
50
+ that exact fenced settlement may clear the holder and permit successor
51
+ selection.
45
52
 
46
53
  A terminal event may cancel a candidate before selection without minting a
47
54
  Warrant. This transition is limited to an exact non-active queued candidate and
@@ -51,7 +58,12 @@ An active candidate still requires its current fencing token and lease
51
58
  generation. Exact duplicate cancellation evidence is a visible no-op; identity,
52
59
  state, event, or evidence drift fails closed.
53
60
 
54
- The reusable terminal controller uses one `settle` operation for active,
61
+ The reusable terminal controller classifies authoritative completion,
62
+ cancellation, supersession, native failure, and transient dequeue separately.
63
+ `dequeued` alone never clears an active Warrant: a fresh holder continues with
64
+ the same generation and token, while an expired holder waits for proof that its
65
+ fenced worker stopped. Queued work may still settle as dequeued because it never
66
+ started native execution. The controller uses one `settle` operation for active,
55
67
  queued, already-terminal, and never-admitted pull requests. An active Warrant
56
68
  still requires its exact fence and evidence. A matching queued cancellation is
57
69
  persisted normally. A duplicate terminal event or a pull request that never
@@ -63,6 +75,27 @@ The queue does not infer an emergency: callers must choose it explicitly under
63
75
  their reviewed policy. Delivery classes are `non-native-fast`,
64
76
  `native-proof-required`, `cross-platform`, and `release`.
65
77
 
78
+ ## CI lane change budget
79
+
80
+ `architecture/ci-lane-change-budget.json` pins the exact protected-Dev cut
81
+ that predates lane-budget enforcement. `scripts/check-ci-lane-change-budget.mjs`
82
+ compares the current workflow job set with that cut on every repository check.
83
+ Legacy jobs remain readable without invented metadata, while every newly added
84
+ job fails closed until its exact `<workflow>#<job>` lane declares:
85
+
86
+ - merge or non-merge authority class;
87
+ - trigger class;
88
+ - concurrency scope and `cancel-in-progress` behavior;
89
+ - expected runner-minutes per run;
90
+ - cancellation/settlement behavior; and
91
+ - merge-critical SLO impact, expected contribution, metric, and rationale.
92
+
93
+ The guard is repository policy only. It does not become another required
94
+ GitHub status, acquire merge-queue authority, or relax Delivery Warrant,
95
+ exact-head, approval, required-check, and protected-ref enforcement. A removed
96
+ lane must also remove its declaration, so stale budget records cannot conceal
97
+ workflow drift.
98
+
66
99
  A release-blocker candidate may additionally carry a rooted priority claim
67
100
  created from a settled Release Train dual landing. The claim binds the exact
68
101
  Assignment, Initiative, repair, prior and successor cuts, candidate generation,
@@ -73,23 +106,50 @@ That lane outranks not-yet-leased ordinary work, but never preempts or rewrites
73
106
  an active Warrant; unrelated, conflicted, mismatched, or fabricated claims fail
74
107
  closed before selection.
75
108
 
76
- ## Split proof authority
109
+ ## Three proof authorities
77
110
 
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.
111
+ Source Qualification Proof is created from the cheap source-acceptance gate. It
112
+ binds the semantic source, exact source head and patch/tree intent, plan,
113
+ affected closure, dependencies, toolchain, covered paths, and exact acceptance
114
+ evidence. Ready state and approval are established before provisional
115
+ selection.
81
116
 
82
- Before reuse, the consumer classifies the dev delta:
117
+ Native Qualification Proof is separate. Its v4 form binds semantic source and patch,
118
+ plan, affected closure, dependency graph, toolchain, the exact execution
119
+ environment contract, covered paths, native shard evidence, the exact dev
120
+ base used by the native composition, and the v3 native heartbeat-run receipt.
121
+ That receipt exposes and roots the exact repository, protected base, source
122
+ head, qualified base, toolchain, and environment binding established before
123
+ process spawn. The proof carries the exact receipt bytes as well as repeating
124
+ the binding and receipt roots in its shard evidence. Public verification
125
+ recomputes those bytes and requires a successful outcome, positive heartbeat
126
+ count, exact command root, ordered start/completion/qualification timestamps,
127
+ and the complete execution binding; caller-computed roots without the receipt
128
+ bytes are not a v4 proof. Before reuse, the consumer roots the
129
+ complete attributed Dev delta, including both sides of every rename, then
130
+ classifies it:
83
131
 
84
- - unchanged roots plus an unrelated attributed delta reuse source
85
- qualification and run only a cheap Project Cut replay. GitHub's `behind`
132
+ - unchanged semantic roots plus an unrelated fully attributed base delta reuse
133
+ native qualification and run only a cheap Project Cut replay. GitHub's `behind`
86
134
  state is accepted only when a rooted replay proof binds the exact current
87
135
  protected base, unchanged PR head and source patch, replay tree, required
88
136
  context roots, and a qualified `project.cut.merge-queue-admission/v1`
89
137
  receipt;
90
- - an overlapping delta reruns the affected source shards;
91
- - an unknown graph or changed source, plan, closure, dependency, or toolchain
92
- root fails closed to full source qualification.
138
+ - an overlapping delta reruns affected native shards or the full native plan;
139
+ - an unknown or truncated graph, ambiguous rename, missing attribution, or
140
+ changed source, plan, closure, dependency, toolchain, or environment root
141
+ fails closed to full native qualification.
142
+
143
+ Historical Native Qualification Proof v1, v2, and v3 values remain readable,
144
+ but they cannot be reused because they do not carry the current v4 exact native
145
+ execution evidence. They fail closed to explicit native revalidation and
146
+ produce a v4 proof.
147
+
148
+ The reuse decision binds the exact old and current Dev heads, normalized changed
149
+ paths and rename pairs in `baseDeltaRoot`. This makes local and hosted replay of
150
+ the same inputs byte-deterministic. Generated outputs that participate in the
151
+ affected closure must be listed in `affected-paths-json`; a delta touching one
152
+ of those surfaces is overlap, not a documentation-only advance.
93
153
 
94
154
  Integration Delivery Proof is separate and cannot be cached across candidates.
95
155
  It binds the exact current dev base, replay tree, GitHub `merge_group` head and
@@ -108,11 +168,27 @@ buildchain dev warrant submit --repository owner/repository \
108
168
  --source-identity-root <root> --source-patch-root <root> \
109
169
  --source-proof-root <root> --plan-root <root> --closure-root <root> \
110
170
  --dependency-root <root> --toolchain-root <root> \
171
+ --environment-root <root> \
111
172
  --delivery-class native-proof-required
112
173
 
113
174
  buildchain dev warrant select --repository owner/repository \
114
175
  --branch dev/v4/v4.0 --execute
115
176
 
177
+ buildchain dev proof native --branch dev/v4/v4.0 \
178
+ --source-head <sha> --qualified-base <sha> \
179
+ --environment-root <root> \
180
+ --native-execution-receipt native-heartbeat-run.json \
181
+ --affected-paths-json '["packages/native"]' ...
182
+
183
+ buildchain dev proof classify-native --source-proof native-proof.json \
184
+ --current-base <sha> --graph-known true --attribution-complete true \
185
+ --changed-paths-json '[]' --renames-json '[]' ...
186
+
187
+ buildchain dev warrant qualify --repository owner/repository \
188
+ --branch dev/v4/v4.0 --fencing-token <root> --lease-generation 1 \
189
+ --native-proof native-proof.json \
190
+ --native-reuse-decision native-reuse-decision.json --execute
191
+
116
192
  buildchain dev warrant cancel-queued --repository owner/repository \
117
193
  --branch dev/v4/v4.0 --candidate-id <root> --pull-request 123 \
118
194
  --expected-source-head <queued-sha> --observed-source-head <event-sha> \
@@ -120,16 +196,51 @@ buildchain dev warrant cancel-queued --repository owner/repository \
120
196
  --evidence-root <terminal-event-root> --execute
121
197
  ```
122
198
 
123
- `heartbeat`, `recover`, `close`, `settle`, `cancel-queued`, and `observe` use the same durable authority.
199
+ `heartbeat`, `qualify`, `recover`, `close`, `settle`, `cancel-queued`, and `observe` use the same durable authority.
124
200
  Warrant-scoped mutations require the exact fencing token and lease generation.
125
201
  `close` also requires a rooted terminal evidence object.
126
202
 
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).
203
+ On the v4 line, `observe` also has an explicit `--read-mode v4` candidate. It requires retained exact semantic-diff qualification and source binding, invokes the effect-disabled Rust projection, retains parity evidence, and returns the existing observation shape. The default and rollback mode remains `v3`; mutation commands ignore the read switch. See [`v4-delivery-warrant-read-candidate.md`](v4-delivery-warrant-read-candidate.md).
204
+
205
+ Expensive native commands must run through `dev-delivery-native-run.mjs` (or an
206
+ equivalent exact consumer). Before spawn it validates the environment and
207
+ execution roots and traverses the complete Linux `/proc` ancestry. An unreadable
208
+ process environment or status is a failure, as is any variable name containing a
209
+ generic auth, credential, key, password, secret, or token segment. The child
210
+ still receives only the fixed process-basics allowlist. The command root,
211
+ exact execution binding and root, successful outcome, child start and completion
212
+ times, and heartbeat count are included in the native receipt. The controller
213
+ keeps retained-fence heartbeats across the direct child lifetime and requires a
214
+ final successful heartbeat after child exit; process-group termination on fence
215
+ loss remains fail-closed runtime behavior rather than a claimed receipt field.
216
+
217
+ The reusable workflow does not run that controller in a credentialed job. A
218
+ GitHub-hosted `native-execution` job has read-only checkout permission, no
219
+ provider write credential in the candidate step or its ancestry, and cannot
220
+ qualify, settle, enqueue, or renew provider state. It copies only rooted proof
221
+ and Warrant bytes into a dedicated staging directory and uploads that closed set.
222
+ The success artifact contains exactly its transfer manifest, Warrant, native
223
+ result, native proof, and reuse decision; the failed-native artifact contains
224
+ exactly its transfer manifest, Warrant, canonical rooted failure, and
225
+ provider-settlement binding. Recursive verification rejects missing or extra
226
+ entries, duplicate or case-colliding paths, traversal, symlinks, directories,
227
+ other non-regular entries, non-canonical failure or manifest JSON bytes, byte
228
+ drift, and mutation between the first and second recursive membership
229
+ snapshots. A
230
+ dependent GitHub-hosted finalizer downloads those bytes and uses live
231
+ Actions job readback to prove different positive job ids, different runner
232
+ identities, a matching run attempt, and strict native-completion-before-finalizer
233
+ ordering. It recomputes the canonical failure root and binds that exact root,
234
+ transfer root, native job, Warrant state and fence into the live provider
235
+ boundary. Failure settlement consumes those verified coordinates directly; it
236
+ does not synthesize a second failure. The boundary also roots a live open-PR
237
+ head and protected-ref readback. The trusted finalizer uses its provider credential only for
238
+ those GET readbacks until the byte transfer, runner boundary, and semantic native
239
+ proof have passed independent verification. It then rereads the live PR head,
240
+ protected base, and Warrant fence before qualifying or settling. A missing or
241
+ corrupt artifact, unreadable `/proc`, same job or runner, invalid timestamp,
242
+ self-hosted label, stale PR/base/fence, or readback mismatch fails closed. Native
243
+ exit zero is only evidence input.
133
244
 
134
245
  Proof commands create, verify, classify, and compose the two proof layers:
135
246
 
@@ -142,27 +253,184 @@ buildchain dev proof replay-proof \
142
253
  buildchain dev proof integration --warrant-result warrant.json ...
143
254
  ```
144
255
 
256
+ ## Opt-in bounded qualification and exclusive landing
257
+
258
+ Buildchain also defines an explicit production opt-in that turns successful
259
+ shadow evidence into a separate v2 authority state. It does not widen or
260
+ reinterpret the v1 Warrant queue. The accepted
261
+ [`Qualification Lease and Landing Warrant ADR`](dev-delivery-qualification-landing-adr.md)
262
+ and `contracts/dev-delivery-authority-v2.schema.json` are authoritative.
263
+
264
+ In `bounded-qualification-landing` mode, a configured number of exact
265
+ Qualification Leases may coexist. Each lease carries
266
+ `authority = qualification-only` and `mergeGroupAdmission = false`. Completing
267
+ qualification records evidence and releases that lease. Qualified candidates
268
+ then wait for the one `Landing Warrant`, which alone carries
269
+ `authority = merge-group-admission` and may be checked for `merge_group`
270
+ admission.
271
+
272
+ Concurrency is granted only across disjoint rooted `qualificationDomains`.
273
+ Overlap and unknown domains are held behind the active safety boundary with an
274
+ explicit content-rooted reason. `maxLandingOvertakes` prevents a slow older
275
+ candidate from being bypassed indefinitely, while `maxQualificationAttempts`
276
+ turns repeated heartbeat loss into a rooted terminal failure. Every release
277
+ returns a deterministic rooted wake instruction; an exact duplicate release or
278
+ recovery is a state-root-preserving no-op.
279
+
280
+ An expired qualification-only lease may release its bounded compute slot. An
281
+ expired Landing Warrant does not release exclusive provider authority by time
282
+ alone: recovery retains it and requires exact provider-stop or terminal
283
+ settlement evidence for the same token and generation before another landing
284
+ candidate can be selected. Expired cleanup invokes a separate independent
285
+ provider terminal verifier after candidate exit. Its rooted readback must match
286
+ the exact repository, protected base, authority state root, candidate, pull
287
+ request, source head, Landing token and generation, provider run and job, and a
288
+ fresh observation for that Warrant. Caller assertions, forged roots, wrong
289
+ bindings, nonterminal states, and stale observations cannot release the slot.
290
+ The verifier reads the immutable historical run-attempt endpoint. A later rerun
291
+ or synchronized PR head cannot rewrite the admitted attempt or prevent its
292
+ terminal settlement; current PR identity and protected base still must match.
293
+ The reader rejects an empty run conclusion, nonterminal run or job state,
294
+ unsupported job conclusion, or pull-request state outside `open|closed` before
295
+ it can seal product-owned cleanup evidence.
296
+
297
+ The public two-phase workflow keeps heartbeat authority in a fourth,
298
+ GitHub-hosted job on a runner domain distinct from admission, native execution,
299
+ evidence sealing, and finalization. Each successful heartbeat records the exact
300
+ expected-old and next authority state roots plus its receipt root. The
301
+ credentialless native job holds only its immutable admission binding; the
302
+ hosted coordinator alone renews durable state. After heartbeat loss it records
303
+ the exact current attempt but never invokes GitHub's run-scoped cancellation
304
+ API, so a successor rerun cannot be cancelled through a stale coordinate. All boundary jobs must prove the exact
305
+ `GitHub Actions` hosted runner group and reject `self-hosted`. The finalizer
306
+ rereads the provider job set and live authority state, rejects missing
307
+ or reordered receipt continuity, and requires the live state root to equal the
308
+ receipt's latest root before it can qualify, settle, or land.
309
+
310
+ A terminal native failure retains the complete provider chain through every
311
+ write-normalize-observe-remutate cycle: `transferRoot`,
312
+ `finalizerBoundaryRoot`, `nativeJobId`, `sealJobId`, the exact admitted
313
+ `providerAttempt`, and, when expiry cleanup was required, the independent
314
+ `providerTerminalReadbackRoot`.
315
+
316
+ Buildchain's tracked self-delivery caller invokes
317
+ `kungfu-systems/buildchain/.github/workflows/dev-pr-auto-merge.yml@v4-alpha`.
318
+ The durable selector remains the floating alpha channel, the repository keeps
319
+ matching `.buildchain/contract-lock.json` (`v4`) and
320
+ `.buildchain/alpha-contract-lock.json` (`v4-alpha`), and a train runtime may be
321
+ selected only through the trusted, non-persistent `workflow_dispatch` input.
322
+ No candidate SHA or train ref is persisted in the caller.
323
+
324
+ Only complete `verified-native-qualification` evidence can mint a new Landing
325
+ Warrant. Migrated `legacy-compatibility-only` evidence may preserve an exact
326
+ already-active historical Landing fence, but it cannot create a successor
327
+ Landing or acquire native proof authority.
328
+
329
+ The public command family is explicit:
330
+
331
+ ```sh
332
+ buildchain dev authority migrate --repository owner/repository \
333
+ --branch dev/v4/v4.0 --execute --json
334
+ buildchain dev authority submit --repository owner/repository \
335
+ --branch dev/v4/v4.0 --environment-root <root> \
336
+ --qualification-domains '["<root>"]' ... --execute
337
+ buildchain dev authority lease-qualification --repository owner/repository \
338
+ --branch dev/v4/v4.0 --execute
339
+ buildchain dev authority heartbeat-qualification --repository owner/repository \
340
+ --branch dev/v4/v4.0 --candidate-id <root> \
341
+ --authority-token <root> --authority-generation 1 --execute
342
+ buildchain dev authority complete-qualification --repository owner/repository \
343
+ --branch dev/v4/v4.0 --candidate-id <root> \
344
+ --authority-token <root> --authority-generation 1 \
345
+ --evidence-root <qualification-root> --execute
346
+ buildchain dev authority lease-landing --repository owner/repository \
347
+ --branch dev/v4/v4.0 --execute
348
+ buildchain dev authority heartbeat-landing --repository owner/repository \
349
+ --branch dev/v4/v4.0 --candidate-id <root> \
350
+ --authority-token <root> --authority-generation 1 \
351
+ --provider-attempt admitted-provider-attempt.json --execute
352
+ buildchain dev authority recover --repository owner/repository \
353
+ --branch dev/v4/v4.0 --execute
354
+ buildchain dev authority admit-merge-group --repository owner/repository \
355
+ --branch dev/v4/v4.0 --candidate-id <root> \
356
+ --authority-token <root> --authority-generation 1 \
357
+ --merge-group-head <sha>
358
+ ```
359
+
360
+ Terminal settlement releases either authority immediately from exact evidence;
361
+ it does not wait for TTL. Exact duplicate settlement is a state-root-preserving
362
+ no-op. The default `buildchain dev warrant` commands, v1 state bytes, and
363
+ single-flight behavior do not change while this mode is off.
364
+
365
+ Migration also accepts the historical non-native v1 form whose active Warrant
366
+ predates the `phase` field. It preserves that exact fence as Landing authority
367
+ and records a schema-safe `legacy-compatibility-only` qualification carrying the
368
+ exact legacy state root, token, generation, source proof, and phase. Fields that
369
+ v1 never established remain explicitly null, including the phase-less
370
+ qualification time and every native proof field. A migrated qualified v1
371
+ Warrant retains its historical proof roots as compatibility facts, but
372
+ `nativeProofAuthority` remains false because migration cannot reconstruct the
373
+ v2 execution binding or qualification contract. Neither form can claim new
374
+ native proof or reuse authority. Phase-less native candidates remain invalid.
375
+
145
376
  ## Workflow rollout and rollback
146
377
 
147
378
  The reusable `dev-pr-auto-merge.yml` supports three explicit rollout modes:
148
379
 
149
380
  - `off` preserves the previous exact-head admission controller;
150
381
  - `shadow` qualifies the source and emits a read-only queue submission plan;
151
- - `required` persists the submission, selects the Warrant, and refuses GitHub
152
- enqueue unless the immutable queue commit, state root, active Warrant, and
382
+ - `required` persists the submission, selects a provisional Warrant, runs or
383
+ reuses semantic native proof under heartbeat, atomically qualifies the same
384
+ fence, and refuses GitHub enqueue unless the immutable queue commit, state root, active Warrant, and
153
385
  selected candidate all pass exact readback validation. Immediately before
154
- enqueue, the controller writes and reads back both the exact-head queue
155
- admission status and the active lease status. Only after both are visible at
156
- their required states does it reread the pull request head, protected base,
157
- native merge queue, and current protected Warrant. The final rooted
158
- admission transaction binds the frozen base, source head, Warrant fence and
159
- generation, Project Cut proof, and both status contexts. Status propagation
160
- is retried before enqueue; base, head, predecessor, lease, or Warrant drift
161
- revokes both statuses without attempting enqueue.
386
+ enqueue, the controller writes and then reads back both the exact-head queue
387
+ admission status and active lease status. Only after those statuses are
388
+ visible at their required states does it reread the pull request head,
389
+ protected base, native merge queue, and current protected Warrant state. The
390
+ final rooted admission transaction binds the frozen base, source head,
391
+ candidate, fencing token, generation, native proof roots, Project Cut proof,
392
+ and both status contexts. Status propagation is retried before enqueue;
393
+ base, head, queue-predecessor, lease, or Warrant drift revokes both statuses
394
+ without attempting enqueue. A previously valid result is not authority after terminal
395
+ closeout. Re-running qualification for the same selected head may regenerate
396
+ timestamped proof bytes, but it retains the immutable active Warrant and its
397
+ originally selected proof instead of rewriting or rejecting that attempt.
398
+ Each candidate also retains the exact successful source workflow run. If a
399
+ controller discovers that another candidate owns the active Warrant, a
400
+ configured consumer workflow is dispatched immediately for that exact PR,
401
+ head, source run, Assignment and Initiative, source identity and patch,
402
+ plan, closure, dependency, toolchain, environment, affected paths, delivery
403
+ class, and priority; the candidate is not left waiting for a patrol cron.
404
+ The shipped Buildchain caller and native template configure this handoff path
405
+ and accept the same complete input contract. A historical phase-less owner
406
+ uses the distinct `legacy-phase-less-active-owner` command path. That path
407
+ carries the exact queue state root observed before its duplicate submission,
408
+ fencing token, generation, PR, head, and source-run binding. The submission
409
+ receipt proves that pre-transition root even though the queue transition
410
+ advances the current state root. The path omits `environment-root`, `native-command`, and
411
+ `native-command-root`, and rejects readback drift. It therefore resumes the
412
+ historical non-native authority without inventing a native command contract
413
+ or upgrading the owner to native proof authority.
414
+
415
+ The PR-controlled native candidate runs in a distinct GitHub-hosted job with
416
+ no provider write credential in the step or process ancestry. The dependent
417
+ credentialed finalizer runs on another live-readback-proven GitHub-hosted job
418
+ and runner, verifies the content-addressed transfer, then independently rereads
419
+ the PR, protected base, and provider fence before qualification or settlement.
420
+ Detached descendants, including descendants that unset runner tracking, remain
421
+ in the native runner authority domain and cannot enter the fresh finalizer
422
+ domain. Exit zero alone is never treated as provider mutation authority,
423
+ Landing authority, or completed delivery.
424
+
425
+ Persistent self-hosted runners are intentionally outside this contract. A
426
+ `needs` edge alone does not prove process cleanup or a new authority domain, so
427
+ the finalizer rejects a self-hosted label. Supporting self-hosted execution
428
+ would require separately attested one-job runner destruction and a provider
429
+ readback contract at least as strong as the GitHub-hosted boundary.
162
430
 
163
431
  Required-mode admission also performs a latest-base Project Cut immediately
164
432
  before enqueue. If the protected base advanced, the controller reclassifies
165
- the exact attributed delta against the Warrant-bound source proof. Only a disjoint,
433
+ the exact attributed delta against the rooted native proof. Only a disjoint,
166
434
  fully attributed move may reuse that proof; overlap, unknown attribution,
167
435
  missing composition, or merge conflict fails with a stable pre-enqueue reason.
168
436
  The rooted Project Cut receipt binds the frozen and admitted base SHAs,
@@ -170,6 +438,37 @@ The reusable `dev-pr-auto-merge.yml` supports three explicit rollout modes:
170
438
  head. A final base/head/queue/Warrant compare-and-swap readback must still
171
439
  match that receipt before the enqueue mutation is attempted.
172
440
 
441
+ The protected branch ref is the base authority for that compare-and-swap.
442
+ A pull request's `base.sha` may remain an older composition snapshot while
443
+ GitHub reports the pull request as behind, so it is diagnostic rather than a
444
+ substitute for the separately read protected ref and rooted Project Cut.
445
+
446
+ For a required native delivery class, the reusable controller rejects a
447
+ missing or malformed environment root before runtime checkout, candidate
448
+ submission, Warrant selection, or native execution. The input remains
449
+ conditionally optional so `off`, `shadow`, and `non-native-fast` callers keep
450
+ their documented behavior.
451
+
452
+ The controller persists a completed native proof before its final base
453
+ reclassification. A later exact retry can supply that proof and avoid the
454
+ expensive native command when the rooted delta still proves reuse safe. A
455
+ duplicate dispatch against the same already-qualified Warrant returns the same
456
+ proof and reuse roots plus a rooted qualification replay output without another
457
+ queue mutation. Both result forms carry
458
+ `landingAuthority: false`: only the live qualified Warrant plus exact-head
459
+ GitHub merge-queue admission can authorize landing.
460
+
461
+ The required controller checks the protected base again after native work. A
462
+ disjoint attributed delta reuses the proof. Overlap or unknown attribution
463
+ triggers one automatic revalidation on the latest base; continued overlap,
464
+ native failure, cancellation, semantic head movement, or an unrecoverable merge
465
+ conflict closes the exact fence. The next queued candidate is notified through
466
+ the `buildchain-dev-delivery-wake` repository event. Its complete semantic
467
+ candidate is carried under the single `client_payload.candidate` envelope so
468
+ GitHub's ten-property top-level limit cannot discard proof bindings. If
469
+ cancellation prevents cleanup, lease expiry recovers retained queue age and
470
+ mints a new fence.
471
+
173
472
  Consumers should deploy `shadow` first, inspect receipts, then change their
174
473
  protected caller to `required`. Rollback is a reviewed caller change back to
175
474
  `off`; it does not delete queue history or reinterpret old receipts. The
@@ -178,15 +477,29 @@ merged candidate (or accepts explicit evidence for another terminal outcome),
178
477
  then closes only the current fencing generation. The separate queued
179
478
  cancellation reusable workflow cannot close an active generation; it advances
180
479
  the state ref only when the caller's complete terminal binding and expected-old
181
- root still match.
480
+ root still match. A delayed `dequeued` event is ignored when GitHub readback
481
+ shows the same exact PR head is already queued again, so an earlier queue event
482
+ cannot close a newer active Warrant generation.
182
483
 
183
484
  Buildchain uses the same contract for its own protected dev line through
184
485
  `buildchain-dev-delivery.yml`. The manual caller requires the exact PR head and
185
- all native/source proof roots, pins the runtime to the caller commit, selects
486
+ semantic source roots, accepts an optional reusable native proof, keeps both
487
+ the durable public selector and explicit runtime input on `v4-alpha`, selects
186
488
  `delivery-warrant-mode: required`, and targets GitHub Merge Queue. It does not
187
489
  offer an `off` switch: rollback is a reviewed change to this caller, not an
188
490
  operator-time weakening of a specific delivery attempt.
189
491
 
492
+ `templates/native-dev-delivery.yml` provides the corresponding protected-dev
493
+ consumer workflow. It supports both explicit dispatch and the bounded wake
494
+ event, calls the allowed floating `@v4-alpha` selector, explicitly passes the v4
495
+ runtime ref that locks every delivery job to the same checkout, and keeps the
496
+ native command in the consumer repository rather than inventing
497
+ provider-specific shards. Both callers explicitly bind the queue-admission
498
+ and active-lease status contexts so write/readback fencing uses the same exact
499
+ names. The reusable workflow defaults the explicit runtime input to
500
+ `v4-alpha`; an empty input or any v3 selector fails before the first runtime
501
+ checkout.
502
+
190
503
  This mechanism schedules protected delivery only. It does not serialize local
191
504
  development, source-only checks, unrelated channels, release publication, or
192
505
  runner provisioning. It never grants authority to enable cloud runner
@@ -0,0 +1,118 @@
1
+ ---
2
+ status: preview
3
+ period: ongoing
4
+ theme: next-development-transition
5
+ doc_type: generated-contract-guidance
6
+ source_level: generated-from-node-contract
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: A
10
+ review_state: self-reviewed
11
+ last_reviewed: 2026-08-11
12
+ ---
13
+
14
+ # Next-development Transition
15
+
16
+ This document is generated from
17
+ `packages/core/next-development-transition.js` and
18
+ `packages/core/next-development-controller.js` and
19
+ `packages/core/next-development-projection.js`. Edit those sources and run
20
+ `node scripts/generate-next-development-guidance.mjs`; direct edits fail the
21
+ projection drift check.
22
+
23
+ ## Contract
24
+
25
+ - Contract: `kungfu-buildchain-next-development-transition/v1`
26
+ - Durable controller: `kungfu-buildchain-next-development-controller/v1`
27
+ - ADR: [ADR 0002](../architecture/decisions/0002-next-development-transition.md)
28
+ - States: `planned`, `waiting-anchor`, `materialized`, `pr-pending`, `merged`, `verified`
29
+ - Legal version models: `semver/auto` and `anchored/manual`
30
+ - Invariant: A completed Alpha remains successful and its refs remain immutable while the next-development transition is incomplete.
31
+
32
+ An Alpha publication is terminal success independently of this transition.
33
+ The idempotency key is a deterministic hash of the completed-Alpha root,
34
+ repository, legal model, and sorted declared paths. Incomplete Dev preparation
35
+ therefore cannot relabel Alpha N as failed, and replay cannot select a different
36
+ Alpha or path set.
37
+
38
+ ## Durable controller
39
+
40
+ `scheduleNextDevelopmentController` atomically creates one child for the
41
+ repository and completed-Alpha root. Identical wakes reuse it. The store
42
+ boundary requires read, create-if-absent, and compare-and-swap operations; the
43
+ controller root fences every checkpoint. Materialization uses an operation key
44
+ derived from the child, exact current protected Dev SHA, and reviewed target,
45
+ so a fresh runner can recover an already-created commit instead of rebuilding
46
+ the Alpha candidate or depending on the original runner workspace.
47
+
48
+ Before opening the protected version PR, the controller reads Dev again. A
49
+ moved head makes the prepared attempt `superseded`; the following wake
50
+ regenerates only declared version material from that latest SHA. After merge,
51
+ `verified` remains unreachable until protected Dev readback contains the
52
+ prepared commit and its target version, source roots, and derived roots exactly
53
+ match the checkpoint. The executor surface contains no Alpha publication, tag,
54
+ release, or package operation.
55
+
56
+ Alpha finalization no longer treats a non-fast-forward Dev update as successful
57
+ bookkeeping. It requires an exact checkout of the current Dev head, regenerates
58
+ the declared version lifecycle there, and uses a non-force merge or reusable
59
+ protected version PR. Candidate Patrol ignores both the generated preparation
60
+ commit and its two-parent integration commit. Before a later product candidate
61
+ can settle, Patrol reads every prepared version path at the candidate SHA and
62
+ requires the exact reserved blob identities; missing or stale state blocks
63
+ before a Release Cut or heavy candidate build.
64
+
65
+ ## Version models
66
+
67
+ `semver/auto` increments the Alpha sequence on the same semantic patch. For
68
+ example, completed `1.4.2-alpha.7` plans `1.4.2-alpha.8`. It must not accept an anchor or an
69
+ operator-selected target.
70
+
71
+ `anchored/manual` enters `waiting-anchor` until the caller provides both a
72
+ semantic target and the exact digest of the configured anchor manifest. The
73
+ adapter verifies the manifest already present in the checkout; it never invents
74
+ or edits upstream anchor facts. `semver/manual` and `anchored/auto` are
75
+ invalid.
76
+
77
+ ## Public self-dogfood and adoption
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
81
+ declared `lifecycle.verify` runs `pnpm run check`, so the same public path
82
+ executes pure recovery tests that inject a transient durable-state write
83
+ failure, restore the adapter operation on a fresh runner, supersede stale work
84
+ when protected Dev moves, preserve `pr-pending` during protected-PR delay, and
85
+ prove both legal version models. No caller-local qualification job, action,
86
+ or private self-dogfood route is added.
87
+
88
+ The existing dual-channel self-consumer separately retains exact hosted
89
+ `build.yml@v4-alpha` and `build.yml@v4` runtime evidence. Consumers adopt
90
+ the proved contract through the floating v4 coordinates; exact resolved SHAs
91
+ remain audit evidence and never become durable selectors.
92
+
93
+ ## Local adapter
94
+
95
+ From a normal Buildchain checkout:
96
+
97
+ ```sh
98
+ node scripts/next-development-transition.mjs materialize --cwd . --input <request.json>
99
+ ```
100
+
101
+ The command prints a rooted plan and performs no write by default. `--write`
102
+ may change only regular, non-symlink source files listed by `version.files`
103
+ in the loaded Buildchain config. The rooted adapter contract separately names
104
+ `version.derived_files` as allowed changes, `version.manifest` as read-only,
105
+ `BUILDCHAIN_VERSION` as the target input, `lifecycle.version-state` as the
106
+ derived-material stage, and `lifecycle.verify` as the truth gate. The
107
+ reference writer fails closed when derived files exist because transaction
108
+ execution is outside this contract slice. It performs no Git operation, ref
109
+ update, network request, provider call, lifecycle command, or anchor edit.
110
+
111
+ Preparing development state creates no tag, Release, public package, or
112
+ candidate. Those public effects remain outside the local adapter contract.
113
+
114
+ The request schema is
115
+ `contracts/next-development-request-v1.schema.json`; the durable record schema
116
+ is `contracts/next-development-transition-v1.schema.json`. Positive and
117
+ negative examples live under
118
+ `contracts/fixtures/next-development-transition-v1/`.