@kungfu-tech/buildchain 3.0.5-alpha.8 → 3.0.5

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 (62) hide show
  1. package/README.md +0 -31
  2. package/actions/macos-credential-island/README.md +0 -8
  3. package/bin/buildchain.mjs +1 -1
  4. package/contracts/auditable-demo-media-profiles-v1.json +0 -61
  5. package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +3 -3
  6. package/contracts/evidence/auditable-demo-web-delivery-v1.json +3 -3
  7. package/dist/site/buildchain-contract.json +25 -86
  8. package/dist/site/buildchain-site.json +38 -64
  9. package/dist/site/capability-registry.json +1 -1
  10. package/dist/site/cli-registry.json +2 -6
  11. package/dist/site/controller-registry.json +3 -11
  12. package/dist/site/kfd-claims.json +11 -53
  13. package/dist/site/kfd-upstream-aggregate.json +1 -1
  14. package/dist/site/manual-registry.json +7 -7
  15. package/dist/site/node-api-registry.json +31 -213
  16. package/dist/site/page-registry.json +20 -50
  17. package/dist/site/public-surface-audit.json +8 -98
  18. package/dist/site/publication-authority-registry.json +1 -42
  19. package/dist/site/publication-registry.json +4 -4
  20. package/dist/site/site-manifest.json +11 -11
  21. package/dist/site/workflow-registry.json +2 -67
  22. package/docs/auditable-demo.md +7 -74
  23. package/docs/aws-us-elastic-runner-burst-plane.md +16 -151
  24. package/docs/cli-reference.md +2 -24
  25. package/docs/node-api-reference.md +72 -90
  26. package/docs/publish-transaction.md +5 -7
  27. package/docs/release-flow.md +0 -4
  28. package/docs/release-governance.md +0 -39
  29. package/docs/reusable-build-surface.md +0 -9
  30. package/package.json +1 -1
  31. package/packages/core/buildchain-contract.js +1 -36
  32. package/packages/core/buildchain-publication-authority.js +0 -2
  33. package/packages/core/public-surface-audit.js +35 -4
  34. package/packages/core/release-propagation-release.js +18 -61
  35. package/packages/core/release-propagation-work.js +3 -7
  36. package/packages/core/release-propagation.js +2 -12
  37. package/scripts/auditable-demo-renditions.mjs +2 -7
  38. package/scripts/auditable-demo.mjs +21 -27
  39. package/scripts/aws-windows-jit-controller-core.mjs +2 -20
  40. package/scripts/aws-windows-jit-controller.mjs +109 -184
  41. package/scripts/aws-windows-jit-core.mjs +3 -21
  42. package/scripts/aws-windows-jit.mjs +0 -2
  43. package/scripts/build-standalone-binary.mjs +0 -4
  44. package/scripts/buildchain-cli-help.mjs +1 -2
  45. package/scripts/capture-package-release-propagation.mjs +1 -24
  46. package/scripts/check-inventory.mjs +0 -5
  47. package/scripts/finalize-native-artifact-signing-result.mjs +15 -37
  48. package/scripts/generate-site-bundle.mjs +0 -2
  49. package/scripts/locked-source-checkout.mjs +3 -17
  50. package/scripts/release-propagation.mjs +2 -77
  51. package/contracts/auditable-demo-scenario-v1.schema.json +0 -153
  52. package/packages/core/release-propagation-pickup.js +0 -387
  53. package/packages/core/workflow-call-contract.js +0 -308
  54. package/packages/core/workflow-yaml-contract.js +0 -272
  55. package/scripts/auditable-demo-platform.mjs +0 -506
  56. package/scripts/aws-macos-jit-controller-core.mjs +0 -389
  57. package/scripts/aws-macos-jit-controller-runtime.mjs +0 -82
  58. package/scripts/aws-macos-jit-controller.mjs +0 -558
  59. package/scripts/aws-macos-jit-job-controller.mjs +0 -401
  60. package/scripts/aws-windows-jit-campaign-core.mjs +0 -296
  61. package/scripts/aws-windows-jit-campaign.mjs +0 -202
  62. package/scripts/workflow-call-contract.mjs +0 -133
@@ -8,12 +8,7 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
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.
11
+ last_reviewed: 2026-07-30
17
12
  ---
18
13
 
19
14
  # AWS US elastic runner burst plane
@@ -143,16 +138,14 @@ The source-bound evidence and deterministic phase receipt are:
143
138
 
144
139
  The Windows phase uses the explicit `aws-us-ec2-windows-jit` runner preset.
145
140
  Its caller supplies one bounded label under
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.
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.
149
144
 
150
145
  The provider creates repository-level GitHub JIT configuration for
151
146
  `kungfu-systems/kungfu`. Its `labels` request must contain all four scheduling
152
147
  labels: `self-hosted`, `Windows`, `X64`, and the card-scoped
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
148
+ `aws-us-ec2-windows-jit-<qualification-id>` label. GitHub's JIT endpoint does
156
149
  not infer the default OS and architecture labels when they are omitted. The
157
150
  encoded configuration is never placed in EC2 user data, a tag, a command log,
158
151
  or an artifact. The operator writes it to a card-scoped SSM SecureString under
@@ -175,123 +168,21 @@ Each runner uses:
175
168
  security-group rule, no key pair, and no warm Auto Scaling capacity.
176
169
 
177
170
  Runner diagnostics and a redacted lifecycle record are uploaded to the
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
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
182
174
  three-hour-old instances and deletes only their dedicated JIT parameter.
183
175
 
184
176
  At the 2026-07-29 AWS Price List rate of USD 1.45 per Windows
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):
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.
242
181
 
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
- ```
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.
295
186
 
296
187
  ## Phase 3 contract
297
188
 
@@ -335,32 +226,6 @@ host, including at least one full run, plus proof that:
335
226
  - AWS has no active campaign instance or allocated campaign host;
336
227
  - actual incremental spend remained below USD 25.
337
228
 
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
-
364
229
  ## Provider lifecycle
365
230
 
366
231
  The three infrastructure templates live under
@@ -1668,17 +1668,6 @@ buildchain release-governance reconcile --repository <owner/repo> --branch <dev|
1668
1668
  buildchain release-propagation
1669
1669
  ```
1670
1670
 
1671
- ### `buildchain release-propagation pickup`
1672
-
1673
- - Help: `buildchain release-propagation pickup --help`
1674
- - Canonical id: `release-propagation`
1675
- - Options: none declared
1676
- - Syntax:
1677
-
1678
- ```text
1679
- buildchain release-propagation <plan|write-lock|work|pickup> ...
1680
- ```
1681
-
1682
1671
  ### `buildchain release-propagation plan`
1683
1672
 
1684
1673
  - Help: `buildchain release-propagation plan --help`
@@ -1687,18 +1676,7 @@ buildchain release-propagation <plan|write-lock|work|pickup> ...
1687
1676
  - Syntax:
1688
1677
 
1689
1678
  ```text
1690
- buildchain release-propagation <plan|write-lock|work|pickup> ...
1691
- ```
1692
-
1693
- ### `buildchain release-propagation work`
1694
-
1695
- - Help: `buildchain release-propagation work --help`
1696
- - Canonical id: `release-propagation`
1697
- - Options: none declared
1698
- - Syntax:
1699
-
1700
- ```text
1701
- buildchain release-propagation <plan|write-lock|work|pickup> ...
1679
+ buildchain release-propagation <plan|write-lock> ...
1702
1680
  ```
1703
1681
 
1704
1682
  ### `buildchain release-propagation write-lock`
@@ -1709,7 +1687,7 @@ buildchain release-propagation <plan|write-lock|work|pickup> ...
1709
1687
  - Syntax:
1710
1688
 
1711
1689
  ```text
1712
- buildchain release-propagation <plan|write-lock|work|pickup> ...
1690
+ buildchain release-propagation <plan|write-lock> ...
1713
1691
  ```
1714
1692
 
1715
1693
  ## `sample`