@kungfu-tech/buildchain 3.0.5-alpha.5 → 3.0.5-alpha.6

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.
@@ -7031,7 +7031,7 @@
7031
7031
  "pageRegistryPath": "dist/site/page-registry.json",
7032
7032
  "cliRegistryDigest": "0db010925d1c60209c3dac8bc2797537f307ab21bc68084263e79004c5c16ff7",
7033
7033
  "workflowRegistryDigest": "4f1b9a933e117abc5fc4212241c83a35609f23477dac98d6cd37c4b40b57ba29",
7034
- "pageRegistryDigest": "296f5d2e42e07ab8f65791f250e8563e5478cd74e8bb78298f025bfd23072a29"
7034
+ "pageRegistryDigest": "1f715d11aca1124de121006046c07387d8d3d6b14fb868f8542626195285ec24"
7035
7035
  },
7036
7036
  "comparison": {
7037
7037
  "missingCliRegistry": [],
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-08-02T07:07:12.421Z",
5
- "publishedAt": "2026-08-02T07:07:12.421Z",
4
+ "generatedAt": "2026-08-02T08:34:45.723Z",
5
+ "publishedAt": "2026-08-02T08:34:45.723Z",
6
6
  "reproducible": true,
7
7
  "timestampPolicy": "ci-injected",
8
8
  "deterministicInputs": [
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "7f32e917c5561a53cf9ffc6e0f8a18df841a1cd9",
22
+ "sourceRevision": "2b5880a79f169f4a64b193a06a47b990d6585e16",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "package": {
34
34
  "name": "@kungfu-tech/buildchain",
35
- "version": "3.0.5-alpha.5",
35
+ "version": "3.0.5-alpha.6",
36
36
  "versionSource": "package.json#version"
37
37
  },
38
38
  "sourceKind": "package-site-bundle",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-manifest",
4
- "generatedAt": "2026-08-02T07:07:12.421Z",
5
- "publishedAt": "2026-08-02T07:07:12.421Z",
4
+ "generatedAt": "2026-08-02T08:34:45.723Z",
5
+ "publishedAt": "2026-08-02T08:34:45.723Z",
6
6
  "reproducible": true,
7
7
  "timestampPolicy": "ci-injected",
8
8
  "deterministicInputs": [
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "7f32e917c5561a53cf9ffc6e0f8a18df841a1cd9",
22
+ "sourceRevision": "2b5880a79f169f4a64b193a06a47b990d6585e16",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "package": {
39
39
  "name": "@kungfu-tech/buildchain",
40
- "version": "3.0.5-alpha.5",
40
+ "version": "3.0.5-alpha.6",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -237,7 +237,7 @@
237
237
  "path": "docs/node-api-reference.md",
238
238
  "plane": "use",
239
239
  "exists": true,
240
- "digest": "sha256:62f5633ce6df3db2b92358a078dcc82d935d6fe480b9b4bf99294c0c1ccc39fb"
240
+ "digest": "sha256:470b65c96353a9f3fac0db7b67bba34058e03bfa7e1a8fc6bec0d6d9f13aa6c4"
241
241
  },
242
242
  {
243
243
  "id": "build-facts",
@@ -199,6 +199,10 @@ paid launch. Reservations are never refunded: a controller crash, ambiguous
199
199
  launch, or successful launch all remain charged to the campaign, favoring a
200
200
  false stop over an accidental budget overrun.
201
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
+
202
206
  The tag-filtered AWS Budget is defense in depth, not the authoritative launch
203
207
  gate. It is disabled by default because a linked account cannot activate a
204
208
  cost-allocation tag. Set `EnableTagFilteredBudget=true` only after the AWS
@@ -216,8 +220,9 @@ final job.
216
220
 
217
221
  `scripts/aws-windows-jit-campaign.mjs` is the one-shot operator boundary.
218
222
  Without a mutation mode it emits the arm plan. `arm-campaign` requires the
219
- campaign id, exact source SHA, state table, and observed prior phase spend to
220
- be repeated as confirmations, then creates `CONTROL` and `CAMPAIGN#<id>` with
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
221
226
  `attribute_not_exists`
222
227
  conditions. DynamoDB therefore refuses a second campaign in the same retained
223
228
  state table. The operator can always use `kill-campaign`; there is deliberately
@@ -241,13 +246,15 @@ windows_source=REPLACE_WITH_EXACT_40_CHARACTER_SHA
241
246
  windows_state_table=REPLACE_WITH_CAMPAIGN_STATE_TABLE
242
247
  windows_expires_at=REPLACE_WITH_ISO_TIMESTAMP_WITHIN_24_HOURS
243
248
  windows_phase_spend_baseline_usd=REPLACE_WITH_OBSERVED_PRIOR_WINDOWS_SPEND
249
+ windows_max_accepted_instances=REPLACE_WITH_INTEGER_FROM_1_THROUGH_5
244
250
 
245
251
  node scripts/aws-windows-jit-campaign.mjs plan-arm \
246
252
  --campaign-id "$windows_campaign" \
247
253
  --source-sha "$windows_source" \
248
254
  --state-table "$windows_state_table" \
249
255
  --expires-at "$windows_expires_at" \
250
- --phase-spend-baseline-usd "$windows_phase_spend_baseline_usd"
256
+ --phase-spend-baseline-usd "$windows_phase_spend_baseline_usd" \
257
+ --max-accepted-instances "$windows_max_accepted_instances"
251
258
 
252
259
  node scripts/aws-windows-jit-campaign.mjs arm-campaign \
253
260
  --campaign-id "$windows_campaign" \
@@ -258,11 +265,14 @@ node scripts/aws-windows-jit-campaign.mjs arm-campaign \
258
265
  --confirm-state-table "$windows_state_table" \
259
266
  --expires-at "$windows_expires_at" \
260
267
  --phase-spend-baseline-usd "$windows_phase_spend_baseline_usd" \
261
- --confirm-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"
262
271
  ```
263
272
 
264
- Arming creates a permanent one-shot control record and admits up to five paid
265
- instances. Its rollback is fail-closed, not deletion: `kill-campaign` first
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
266
276
  persists `KILLED`, then publishes to the dedicated SNS topic so the reaper
267
277
  terminates active card-owned instances and removes their JIT parameters. The
268
278
  command is idempotent, but the operator must read back DynamoDB, EC2, SSM, and
@@ -480,7 +480,7 @@ Target: `./packages/core/index.js`. Public symbols: 541.
480
480
  | `resolvePropagationChannel` | function: function resolvePropagationChannel(edge, upstreamChannel) | edge, upstreamChannel | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resolvePropagationChannel } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation.js:190` |
481
481
  | `resolvePublicationCandidateFile` | function: function resolvePublicationCandidateFile(files = [], candidatePath) | files = [], candidatePath | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { resolvePublicationCandidateFile } from "@kungfu-tech/buildchain";` | `packages/core/publication-artifact-candidate.js:23` |
482
482
  | `resolveReleasePassportPath` | function: function resolveReleasePassportPath(cwd = process.cwd()) | cwd = process.cwd() | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resolveReleasePassportPath } from "@kungfu-tech/buildchain";` | `packages/core/buildchain-layout.js:92` |
483
- | `resumeReleasePropagationWork` | function: function resumeReleasePropagationWork(work) | work | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resumeReleasePropagationWork } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-work.js:514` |
483
+ | `resumeReleasePropagationWork` | function: function resumeReleasePropagationWork(work) | work | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resumeReleasePropagationWork } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-work.js:518` |
484
484
  | `revokeStableCandidate` | function: function revokeStableCandidate(ledgerInput, versionInput, { reason, actor = "", now = new Date().toISOString() } = {}) | ledgerInput, versionInput, { reason, actor = "", now = new Date().toISOString() } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | may-write-or-invoke-external-actions | `import { revokeStableCandidate } from "@kungfu-tech/buildchain";` | `packages/core/stable-candidate-ledger.js:185` |
485
485
  | `rollbackReleaseActivationTransaction` | function: function rollbackReleaseActivationTransaction(transaction, { toSiteSourceSha, reason } = {}) | transaction, { toSiteSourceSha, reason } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | may-write-or-invoke-external-actions | `import { rollbackReleaseActivationTransaction } from "@kungfu-tech/buildchain";` | `packages/core/release-activation-transaction.js:290` |
486
486
  | `runLifecycleStage` | function: function runLifecycleStage({ cwd = process.cwd(), loadedConfig, name, stage, env: extraEnv, timeoutMinutes }) | { cwd = process.cwd(), loadedConfig, name, stage, env: extraEnv, timeoutMinutes } | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | subprocess | `import { runLifecycleStage } from "@kungfu-tech/buildchain";` | `packages/core/buildchain-config.js:1380` |
@@ -552,7 +552,7 @@ Target: `./packages/core/index.js`. Public symbols: 541.
552
552
  | `verifyPublicationReproducibility` | function: function verifyPublicationReproducibility({ cwd = process.cwd(), sourceSha = "", output = DEFAULT_OUTPUT, promote = false, keepWorkspaces = false, pullToolchain = true, packageName = "", allowUnpinnedToolchain = false, overlayPaths = [DEFAULT_REGISTRY_INPUT_DIR, DEFAULT_REGISTRY_HYDRATION], } = {}) | { cwd = process.cwd(), sourceSha = "", output = DEFAULT_OUTPUT, promote = false, keepWorkspaces = false, pullToolchain = true, packageName = "", allowUnpinnedToolchain = false, overlayPaths = [DEFAULT_REGISTRY_INPUT_DIR, DEFAULT_REGISTRY_HYDRATION], } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | local-filesystem-write | `import { verifyPublicationReproducibility } from "@kungfu-tech/buildchain";` | `packages/core/publication-reproducibility.js:869` |
553
553
  | `verifyPublicationSealedBundle` | function: function verifyPublicationSealedBundle({ bundleRoot, manifest } = {}) | { bundleRoot, manifest } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyPublicationSealedBundle } from "@kungfu-tech/buildchain";` | `packages/core/publication-sealed-bundle.js:124` |
554
554
  | `verifyReleasePassport` | function: async function verifyReleasePassport({ passportLocation, artifactEvidenceLocation = "", publishEvidenceLocation = "", impactLocation = "", agentIndexLocation = "", productMechanismLocation = "", kfdAgentHubEvidenceLocation = "", kfdSupportEvidenceLocation = "", checkedAt = nowIso(), } = {}) | { passportLocation, artifactEvidenceLocation = "", publishEvidenceLocation = "", impactLocation = "", agentIndexLocation = "", productMechanismLocation = "", kfdAgentHubEvidenceLocation = "", kfdSupportEvidenceLocation = "", checkedAt = nowIso(), } = {} | Promise<unknown> | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { verifyReleasePassport } from "@kungfu-tech/buildchain";` | `packages/core/release-passport.js:2743` |
555
- | `verifyReleasePropagationWork` | function: function verifyReleasePropagationWork(input) | input | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyReleasePropagationWork } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-work.js:482` |
555
+ | `verifyReleasePropagationWork` | function: function verifyReleasePropagationWork(input) | input | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyReleasePropagationWork } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-work.js:486` |
556
556
  | `WEB_SURFACE_PRODUCTION_DECISION_CONTRACT` | constant: const WEB_SURFACE_PRODUCTION_DECISION_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { WEB_SURFACE_PRODUCTION_DECISION_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/web-surface-publication-candidate.js:7` |
557
557
  | `WEB_SURFACE_PUBLICATION_CANDIDATE_CONTRACT` | constant: const WEB_SURFACE_PUBLICATION_CANDIDATE_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { WEB_SURFACE_PUBLICATION_CANDIDATE_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/web-surface-publication-candidate.js:5` |
558
558
  | `webSurfacePublicationDigest` | function: function webSurfacePublicationDigest(value) | value | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { webSurfacePublicationDigest } from "@kungfu-tech/buildchain";` | `packages/core/web-surface-publication-candidate.js:21` |
@@ -1074,7 +1074,7 @@ Target: `./packages/core/index.js`. Public symbols: 541.
1074
1074
  | `resolvePropagationChannel` | function: function resolvePropagationChannel(edge, upstreamChannel) | edge, upstreamChannel | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resolvePropagationChannel } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation.js:190` |
1075
1075
  | `resolvePublicationCandidateFile` | function: function resolvePublicationCandidateFile(files = [], candidatePath) | files = [], candidatePath | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { resolvePublicationCandidateFile } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-artifact-candidate.js:23` |
1076
1076
  | `resolveReleasePassportPath` | function: function resolveReleasePassportPath(cwd = process.cwd()) | cwd = process.cwd() | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resolveReleasePassportPath } from "@kungfu-tech/buildchain/core";` | `packages/core/buildchain-layout.js:92` |
1077
- | `resumeReleasePropagationWork` | function: function resumeReleasePropagationWork(work) | work | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resumeReleasePropagationWork } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-work.js:514` |
1077
+ | `resumeReleasePropagationWork` | function: function resumeReleasePropagationWork(work) | work | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resumeReleasePropagationWork } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-work.js:518` |
1078
1078
  | `revokeStableCandidate` | function: function revokeStableCandidate(ledgerInput, versionInput, { reason, actor = "", now = new Date().toISOString() } = {}) | ledgerInput, versionInput, { reason, actor = "", now = new Date().toISOString() } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | may-write-or-invoke-external-actions | `import { revokeStableCandidate } from "@kungfu-tech/buildchain/core";` | `packages/core/stable-candidate-ledger.js:185` |
1079
1079
  | `rollbackReleaseActivationTransaction` | function: function rollbackReleaseActivationTransaction(transaction, { toSiteSourceSha, reason } = {}) | transaction, { toSiteSourceSha, reason } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | may-write-or-invoke-external-actions | `import { rollbackReleaseActivationTransaction } from "@kungfu-tech/buildchain/core";` | `packages/core/release-activation-transaction.js:290` |
1080
1080
  | `runLifecycleStage` | function: function runLifecycleStage({ cwd = process.cwd(), loadedConfig, name, stage, env: extraEnv, timeoutMinutes }) | { cwd = process.cwd(), loadedConfig, name, stage, env: extraEnv, timeoutMinutes } | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | subprocess | `import { runLifecycleStage } from "@kungfu-tech/buildchain/core";` | `packages/core/buildchain-config.js:1380` |
@@ -1146,7 +1146,7 @@ Target: `./packages/core/index.js`. Public symbols: 541.
1146
1146
  | `verifyPublicationReproducibility` | function: function verifyPublicationReproducibility({ cwd = process.cwd(), sourceSha = "", output = DEFAULT_OUTPUT, promote = false, keepWorkspaces = false, pullToolchain = true, packageName = "", allowUnpinnedToolchain = false, overlayPaths = [DEFAULT_REGISTRY_INPUT_DIR, DEFAULT_REGISTRY_HYDRATION], } = {}) | { cwd = process.cwd(), sourceSha = "", output = DEFAULT_OUTPUT, promote = false, keepWorkspaces = false, pullToolchain = true, packageName = "", allowUnpinnedToolchain = false, overlayPaths = [DEFAULT_REGISTRY_INPUT_DIR, DEFAULT_REGISTRY_HYDRATION], } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | local-filesystem-write | `import { verifyPublicationReproducibility } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-reproducibility.js:869` |
1147
1147
  | `verifyPublicationSealedBundle` | function: function verifyPublicationSealedBundle({ bundleRoot, manifest } = {}) | { bundleRoot, manifest } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyPublicationSealedBundle } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-sealed-bundle.js:124` |
1148
1148
  | `verifyReleasePassport` | function: async function verifyReleasePassport({ passportLocation, artifactEvidenceLocation = "", publishEvidenceLocation = "", impactLocation = "", agentIndexLocation = "", productMechanismLocation = "", kfdAgentHubEvidenceLocation = "", kfdSupportEvidenceLocation = "", checkedAt = nowIso(), } = {}) | { passportLocation, artifactEvidenceLocation = "", publishEvidenceLocation = "", impactLocation = "", agentIndexLocation = "", productMechanismLocation = "", kfdAgentHubEvidenceLocation = "", kfdSupportEvidenceLocation = "", checkedAt = nowIso(), } = {} | Promise<unknown> | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { verifyReleasePassport } from "@kungfu-tech/buildchain/core";` | `packages/core/release-passport.js:2743` |
1149
- | `verifyReleasePropagationWork` | function: function verifyReleasePropagationWork(input) | input | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyReleasePropagationWork } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-work.js:482` |
1149
+ | `verifyReleasePropagationWork` | function: function verifyReleasePropagationWork(input) | input | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyReleasePropagationWork } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-work.js:486` |
1150
1150
  | `WEB_SURFACE_PRODUCTION_DECISION_CONTRACT` | constant: const WEB_SURFACE_PRODUCTION_DECISION_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { WEB_SURFACE_PRODUCTION_DECISION_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/web-surface-publication-candidate.js:7` |
1151
1151
  | `WEB_SURFACE_PUBLICATION_CANDIDATE_CONTRACT` | constant: const WEB_SURFACE_PUBLICATION_CANDIDATE_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { WEB_SURFACE_PUBLICATION_CANDIDATE_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/web-surface-publication-candidate.js:5` |
1152
1152
  | `webSurfacePublicationDigest` | function: function webSurfacePublicationDigest(value) | value | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { webSurfacePublicationDigest } from "@kungfu-tech/buildchain/core";` | `packages/core/web-surface-publication-candidate.js:21` |
@@ -1911,8 +1911,8 @@ Target: `./packages/core/release-propagation.js`. Public symbols: 25.
1911
1911
  | `RELEASE_PROPAGATION_WORK_STAGES` | constant: const RELEASE_PROPAGATION_WORK_STAGES | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_PROPAGATION_WORK_STAGES } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work-constants.js:4` |
1912
1912
  | `repairReleasePropagationWork` | function: function repairReleasePropagationWork({ work, expectedWorkRoot, receipt } = {}) | { work, expectedWorkRoot, receipt } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { repairReleasePropagationWork } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work-transitions.js:88` |
1913
1913
  | `resolvePropagationChannel` | function: function resolvePropagationChannel(edge, upstreamChannel) | edge, upstreamChannel | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resolvePropagationChannel } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation.js:190` |
1914
- | `resumeReleasePropagationWork` | function: function resumeReleasePropagationWork(work) | work | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resumeReleasePropagationWork } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work.js:514` |
1915
- | `verifyReleasePropagationWork` | function: function verifyReleasePropagationWork(input) | input | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyReleasePropagationWork } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work.js:482` |
1914
+ | `resumeReleasePropagationWork` | function: function resumeReleasePropagationWork(work) | work | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { resumeReleasePropagationWork } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work.js:518` |
1915
+ | `verifyReleasePropagationWork` | function: function verifyReleasePropagationWork(input) | input | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyReleasePropagationWork } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work.js:486` |
1916
1916
  | `writeReleasePropagationLock` | function: function writeReleasePropagationLock({ plan, target = "", cwd = process.cwd(), output = "" } = {}) | { plan, target = "", cwd = process.cwd(), output = "" } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | local-filesystem-write | `import { writeReleasePropagationLock } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation.js:316` |
1917
1917
 
1918
1918
  ## `@kungfu-tech/buildchain/release-activation-transaction`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "3.0.5-alpha.5",
3
+ "version": "3.0.5-alpha.6",
4
4
  "private": false,
5
5
  "description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
6
6
  "repository": "https://github.com/kungfu-systems/buildchain",
@@ -317,8 +317,12 @@ function verifyWorkRelease(work) {
317
317
  downstream.executionProfile,
318
318
  "release propagation work downstream.executionProfile",
319
319
  );
320
- if (!profile
321
- || JSON.stringify(profile) !== JSON.stringify(downstream.releaseLock.downstream.executionProfile)) {
320
+ const lockedProfile = normalizeExecutionProfile(
321
+ downstream.releaseLock.downstream.executionProfile,
322
+ "release propagation work releaseLock.downstream.executionProfile",
323
+ );
324
+ if (!profile || !lockedProfile
325
+ || sha256Json(profile) !== sha256Json(lockedProfile)) {
322
326
  throw new Error("release propagation work execution profile disagrees with the exact release lock");
323
327
  }
324
328
  return { downstream, profile };
@@ -400,7 +404,7 @@ function verifyWorkPlanAndState(work, downstream, profile) {
400
404
  downstream.branch,
401
405
  downstream.baseRef,
402
406
  );
403
- if (JSON.stringify(plan.commands) !== JSON.stringify(expectedCommands)) {
407
+ if (sha256Json(plan.commands) !== sha256Json(expectedCommands)) {
404
408
  throw new Error("release propagation work commands are not canonical");
405
409
  }
406
410
  const state = assertExactFields(
@@ -50,6 +50,22 @@ function money(value, label) {
50
50
  return Math.round(parsed * 100_000_000) / 100_000_000;
51
51
  }
52
52
 
53
+ function acceptedInstances(value) {
54
+ const normalized = String(value ?? "").trim();
55
+ if (!normalized) return WINDOWS_EC2_JIT.maxAcceptedInstances;
56
+ const parsed = Number(normalized);
57
+ if (
58
+ !Number.isInteger(parsed) ||
59
+ parsed < 1 ||
60
+ parsed > WINDOWS_EC2_JIT.maxAcceptedInstances
61
+ ) {
62
+ throw new Error(
63
+ `maxAcceptedInstances must be an integer from 1 through ${WINDOWS_EC2_JIT.maxAcceptedInstances}`,
64
+ );
65
+ }
66
+ return parsed;
67
+ }
68
+
53
69
  function string(value) {
54
70
  return { S: String(value) };
55
71
  }
@@ -72,8 +88,8 @@ export function createWindowsJitCampaignArmPlan(values = {}) {
72
88
  values.phaseSpendBaselineUsd,
73
89
  "phaseSpendBaselineUsd",
74
90
  );
75
- const campaignReservationCeilingUsd =
76
- reservationUsd * WINDOWS_EC2_JIT.maxAcceptedInstances;
91
+ const maxAcceptedInstances = acceptedInstances(values.maxAcceptedInstances);
92
+ const campaignReservationCeilingUsd = reservationUsd * maxAcceptedInstances;
77
93
  const campaignSafetyCeilingUsd =
78
94
  campaignReservationCeilingUsd +
79
95
  reservationUsd * WINDOWS_EC2_JIT.maxConcurrentInstances;
@@ -103,7 +119,7 @@ export function createWindowsJitCampaignArmPlan(values = {}) {
103
119
  stateTable: tableName(values.stateTable),
104
120
  },
105
121
  limits: {
106
- maxAcceptedInstances: WINDOWS_EC2_JIT.maxAcceptedInstances,
122
+ maxAcceptedInstances,
107
123
  reservationUsd,
108
124
  budgetLimitUsd: WINDOWS_EC2_JIT.budgetLimitUsd,
109
125
  phaseSpendBaselineUsd,
@@ -46,10 +46,14 @@ function armPlan() {
46
46
  armedAt: arg("armed-at", new Date().toISOString()),
47
47
  expiresAt: arg("expires-at"),
48
48
  phaseSpendBaselineUsd: arg("phase-spend-baseline-usd"),
49
+ maxAcceptedInstances: arg("max-accepted-instances"),
49
50
  });
50
51
  }
51
52
 
52
- function confirm(plan, { phaseSpendBaseline = true } = {}) {
53
+ function confirm(
54
+ plan,
55
+ { phaseSpendBaseline = true, maxAcceptedInstances = true } = {},
56
+ ) {
53
57
  if (arg("confirm-campaign-id") !== plan.campaign.id) {
54
58
  throw new Error("--confirm-campaign-id must equal the campaign id");
55
59
  }
@@ -71,6 +75,16 @@ function confirm(plan, { phaseSpendBaseline = true } = {}) {
71
75
  "--confirm-phase-spend-baseline-usd must equal the phase spend baseline",
72
76
  );
73
77
  }
78
+ if (
79
+ maxAcceptedInstances &&
80
+ (!arg("confirm-max-accepted-instances").trim() ||
81
+ Number(arg("confirm-max-accepted-instances")) !==
82
+ plan.limits.maxAcceptedInstances)
83
+ ) {
84
+ throw new Error(
85
+ "--confirm-max-accepted-instances must equal the campaign slot ceiling",
86
+ );
87
+ }
74
88
  }
75
89
 
76
90
  function killSwitchTopic() {
@@ -132,7 +146,10 @@ export function main() {
132
146
  expiresAt: new Date(now.getTime() + 1000).toISOString(),
133
147
  phaseSpendBaselineUsd: 0,
134
148
  });
135
- confirm(plan, { phaseSpendBaseline: false });
149
+ confirm(plan, {
150
+ phaseSpendBaseline: false,
151
+ maxAcceptedInstances: false,
152
+ });
136
153
  const topic = killSwitchTopic();
137
154
  aws(
138
155
  plan,
@@ -12,6 +12,7 @@ import {
12
12
  artifactSigningEvidenceDigest,
13
13
  createArtifactSigningResult,
14
14
  } from "../packages/core/artifact-signing-result.js";
15
+ import { acceptedMacosCredentialEvidence } from "../actions/macos-credential-island/dmg-assembly.js";
15
16
  import { writeGitHubOutputs } from "./build-contract-core.mjs";
16
17
 
17
18
  function required(value, label) {
@@ -32,15 +33,39 @@ function resolveBelow(root, relative, label) {
32
33
  return target;
33
34
  }
34
35
 
36
+ function expectedCredentialExecution(
37
+ appBundleResult,
38
+ expectedRunId,
39
+ expectedRunAttempt,
40
+ ) {
41
+ if (!appBundleResult) return null;
42
+ return {
43
+ runId: required(expectedRunId, "credential execution run id"),
44
+ runAttempt: required(
45
+ expectedRunAttempt,
46
+ "credential execution run attempt",
47
+ ),
48
+ };
49
+ }
50
+
51
+ function acceptedProviderEvidence(evidence, request, expectedExecution) {
52
+ return expectedExecution
53
+ ? acceptedMacosCredentialEvidence(evidence, request, expectedExecution)
54
+ : evidence.status === "passed" &&
55
+ evidence.provider === request.signature.provider;
56
+ }
57
+
35
58
  export function finalizeNativeArtifactSigningResult({
36
59
  requestRoot = process.env.BUILDCHAIN_SIGNING_REQUEST_ROOT,
37
60
  requestPath = process.env.BUILDCHAIN_SIGNING_REQUEST_PATH,
38
61
  signedPayload = process.env.BUILDCHAIN_SIGNED_PAYLOAD,
39
62
  evidencePath = process.env.BUILDCHAIN_SIGNING_EVIDENCE,
40
- credentialArtifactRoot =
41
- process.env.BUILDCHAIN_SIGNING_CREDENTIAL_ARTIFACT_ROOT,
63
+ credentialArtifactRoot = process.env
64
+ .BUILDCHAIN_SIGNING_CREDENTIAL_ARTIFACT_ROOT,
42
65
  outputRoot = process.env.BUILDCHAIN_SIGNING_RESULT_ROOT,
43
66
  checks = process.env.BUILDCHAIN_SIGNING_VERIFICATION_CHECKS,
67
+ expectedRunId = process.env.GITHUB_RUN_ID,
68
+ expectedRunAttempt = process.env.GITHUB_RUN_ATTEMPT,
44
69
  } = {}) {
45
70
  const requests = path.resolve(required(requestRoot, "signing request root"));
46
71
  const request = JSON.parse(
@@ -77,19 +102,16 @@ export function finalizeNativeArtifactSigningResult({
77
102
  fs.copyFileSync(evidenceSource, evidenceOutput, fs.constants.COPYFILE_EXCL);
78
103
  const evidenceDocument = JSON.parse(fs.readFileSync(evidenceOutput, "utf8"));
79
104
  const appBundleResult = request.artifact.kind === "app-bundle";
80
- const providerEvidencePassed = appBundleResult
81
- ? evidenceDocument.schema ===
82
- "buildchain.macos-credential-island-evidence/v1" &&
83
- evidenceDocument.status === "accepted" &&
84
- evidenceDocument.source?.repository === request.source.repository &&
85
- evidenceDocument.source?.sha === request.source.sha &&
86
- evidenceDocument.source?.treeSha === request.source.treeSha &&
87
- evidenceDocument.buildchain?.runtimeSha === request.runtime.sha &&
88
- evidenceDocument.app?.architecture === request.artifact.arch &&
89
- evidenceDocument.notarization?.application?.status === "Accepted" &&
90
- evidenceDocument.notarization?.diskImage?.status === "Accepted"
91
- : evidenceDocument.status === "passed" &&
92
- evidenceDocument.provider === request.signature.provider;
105
+ const expectedExecution = expectedCredentialExecution(
106
+ appBundleResult,
107
+ expectedRunId,
108
+ expectedRunAttempt,
109
+ );
110
+ const providerEvidencePassed = acceptedProviderEvidence(
111
+ evidenceDocument,
112
+ request,
113
+ expectedExecution,
114
+ );
93
115
  if (!providerEvidencePassed) {
94
116
  throw new Error(
95
117
  "provider evidence does not prove the requested native signature",