@kungfu-tech/buildchain 4.0.1-alpha.37 → 4.0.1-alpha.39

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.
@@ -8846,8 +8846,8 @@
8846
8846
  "workflowRegistryPath": "dist/site/workflow-registry.json",
8847
8847
  "pageRegistryPath": "dist/site/page-registry.json",
8848
8848
  "cliRegistryDigest": "ea47a31ce7ef3577f23e22055ab7be7715c3af494bcef63f76b426f2883086aa",
8849
- "workflowRegistryDigest": "9e42b64221ce75615ccf783dd9db878b7be250964c35701b030a704740f8bbd9",
8850
- "pageRegistryDigest": "619910e5c57fb8e94ea1525de1fb7699c412a8dafd7269bc9354cc6c4fe83f48"
8849
+ "workflowRegistryDigest": "0a2a2087a2790e8cbe0a7cbdcd2646c0567a2c36cd10dee5f38cf3dc2c603aee",
8850
+ "pageRegistryDigest": "1c6ec0e488e5c2e36df00ab65984c067240dc24b84f57a0e1cd9e8681e52c076"
8851
8851
  },
8852
8852
  "comparison": {
8853
8853
  "missingCliRegistry": [],
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-08-24T06:09:08.176Z",
5
- "publishedAt": "2026-08-24T06:09:08.176Z",
4
+ "generatedAt": "2026-08-25T13:52:04.281Z",
5
+ "publishedAt": "2026-08-25T13:52:04.281Z",
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": "4301b1d6db0027ed877f16b1d807d6f5894170fc",
22
+ "sourceRevision": "4c7b1cd12fe47e4f8b76f08f118a0ed18f23b142",
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": "4.0.1-alpha.37",
35
+ "version": "4.0.1-alpha.39",
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-24T06:09:08.176Z",
5
- "publishedAt": "2026-08-24T06:09:08.176Z",
4
+ "generatedAt": "2026-08-25T13:52:04.281Z",
5
+ "publishedAt": "2026-08-25T13:52:04.281Z",
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": "4301b1d6db0027ed877f16b1d807d6f5894170fc",
22
+ "sourceRevision": "4c7b1cd12fe47e4f8b76f08f118a0ed18f23b142",
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": "4.0.1-alpha.37",
40
+ "version": "4.0.1-alpha.39",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -253,7 +253,7 @@
253
253
  "path": "docs/node-api-reference.md",
254
254
  "plane": "use",
255
255
  "exists": true,
256
- "digest": "sha256:da744d2071ab7871eccbf6b3049a4d8a44b21daa477598fa9327a28b7d89ae67"
256
+ "digest": "sha256:e8a597dae50b7907221d6ae8ed21eccee94001c3463e8671b49ec010f12d2b68"
257
257
  },
258
258
  {
259
259
  "id": "build-facts",
@@ -2027,7 +2027,7 @@
2027
2027
  "status": "preview",
2028
2028
  "owner": "buildchain-workflows",
2029
2029
  "maturity": "preview",
2030
- "introducedVersion": "4.0.1-alpha.37",
2030
+ "introducedVersion": "4.0.1-alpha.39",
2031
2031
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2032
2032
  "deprecationReplacement": "",
2033
2033
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2048,7 +2048,7 @@
2048
2048
  "status": "preview",
2049
2049
  "owner": "buildchain-workflows",
2050
2050
  "maturity": "preview",
2051
- "introducedVersion": "4.0.1-alpha.37",
2051
+ "introducedVersion": "4.0.1-alpha.39",
2052
2052
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2053
2053
  "deprecationReplacement": "",
2054
2054
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2069,7 +2069,7 @@
2069
2069
  "status": "preview",
2070
2070
  "owner": "buildchain-workflows",
2071
2071
  "maturity": "preview",
2072
- "introducedVersion": "4.0.1-alpha.37",
2072
+ "introducedVersion": "4.0.1-alpha.39",
2073
2073
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2074
2074
  "deprecationReplacement": "",
2075
2075
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2119,7 +2119,7 @@
2119
2119
  "status": "preview",
2120
2120
  "owner": "buildchain-workflows",
2121
2121
  "maturity": "preview",
2122
- "introducedVersion": "4.0.1-alpha.37",
2122
+ "introducedVersion": "4.0.1-alpha.39",
2123
2123
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2124
2124
  "deprecationReplacement": "",
2125
2125
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -1674,13 +1674,13 @@ Target: `./packages/core/dev-delivery-authority-landing.js`. Public symbols: 35.
1674
1674
 
1675
1675
  ## `@kungfu-tech/buildchain/dev-delivery-warrant`
1676
1676
 
1677
- Target: `./packages/core/dev-delivery-warrant.js`. Public symbols: 54.
1677
+ Target: `./packages/core/dev-delivery-warrant.js`. Public symbols: 56.
1678
1678
 
1679
1679
  | Symbol | Kind and signature | Parameters | Return | Errors | Side effects | Example | Source |
1680
1680
  | --- | --- | --- | --- | --- | --- | --- | --- |
1681
- | `cancelQueuedDevDeliveryCandidate` | function: function cancelQueuedDevDeliveryCandidate(queueInput, input, options) | queueInput, input, options | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { cancelQueuedDevDeliveryCandidate } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:508` |
1681
+ | `cancelQueuedDevDeliveryCandidate` | function: function cancelQueuedDevDeliveryCandidate(queueInput, input, options) | queueInput, input, options | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { cancelQueuedDevDeliveryCandidate } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:511` |
1682
1682
  | `classifyDevDeliveryDelta` | function: function classifyDevDeliveryDelta({ proof, current = {} } = {}) | { proof, current = {} } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { classifyDevDeliveryDelta } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-proof.js:109` |
1683
- | `closeDevDeliveryWarrant` | function: function closeDevDeliveryWarrant(queueInput, warrant, { outcome, evidenceRoot, reason = "", providerFailureAuthority = null, now = new Date().toISOString(), } = {}) | queueInput, warrant, { outcome, evidenceRoot, reason = "", providerFailureAuthority = null, now = new Date().toISOString(), } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { closeDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:384` |
1683
+ | `closeDevDeliveryWarrant` | function: function closeDevDeliveryWarrant(queueInput, warrant, { outcome, evidenceRoot, reason = "", providerFailureAuthority = null, now = new Date().toISOString(), } = {}) | queueInput, warrant, { outcome, evidenceRoot, reason = "", providerFailureAuthority = null, now = new Date().toISOString(), } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { closeDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:387` |
1684
1684
  | `createDevDeliveryQueue` | value: createDevDeliveryQueue | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { createDevDeliveryQueue } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
1685
1685
  | `createIntegrationDeliveryProof` | function: function createIntegrationDeliveryProof(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 { createIntegrationDeliveryProof } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-proof.js:241` |
1686
1686
  | `createNativeCommandContract` | value: createNativeCommandContract | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { createNativeCommandContract } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-native-proof.js:1` |
@@ -1703,9 +1703,10 @@ Target: `./packages/core/dev-delivery-warrant.js`. Public symbols: 54.
1703
1703
  | `DEV_DELIVERY_SELECTION_RECEIPT_SCHEMA` | value: DEV_DELIVERY_SELECTION_RECEIPT_SCHEMA | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { DEV_DELIVERY_SELECTION_RECEIPT_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
1704
1704
  | `DEV_DELIVERY_SETTLEMENT_RECEIPT_SCHEMA` | value: DEV_DELIVERY_SETTLEMENT_RECEIPT_SCHEMA | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { DEV_DELIVERY_SETTLEMENT_RECEIPT_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
1705
1705
  | `DEV_DELIVERY_SUBMISSION_RECEIPT_SCHEMA` | value: DEV_DELIVERY_SUBMISSION_RECEIPT_SCHEMA | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { DEV_DELIVERY_SUBMISSION_RECEIPT_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
1706
+ | `DEV_DELIVERY_TERMINAL_EVIDENCE_CORRECTION_SCHEMA` | value: DEV_DELIVERY_TERMINAL_EVIDENCE_CORRECTION_SCHEMA | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { DEV_DELIVERY_TERMINAL_EVIDENCE_CORRECTION_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
1706
1707
  | `DEV_DELIVERY_WARRANT_SCHEMA` | value: DEV_DELIVERY_WARRANT_SCHEMA | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { DEV_DELIVERY_WARRANT_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
1707
1708
  | `devDeliveryContentRoot` | function: function devDeliveryContentRoot(value) | value | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { devDeliveryContentRoot } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-common.js:27` |
1708
- | `heartbeatDevDeliveryWarrant` | function: function heartbeatDevDeliveryWarrant(queueInput, warrant, { now = new Date().toISOString(), leaseSeconds } = {}) | queueInput, warrant, { now = new Date().toISOString(), leaseSeconds } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { heartbeatDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:255` |
1709
+ | `heartbeatDevDeliveryWarrant` | function: function heartbeatDevDeliveryWarrant(queueInput, warrant, { now = new Date().toISOString(), leaseSeconds } = {}) | queueInput, warrant, { now = new Date().toISOString(), leaseSeconds } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { heartbeatDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:258` |
1709
1710
  | `INTEGRATION_DELIVERY_PROOF_SCHEMA` | constant: const INTEGRATION_DELIVERY_PROOF_SCHEMA | none | value | Import does not declare a throw contract. | none-on-import | `import { INTEGRATION_DELIVERY_PROOF_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-proof.js:6` |
1710
1711
  | `NATIVE_COMMAND_CONTRACT_SCHEMA` | value: NATIVE_COMMAND_CONTRACT_SCHEMA | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { NATIVE_COMMAND_CONTRACT_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-native-proof.js:1` |
1711
1712
  | `NATIVE_EXECUTION_BINDING_SCHEMA` | value: NATIVE_EXECUTION_BINDING_SCHEMA | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { NATIVE_EXECUTION_BINDING_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-native-proof.js:1` |
@@ -1715,14 +1716,15 @@ Target: `./packages/core/dev-delivery-warrant.js`. Public symbols: 54.
1715
1716
  | `NATIVE_QUALIFICATION_PROOF_SCHEMA` | constant: const NATIVE_QUALIFICATION_PROOF_SCHEMA | none | value | Import does not declare a throw contract. | none-on-import | `import { NATIVE_QUALIFICATION_PROOF_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-native-proof.js:31` |
1716
1717
  | `normalizeDevDeliveryQueue` | value: normalizeDevDeliveryQueue | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { normalizeDevDeliveryQueue } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
1717
1718
  | `normalizeNativeCommandContract` | value: normalizeNativeCommandContract | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { normalizeNativeCommandContract } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-native-proof.js:1` |
1718
- | `observeDevDeliveryQueue` | function: function observeDevDeliveryQueue(queueInput, { now = new Date().toISOString(), allowLegacyV3Readback = false } = {}) | queueInput, { now = new Date().toISOString(), allowLegacyV3Readback = false } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { observeDevDeliveryQueue } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:517` |
1719
+ | `observeDevDeliveryQueue` | function: function observeDevDeliveryQueue(queueInput, { now = new Date().toISOString(), allowLegacyV3Readback = false } = {}) | queueInput, { now = new Date().toISOString(), allowLegacyV3Readback = false } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { observeDevDeliveryQueue } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:525` |
1719
1720
  | `PROJECT_CUT_REPLAY_PROOF_SCHEMA` | constant: const PROJECT_CUT_REPLAY_PROOF_SCHEMA | none | value | Import does not declare a throw contract. | none-on-import | `import { PROJECT_CUT_REPLAY_PROOF_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-proof.js:5` |
1720
- | `qualifyDevDeliveryWarrant` | constant: const qualifyDevDeliveryWarrant | none | value | Import does not declare a throw contract. | none-on-import | `import { qualifyDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:380` |
1721
+ | `qualifyDevDeliveryWarrant` | constant: const qualifyDevDeliveryWarrant | none | value | Import does not declare a throw contract. | none-on-import | `import { qualifyDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:383` |
1721
1722
  | `rankDevDeliveryCandidates` | value: rankDevDeliveryCandidates | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { rankDevDeliveryCandidates } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
1722
- | `recoverExpiredDevDeliveryWarrant` | function: function recoverExpiredDevDeliveryWarrant(queueInput, { now = new Date().toISOString() } = {}) | queueInput, { now = new Date().toISOString() } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { recoverExpiredDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:301` |
1723
+ | `reconcileDevDeliveryTerminalEvidence` | constant: const reconcileDevDeliveryTerminalEvidence | none | value | Import does not declare a throw contract. | none-on-import | `import { reconcileDevDeliveryTerminalEvidence } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:520` |
1724
+ | `recoverExpiredDevDeliveryWarrant` | function: function recoverExpiredDevDeliveryWarrant(queueInput, { now = new Date().toISOString() } = {}) | queueInput, { now = new Date().toISOString() } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { recoverExpiredDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:304` |
1723
1725
  | `RELEASE_BLOCKER_PRIORITY_CLAIM_SCHEMA` | constant: const RELEASE_BLOCKER_PRIORITY_CLAIM_SCHEMA | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_BLOCKER_PRIORITY_CLAIM_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/release-blocker-priority.js:15` |
1724
- | `selectDevDeliveryWarrant` | function: function selectDevDeliveryWarrant(queueInput, { now = new Date().toISOString(), leaseSeconds } = {}) | queueInput, { now = new Date().toISOString(), leaseSeconds } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { selectDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:95` |
1725
- | `settleDevDeliveryTerminalEvent` | constant: const settleDevDeliveryTerminalEvent | none | value | Import does not declare a throw contract. | none-on-import | `import { settleDevDeliveryTerminalEvent } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:511` |
1726
+ | `selectDevDeliveryWarrant` | function: function selectDevDeliveryWarrant(queueInput, { now = new Date().toISOString(), leaseSeconds } = {}) | queueInput, { now = new Date().toISOString(), leaseSeconds } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { selectDevDeliveryWarrant } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:98` |
1727
+ | `settleDevDeliveryTerminalEvent` | constant: const settleDevDeliveryTerminalEvent | none | value | Import does not declare a throw contract. | none-on-import | `import { settleDevDeliveryTerminalEvent } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:514` |
1726
1728
  | `SOURCE_QUALIFICATION_PROOF_SCHEMA` | constant: const SOURCE_QUALIFICATION_PROOF_SCHEMA | none | value | Import does not declare a throw contract. | none-on-import | `import { SOURCE_QUALIFICATION_PROOF_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-proof.js:3` |
1727
1729
  | `SOURCE_QUALIFICATION_PROOF_V2_SCHEMA` | constant: const SOURCE_QUALIFICATION_PROOF_V2_SCHEMA | none | value | Import does not declare a throw contract. | none-on-import | `import { SOURCE_QUALIFICATION_PROOF_V2_SCHEMA } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-proof.js:4` |
1728
1730
  | `submitDevDeliveryCandidate` | value: submitDevDeliveryCandidate | none | unknown | No narrower error contract was mechanically discoverable. | unknown | `import { submitDevDeliveryCandidate } from "@kungfu-tech/buildchain/dev-delivery-warrant";` | `packages/core/dev-delivery-warrant.js:1` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "4.0.1-alpha.37",
3
+ "version": "4.0.1-alpha.39",
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",
@@ -1,13 +1,18 @@
1
1
  import {
2
+ devDeliveryClone as clone,
2
3
  devDeliveryContentRoot,
3
4
  devDeliveryExactRoot as exactRoot,
4
5
  devDeliveryExactSha as exactSha,
5
6
  devDeliveryPositiveInteger as positiveInteger,
6
7
  devDeliveryText as text,
8
+ devDeliveryTimestamp as timestamp,
7
9
  } from "./dev-delivery-common.js";
10
+ import { verifyIntegrationDeliveryProof } from "./dev-delivery-proof.js";
8
11
 
9
12
  export const DEV_DELIVERY_SETTLEMENT_RECEIPT_SCHEMA =
10
13
  "kungfu.buildchain.dev-delivery-settlement-receipt/v1";
14
+ export const DEV_DELIVERY_TERMINAL_EVIDENCE_CORRECTION_SCHEMA =
15
+ "kungfu.buildchain.dev-delivery-terminal-evidence-correction/v1";
11
16
 
12
17
  const PROVIDER_FAILURE_FIELDS = [
13
18
  "transferRoot",
@@ -16,6 +21,233 @@ const PROVIDER_FAILURE_FIELDS = [
16
21
  "sealJobId",
17
22
  ];
18
23
 
24
+ function correctionBody(input) {
25
+ const body = clone(input || {});
26
+ delete body.correctionRoot;
27
+ return body;
28
+ }
29
+
30
+ export function normalizeTerminalEvidenceCorrection(
31
+ input,
32
+ { candidate, repository, protectedBase } = {},
33
+ ) {
34
+ const correction = correctionBody(input);
35
+ if (correction.schema !== DEV_DELIVERY_TERMINAL_EVIDENCE_CORRECTION_SCHEMA) {
36
+ throw new Error("unsupported terminal evidence correction schema");
37
+ }
38
+ correction.candidateId = exactRoot(
39
+ correction.candidateId,
40
+ "terminal evidence correction candidateId",
41
+ );
42
+ correction.pullRequestNumber = positiveInteger(
43
+ correction.pullRequestNumber,
44
+ "terminal evidence correction pullRequestNumber",
45
+ );
46
+ correction.sourceHead = exactSha(
47
+ correction.sourceHead,
48
+ "terminal evidence correction sourceHead",
49
+ );
50
+ correction.outcome = text(correction.outcome);
51
+ correction.priorEvidenceRoot = exactRoot(
52
+ correction.priorEvidenceRoot,
53
+ "terminal evidence correction priorEvidenceRoot",
54
+ );
55
+ correction.correctedAt = timestamp(
56
+ correction.correctedAt,
57
+ "terminal evidence correction correctedAt",
58
+ );
59
+ correction.reason = text(correction.reason);
60
+ if (!correction.reason) {
61
+ throw new Error("terminal evidence correction reason is required");
62
+ }
63
+ const verification = verifyIntegrationDeliveryProof(
64
+ correction.integrationProof,
65
+ );
66
+ if (!verification.ok) {
67
+ throw new Error(
68
+ `terminal evidence correction requires an exact integration proof: ${verification.reason}`,
69
+ );
70
+ }
71
+ if (
72
+ correction.integrationProof.currentBase !==
73
+ correction.integrationProof.mergeGroupHead ||
74
+ correction.integrationProof.replayTree !==
75
+ correction.integrationProof.mergeGroupTree
76
+ ) {
77
+ throw new Error(
78
+ "terminal evidence correction requires exact merge-group commit and tree continuity",
79
+ );
80
+ }
81
+ if (candidate) {
82
+ const checks = {
83
+ candidateId: correction.candidateId === candidate.candidateId,
84
+ pullRequestNumber:
85
+ correction.pullRequestNumber === candidate.pullRequestNumber,
86
+ sourceHead: correction.sourceHead === candidate.sourceHead,
87
+ outcome:
88
+ correction.outcome === candidate.status &&
89
+ correction.outcome === candidate.terminal?.outcome,
90
+ priorEvidenceRoot:
91
+ correction.priorEvidenceRoot === candidate.terminal?.evidenceRoot,
92
+ repository: correction.integrationProof.repository === repository,
93
+ protectedBase:
94
+ correction.integrationProof.protectedBase === protectedBase,
95
+ sourceProofRoot:
96
+ correction.integrationProof.sourceProofRoot ===
97
+ candidate.sourceProofRoot,
98
+ warrantCandidateId:
99
+ correction.integrationProof.warrantCandidateId ===
100
+ candidate.candidateId,
101
+ warrantFencingToken:
102
+ correction.integrationProof.warrantFencingToken ===
103
+ candidate.terminal?.fencingToken,
104
+ warrantGeneration:
105
+ correction.integrationProof.warrantGeneration ===
106
+ candidate.terminal?.leaseGeneration,
107
+ };
108
+ const failed = Object.entries(checks)
109
+ .filter(([, matches]) => !matches)
110
+ .map(([field]) => field);
111
+ if (failed.length > 0) {
112
+ throw new Error(
113
+ `terminal evidence correction identity drift: ${failed.join(", ")}`,
114
+ );
115
+ }
116
+ }
117
+ const correctionRoot = devDeliveryContentRoot(correction);
118
+ if (input?.correctionRoot && input.correctionRoot !== correctionRoot) {
119
+ throw new Error("terminal evidence correction root drift");
120
+ }
121
+ return { ...correction, correctionRoot };
122
+ }
123
+
124
+ export function effectiveTerminalEvidenceRoot(candidate) {
125
+ return (
126
+ candidate?.terminal?.integrationEvidenceCorrection?.integrationProof
127
+ ?.proofRoot ||
128
+ candidate?.terminal?.evidenceRoot ||
129
+ ""
130
+ );
131
+ }
132
+
133
+ export function createTerminalEvidenceCorrection(
134
+ candidate,
135
+ input,
136
+ { repository, protectedBase, now } = {},
137
+ ) {
138
+ return normalizeTerminalEvidenceCorrection(
139
+ {
140
+ schema: DEV_DELIVERY_TERMINAL_EVIDENCE_CORRECTION_SCHEMA,
141
+ candidateId: candidate?.candidateId,
142
+ pullRequestNumber: candidate?.pullRequestNumber,
143
+ sourceHead: candidate?.sourceHead,
144
+ outcome: candidate?.status,
145
+ priorEvidenceRoot: input?.expectedPriorEvidenceRoot,
146
+ integrationProof: input?.integrationProof,
147
+ correctedAt: now,
148
+ reason: input?.reason,
149
+ },
150
+ { candidate, repository, protectedBase },
151
+ );
152
+ }
153
+
154
+ export function createDevDeliveryTerminalEvidenceReconciler({
155
+ normalizeQueue,
156
+ transition,
157
+ }) {
158
+ return function reconcileDevDeliveryTerminalEvidence(
159
+ queueInput,
160
+ input,
161
+ { now = new Date().toISOString() } = {},
162
+ ) {
163
+ const before = normalizeQueue(queueInput);
164
+ const candidate = before.candidates.find(
165
+ (entry) =>
166
+ entry.candidateId === exactRoot(input?.candidateId, "candidateId"),
167
+ );
168
+ if (!candidate)
169
+ throw new Error("terminal evidence candidate does not exist");
170
+ if (candidate.status !== "merged") {
171
+ throw new Error(
172
+ "integration evidence correction requires a merged candidate",
173
+ );
174
+ }
175
+ const existing = candidate.terminal?.integrationEvidenceCorrection;
176
+ const correction = createTerminalEvidenceCorrection(candidate, input, {
177
+ repository: before.repository,
178
+ protectedBase: before.protectedBase,
179
+ now: existing?.correctedAt || timestamp(now, "now"),
180
+ });
181
+ if (existing) {
182
+ if (existing.correctionRoot !== correction.correctionRoot) {
183
+ throw new Error(
184
+ "terminal evidence correction already exists with different evidence",
185
+ );
186
+ }
187
+ const receipt = {
188
+ schema: DEV_DELIVERY_SETTLEMENT_RECEIPT_SCHEMA,
189
+ action: "duplicate-terminal-evidence-correction-noop",
190
+ applicable: true,
191
+ repository: before.repository,
192
+ protectedBase: before.protectedBase,
193
+ candidateId: candidate.candidateId,
194
+ pullRequestNumber: candidate.pullRequestNumber,
195
+ sourceHead: candidate.sourceHead,
196
+ outcome: candidate.status,
197
+ priorEvidenceRoot: candidate.terminal.evidenceRoot,
198
+ evidenceRoot: correction.integrationProof.proofRoot,
199
+ correctionRoot: correction.correctionRoot,
200
+ expectedOldStateRoot: before.stateRoot,
201
+ nextStateRoot: before.stateRoot,
202
+ nextAction:
203
+ "Retain the exact verified integration evidence correction.",
204
+ };
205
+ return {
206
+ queue: before,
207
+ receipt,
208
+ receiptRoot: devDeliveryContentRoot(receipt),
209
+ };
210
+ }
211
+ const transaction = transition(
212
+ before,
213
+ (queue) => {
214
+ const mutable = queue.candidates.find(
215
+ (entry) => entry.candidateId === candidate.candidateId,
216
+ );
217
+ mutable.terminal = {
218
+ ...mutable.terminal,
219
+ integrationEvidenceCorrection: correction,
220
+ };
221
+ return { candidate: mutable };
222
+ },
223
+ correction.correctedAt,
224
+ );
225
+ const receipt = {
226
+ schema: DEV_DELIVERY_SETTLEMENT_RECEIPT_SCHEMA,
227
+ action: "terminal-evidence-corrected",
228
+ applicable: true,
229
+ repository: transaction.after.repository,
230
+ protectedBase: transaction.after.protectedBase,
231
+ candidateId: candidate.candidateId,
232
+ pullRequestNumber: candidate.pullRequestNumber,
233
+ sourceHead: candidate.sourceHead,
234
+ outcome: candidate.status,
235
+ priorEvidenceRoot: candidate.terminal.evidenceRoot,
236
+ evidenceRoot: correction.integrationProof.proofRoot,
237
+ correctionRoot: correction.correctionRoot,
238
+ expectedOldStateRoot: transaction.expectedOldStateRoot,
239
+ nextStateRoot: transaction.after.stateRoot,
240
+ nextAction:
241
+ "Read back the corrected terminal candidate and repeat settlement idempotently.",
242
+ };
243
+ return {
244
+ queue: transaction.after,
245
+ receipt,
246
+ receiptRoot: devDeliveryContentRoot(receipt),
247
+ };
248
+ };
249
+ }
250
+
19
251
  export function normalizeProviderFailureAuthorityBinding(
20
252
  input = {},
21
253
  { required = false } = {},
@@ -56,7 +288,7 @@ function noopReceipt(queue, identity, candidate, action, details = {}) {
56
288
  outcome: identity.outcome,
57
289
  candidateId: candidate?.candidateId || null,
58
290
  evidenceRoot:
59
- candidate?.terminal?.evidenceRoot || identity.evidenceRoot || null,
291
+ effectiveTerminalEvidenceRoot(candidate) || identity.evidenceRoot || null,
60
292
  expectedOldStateRoot: queue.stateRoot,
61
293
  nextStateRoot: queue.stateRoot,
62
294
  nextAction: "No fenced delivery state remains for this terminal event.",
@@ -95,7 +327,7 @@ function settleTerminalCandidate(queue, identity, candidate) {
95
327
  "duplicate terminal event provider failure authority drift",
96
328
  );
97
329
  }
98
- if (candidate.terminal?.evidenceRoot !== identity.evidenceRoot) {
330
+ if (effectiveTerminalEvidenceRoot(candidate) !== identity.evidenceRoot) {
99
331
  throw new Error("duplicate terminal event evidenceRoot drift");
100
332
  }
101
333
  const receipt = noopReceipt(
@@ -19,7 +19,10 @@ import {
19
19
  normalizeNativeCommandContract,
20
20
  validateActiveDevDeliveryWarrant,
21
21
  } from "./dev-delivery-native-proof.js";
22
- import { normalizeProviderFailureAuthorityBinding } from "./dev-delivery-warrant-settlement.js";
22
+ import {
23
+ normalizeProviderFailureAuthorityBinding,
24
+ normalizeTerminalEvidenceCorrection,
25
+ } from "./dev-delivery-warrant-settlement.js";
23
26
  import {
24
27
  compareReleaseBlockerPriority,
25
28
  normalizeReleaseBlockerPriorityClaim,
@@ -244,8 +247,18 @@ function normalizeCandidate(input, expected) {
244
247
  "provider failure authority can exist only on terminal-failure state",
245
248
  );
246
249
  }
247
- if (failureAuthority) {
250
+ if (failureAuthority)
248
251
  candidate.terminal = { ...candidate.terminal, ...failureAuthority };
252
+ if (candidate.terminal.integrationEvidenceCorrection) {
253
+ candidate.terminal.integrationEvidenceCorrection =
254
+ normalizeTerminalEvidenceCorrection(
255
+ candidate.terminal.integrationEvidenceCorrection,
256
+ {
257
+ candidate,
258
+ repository: expected.repository,
259
+ protectedBase: expected.protectedBase,
260
+ },
261
+ );
249
262
  }
250
263
  }
251
264
  if (Object.hasOwn(input, "affectedPaths")) {
@@ -11,7 +11,9 @@ import {
11
11
  createCancelQueuedDevDeliveryCandidate,
12
12
  } from "./dev-delivery-warrant-cancellation.js";
13
13
  import {
14
+ createDevDeliveryTerminalEvidenceReconciler,
14
15
  DEV_DELIVERY_SETTLEMENT_RECEIPT_SCHEMA,
16
+ DEV_DELIVERY_TERMINAL_EVIDENCE_CORRECTION_SCHEMA,
15
17
  createDevDeliveryTerminalSettler,
16
18
  normalizeProviderFailureAuthorityBinding,
17
19
  } from "./dev-delivery-warrant-settlement.js";
@@ -91,6 +93,7 @@ export {
91
93
  };
92
94
  export { DEV_DELIVERY_CANCELLATION_RECEIPT_SCHEMA };
93
95
  export { DEV_DELIVERY_SETTLEMENT_RECEIPT_SCHEMA };
96
+ export { DEV_DELIVERY_TERMINAL_EVIDENCE_CORRECTION_SCHEMA };
94
97
 
95
98
  export function selectDevDeliveryWarrant(
96
99
  queueInput,
@@ -514,6 +517,11 @@ export const settleDevDeliveryTerminalEvent = createDevDeliveryTerminalSettler({
514
517
  cancelQueued: cancelQueuedDevDeliveryCandidate,
515
518
  terminalStates: TERMINAL_STATES,
516
519
  });
520
+ export const reconcileDevDeliveryTerminalEvidence =
521
+ createDevDeliveryTerminalEvidenceReconciler({
522
+ normalizeQueue: normalizeDevDeliveryQueue,
523
+ transition,
524
+ });
517
525
  export function observeDevDeliveryQueue(
518
526
  queueInput,
519
527
  { now = new Date().toISOString(), allowLegacyV3Readback = false } = {},
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env node
2
+ import fs from "node:fs";
3
+ import {
4
+ ProjectCutAdmissionError,
5
+ qualifyProjectCut,
6
+ releaseFamilyQueueLease,
7
+ } from "./project-cut-merge-queue-admission.mjs";
8
+
9
+ function parseArguments(argv) {
10
+ const options = {};
11
+ const names = new Map([
12
+ ["--base", "base"],
13
+ ["--head", "head"],
14
+ ["--initiative-id", "initiativeId"],
15
+ ["--assignment-id", "assignmentId"],
16
+ ["--delivery-class", "deliveryClass"],
17
+ ["--queue-attempt", "queueAttempt"],
18
+ ["--admission-proof-root", "admissionProofRoot"],
19
+ ["--release-family-marker", "releaseFamilyMarker"],
20
+ ["--expected-pr-head", "expectedPullRequestHead"],
21
+ ["--terminal-reason", "terminalReason"],
22
+ ["--evidence-root", "evidenceRoot"],
23
+ ]);
24
+ for (let index = 0; index < argv.length; index += 1) {
25
+ const name = argv[index];
26
+ const key = names.get(name);
27
+ if (!key) throw new Error(`unknown argument: ${name}`);
28
+ const value = argv[index + 1];
29
+ if (value === undefined || value.startsWith("--"))
30
+ throw new Error(`${name} requires a value`);
31
+ if (Object.hasOwn(options, key))
32
+ throw new Error(`${name} was provided more than once`);
33
+ options[key] = value;
34
+ index += 1;
35
+ }
36
+ return options;
37
+ }
38
+
39
+ function markerText(path) {
40
+ return path === "-"
41
+ ? fs.readFileSync(0, "utf8")
42
+ : fs.readFileSync(path, "utf8");
43
+ }
44
+
45
+ function repairReceipt(error) {
46
+ return {
47
+ schema: "project.cut.merge-queue-admission/v1",
48
+ ok: false,
49
+ decision: "repair-required",
50
+ retryable: false,
51
+ compositionChanged: false,
52
+ reasonCodes: [error.reasonCode],
53
+ error: error.message,
54
+ };
55
+ }
56
+
57
+ export function main(argv = process.argv.slice(2)) {
58
+ try {
59
+ const options = parseArguments(argv);
60
+ if (options.releaseFamilyMarker) {
61
+ console.log(
62
+ JSON.stringify(
63
+ releaseFamilyQueueLease(
64
+ markerText(options.releaseFamilyMarker),
65
+ options,
66
+ ),
67
+ ),
68
+ );
69
+ return 0;
70
+ }
71
+ if (!options.base || !options.head)
72
+ throw new Error("--base and --head are required");
73
+ console.log(
74
+ JSON.stringify(qualifyProjectCut({ cwd: process.cwd(), ...options })),
75
+ );
76
+ return 0;
77
+ } catch (error) {
78
+ if (error instanceof ProjectCutAdmissionError) {
79
+ console.log(JSON.stringify(repairReceipt(error)));
80
+ return 1;
81
+ }
82
+ console.error(`project-cut admission error: ${error.message}`);
83
+ return 2;
84
+ }
85
+ }
86
+
87
+ if (import.meta.url === `file://${process.argv[1]}`) process.exitCode = main();
@@ -7,6 +7,32 @@ export function hasFlag(args, name) {
7
7
  return args.includes(`--${name}`);
8
8
  }
9
9
 
10
+ function terminalEvidenceOptions(rest, environment) {
11
+ return {
12
+ outcome: flag(rest, "outcome", environment.BUILDCHAIN_DEV_DELIVERY_OUTCOME),
13
+ eventAction: flag(
14
+ rest,
15
+ "event-action",
16
+ environment.BUILDCHAIN_DEV_DELIVERY_EVENT_ACTION,
17
+ ),
18
+ evidenceRoot: flag(
19
+ rest,
20
+ "evidence-root",
21
+ environment.BUILDCHAIN_DEV_DELIVERY_EVIDENCE_ROOT,
22
+ ),
23
+ expectedPriorEvidenceRoot: flag(
24
+ rest,
25
+ "expected-prior-evidence-root",
26
+ environment.BUILDCHAIN_DEV_DELIVERY_EXPECTED_PRIOR_EVIDENCE_ROOT,
27
+ ),
28
+ integrationProofPath: flag(
29
+ rest,
30
+ "integration-proof",
31
+ environment.BUILDCHAIN_DEV_DELIVERY_INTEGRATION_PROOF,
32
+ ),
33
+ };
34
+ }
35
+
10
36
  export function devDeliveryCliOptions(args = [], environment = process.env) {
11
37
  const [command = "", ...rest] = args;
12
38
  return {
@@ -196,17 +222,7 @@ export function devDeliveryCliOptions(args = [], environment = process.env) {
196
222
  "lease-seconds",
197
223
  environment.BUILDCHAIN_DEV_DELIVERY_LEASE_SECONDS,
198
224
  ),
199
- outcome: flag(rest, "outcome", environment.BUILDCHAIN_DEV_DELIVERY_OUTCOME),
200
- eventAction: flag(
201
- rest,
202
- "event-action",
203
- environment.BUILDCHAIN_DEV_DELIVERY_EVENT_ACTION,
204
- ),
205
- evidenceRoot: flag(
206
- rest,
207
- "evidence-root",
208
- environment.BUILDCHAIN_DEV_DELIVERY_EVIDENCE_ROOT,
209
- ),
225
+ ...terminalEvidenceOptions(rest, environment),
210
226
  transferRoot: flag(rest, "transfer-root"),
211
227
  finalizerBoundaryRoot: flag(rest, "finalizer-boundary-root"),
212
228
  nativeJobId: flag(rest, "native-job-id"),