@kungfu-tech/buildchain 3.0.6-alpha.1 → 3.0.6-alpha.3
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.
- package/README.md +4 -4
- package/actions/promote-buildchain-ref/README.md +8 -0
- package/bin/buildchain.mjs +13 -1
- package/contracts/auditable-demo-scenario-v1.schema.json +52 -0
- package/contracts/release-candidate-recovery-v1.schema.json +102 -0
- package/dist/site/buildchain-contract.json +129 -34
- package/dist/site/buildchain-site.json +171 -45
- package/dist/site/capability-registry.json +5 -5
- package/dist/site/cli-registry.json +40 -4
- package/dist/site/controller-registry.json +56 -4
- package/dist/site/kfd-claims.json +184 -20
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +10 -10
- package/dist/site/node-api-registry.json +1242 -121
- package/dist/site/page-registry.json +157 -31
- package/dist/site/public-surface-audit.json +422 -21
- package/dist/site/publication-authority-registry.json +66 -1
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +2 -0
- package/dist/site/site-manifest.json +14 -14
- package/dist/site/workflow-registry.json +197 -15
- package/docs/MAP.md +1 -0
- package/docs/auditable-demo.md +58 -11
- package/docs/aws-us-elastic-runner-burst-plane.md +23 -19
- package/docs/cli-reference.md +154 -0
- package/docs/dev-alpha-candidate-patrol.md +13 -5
- package/docs/dev-delivery-warrant.md +158 -0
- package/docs/node-api-reference.md +96 -38
- package/docs/publication-authority.md +11 -0
- package/docs/publish-transaction.md +10 -1
- package/docs/release-candidate.md +106 -12
- package/docs/release-governance.md +52 -0
- package/docs/reusable-build-surface.md +11 -1
- package/docs/shifu-gate-profiles.md +12 -1
- package/docs/versioning.md +2 -0
- package/package.json +3 -1
- package/packages/core/buildchain-contract.js +30 -2
- package/packages/core/buildchain-publication-authority.js +3 -1
- package/packages/core/channel-candidate.js +2 -21
- package/packages/core/channel-promotion-baseline.js +199 -0
- package/packages/core/dev-delivery-candidate-identity.js +94 -0
- package/packages/core/dev-delivery-common.js +73 -0
- package/packages/core/dev-delivery-proof.js +252 -0
- package/packages/core/dev-delivery-warrant-cancellation.js +94 -0
- package/packages/core/dev-delivery-warrant-settlement.js +73 -0
- package/packages/core/dev-delivery-warrant.js +591 -0
- package/packages/core/index.js +7 -0
- package/packages/core/release-candidate-recovery.js +386 -0
- package/scripts/auditable-demo-bundle-verification.mjs +148 -0
- package/scripts/auditable-demo-platform.mjs +86 -50
- package/scripts/auditable-demo-presentation.mjs +83 -0
- package/scripts/auditable-demo-renditions.mjs +264 -0
- package/scripts/auditable-demo.mjs +24 -30
- package/scripts/build-contract-core.mjs +58 -3
- package/scripts/buildchain-cli-help.mjs +8 -0
- package/scripts/buildchain-patrol.mjs +9 -0
- package/scripts/check-inventory.mjs +13 -2
- package/scripts/dev-alpha-candidate-patrol.mjs +45 -48
- package/scripts/dev-delivery-proof.mjs +193 -0
- package/scripts/dev-delivery-warrant.mjs +426 -0
- package/scripts/dev-pr-auto-merge.mjs +488 -46
- package/scripts/dev-pr-delivery-warrant.mjs +209 -0
- package/scripts/gate-profile-core.mjs +24 -0
- package/scripts/generate-site-bundle.mjs +2 -2
- package/scripts/git-fetch-process-tree.mjs +142 -0
- package/scripts/lifecycle-substage-evidence.mjs +274 -0
- package/scripts/locked-source-checkout.mjs +6 -3
- package/scripts/release-candidate-resolver.mjs +35 -3
- package/scripts/resolve-artifact-transfer-mode.mjs +9 -0
- package/scripts/resolve-build-contract.mjs +7 -0
- package/scripts/resume-from-candidate-run.mjs +498 -0
- package/scripts/route-offline-runners.mjs +1 -0
- package/scripts/run-lifecycle-core.mjs +9 -9
- package/scripts/shifu-gate-profile.mjs +10 -16
- package/scripts/site-capability-metadata.mjs +15 -0
package/docs/auditable-demo.md
CHANGED
|
@@ -8,7 +8,7 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: self-reviewed
|
|
11
|
-
last_reviewed: 2026-08-
|
|
11
|
+
last_reviewed: 2026-08-05
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
@@ -52,6 +52,39 @@ the default. Both classes retain 4 MiB per step, a clean Home/XDG environment,
|
|
|
52
52
|
no inherited credentials, and a network-disabled read-only container with
|
|
53
53
|
bounded tmpfs.
|
|
54
54
|
|
|
55
|
+
Consumers may optionally add a
|
|
56
|
+
`buildchain.declarative-demo-presentation/v1` presentation. This contract
|
|
57
|
+
binds one consumer-owned proof label, question, summary, and optional
|
|
58
|
+
transition to every demo in declared order. Buildchain verifies that each
|
|
59
|
+
question is the same title used by capture and media; it does not invent or
|
|
60
|
+
reinterpret the product argument.
|
|
61
|
+
|
|
62
|
+
The presentation also chooses one of two README materialization modes. The
|
|
63
|
+
default, when no presentation is declared, remains the original full generated
|
|
64
|
+
block with commands, renditions, evidence, and claim boundary. `media-only`
|
|
65
|
+
updates only the image inside each existing README marker so consumer-authored
|
|
66
|
+
narrative and transitions survive regeneration. The generated technical
|
|
67
|
+
details move to a separately declared Markdown specification, where stable
|
|
68
|
+
per-demo markers preserve proof order and idempotent updates. The publication
|
|
69
|
+
pull request stages that specification together with the README and
|
|
70
|
+
content-addressed evidence. No presentation field grants publication or Work
|
|
71
|
+
authority.
|
|
72
|
+
|
|
73
|
+
The optional top-level `compositionMode` is an explicit visual contract.
|
|
74
|
+
Omitting it preserves `presentation-framed`; declaring `terminal-fill` makes
|
|
75
|
+
the bounded PTY replay the complete pixel surface without renderer-owned
|
|
76
|
+
window chrome. Buildchain carries that choice into both native scenes. It does
|
|
77
|
+
not infer full-frame intent from output resolution.
|
|
78
|
+
|
|
79
|
+
The optional `buildchain.declarative-demo-playback/v1` contract separates
|
|
80
|
+
observed command latency from presentation timing. Its
|
|
81
|
+
`deterministic-readable` mode preserves the captured terminal event payloads
|
|
82
|
+
and their order, records the observed final-event time as non-authoritative
|
|
83
|
+
evidence, and maps event ordinals onto the declared `activeDurationMs` before a
|
|
84
|
+
bounded `finalHoldMs`. Both native renditions therefore replay at the same
|
|
85
|
+
readable pace even when an identical command runs faster or slower. Omitting
|
|
86
|
+
the contract preserves the original PTY timestamp behavior.
|
|
87
|
+
|
|
55
88
|
The uploaded metadata must bind the executable SHA-256, declare an empty
|
|
56
89
|
runtime dependency set, and provide a bounded `executableFiles` array of exact
|
|
57
90
|
artifact-relative paths and SHA-256 digests. GitHub Artifact transport does not
|
|
@@ -97,6 +130,7 @@ jobs:
|
|
|
97
130
|
scenario-path: .buildchain/auditable-demo.json
|
|
98
131
|
renderer-image: ghcr.io/kungfu-systems/build-images/demo-renderer@sha256:RENDERER_DIGEST
|
|
99
132
|
render-media: true
|
|
133
|
+
render-failure-advisory: false
|
|
100
134
|
media-profile: responsive-web-delivery-v1
|
|
101
135
|
materialize: true
|
|
102
136
|
materialize-base-ref: dev/v1/v1.0
|
|
@@ -193,6 +227,10 @@ The Gate:
|
|
|
193
227
|
bounded tmpfs;
|
|
194
228
|
- verifies the renderer manifest, media probe, exact input roots, exact output
|
|
195
229
|
member set, and complete checksums;
|
|
230
|
+
- independently verifies the requested composition mode, browser-observed
|
|
231
|
+
content viewport, PTY rows and columns, and deterministic cell geometry for
|
|
232
|
+
every frame set; `terminal-fill` is rejected unless the viewport and cell
|
|
233
|
+
grid resolve to the complete declared frame;
|
|
196
234
|
- uploads a content-addressed qualified bundle plus an independent GitHub
|
|
197
235
|
Artifact id, URL, archive digest, and expiry-bearing source coordinate.
|
|
198
236
|
|
|
@@ -202,9 +240,9 @@ passed gate receipt, and checksums covering every member exactly once.
|
|
|
202
240
|
|
|
203
241
|
## Selective Render
|
|
204
242
|
|
|
205
|
-
`render-media: true` enables the
|
|
206
|
-
|
|
207
|
-
|
|
243
|
+
`render-media: true` enables the full-media step only after every declared demo
|
|
244
|
+
has passed the required Gate. It recomputes each Gate member root, verifies the
|
|
245
|
+
exact source SHA and renderer digest, and only then renders the complete
|
|
208
246
|
qualified scene.
|
|
209
247
|
|
|
210
248
|
The media bundle contains MP4, WebM, GIF, poster, probe, renderer manifest,
|
|
@@ -213,10 +251,19 @@ distribution checksums. A web-delivery profile also retains
|
|
|
213
251
|
`media-inspection.json`, whose content root is bound into the receipt.
|
|
214
252
|
`render-media: false` does not weaken or skip the Gate.
|
|
215
253
|
|
|
254
|
+
`render-failure-advisory: true` makes only the full-media step advisory. A
|
|
255
|
+
render failure remains visible as a failed step and workflow warning, while the
|
|
256
|
+
required Gate keeps its normal failure semantics. Failed or partial media can
|
|
257
|
+
never open a materialization PR. Use this for an Alpha lane whose binary
|
|
258
|
+
publication must not depend on animation capacity; keep the default `false`
|
|
259
|
+
for explicit media refreshes and other workflows that require complete media.
|
|
260
|
+
|
|
216
261
|
When the Gate bundle contains a qualified terminal capture, the render job
|
|
217
262
|
passes it read-only to the immutable renderer. The renderer manifest binds the
|
|
218
263
|
capture root and terminal-state-machine version, but raw capture bytes remain
|
|
219
264
|
in the Gate bundle rather than being copied into the public media bundle.
|
|
265
|
+
Missing, malformed, out-of-bounds, non-full-frame, rendition-mismatched, or
|
|
266
|
+
internally drifted composition evidence fails before media finalization.
|
|
220
267
|
|
|
221
268
|
## Media Qualification Profiles
|
|
222
269
|
|
|
@@ -225,13 +272,13 @@ The single machine-readable source is
|
|
|
225
272
|
profile through `media-profile`; they cannot pass ffmpeg commands, codec flags,
|
|
226
273
|
shell fragments, arbitrary profile paths, or transcoding instructions.
|
|
227
274
|
|
|
228
|
-
| Profile
|
|
229
|
-
|
|
|
230
|
-
| `archive-v1`
|
|
231
|
-
| `web-delivery-v1`
|
|
232
|
-
| `responsive-web-delivery-v1`
|
|
233
|
-
| `responsive-long-form-web-delivery-v1` | Extends the responsive profile for explicitly admitted long-form scenes. Its measured-baseline multipliers raise only the GIF ceiling to 8 MiB and the four video ceilings to 4 MiB; all codec, native-resolution, no-audio, duration, and authority checks remain unchanged.
|
|
234
|
-
| `site-hero-v1`
|
|
275
|
+
| Profile | Meaning |
|
|
276
|
+
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
277
|
+
| `archive-v1` | Default compatibility contract. Retains the exact renderer outputs and classifies GIF as README compatibility evidence without making a browser-delivery claim. |
|
|
278
|
+
| `web-delivery-v1` | Independently qualifies H.264 MP4 and VP9 WebM playback sources, forbids audio, requires exact scene dimensions and bounded duration/frame-rate drift, checks per-rendition byte ceilings, and proves MP4 `moov` precedes `mdat`. PNG remains the lossless evidence poster. |
|
|
279
|
+
| `responsive-web-delivery-v1` | Extends `web-delivery-v1` with exact 1280x720 H.264 MP4 and VP9 WebM responsive sources plus a 1280x720 README GIF while keeping the primary MP4/WebM and evidence poster at the source scene dimensions. Every declared downscale must preserve the scene aspect ratio and may never upscale. |
|
|
280
|
+
| `responsive-long-form-web-delivery-v1` | Extends the responsive profile for explicitly admitted long-form scenes. Its measured-baseline multipliers raise only the GIF ceiling to 8 MiB and the four video ceilings to 4 MiB; all codec, native-resolution, no-audio, duration, and authority checks remain unchanged. |
|
|
281
|
+
| `site-hero-v1` | Extends `web-delivery-v1` and additionally requires a qualified WebP browser poster. The current Build Images v1 renderer does not emit that member, so selecting this profile fails closed until the producer adds it. |
|
|
235
282
|
|
|
236
283
|
For web-delivery profiles, Buildchain runs its own fixed `ffprobe` invocation
|
|
237
284
|
inside the same immutable, network-disabled renderer image. That command is
|
|
@@ -210,21 +210,25 @@ Each stack owns a stack-scoped reaper log group, so an independent retained
|
|
|
210
210
|
one-shot campaign stack can be created without colliding with another
|
|
211
211
|
campaign's audit log resource.
|
|
212
212
|
|
|
213
|
-
The
|
|
213
|
+
The account-native AWS Budget is defense in depth, not the authoritative launch
|
|
214
214
|
gate. It is owned by the singleton
|
|
215
215
|
`kungfu-buildchain-windows-jit-budget-guard` stack rather than any retained
|
|
216
216
|
campaign stack. This prevents Budget-name collisions and prevents a stale
|
|
217
217
|
campaign reaper from becoming the provider-wide cost authority. The Budget
|
|
218
|
-
filters exactly `
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
218
|
+
filters exactly `USAGE_TYPE=BoxUsage:c7i.4xlarge`,
|
|
219
|
+
`OPERATION=RunInstances:0002` (Windows), and `REGION=us-east-1`; its 80% and
|
|
220
|
+
95% actual notifications persist the provider kill sentinel, terminate every
|
|
221
|
+
tagged Windows JIT instance, and delete scoped JIT parameters. Every launch
|
|
222
|
+
controller refuses to proceed when the sentinel exists or when the Budget
|
|
223
|
+
identity or dimension filter does not match.
|
|
224
|
+
|
|
225
|
+
Budget installation is intentionally deployable by the workload account without
|
|
226
|
+
AWS Organizations management-account access. It fails closed unless Cost
|
|
227
|
+
Explorer exposes all three AWS-owned billing dimensions in the requested phase
|
|
228
|
+
window. The `kungfu:provider=windows-ec2-jit` resource tag remains mandatory for
|
|
229
|
+
ownership, cleanup, and IAM scoping, but it is not a billing filter. Do not
|
|
230
|
+
create an unfiltered fallback Budget or treat an incomplete dimension readback
|
|
231
|
+
as evidence.
|
|
228
232
|
The DynamoDB campaign reservation remains the atomic launch authority because
|
|
229
233
|
Cost Explorer and AWS Budgets can lag provider activity.
|
|
230
234
|
|
|
@@ -250,12 +254,12 @@ The modes are deliberately separated:
|
|
|
250
254
|
provider kill sentinel, campaign stack, and zero EC2/EBS/SSM/JIT/runner
|
|
251
255
|
residue.
|
|
252
256
|
- `install-budget --execute` deploys or updates only the singleton Budget guard.
|
|
253
|
-
It refuses to mutate unless
|
|
254
|
-
workflow is disabled, and the account, campaign, source, Budget,
|
|
255
|
-
digest confirmations match.
|
|
257
|
+
It refuses to mutate unless all exact Windows billing dimensions are visible,
|
|
258
|
+
the Windows workflow is disabled, and the account, campaign, source, Budget,
|
|
259
|
+
and plan digest confirmations match.
|
|
256
260
|
- `prepare --execute` requires the installed Budget guard, absent kill
|
|
257
|
-
sentinel, fresh Cost Explorer readback filtered by
|
|
258
|
-
`
|
|
261
|
+
sentinel, fresh Cost Explorer readback filtered by `BoxUsage:c7i.4xlarge`,
|
|
262
|
+
`RunInstances:0002`, and `us-east-1`, zero residue, a
|
|
259
263
|
never-used campaign stack name, and the disabled workflow. The receipt binds
|
|
260
264
|
the query timestamp and exact filter identity. Preparation deploys the
|
|
261
265
|
campaign stack and atomically arms the ledger with that provider-spend
|
|
@@ -310,9 +314,9 @@ clear or re-arm operation.
|
|
|
310
314
|
Every `scripts/aws-windows-jit-controller.mjs --execute` call must provide the
|
|
311
315
|
same `--account-id`, `--campaign-id`, `--confirm-campaign-id`, `--state-table`,
|
|
312
316
|
and `--confirm-state-table`. Before GitHub JIT material is created, the
|
|
313
|
-
controller verifies the exact provider Budget/
|
|
314
|
-
Budget kill sentinel absent. After the GitHub, AMI, active-instance,
|
|
315
|
-
EC2 DryRun checks pass, the controller
|
|
317
|
+
controller verifies the exact provider Budget/dimension filter and proves the
|
|
318
|
+
global Budget kill sentinel absent. After the GitHub, AMI, active-instance,
|
|
319
|
+
SSM, and EC2 DryRun checks pass, the controller
|
|
316
320
|
atomically reserves one run. Duplicate run-attempt-qualification identities,
|
|
317
321
|
source mismatch, expiry, `KILLED`, the sixth accepted instance, or a
|
|
318
322
|
reservation that would exceed the USD 110 ceiling after combining the persisted
|
package/docs/cli-reference.md
CHANGED
|
@@ -223,6 +223,160 @@ buildchain dev
|
|
|
223
223
|
buildchain dev merge-queue --repository <owner/repo> --branch <dev/vN/vN.M> [--from-config | --workflow <required-workflow.yml>...] [--cwd <dir>] [--check-response-timeout-minutes <n>] [--max-entries-to-build <n>] [--apply]
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
+
### `buildchain dev pr-admit`
|
|
227
|
+
|
|
228
|
+
- Help: `buildchain dev pr-admit --help`
|
|
229
|
+
- Canonical id: `dev`
|
|
230
|
+
- Options: `--branch`, `--execute`, `--expected-head`, `--json`, `--output`, `--pull-request`, `--repository`
|
|
231
|
+
- Syntax:
|
|
232
|
+
|
|
233
|
+
```text
|
|
234
|
+
buildchain dev pr-admit --repository <owner/repo> --branch <dev/vN/vN.M> --pull-request <n> --expected-head <sha> [--execute] [--output <file>] [--json]
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### `buildchain dev proof classify`
|
|
238
|
+
|
|
239
|
+
- Help: `buildchain dev proof classify --help`
|
|
240
|
+
- Canonical id: `dev`
|
|
241
|
+
- Options: `--json`, `--output`
|
|
242
|
+
- Syntax:
|
|
243
|
+
|
|
244
|
+
```text
|
|
245
|
+
buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### `buildchain dev proof integration`
|
|
249
|
+
|
|
250
|
+
- Help: `buildchain dev proof integration --help`
|
|
251
|
+
- Canonical id: `dev`
|
|
252
|
+
- Options: `--json`, `--output`
|
|
253
|
+
- Syntax:
|
|
254
|
+
|
|
255
|
+
```text
|
|
256
|
+
buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### `buildchain dev proof replay`
|
|
260
|
+
|
|
261
|
+
- Help: `buildchain dev proof replay --help`
|
|
262
|
+
- Canonical id: `dev`
|
|
263
|
+
- Options: `--json`, `--output`
|
|
264
|
+
- Syntax:
|
|
265
|
+
|
|
266
|
+
```text
|
|
267
|
+
buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### `buildchain dev proof source`
|
|
271
|
+
|
|
272
|
+
- Help: `buildchain dev proof source --help`
|
|
273
|
+
- Canonical id: `dev`
|
|
274
|
+
- Options: `--json`, `--output`
|
|
275
|
+
- Syntax:
|
|
276
|
+
|
|
277
|
+
```text
|
|
278
|
+
buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### `buildchain dev proof verify-integration`
|
|
282
|
+
|
|
283
|
+
- Help: `buildchain dev proof verify-integration --help`
|
|
284
|
+
- Canonical id: `dev`
|
|
285
|
+
- Options: `--json`, `--output`
|
|
286
|
+
- Syntax:
|
|
287
|
+
|
|
288
|
+
```text
|
|
289
|
+
buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### `buildchain dev proof verify-source`
|
|
293
|
+
|
|
294
|
+
- Help: `buildchain dev proof verify-source --help`
|
|
295
|
+
- Canonical id: `dev`
|
|
296
|
+
- Options: `--json`, `--output`
|
|
297
|
+
- Syntax:
|
|
298
|
+
|
|
299
|
+
```text
|
|
300
|
+
buildchain dev proof <source|verify-source|classify|replay|integration|verify-integration> [--output <file>] [--json]
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### `buildchain dev warrant cancel-queued`
|
|
304
|
+
|
|
305
|
+
- Help: `buildchain dev warrant cancel-queued --help`
|
|
306
|
+
- Canonical id: `dev`
|
|
307
|
+
- Options: `--branch`, `--execute`, `--json`, `--output`, `--repository`
|
|
308
|
+
- Syntax:
|
|
309
|
+
|
|
310
|
+
```text
|
|
311
|
+
buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### `buildchain dev warrant close`
|
|
315
|
+
|
|
316
|
+
- Help: `buildchain dev warrant close --help`
|
|
317
|
+
- Canonical id: `dev`
|
|
318
|
+
- Options: `--branch`, `--execute`, `--json`, `--output`, `--repository`
|
|
319
|
+
- Syntax:
|
|
320
|
+
|
|
321
|
+
```text
|
|
322
|
+
buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### `buildchain dev warrant heartbeat`
|
|
326
|
+
|
|
327
|
+
- Help: `buildchain dev warrant heartbeat --help`
|
|
328
|
+
- Canonical id: `dev`
|
|
329
|
+
- Options: `--branch`, `--execute`, `--json`, `--output`, `--repository`
|
|
330
|
+
- Syntax:
|
|
331
|
+
|
|
332
|
+
```text
|
|
333
|
+
buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### `buildchain dev warrant observe`
|
|
337
|
+
|
|
338
|
+
- Help: `buildchain dev warrant observe --help`
|
|
339
|
+
- Canonical id: `dev`
|
|
340
|
+
- Options: `--branch`, `--execute`, `--json`, `--output`, `--repository`
|
|
341
|
+
- Syntax:
|
|
342
|
+
|
|
343
|
+
```text
|
|
344
|
+
buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### `buildchain dev warrant recover`
|
|
348
|
+
|
|
349
|
+
- Help: `buildchain dev warrant recover --help`
|
|
350
|
+
- Canonical id: `dev`
|
|
351
|
+
- Options: `--branch`, `--execute`, `--json`, `--output`, `--repository`
|
|
352
|
+
- Syntax:
|
|
353
|
+
|
|
354
|
+
```text
|
|
355
|
+
buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### `buildchain dev warrant select`
|
|
359
|
+
|
|
360
|
+
- Help: `buildchain dev warrant select --help`
|
|
361
|
+
- Canonical id: `dev`
|
|
362
|
+
- Options: `--branch`, `--execute`, `--json`, `--output`, `--repository`
|
|
363
|
+
- Syntax:
|
|
364
|
+
|
|
365
|
+
```text
|
|
366
|
+
buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### `buildchain dev warrant submit`
|
|
370
|
+
|
|
371
|
+
- Help: `buildchain dev warrant submit --help`
|
|
372
|
+
- Canonical id: `dev`
|
|
373
|
+
- Options: `--branch`, `--execute`, `--json`, `--output`, `--repository`
|
|
374
|
+
- Syntax:
|
|
375
|
+
|
|
376
|
+
```text
|
|
377
|
+
buildchain dev warrant <submit|select|heartbeat|recover|close|cancel-queued|observe> --repository <owner/repo> --branch <dev/vN/vN.M> [--execute] [--output <file>] [--json]
|
|
378
|
+
```
|
|
379
|
+
|
|
226
380
|
## `diagnostics`
|
|
227
381
|
|
|
228
382
|
### `buildchain diagnostics`
|
|
@@ -8,12 +8,12 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: self-reviewed
|
|
11
|
-
last_reviewed: 2026-08-
|
|
11
|
+
last_reviewed: 2026-08-04
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-
|
|
16
|
-
visible_context: Existing Buildchain source locks, Kungfu exact-source Alpha preflight, Dev Patrol, protected auto-merge policy, repository release governance, and the consumer-owned settlement renderer threat model.
|
|
15
|
+
generated_at: 2026-08-04
|
|
16
|
+
visible_context: Existing Buildchain source locks, Kungfu exact-source Alpha preflight, Dev Patrol, cancelled duplicate runs, protected auto-merge policy, repository release governance, and the consumer-owned settlement renderer threat model.
|
|
17
17
|
invisible_context_boundary: No credentials, private logs, or private configuration were used.
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -27,8 +27,10 @@ bounded development history from newest to oldest (stopping early at the Alpha
|
|
|
27
27
|
head), and selects the newest commit that satisfies all of these conditions:
|
|
28
28
|
|
|
29
29
|
- the source is strictly ahead of the recorded target head;
|
|
30
|
-
- the latest completed Dev Patrol for that exact commit SHA
|
|
31
|
-
|
|
30
|
+
- the latest completed, non-cancelled Dev Patrol for that exact commit SHA
|
|
31
|
+
succeeded;
|
|
32
|
+
- the latest completed, non-cancelled Alpha preflight for the same commit SHA
|
|
33
|
+
succeeded; and
|
|
32
34
|
- both runs are within the caller's evidence age limit.
|
|
33
35
|
|
|
34
36
|
The selected commit can be behind the observed development head when newer
|
|
@@ -37,6 +39,12 @@ head, selected SHA, and count of skipped newer commits. This makes a slow native
|
|
|
37
39
|
verification lane live under continuous development without silently treating
|
|
38
40
|
an unqualified head as releasable.
|
|
39
41
|
|
|
42
|
+
A cancelled workflow run carries no qualification verdict, so a newer
|
|
43
|
+
cancelled duplicate does not erase the prior completed verdict for the same
|
|
44
|
+
workflow and source SHA. Other non-success conclusions remain authoritative:
|
|
45
|
+
a newer failed, timed-out, skipped, or otherwise non-successful completed run
|
|
46
|
+
still excludes that SHA and forces the controller to fall back or fail closed.
|
|
47
|
+
|
|
40
48
|
History discovery is bounded to the newest 1000 development commits. The
|
|
41
49
|
controller then compares the selected SHA to the exact Alpha head before it can
|
|
42
50
|
be eligible, so a bounded scan cannot turn a commit outside the promotion
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: draft
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: dev-delivery-warrant
|
|
5
|
+
doc_type: technical-reference
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-08-05
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-08-04
|
|
16
|
+
invisible_context: not asserted
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Dev Delivery Warrant Queue
|
|
20
|
+
|
|
21
|
+
Buildchain's Dev Delivery Warrant Queue gives a qualified slow pull request a
|
|
22
|
+
durable, non-preemptive delivery turn without replacing GitHub Merge Queue as
|
|
23
|
+
the final protected-ref authority.
|
|
24
|
+
|
|
25
|
+
The queue is stored on a dedicated Git ref below
|
|
26
|
+
`buildchain/dev-delivery-warrant/`. Every update creates a child Git commit and
|
|
27
|
+
advances the ref without force. The transition receipt binds the expected old
|
|
28
|
+
state root; a competing controller receives a visible non-fast-forward failure
|
|
29
|
+
instead of a second authority claim.
|
|
30
|
+
|
|
31
|
+
## Contract
|
|
32
|
+
|
|
33
|
+
A submission binds the repository, protected dev line, pull request, semantic
|
|
34
|
+
source identity, exact source head, native Assignment and Initiative roots,
|
|
35
|
+
source patch or tree intent, reusable Source Qualification Proof, plan,
|
|
36
|
+
affected closure, dependencies, toolchain, delivery class, priority, attempts,
|
|
37
|
+
and retained enqueue time.
|
|
38
|
+
|
|
39
|
+
Selection is deterministic FIFO plus aging with bounded priority. Priority may
|
|
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.
|
|
45
|
+
|
|
46
|
+
A terminal event may cancel a candidate before selection without minting a
|
|
47
|
+
Warrant. This transition is limited to an exact non-active queued candidate and
|
|
48
|
+
binds its candidate root, pull request, recorded source head, event-observed
|
|
49
|
+
source head, terminal event action, evidence root, and expected-old queue root.
|
|
50
|
+
An active candidate still requires its current fencing token and lease
|
|
51
|
+
generation. Exact duplicate cancellation evidence is a visible no-op; identity,
|
|
52
|
+
state, event, or evidence drift fails closed.
|
|
53
|
+
|
|
54
|
+
The reusable terminal controller uses one `settle` operation for active,
|
|
55
|
+
queued, already-terminal, and never-admitted pull requests. An active Warrant
|
|
56
|
+
still requires its exact fence and evidence. A matching queued cancellation is
|
|
57
|
+
persisted normally. A duplicate terminal event or a pull request that never
|
|
58
|
+
entered Warrant authority returns a rooted explicit no-op instead of failing
|
|
59
|
+
the workflow or inventing queue state.
|
|
60
|
+
|
|
61
|
+
The supported priority classes are `ordinary`, `expedited`, and `emergency`.
|
|
62
|
+
The queue does not infer an emergency: callers must choose it explicitly under
|
|
63
|
+
their reviewed policy. Delivery classes are `non-native-fast`,
|
|
64
|
+
`native-proof-required`, `cross-platform`, and `release`.
|
|
65
|
+
|
|
66
|
+
## Split proof authority
|
|
67
|
+
|
|
68
|
+
Source Qualification Proof is independent of the moving dev base. It binds the
|
|
69
|
+
semantic source, exact source head and patch/tree intent, plan, affected
|
|
70
|
+
closure, dependencies, toolchain, covered paths, and shard evidence.
|
|
71
|
+
|
|
72
|
+
Before reuse, the consumer classifies the dev delta:
|
|
73
|
+
|
|
74
|
+
- unchanged roots plus an unrelated attributed delta reuse source
|
|
75
|
+
qualification and run only a cheap Project Cut replay. GitHub's `behind`
|
|
76
|
+
state is accepted only when a rooted replay proof binds the exact current
|
|
77
|
+
protected base, unchanged PR head and source patch, replay tree, required
|
|
78
|
+
context roots, and a qualified `project.cut.merge-queue-admission/v1`
|
|
79
|
+
receipt;
|
|
80
|
+
- an overlapping delta reruns the affected source shards;
|
|
81
|
+
- an unknown graph or changed source, plan, closure, dependency, or toolchain
|
|
82
|
+
root fails closed to full source qualification.
|
|
83
|
+
|
|
84
|
+
Integration Delivery Proof is separate and cannot be cached across candidates.
|
|
85
|
+
It binds the exact current dev base, replay tree, GitHub `merge_group` head and
|
|
86
|
+
tree, active Warrant fencing generation, Source Qualification Proof root, and
|
|
87
|
+
final required-context roots. GitHub's exact merge-group checks remain the
|
|
88
|
+
final integration authority.
|
|
89
|
+
|
|
90
|
+
## CLI
|
|
91
|
+
|
|
92
|
+
Queue commands are dry-run by default:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
buildchain dev warrant submit --repository owner/repository \
|
|
96
|
+
--branch dev/v4/v4.0 --pull-request 123 --source-head <sha> \
|
|
97
|
+
--assignment-root <root> --initiative-root <root> \
|
|
98
|
+
--source-identity-root <root> --source-patch-root <root> \
|
|
99
|
+
--source-proof-root <root> --plan-root <root> --closure-root <root> \
|
|
100
|
+
--dependency-root <root> --toolchain-root <root> \
|
|
101
|
+
--delivery-class native-proof-required
|
|
102
|
+
|
|
103
|
+
buildchain dev warrant select --repository owner/repository \
|
|
104
|
+
--branch dev/v4/v4.0 --execute
|
|
105
|
+
|
|
106
|
+
buildchain dev warrant cancel-queued --repository owner/repository \
|
|
107
|
+
--branch dev/v4/v4.0 --candidate-id <root> --pull-request 123 \
|
|
108
|
+
--expected-source-head <queued-sha> --observed-source-head <event-sha> \
|
|
109
|
+
--expected-old <queue-root> --event-action closed --outcome cancelled \
|
|
110
|
+
--evidence-root <terminal-event-root> --execute
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`heartbeat`, `recover`, `close`, `settle`, `cancel-queued`, and `observe` use the same durable authority.
|
|
114
|
+
Warrant-scoped mutations require the exact fencing token and lease generation.
|
|
115
|
+
`close` also requires a rooted terminal evidence object.
|
|
116
|
+
|
|
117
|
+
Proof commands create, verify, classify, and compose the two proof layers:
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
buildchain dev proof source ...
|
|
121
|
+
buildchain dev proof classify --source-proof source-proof.json ...
|
|
122
|
+
buildchain dev proof replay ...
|
|
123
|
+
buildchain dev proof replay-proof \
|
|
124
|
+
--qualification-receipt project-cut-admission.json ...
|
|
125
|
+
buildchain dev proof integration --warrant-result warrant.json ...
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Workflow rollout and rollback
|
|
129
|
+
|
|
130
|
+
The reusable `dev-pr-auto-merge.yml` supports three explicit rollout modes:
|
|
131
|
+
|
|
132
|
+
- `off` preserves the previous exact-head admission controller;
|
|
133
|
+
- `shadow` qualifies the source and emits a read-only queue submission plan;
|
|
134
|
+
- `required` persists the submission, selects the Warrant, and refuses GitHub
|
|
135
|
+
enqueue unless the immutable queue commit, state root, active Warrant, and
|
|
136
|
+
selected candidate all pass exact readback validation.
|
|
137
|
+
|
|
138
|
+
Consumers should deploy `shadow` first, inspect receipts, then change their
|
|
139
|
+
protected caller to `required`. Rollback is a reviewed caller change back to
|
|
140
|
+
`off`; it does not delete queue history or reinterpret old receipts. The
|
|
141
|
+
terminal reusable workflow creates the exact Integration Delivery Proof for a
|
|
142
|
+
merged candidate (or accepts explicit evidence for another terminal outcome),
|
|
143
|
+
then closes only the current fencing generation. The separate queued
|
|
144
|
+
cancellation reusable workflow cannot close an active generation; it advances
|
|
145
|
+
the state ref only when the caller's complete terminal binding and expected-old
|
|
146
|
+
root still match.
|
|
147
|
+
|
|
148
|
+
Buildchain uses the same contract for its own protected dev line through
|
|
149
|
+
`buildchain-dev-delivery.yml`. The manual caller requires the exact PR head and
|
|
150
|
+
all native/source proof roots, pins the runtime to the caller commit, selects
|
|
151
|
+
`delivery-warrant-mode: required`, and targets GitHub Merge Queue. It does not
|
|
152
|
+
offer an `off` switch: rollback is a reviewed change to this caller, not an
|
|
153
|
+
operator-time weakening of a specific delivery attempt.
|
|
154
|
+
|
|
155
|
+
This mechanism schedules protected delivery only. It does not serialize local
|
|
156
|
+
development, source-only checks, unrelated channels, release publication, or
|
|
157
|
+
runner provisioning. It never grants authority to enable cloud runner
|
|
158
|
+
campaigns.
|