@kungfu-tech/buildchain 3.0.5 → 3.0.6-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 (83) hide show
  1. package/README.md +31 -0
  2. package/actions/macos-credential-island/README.md +8 -0
  3. package/bin/buildchain.mjs +1 -1
  4. package/contracts/auditable-demo-media-profiles-v1.json +61 -0
  5. package/contracts/auditable-demo-scenario-v1.schema.json +164 -0
  6. package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +3 -3
  7. package/contracts/evidence/auditable-demo-web-delivery-v1.json +3 -3
  8. package/dist/site/buildchain-contract.json +107 -26
  9. package/dist/site/buildchain-site.json +121 -49
  10. package/dist/site/capability-registry.json +3 -3
  11. package/dist/site/cli-registry.json +9 -3
  12. package/dist/site/controller-registry.json +27 -3
  13. package/dist/site/kfd-claims.json +101 -15
  14. package/dist/site/kfd-upstream-aggregate.json +1 -1
  15. package/dist/site/manual-registry.json +10 -9
  16. package/dist/site/node-api-registry.json +540 -31
  17. package/dist/site/page-registry.json +105 -29
  18. package/dist/site/public-surface-audit.json +184 -11
  19. package/dist/site/publication-authority-registry.json +62 -1
  20. package/dist/site/publication-registry.json +4 -4
  21. package/dist/site/site-manifest.json +13 -13
  22. package/dist/site/workflow-registry.json +118 -4
  23. package/docs/MAP.md +4 -1
  24. package/docs/auditable-demo.md +90 -7
  25. package/docs/aws-us-elastic-runner-burst-plane.md +151 -16
  26. package/docs/cli-reference.md +35 -2
  27. package/docs/dev-alpha-candidate-patrol.md +14 -5
  28. package/docs/dev-qualification-patrol.md +108 -0
  29. package/docs/node-api-reference.md +123 -72
  30. package/docs/publish-transaction.md +7 -5
  31. package/docs/release-flow.md +4 -0
  32. package/docs/release-governance.md +39 -0
  33. package/docs/release-propagation.md +93 -0
  34. package/docs/reusable-build-surface.md +53 -12
  35. package/docs/stable-candidate-patrol.md +5 -2
  36. package/package.json +1 -1
  37. package/packages/core/buildchain-contract.js +36 -1
  38. package/packages/core/buildchain-publication-authority.js +3 -0
  39. package/packages/core/public-surface-audit.js +4 -35
  40. package/packages/core/release-propagation-agent-entry.js +185 -0
  41. package/packages/core/release-propagation-pickup.js +387 -0
  42. package/packages/core/release-propagation-push.js +293 -0
  43. package/packages/core/release-propagation-release.js +61 -18
  44. package/packages/core/release-propagation-stage-evidence.js +36 -0
  45. package/packages/core/release-propagation-work.js +8 -4
  46. package/packages/core/release-propagation.js +27 -2
  47. package/packages/core/workflow-call-contract.js +308 -0
  48. package/packages/core/workflow-yaml-contract.js +272 -0
  49. package/scripts/artifact-signing-controller-core.mjs +525 -0
  50. package/scripts/artifact-signing-controller.mjs +302 -0
  51. package/scripts/artifact-signing-delegation.mjs +51 -3
  52. package/scripts/auditable-demo-platform.mjs +564 -0
  53. package/scripts/auditable-demo-renditions.mjs +7 -2
  54. package/scripts/auditable-demo-transport-smoke.mjs +176 -0
  55. package/scripts/auditable-demo.mjs +27 -21
  56. package/scripts/aws-macos-jit-controller-core.mjs +389 -0
  57. package/scripts/aws-macos-jit-controller-runtime.mjs +82 -0
  58. package/scripts/aws-macos-jit-controller.mjs +558 -0
  59. package/scripts/aws-macos-jit-job-controller.mjs +401 -0
  60. package/scripts/aws-windows-jit-campaign-core.mjs +296 -0
  61. package/scripts/aws-windows-jit-campaign.mjs +202 -0
  62. package/scripts/aws-windows-jit-controller-core.mjs +20 -2
  63. package/scripts/aws-windows-jit-controller.mjs +184 -109
  64. package/scripts/aws-windows-jit-core.mjs +21 -3
  65. package/scripts/aws-windows-jit.mjs +2 -0
  66. package/scripts/build-standalone-binary.mjs +6 -0
  67. package/scripts/buildchain-cli-help.mjs +2 -1
  68. package/scripts/capture-package-release-propagation.mjs +24 -1
  69. package/scripts/check-inventory.mjs +6 -0
  70. package/scripts/compiler-cache-evidence.mjs +90 -7
  71. package/scripts/dev-alpha-candidate-patrol.mjs +80 -5
  72. package/scripts/dev-pr-auto-merge.mjs +4 -4
  73. package/scripts/dev-qualification-patrol.mjs +594 -0
  74. package/scripts/dispatch-artifact-signing-authority.mjs +312 -61
  75. package/scripts/finalize-native-artifact-signing-result.mjs +37 -15
  76. package/scripts/generate-site-bundle.mjs +5 -0
  77. package/scripts/inspect-artifact-signing-requests.mjs +12 -0
  78. package/scripts/locked-source-checkout.mjs +17 -3
  79. package/scripts/release-propagation.mjs +150 -2
  80. package/scripts/run-lifecycle-core.mjs +25 -0
  81. package/scripts/site-capability-metadata.mjs +1 -1
  82. package/scripts/stable-candidate-patrol.mjs +30 -4
  83. package/scripts/workflow-call-contract.mjs +133 -0
@@ -126,6 +126,7 @@
126
126
  "checkout-cache-mode",
127
127
  "checkout-cache-reference-repository-template",
128
128
  "checkout-cache-timeout-seconds",
129
+ "checkout-history-mode",
129
130
  "compiler-cache-platforms-json",
130
131
  "compiler-cache-provider",
131
132
  "compiler-cache-required",
@@ -147,6 +148,8 @@
147
148
  "linux-container-preset",
148
149
  "node-version",
149
150
  "platforms-json",
151
+ "pre-upload-transport-smoke-artifact-root",
152
+ "pre-upload-transport-smoke-scenario-path",
150
153
  "process-sample-interval-ms",
151
154
  "process-summary-path",
152
155
  "publish-anchor-request-json",
@@ -175,7 +178,7 @@
175
178
  "verify-command",
176
179
  "working-directory"
177
180
  ],
178
- "inputCount": 82,
181
+ "inputCount": 85,
179
182
  "secrets": [
180
183
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
181
184
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -268,6 +271,48 @@
268
271
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
269
272
  "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
270
273
  },
274
+ {
275
+ "id": ".declarative-auditable-demo",
276
+ "path": ".github/workflows/.declarative-auditable-demo.yml",
277
+ "reusable": true,
278
+ "inputs": [
279
+ "artifact-retention-days",
280
+ "binary-artifact-digest",
281
+ "binary-artifact-name",
282
+ "buildchain-repository",
283
+ "materialize",
284
+ "materialize-base-ref",
285
+ "media-profile",
286
+ "render-media",
287
+ "renderer-image",
288
+ "scenario-path",
289
+ "source-ref"
290
+ ],
291
+ "inputCount": 11,
292
+ "secrets": [
293
+ "DEMO_UPDATE_TOKEN"
294
+ ],
295
+ "secretCount": 1,
296
+ "outputs": [
297
+ "capture-artifact-digest",
298
+ "capture-artifact-name",
299
+ "evidence-artifact-digest",
300
+ "evidence-artifact-name",
301
+ "publication-pr-url",
302
+ "source-sha"
303
+ ],
304
+ "outputCount": 6,
305
+ "surface": "declarative-auditable-demo",
306
+ "capabilityGroup": "api-cli-reference",
307
+ "status": "preview",
308
+ "owner": "buildchain-workflows",
309
+ "maturity": "preview",
310
+ "introducedVersion": "pre-3.0.2-alpha.4",
311
+ "compatibilityPromise": "preserved-through-the-v3-major-line",
312
+ "deprecationReplacement": "",
313
+ "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
314
+ "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
315
+ },
271
316
  {
272
317
  "id": ".gate-profile",
273
318
  "path": ".github/workflows/.gate-profile.yml",
@@ -1050,6 +1095,27 @@
1050
1095
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
1051
1096
  "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
1052
1097
  },
1098
+ {
1099
+ "id": "auditable-demo",
1100
+ "path": ".github/workflows/auditable-demo.yml",
1101
+ "reusable": false,
1102
+ "inputs": [],
1103
+ "inputCount": 0,
1104
+ "secrets": [],
1105
+ "secretCount": 0,
1106
+ "outputs": [],
1107
+ "outputCount": 0,
1108
+ "surface": "repository-workflow",
1109
+ "capabilityGroup": "api-cli-reference",
1110
+ "status": "active",
1111
+ "owner": "buildchain-workflows",
1112
+ "maturity": "active",
1113
+ "introducedVersion": "pre-3.0.2-alpha.4",
1114
+ "compatibilityPromise": "preserved-through-the-v3-major-line",
1115
+ "deprecationReplacement": "",
1116
+ "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
1117
+ "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
1118
+ },
1053
1119
  {
1054
1120
  "id": "binary-distribution",
1055
1121
  "path": ".github/workflows/binary-distribution.yml",
@@ -1155,6 +1221,7 @@
1155
1221
  "checkout-cache-mode",
1156
1222
  "checkout-cache-reference-repository-template",
1157
1223
  "checkout-cache-timeout-seconds",
1224
+ "checkout-history-mode",
1158
1225
  "compiler-cache-platforms-json",
1159
1226
  "compiler-cache-provider",
1160
1227
  "compiler-cache-required",
@@ -1176,6 +1243,8 @@
1176
1243
  "linux-container-preset",
1177
1244
  "node-version",
1178
1245
  "platforms-json",
1246
+ "pre-upload-transport-smoke-artifact-root",
1247
+ "pre-upload-transport-smoke-scenario-path",
1179
1248
  "process-sample-interval-ms",
1180
1249
  "process-summary-path",
1181
1250
  "publish-anchor-request-json",
@@ -1204,7 +1273,7 @@
1204
1273
  "verify-command",
1205
1274
  "working-directory"
1206
1275
  ],
1207
- "inputCount": 85,
1276
+ "inputCount": 88,
1208
1277
  "secrets": [
1209
1278
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
1210
1279
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -1534,12 +1603,14 @@
1534
1603
  "reusable": true,
1535
1604
  "inputs": [
1536
1605
  "alpha-workflow-path",
1606
+ "auto-merge",
1537
1607
  "buildchain-ref",
1538
1608
  "buildchain-repository",
1539
1609
  "create-pull-request",
1540
1610
  "dev-workflow-path",
1541
1611
  "dry-run",
1542
1612
  "max-age-seconds",
1613
+ "merge-method",
1543
1614
  "pull-request-body-prefix",
1544
1615
  "pull-request-body-prefix-renderer",
1545
1616
  "reactivation-authorized",
@@ -1547,7 +1618,7 @@
1547
1618
  "source-branch",
1548
1619
  "target-branch"
1549
1620
  ],
1550
- "inputCount": 13,
1621
+ "inputCount": 15,
1551
1622
  "secrets": [
1552
1623
  "promotion-token"
1553
1624
  ],
@@ -1641,6 +1712,48 @@
1641
1712
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
1642
1713
  "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
1643
1714
  },
1715
+ {
1716
+ "id": "dev-qualification-patrol",
1717
+ "path": ".github/workflows/dev-qualification-patrol.yml",
1718
+ "reusable": true,
1719
+ "inputs": [
1720
+ "buildchain-ref",
1721
+ "buildchain-repository",
1722
+ "dev-workflow-path",
1723
+ "dispatch-inputs-json",
1724
+ "dry-run",
1725
+ "max-attempts",
1726
+ "mutation-authorized",
1727
+ "preflight-workflow-path",
1728
+ "priority-workflows-json",
1729
+ "source-branch"
1730
+ ],
1731
+ "inputCount": 10,
1732
+ "secrets": [
1733
+ "qualification-token"
1734
+ ],
1735
+ "secretCount": 1,
1736
+ "outputs": [
1737
+ "action",
1738
+ "active-run-id",
1739
+ "decision-root",
1740
+ "pending-sha",
1741
+ "reason",
1742
+ "source-sha",
1743
+ "state"
1744
+ ],
1745
+ "outputCount": 7,
1746
+ "surface": "repository-patrol",
1747
+ "capabilityGroup": "governance-versioning",
1748
+ "status": "active",
1749
+ "owner": "buildchain-workflows",
1750
+ "maturity": "active",
1751
+ "introducedVersion": "pre-3.0.2-alpha.4",
1752
+ "compatibilityPromise": "preserved-through-the-v3-major-line",
1753
+ "deprecationReplacement": "",
1754
+ "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
1755
+ "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
1756
+ },
1644
1757
  {
1645
1758
  "id": "github-artifact-attestation",
1646
1759
  "path": ".github/workflows/github-artifact-attestation.yml",
@@ -2424,6 +2537,7 @@
2424
2537
  "hold",
2425
2538
  "hold-reason",
2426
2539
  "ledger-ref",
2540
+ "merge-method",
2427
2541
  "minimum-soak-seconds",
2428
2542
  "release-now",
2429
2543
  "required-checks",
@@ -2431,7 +2545,7 @@
2431
2545
  "revoked-versions",
2432
2546
  "target-branch"
2433
2547
  ],
2434
- "inputCount": 15,
2548
+ "inputCount": 16,
2435
2549
  "secrets": [
2436
2550
  "approval-token",
2437
2551
  "promotion-token"
package/docs/MAP.md CHANGED
@@ -84,7 +84,7 @@ workflow, action, and Node API export also carries a `capabilityGroup`,
84
84
  | Git/source/version/module/product build facts | `dist/site/node-api-registry.json`, `dist/site/cli-registry.json`, `kungfu-buildchain-module-build-facts`, `kungfu-buildchain-product-build-facts` | [`build-facts.md`](build-facts.md) |
85
85
  | GitHub Release passport/evidence publication | `dist/site/release-model.json`, `dist/site/artifact-schemas.json` | [`release-governance.md`](release-governance.md), [`release-candidate.md`](release-candidate.md) |
86
86
  | GitHub ownership, effective protection, plan capability, and managed-zone governance receipts | `dist/site/node-api-registry.json`, `dist/site/cli-registry.json`, `kungfu-buildchain-github-governance-receipt` | [`github-governance-authority.md`](github-governance-authority.md) |
87
- | release propagation for package/publication/site chains | `dist/site/release-model.json` | [`release-propagation.md`](release-propagation.md) |
87
+ | release propagation and the unified Paper/KFD/Buildchain/Core Site agent entry | `dist/site/release-model.json`, `dist/site/cli-registry.json`, `dist/site/node-api-registry.json` | [`release-propagation.md`](release-propagation.md) |
88
88
  | publication artifact manifests, immutable archive registries, source bundles, and paper repository workflows | `dist/site/publication-registry.json`, `dist/site/workflow-registry.json`, `dist/site/node-api-registry.json`, `kungfu-buildchain-publication-artifact-manifest`, `kungfu-buildchain-publication-artifact-registry` | [`publication-artifacts.md`](publication-artifacts.md) |
89
89
  | Generated badge bundles, README badge blocks, and badge facts | `dist/site/node-api-registry.json`, `dist/site/manual-registry.json`, `kungfu-buildchain-badge-bundle-facts`, `kungfu-buildchain-readme-badge-facts` | [`readme-badges.md`](readme-badges.md) |
90
90
  | Homebrew tap distribution indexes | `dist/site/node-api-registry.json`, `dist/site/buildchain-contract.json` | [`homebrew.md`](homebrew.md) |
@@ -111,6 +111,7 @@ replace them.
111
111
  | Why does Buildchain use branch-driven release governance? | [`release-governance.md`](release-governance.md) | why | stable |
112
112
  | How do protected dev branches and scheduled ready-PR merging work? | [`release-governance.md`](release-governance.md#protected-dev-branches) | use | stable |
113
113
  | How do slow required checks land reliably on a busy dev channel? | [`release-governance.md`](release-governance.md#protected-dev-branches) + [`cli.md`](cli.md#commands) | use | preview |
114
+ | How do I coalesce rapid Dev changes, preserve release runner priority, and retry only transient failed jobs? | [`dev-qualification-patrol.md`](dev-qualification-patrol.md) | use/verify | preview |
114
115
  | How do I run daily, weekly, or monthly repository patrols? | [`release-governance.md`](release-governance.md#buildchain-patrol) | use | stable |
115
116
  | How does Buildchain decide patch, minor, and major release lines? | [`versioning.md`](versioning.md) | why | stable |
116
117
  | What exact branch/tag state machine runs on alpha, release, and major gate? | [`release-flow.md`](release-flow.md) | verify | stable |
@@ -176,6 +177,8 @@ replace them.
176
177
  - **protected dev branches / scheduled ready-PR merge / daily-weekly-monthly patrol** ->
177
178
  [`release-governance.md`](release-governance.md#protected-dev-branches) and
178
179
  [`release-governance.md`](release-governance.md#buildchain-patrol).
180
+ - **Dev qualification coalescing / release-priority runners / failed-job retry** ->
181
+ [`dev-qualification-patrol.md`](dev-qualification-patrol.md).
179
182
  - **pnpm / npm / yarn / package-manager adapters** ->
180
183
  [`lifecycle-protocol.md`](lifecycle-protocol.md).
181
184
  - **pip / Conan / CMake / custom commands** -> [`lifecycle-protocol.md`](lifecycle-protocol.md)
@@ -8,11 +8,11 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: self-reviewed
11
- last_reviewed: 2026-07-31
11
+ last_reviewed: 2026-08-02
12
12
  ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
15
- generated_at: 2026-07-31
15
+ generated_at: 2026-08-02
16
16
  invisible_context_boundary: No hidden model build, parameter count, or private corpus is asserted.
17
17
  ---
18
18
 
@@ -30,6 +30,84 @@ The public reusable workflow is
30
30
  does not know how a Kungfu, library, service, or application artifact should be
31
31
  interpreted. The consumer owns a small checked-in executable adapter.
32
32
 
33
+ For standalone binary CLIs, the higher-level first-class surface is
34
+ `.github/workflows/.declarative-auditable-demo.yml`. A consumer checks in only
35
+ `.buildchain/auditable-demo.json`, builds and uploads its exact same-run binary
36
+ plus metadata, and passes the producer-owned artifact name and digest to that
37
+ workflow. Buildchain then owns capture, Gate adaptation, independent native
38
+ 1080p and 720p rendering, Release Passport construction, content-addressed
39
+ materialization, and the protected README update pull request. No
40
+ product-specific capture, adapter, passport, or materializer is required.
41
+
42
+ ## Declarative Standalone Binary Scenarios
43
+
44
+ The schema is `contracts/auditable-demo-scenario-v1.schema.json`. One scenario
45
+ can declare up to eight demos, and each demo can contain up to twelve ordered
46
+ literal argv steps. Steps in one demo share a disposable workspace; separate
47
+ demos and the two rendition captures do not. Commands are never accepted as a
48
+ shell string. An omitted or explicit `standard` duration class remains bounded
49
+ to 60 seconds. A reviewed `execution.durationClass: long-form` declaration may
50
+ raise the scenario and literal step ceilings to 180 seconds; it does not change
51
+ the default. Both classes retain 4 MiB per step, a clean Home/XDG environment,
52
+ no inherited credentials, and a network-disabled read-only container with
53
+ bounded tmpfs.
54
+
55
+ The uploaded metadata must bind the executable SHA-256, declare an empty
56
+ runtime dependency set, and provide a bounded `executableFiles` array of exact
57
+ artifact-relative paths and SHA-256 digests. GitHub Artifact transport does not
58
+ retain Unix executable modes, so Buildchain restores mode `0755` only for this
59
+ digest-verified executable closure and verifies the same closure again inside
60
+ the network-disabled capture boundary. It never recursively changes artifact
61
+ modes. This metadata controls assembly only and grants no execution,
62
+ publication, or identity authority. Capture rejects an artifact name or upload
63
+ digest that does not resolve to exactly one live artifact from the current workflow run.
64
+
65
+ Consumers may also declare one bounded, non-interactive `transportSmoke` argv
66
+ in the same scenario and opt the reusable build into
67
+ `pre-upload-transport-smoke-scenario-path`. Before any GitHub Artifact or S3
68
+ relay upload, Buildchain copies the exact distribution directory, removes Unix
69
+ execute bits to simulate transport, restores only the digest-bound executable
70
+ closure, and runs that real binary with a clean Home/XDG environment. A missing
71
+ launcher, runtime, or embedded interpreter therefore fails before the expensive
72
+ upload begins. This is a transport diagnostic with no authority grants; the
73
+ later network-disabled capture and Gate remain the qualification authority.
74
+ It retains ANSI terminal bytes with the real PTY read timestamps, verifies
75
+ declared stdout and JSON file facts, enforces the total deadline while a step is
76
+ running, and removes the disposable workspace before emitting evidence.
77
+
78
+ Both manual validation and alpha or release refreshes call the same reusable
79
+ workflow. Manual callers select Gate-only or full rendering and can explicitly
80
+ request a materialization PR. Release callers select full rendering and the
81
+ same materializer automatically; there is no separate release-only recording
82
+ implementation. Publication requires a dedicated update token and target
83
+ branch. The token is an explicit bounded capability, while actor identity,
84
+ first-party/System classification, KFD compliance, Product System metadata,
85
+ package metadata, registry history, scans, and generated evidence grant no
86
+ authority.
87
+
88
+ ```yaml
89
+ jobs:
90
+ demo:
91
+ needs: exact-binary
92
+ uses: kungfu-systems/buildchain/.github/workflows/.declarative-auditable-demo.yml@BUILDCHAIN_EXACT_SHA
93
+ with:
94
+ source-ref: ${{ github.sha }}
95
+ binary-artifact-name: ${{ needs.exact-binary.outputs.artifact-name }}
96
+ binary-artifact-digest: ${{ needs.exact-binary.outputs.artifact-digest }}
97
+ scenario-path: .buildchain/auditable-demo.json
98
+ renderer-image: ghcr.io/kungfu-systems/build-images/demo-renderer@sha256:RENDERER_DIGEST
99
+ render-media: true
100
+ media-profile: responsive-web-delivery-v1
101
+ materialize: true
102
+ materialize-base-ref: dev/v1/v1.0
103
+ secrets:
104
+ DEMO_UPDATE_TOKEN: ${{ secrets.DEMO_UPDATE_TOKEN }}
105
+ ```
106
+
107
+ Buildchain recursively consumes this surface in
108
+ `.github/workflows/auditable-demo.yml` using its own exact standalone binary
109
+ and the beginner bootstrap scenario in `.buildchain/auditable-demo.json`.
110
+
33
111
  ## Authority Boundary
34
112
 
35
113
  The retained build output is authoritative. The adapter reads that exact
@@ -42,9 +120,10 @@ scene.json
42
120
  ```
43
121
 
44
122
  It may additionally emit one declared `terminal-capture.json` using
45
- `kungfu.terminal-capture/v1`. The optional capture is bounded to 60 seconds,
123
+ `kungfu.terminal-capture/v1`. The optional capture is bounded to 60 seconds by
124
+ default or 180 seconds only when its scene explicitly declares `long-form`,
46
125
  fixed 80-200 by 24-80 terminal cells, 10,000 events, and 4 MiB of canonical
47
- base64 bytes. It must contain a passed completion sentinel and an explicitly
126
+ base64 bytes. It must contain a qualified completion sentinel and an explicitly
48
127
  empty authority-grant list. Existing three-file adapters remain valid.
49
128
 
50
129
  The completion sentinel names a consumer-owned versioned schema, the exact
@@ -151,6 +230,7 @@ shell fragments, arbitrary profile paths, or transcoding instructions.
151
230
  | `archive-v1` | Default compatibility contract. Retains the exact renderer outputs and classifies GIF as README compatibility evidence without making a browser-delivery claim. |
152
231
  | `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. |
153
232
  | `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. |
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. |
154
234
  | `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. |
155
235
 
156
236
  For web-delivery profiles, Buildchain runs its own fixed `ffprobe` invocation
@@ -185,8 +265,10 @@ Initial byte ceilings are derived from the checked-in
185
265
  `auditable-demo-web-delivery-v1` fixture rendered by Build Images
186
266
  `v1.3.0-alpha.16` at its exact source SHA and image digest. GIF, MP4, WebM, and
187
267
  PNG ceilings are the next power of two above sixteen times the measured member
188
- bytes. The not-yet-produced WebP poster uses eight times the measured lossless
189
- PNG as its conservative proxy. The path-scoped qualification workflow
268
+ bytes. The explicit responsive long-form profile derives its 4 MiB video and
269
+ 8 MiB GIF ceilings from the same observed bytes at a bounded 128-times
270
+ multiplier; it does not change another profile. The not-yet-produced WebP poster
271
+ uses eight times the measured lossless PNG as its conservative proxy. The path-scoped qualification workflow
190
272
  regenerates the content-addressed evidence and fails on any byte or fact drift.
191
273
  Its matrix retains the original 1280x720 web-delivery baseline on the renderer
192
274
  that produced it and separately measures the responsive profile against a
@@ -242,7 +324,8 @@ build should always call the reusable workflow. Selection policy changes only
242
324
 
243
325
  Use `web-delivery-v1` only when the rendered bundle is intended to become a
244
326
  qualified web-delivery source. Use `site-hero-v1` when an optimized browser
245
- poster is also required. Profile qualification does not prove browser playback,
327
+ poster is also required. Select `responsive-long-form-web-delivery-v1` only
328
+ with an explicit long-form scenario. Profile qualification does not prove browser playback,
246
329
  responsive layout, reduced-motion behavior, accessibility, or production
247
330
  deployment; those remain site responsibilities.
248
331
 
@@ -8,7 +8,12 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-07-30
11
+ last_reviewed: 2026-08-02
12
+ ai_provenance:
13
+ model_family: GPT-5
14
+ product: Codex
15
+ generated_at: 2026-08-01
16
+ invisible_information: No hidden model checkpoint, parameters, or private training data were available.
12
17
  ---
13
18
 
14
19
  # AWS US elastic runner burst plane
@@ -138,14 +143,16 @@ The source-bound evidence and deterministic phase receipt are:
138
143
 
139
144
  The Windows phase uses the explicit `aws-us-ec2-windows-jit` runner preset.
140
145
  Its caller supplies one bounded label under
141
- `aws-us-ec2-windows-jit-<qualification-id>`, and Buildchain resolves exactly
142
- one Windows x64 native lane. The reusable trust gate still runs on a
143
- GitHub-hosted runner before the JIT label can select EC2.
146
+ `aws-us-ec2-windows-jit-<campaign-id>-<qualification-id>`, and Buildchain
147
+ resolves exactly one Windows x64 native lane. The reusable trust gate still
148
+ runs on a GitHub-hosted runner before the JIT label can select EC2.
144
149
 
145
150
  The provider creates repository-level GitHub JIT configuration for
146
151
  `kungfu-systems/kungfu`. Its `labels` request must contain all four scheduling
147
152
  labels: `self-hosted`, `Windows`, `X64`, and the card-scoped
148
- `aws-us-ec2-windows-jit-<qualification-id>` label. GitHub's JIT endpoint does
153
+ `aws-us-ec2-windows-jit-<campaign-id>-<qualification-id>` label. The workflow
154
+ display title also carries both identities, allowing the launch controller to
155
+ verify the queued run against its campaign plan. GitHub's JIT endpoint does
149
156
  not infer the default OS and architecture labels when they are omitted. The
150
157
  encoded configuration is never placed in EC2 user data, a tag, a command log,
151
158
  or an artifact. The operator writes it to a card-scoped SSM SecureString under
@@ -168,21 +175,123 @@ Each runner uses:
168
175
  security-group rule, no key pair, and no warm Auto Scaling capacity.
169
176
 
170
177
  Runner diagnostics and a redacted lifecycle record are uploaded to the
171
- provider's encrypted, private evidence bucket. The runner process exits after
172
- one job, Windows shuts down, and EC2's instance-initiated shutdown behavior is
173
- set to `terminate`. A five-minute reaper terminates card-owned stopped or
178
+ provider's encrypted, private evidence bucket under the exact campaign, run,
179
+ attempt, and instance identity. The runner process exits after one job, Windows
180
+ shuts down, and EC2's instance-initiated shutdown behavior is set to
181
+ `terminate`. A five-minute reaper terminates card-owned stopped or
174
182
  three-hour-old instances and deletes only their dedicated JIT parameter.
175
183
 
176
184
  At the 2026-07-29 AWS Price List rate of USD 1.45 per Windows
177
- `c7i.4xlarge` hour, six accepted three-hour instances reserve USD 26.10. The
178
- two-instance race envelope reserves another USD 8.70, producing a USD 34.80
179
- worst case below the dedicated USD 40 budget. Budget notifications at 80% and
180
- 95% invoke the same card-scoped global kill switch.
185
+ `c7i.4xlarge` hour, each accepted instance reserves its complete three-hour
186
+ USD 4.35 fail-closed lifetime before `RunInstances`. A DynamoDB transaction
187
+ binds the exact campaign and source, creates an idempotent run ledger entry,
188
+ and atomically refuses a sixth accepted instance. Five accepted instances
189
+ therefore reserve at most USD 21.75. The campaign also persists the
190
+ operator-observed spend from earlier Windows work, and refuses to arm unless
191
+ that baseline, all five reservations, and one USD 4.35 fail-closed race
192
+ allowance remain below the USD 80 phase cap.
193
+
194
+ The campaign starts unarmed and expires within 24 hours. Its `CONTROL` record
195
+ can be created only once: a killed or expired campaign cannot be re-armed by
196
+ the campaign tool. A budget notification or any instance lifetime violation
197
+ persists `KILLED` before cleanup, so later workflow dispatches fail before a
198
+ paid launch. Reservations are never refunded: a controller crash, ambiguous
199
+ launch, or successful launch all remain charged to the campaign, favoring a
200
+ false stop over an accidental budget overrun.
201
+
202
+ Each stack owns a stack-scoped reaper log group, so an independent retained
203
+ one-shot campaign stack can be created without colliding with another
204
+ campaign's audit log resource.
205
+
206
+ The tag-filtered AWS Budget is defense in depth, not the authoritative launch
207
+ gate. It is disabled by default because a linked account cannot activate a
208
+ cost-allocation tag. Set `EnableTagFilteredBudget=true` only after the AWS
209
+ Organizations management account has activated `kungfu:provider` and a Cost
210
+ Explorer readback proves that `windows-ec2-jit` spend is visible. The DynamoDB
211
+ reservation cap remains mandatory in either mode.
212
+
213
+ Qualification requires one runner-profile smoke and three trusted exact-source
214
+ full Windows jobs all bound to the same campaign, independent cancellation and
215
+ timeout cleanup exercises, and zero repository runner, EC2 instance,
216
+ disposable volume, min capacity, and desired capacity within 15 minutes of the
217
+ final job.
218
+
219
+ ### Phase 2 campaign controller
220
+
221
+ `scripts/aws-windows-jit-campaign.mjs` is the one-shot operator boundary.
222
+ Without a mutation mode it emits the arm plan. `arm-campaign` requires the
223
+ campaign id, exact source SHA, state table, observed prior phase spend, and a
224
+ bounded one-to-five accepted-instance ceiling to be repeated as confirmations,
225
+ then creates `CONTROL` and `CAMPAIGN#<id>` with
226
+ `attribute_not_exists`
227
+ conditions. DynamoDB therefore refuses a second campaign in the same retained
228
+ state table. The operator can always use `kill-campaign`; there is deliberately
229
+ no clear or re-arm operation.
230
+
231
+ Every `scripts/aws-windows-jit-controller.mjs --execute` call must provide the
232
+ same `--campaign-id`, `--confirm-campaign-id`, `--state-table`, and
233
+ `--confirm-state-table`. After the GitHub, AMI, active-instance, SSM, and EC2
234
+ DryRun checks pass, the controller
235
+ atomically reserves one run. Duplicate run-attempt-qualification identities,
236
+ source mismatch, expiry, `KILLED`, the sixth accepted instance, or a
237
+ reservation that would exceed the baseline-adjusted USD 80 phase ceiling all
238
+ fail closed before `RunInstances`.
239
+
240
+ Example dry-run and arm boundary (do not execute without a new campaign budget
241
+ decision):
181
242
 
182
- Qualification requires one runner-profile smoke, three trusted exact-source
183
- full Windows jobs, independent cancellation and timeout cleanup exercises, and
184
- zero repository runner, EC2 instance, disposable volume, min capacity, and
185
- desired capacity within 15 minutes of the final job.
243
+ ```bash
244
+ windows_campaign=win-REPLACE_WITH_CAMPAIGN_ID
245
+ windows_source=REPLACE_WITH_EXACT_40_CHARACTER_SHA
246
+ windows_state_table=REPLACE_WITH_CAMPAIGN_STATE_TABLE
247
+ windows_expires_at=REPLACE_WITH_ISO_TIMESTAMP_WITHIN_24_HOURS
248
+ windows_phase_spend_baseline_usd=REPLACE_WITH_OBSERVED_PRIOR_WINDOWS_SPEND
249
+ windows_max_accepted_instances=REPLACE_WITH_INTEGER_FROM_1_THROUGH_5
250
+
251
+ node scripts/aws-windows-jit-campaign.mjs plan-arm \
252
+ --campaign-id "$windows_campaign" \
253
+ --source-sha "$windows_source" \
254
+ --state-table "$windows_state_table" \
255
+ --expires-at "$windows_expires_at" \
256
+ --phase-spend-baseline-usd "$windows_phase_spend_baseline_usd" \
257
+ --max-accepted-instances "$windows_max_accepted_instances"
258
+
259
+ node scripts/aws-windows-jit-campaign.mjs arm-campaign \
260
+ --campaign-id "$windows_campaign" \
261
+ --confirm-campaign-id "$windows_campaign" \
262
+ --source-sha "$windows_source" \
263
+ --confirm-source-sha "$windows_source" \
264
+ --state-table "$windows_state_table" \
265
+ --confirm-state-table "$windows_state_table" \
266
+ --expires-at "$windows_expires_at" \
267
+ --phase-spend-baseline-usd "$windows_phase_spend_baseline_usd" \
268
+ --confirm-phase-spend-baseline-usd "$windows_phase_spend_baseline_usd" \
269
+ --max-accepted-instances "$windows_max_accepted_instances" \
270
+ --confirm-max-accepted-instances "$windows_max_accepted_instances"
271
+ ```
272
+
273
+ Arming creates a permanent one-shot control record and admits only the
274
+ explicitly confirmed number of paid instances, never more than five. Its
275
+ rollback is fail-closed, not deletion: `kill-campaign` first
276
+ persists `KILLED`, then publishes to the dedicated SNS topic so the reaper
277
+ terminates active card-owned instances and removes their JIT parameters. The
278
+ command is idempotent, but the operator must read back DynamoDB, EC2, SSM, and
279
+ GitHub runners before treating cleanup as complete:
280
+
281
+ ```bash
282
+ windows_kill_topic=REPLACE_WITH_DEDICATED_KILL_SWITCH_TOPIC_ARN
283
+
284
+ node scripts/aws-windows-jit-campaign.mjs kill-campaign \
285
+ --campaign-id "$windows_campaign" \
286
+ --confirm-campaign-id "$windows_campaign" \
287
+ --source-sha "$windows_source" \
288
+ --confirm-source-sha "$windows_source" \
289
+ --state-table "$windows_state_table" \
290
+ --confirm-state-table "$windows_state_table" \
291
+ --kill-switch-topic "$windows_kill_topic" \
292
+ --confirm-kill-switch-topic "$windows_kill_topic" \
293
+ --reason operator-kill
294
+ ```
186
295
 
187
296
  ## Phase 3 contract
188
297
 
@@ -226,6 +335,32 @@ host, including at least one full run, plus proof that:
226
335
  - AWS has no active campaign instance or allocated campaign host;
227
336
  - actual incremental spend remained below USD 25.
228
337
 
338
+ ### Phase 3 lifecycle controller
339
+
340
+ `scripts/aws-macos-jit-controller.mjs` is the operator boundary for the paid
341
+ campaign. It has three explicit mutation modes:
342
+
343
+ - `launch-campaign` binds the exact repository source, AMI, availability zone,
344
+ tagged Dedicated Host, and reusable instance. It rejects pre-existing Mac
345
+ capacity and requires successful `AllocateHosts` and `RunInstances` DryRuns
346
+ before either real call.
347
+ - `run-job` binds one queued exact-source GitHub job to the existing campaign
348
+ host and instance. It writes the repository JIT configuration through a
349
+ mode-0600 temporary file into a distinct SSM SecureString, sends only the
350
+ credential-free bootstrap through SSM, and removes the parameter plus runner
351
+ registration if command delivery fails.
352
+ - `close-campaign` refuses execution before the provider's 24-hour minimum,
353
+ verifies the encrypted delete-on-termination root volume, removes scoped JIT
354
+ residue, terminates the exact instance, and requires a `ReleaseHosts` DryRun
355
+ before release. If Apple host scrubbing is still in progress, it reports
356
+ `release-pending`; the ten-minute card-scoped reaper remains the bounded
357
+ retry path.
358
+
359
+ Every execute mode requires the exact source SHA and campaign id to be repeated
360
+ through `--confirm-source-sha` and `--confirm-campaign-id`. `run-job` also
361
+ requires `--confirm-run-id`. Omitting `--execute` emits a deterministic plan
362
+ without changing AWS or GitHub state.
363
+
229
364
  ## Provider lifecycle
230
365
 
231
366
  The three infrastructure templates live under
@@ -1668,6 +1668,28 @@ buildchain release-governance reconcile --repository <owner/repo> --branch <dev|
1668
1668
  buildchain release-propagation
1669
1669
  ```
1670
1670
 
1671
+ ### `buildchain release-propagation entry`
1672
+
1673
+ - Help: `buildchain release-propagation entry --help`
1674
+ - Canonical id: `release-propagation`
1675
+ - Options: none declared
1676
+ - Syntax:
1677
+
1678
+ ```text
1679
+ buildchain release-propagation <plan|write-lock|work|entry|pickup> ...
1680
+ ```
1681
+
1682
+ ### `buildchain release-propagation pickup`
1683
+
1684
+ - Help: `buildchain release-propagation pickup --help`
1685
+ - Canonical id: `release-propagation`
1686
+ - Options: none declared
1687
+ - Syntax:
1688
+
1689
+ ```text
1690
+ buildchain release-propagation <plan|write-lock|work|entry|pickup> ...
1691
+ ```
1692
+
1671
1693
  ### `buildchain release-propagation plan`
1672
1694
 
1673
1695
  - Help: `buildchain release-propagation plan --help`
@@ -1676,7 +1698,18 @@ buildchain release-propagation
1676
1698
  - Syntax:
1677
1699
 
1678
1700
  ```text
1679
- buildchain release-propagation <plan|write-lock> ...
1701
+ buildchain release-propagation <plan|write-lock|work|entry|pickup> ...
1702
+ ```
1703
+
1704
+ ### `buildchain release-propagation work`
1705
+
1706
+ - Help: `buildchain release-propagation work --help`
1707
+ - Canonical id: `release-propagation`
1708
+ - Options: none declared
1709
+ - Syntax:
1710
+
1711
+ ```text
1712
+ buildchain release-propagation <plan|write-lock|work|entry|pickup> ...
1680
1713
  ```
1681
1714
 
1682
1715
  ### `buildchain release-propagation write-lock`
@@ -1687,7 +1720,7 @@ buildchain release-propagation <plan|write-lock> ...
1687
1720
  - Syntax:
1688
1721
 
1689
1722
  ```text
1690
- buildchain release-propagation <plan|write-lock> ...
1723
+ buildchain release-propagation <plan|write-lock|work|entry|pickup> ...
1691
1724
  ```
1692
1725
 
1693
1726
  ## `sample`