@kungfu-tech/buildchain 3.0.6-alpha.6 → 3.0.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.
- package/actions/promote-buildchain-ref/README.md +5 -1
- package/contracts/release-candidate-recovery-v1.schema.json +1 -0
- package/dist/site/buildchain-contract.json +23 -18
- package/dist/site/buildchain-site.json +15 -15
- package/dist/site/controller-registry.json +6 -2
- package/dist/site/kfd-claims.json +10 -5
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +3 -3
- package/dist/site/node-api-registry.json +77 -13
- package/dist/site/page-registry.json +8 -8
- package/dist/site/public-surface-audit.json +10 -5
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +7 -7
- package/dist/site/workflow-registry.json +8 -3
- package/docs/node-api-reference.md +22 -20
- package/docs/release-candidate.md +26 -1
- package/docs/release-governance.md +6 -0
- package/package.json +1 -1
- package/packages/core/publication-sealed-bundle.js +10 -1
- package/packages/core/release-candidate-recovery.js +89 -1
- package/scripts/audit-publication-control-plane.mjs +12 -4
- package/scripts/check-inventory.mjs +10 -1
- package/scripts/generate-channel-promotion-workflow.mjs +30 -14
- package/scripts/release-candidate-resolver.mjs +32 -6
- package/scripts/resume-from-candidate-run.mjs +127 -56
|
@@ -907,6 +907,9 @@
|
|
|
907
907
|
"buildchain-ref",
|
|
908
908
|
"buildchain-repository",
|
|
909
909
|
"consumer-gate-command",
|
|
910
|
+
"consumer-gate-controller-sha",
|
|
911
|
+
"consumer-gate-evidence-source-sha",
|
|
912
|
+
"consumer-gate-evidence-source-tree",
|
|
910
913
|
"consumer-predicate-digest",
|
|
911
914
|
"consumer-predicate-id",
|
|
912
915
|
"consumer-qualification-required",
|
|
@@ -934,7 +937,7 @@
|
|
|
934
937
|
"target-ref",
|
|
935
938
|
"used-nonces-json"
|
|
936
939
|
],
|
|
937
|
-
"inputCount":
|
|
940
|
+
"inputCount": 37,
|
|
938
941
|
"secrets": [
|
|
939
942
|
"KUNGFU_GOVERNANCE_AUDITOR_APP_PRIVATE_KEY"
|
|
940
943
|
],
|
|
@@ -997,6 +1000,7 @@
|
|
|
997
1000
|
"publication-expected-json",
|
|
998
1001
|
"publication-gate-aggregate-json",
|
|
999
1002
|
"publication-gate-command",
|
|
1003
|
+
"publication-gate-controller-sha",
|
|
1000
1004
|
"publication-package-name",
|
|
1001
1005
|
"publication-product",
|
|
1002
1006
|
"publication-publisher-workflow-path",
|
|
@@ -1060,7 +1064,7 @@
|
|
|
1060
1064
|
"target-sha",
|
|
1061
1065
|
"trusted-publishing"
|
|
1062
1066
|
],
|
|
1063
|
-
"inputCount":
|
|
1067
|
+
"inputCount": 107,
|
|
1064
1068
|
"secrets": [
|
|
1065
1069
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
1066
1070
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -2419,6 +2423,7 @@
|
|
|
2419
2423
|
"publication-expected-json",
|
|
2420
2424
|
"publication-gate-aggregate-json",
|
|
2421
2425
|
"publication-gate-command",
|
|
2426
|
+
"publication-gate-controller-sha",
|
|
2422
2427
|
"publication-package-name",
|
|
2423
2428
|
"publication-product",
|
|
2424
2429
|
"publication-publisher-workflow-path",
|
|
@@ -2482,7 +2487,7 @@
|
|
|
2482
2487
|
"target-sha",
|
|
2483
2488
|
"trusted-publishing"
|
|
2484
2489
|
],
|
|
2485
|
-
"inputCount":
|
|
2490
|
+
"inputCount": 99,
|
|
2486
2491
|
"secrets": [
|
|
2487
2492
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
2488
2493
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -7603,8 +7608,8 @@
|
|
|
7603
7608
|
"workflowRegistryPath": "dist/site/workflow-registry.json",
|
|
7604
7609
|
"pageRegistryPath": "dist/site/page-registry.json",
|
|
7605
7610
|
"cliRegistryDigest": "2e7804e1fa8ef08bbe59fcf58908e47daef4dc145675fc9a989862671e40f993",
|
|
7606
|
-
"workflowRegistryDigest": "
|
|
7607
|
-
"pageRegistryDigest": "
|
|
7611
|
+
"workflowRegistryDigest": "20c6b31e754f9f0ffb15362bd1b646376e9cf2698951d5f502a5bafcdfd523e7",
|
|
7612
|
+
"pageRegistryDigest": "50489f303fc5343c6c13ed307f0f7d008fa8deee7f32dd8ff701d47775b210df"
|
|
7608
7613
|
},
|
|
7609
7614
|
"comparison": {
|
|
7610
7615
|
"missingCliRegistry": [],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-publication-release-registry",
|
|
4
|
-
"generatedAt": "2026-08-
|
|
5
|
-
"publishedAt": "2026-08-
|
|
4
|
+
"generatedAt": "2026-08-07T01:27:51.160Z",
|
|
5
|
+
"publishedAt": "2026-08-07T01:27:51.160Z",
|
|
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": "
|
|
22
|
+
"sourceRevision": "4d3415855debb03bac01c4f5d11417f0d1ea42d8",
|
|
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.6
|
|
35
|
+
"version": "3.0.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-
|
|
5
|
-
"publishedAt": "2026-08-
|
|
4
|
+
"generatedAt": "2026-08-07T01:27:51.160Z",
|
|
5
|
+
"publishedAt": "2026-08-07T01:27:51.160Z",
|
|
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": "
|
|
22
|
+
"sourceRevision": "4d3415855debb03bac01c4f5d11417f0d1ea42d8",
|
|
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.6
|
|
40
|
+
"version": "3.0.6",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"path": "docs/release-candidate.md",
|
|
126
126
|
"plane": "verify",
|
|
127
127
|
"exists": true,
|
|
128
|
-
"digest": "sha256:
|
|
128
|
+
"digest": "sha256:d76bbd75aab3c4dd94756c1c64562a125e74369c7c8b97342dbcacc5d7561602"
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
"id": "release-propagation",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"path": "docs/node-api-reference.md",
|
|
238
238
|
"plane": "use",
|
|
239
239
|
"exists": true,
|
|
240
|
-
"digest": "sha256:
|
|
240
|
+
"digest": "sha256:f5592359584e98ab4283d56b0262fdcf9c5da61f48033cecad1b0404aa95bd2e"
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
"id": "build-facts",
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
"path": "docs/release-governance.md",
|
|
294
294
|
"plane": "why",
|
|
295
295
|
"exists": true,
|
|
296
|
-
"digest": "sha256:
|
|
296
|
+
"digest": "sha256:34fb81d1dd9f913cbed6ee76ac9f0bdb095669e55c1bee67389601fd494470cf"
|
|
297
297
|
},
|
|
298
298
|
{
|
|
299
299
|
"id": "release-flow",
|
|
@@ -396,6 +396,9 @@
|
|
|
396
396
|
"buildchain-ref",
|
|
397
397
|
"buildchain-repository",
|
|
398
398
|
"consumer-gate-command",
|
|
399
|
+
"consumer-gate-controller-sha",
|
|
400
|
+
"consumer-gate-evidence-source-sha",
|
|
401
|
+
"consumer-gate-evidence-source-tree",
|
|
399
402
|
"consumer-predicate-digest",
|
|
400
403
|
"consumer-predicate-id",
|
|
401
404
|
"consumer-qualification-required",
|
|
@@ -423,7 +426,7 @@
|
|
|
423
426
|
"target-ref",
|
|
424
427
|
"used-nonces-json"
|
|
425
428
|
],
|
|
426
|
-
"inputCount":
|
|
429
|
+
"inputCount": 37,
|
|
427
430
|
"secrets": [
|
|
428
431
|
"KUNGFU_GOVERNANCE_AUDITOR_APP_PRIVATE_KEY"
|
|
429
432
|
],
|
|
@@ -496,6 +499,7 @@
|
|
|
496
499
|
"publication-expected-json",
|
|
497
500
|
"publication-gate-aggregate-json",
|
|
498
501
|
"publication-gate-command",
|
|
502
|
+
"publication-gate-controller-sha",
|
|
499
503
|
"publication-package-name",
|
|
500
504
|
"publication-product",
|
|
501
505
|
"publication-publisher-workflow-path",
|
|
@@ -559,7 +563,7 @@
|
|
|
559
563
|
"target-sha",
|
|
560
564
|
"trusted-publishing"
|
|
561
565
|
],
|
|
562
|
-
"inputCount":
|
|
566
|
+
"inputCount": 107,
|
|
563
567
|
"secrets": [
|
|
564
568
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
565
569
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -2388,6 +2392,7 @@
|
|
|
2388
2392
|
"publication-expected-json",
|
|
2389
2393
|
"publication-gate-aggregate-json",
|
|
2390
2394
|
"publication-gate-command",
|
|
2395
|
+
"publication-gate-controller-sha",
|
|
2391
2396
|
"publication-package-name",
|
|
2392
2397
|
"publication-product",
|
|
2393
2398
|
"publication-publisher-workflow-path",
|
|
@@ -2451,7 +2456,7 @@
|
|
|
2451
2456
|
"target-sha",
|
|
2452
2457
|
"trusted-publishing"
|
|
2453
2458
|
],
|
|
2454
|
-
"inputCount":
|
|
2459
|
+
"inputCount": 99,
|
|
2455
2460
|
"secrets": [
|
|
2456
2461
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
2457
2462
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -217,7 +217,7 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
217
217
|
| `createPublicationControlPlaneAudit` | function: function createPublicationControlPlaneAudit({ repository, workflowPath, publisherWorkflowPath, environment, facts = [], observedAt, expiresAt, } = {}) | { repository, workflowPath, publisherWorkflowPath, environment, facts = [], observedAt, expiresAt, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createPublicationControlPlaneAudit } from "@kungfu-tech/buildchain";` | `packages/core/publication-authority.js:208` |
|
|
218
218
|
| `createPublicationGateDecision` | function: function createPublicationGateDecision({ sourceSha, profile, required = false, rationale, policy = {}, } = {}) | { sourceSha, profile, required = false, rationale, policy = {}, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createPublicationGateDecision } from "@kungfu-tech/buildchain";` | `packages/core/publication-authority.js:280` |
|
|
219
219
|
| `createPublicationQualificationReceipt` | function: function createPublicationQualificationReceipt({ capability, gateAggregate, consumerDecision, now = new Date(), } = {}) | { capability, gateAggregate, consumerDecision, now = new Date(), } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPublicationQualificationReceipt } from "@kungfu-tech/buildchain";` | `packages/core/publication-authority.js:1035` |
|
|
220
|
-
| `createPublicationSealedBundle` | function: function createPublicationSealedBundle({ candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {}) | { candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPublicationSealedBundle } from "@kungfu-tech/buildchain";` | `packages/core/publication-sealed-bundle.js:
|
|
220
|
+
| `createPublicationSealedBundle` | function: function createPublicationSealedBundle({ candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {}) | { candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPublicationSealedBundle } from "@kungfu-tech/buildchain";` | `packages/core/publication-sealed-bundle.js:84` |
|
|
221
221
|
| `createPublicationSourceBundle` | function: function createPublicationSourceBundle({ cwd = process.cwd(), sourcePaths = [], output = ".buildchain/publication/source.tar.gz", } = {}) | { cwd = process.cwd(), sourcePaths = [], output = ".buildchain/publication/source.tar.gz", } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | local-filesystem-write, subprocess | `import { createPublicationSourceBundle } from "@kungfu-tech/buildchain";` | `packages/core/publication-artifact.js:249` |
|
|
222
222
|
| `createReadmeBadgeEndpointRegistry` | function: function createReadmeBadgeEndpointRegistry({ kfdSpecs = undefined, kfdStandards = undefined } = {}) | { kfdSpecs = undefined, kfdStandards = undefined } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | subprocess | `import { createReadmeBadgeEndpointRegistry } from "@kungfu-tech/buildchain";` | `packages/core/readme-badges.js:133` |
|
|
223
223
|
| `createReleaseActivationReceiptSet` | function: function createReleaseActivationReceiptSet({ transaction, receipts = [], } = {}) | { transaction, receipts = [], } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createReleaseActivationReceiptSet } from "@kungfu-tech/buildchain";` | `packages/core/release-activation-transaction.js:311` |
|
|
@@ -447,7 +447,7 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
447
447
|
| `readReleaseTransaction` | function: function readReleaseTransaction(filePath) | filePath | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { readReleaseTransaction } from "@kungfu-tech/buildchain";` | `packages/core/publish-transaction.js:367` |
|
|
448
448
|
| `recordReleaseActivationPhase` | function: function recordReleaseActivationPhase(transaction, phaseId, { receiptRoots = [], failure = "" } = {}) | transaction, phaseId, { receiptRoots = [], failure = "" } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | may-write-or-invoke-external-actions | `import { recordReleaseActivationPhase } from "@kungfu-tech/buildchain";` | `packages/core/release-activation-transaction.js:217` |
|
|
449
449
|
| `recordReleasePropagationStage` | function: function recordReleasePropagationStage({ work, expectedWorkRoot, receipt } = {}) | { work, expectedWorkRoot, receipt } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | may-write-or-invoke-external-actions | `import { recordReleasePropagationStage } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-work-transitions.js:45` |
|
|
450
|
-
| `recoveryFailure` | function: function recoveryFailure(error) | error | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { recoveryFailure } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate-recovery.js:
|
|
450
|
+
| `recoveryFailure` | function: function recoveryFailure(error) | error | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { recoveryFailure } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate-recovery.js:529` |
|
|
451
451
|
| `redactBuildchainLogAttributes` | function: function redactBuildchainLogAttributes(attributes = {}) | attributes = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { redactBuildchainLogAttributes } from "@kungfu-tech/buildchain";` | `packages/core/logging.js:33` |
|
|
452
452
|
| `redactDiagnosticsValue` | function: function redactDiagnosticsValue(key, value, pattern = DEFAULT_SECRET_KEY_PATTERN) | key, value, pattern = DEFAULT_SECRET_KEY_PATTERN | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { redactDiagnosticsValue } from "@kungfu-tech/buildchain";` | `packages/core/diagnostics.js:953` |
|
|
453
453
|
| `redactIssueText` | function: function redactIssueText(value) | value | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { redactIssueText } from "@kungfu-tech/buildchain";` | `packages/core/issue-reporting.js:51` |
|
|
@@ -457,7 +457,7 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
457
457
|
| `RELEASE_ACTIVATION_PHASES` | constant: const RELEASE_ACTIVATION_PHASES | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_ACTIVATION_PHASES } from "@kungfu-tech/buildchain";` | `packages/core/release-activation-transaction.js:8` |
|
|
458
458
|
| `RELEASE_ACTIVATION_RECEIPT_SET_CONTRACT` | constant: const RELEASE_ACTIVATION_RECEIPT_SET_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_ACTIVATION_RECEIPT_SET_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-activation-transaction.js:5` |
|
|
459
459
|
| `RELEASE_CANDIDATE_PASSPORT_CONTRACT` | constant: const RELEASE_CANDIDATE_PASSPORT_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CANDIDATE_PASSPORT_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate.js:4` |
|
|
460
|
-
| `RELEASE_CANDIDATE_RECOVERY_CONTRACT` | constant: const RELEASE_CANDIDATE_RECOVERY_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CANDIDATE_RECOVERY_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate-recovery.js:
|
|
460
|
+
| `RELEASE_CANDIDATE_RECOVERY_CONTRACT` | constant: const RELEASE_CANDIDATE_RECOVERY_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CANDIDATE_RECOVERY_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate-recovery.js:15` |
|
|
461
461
|
| `RELEASE_CHECK_REPORT_CONTRACT` | constant: const RELEASE_CHECK_REPORT_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CHECK_REPORT_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-passport.js:33` |
|
|
462
462
|
| `RELEASE_EVIDENCE_ATTACHMENT_CONTRACT` | constant: const RELEASE_EVIDENCE_ATTACHMENT_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_EVIDENCE_ATTACHMENT_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-passport.js:34` |
|
|
463
463
|
| `RELEASE_PASSPORT_CHECK_MANIFEST_CONTRACT` | constant: const RELEASE_PASSPORT_CHECK_MANIFEST_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_PASSPORT_CHECK_MANIFEST_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-passport-contract.js:9` |
|
|
@@ -476,7 +476,7 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
476
476
|
| `RELEASE_PROPAGATION_WORK_CONTRACT` | constant: const RELEASE_PROPAGATION_WORK_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_PROPAGATION_WORK_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-work-constants.js:1` |
|
|
477
477
|
| `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";` | `packages/core/release-propagation-work-constants.js:4` |
|
|
478
478
|
| `releaseActivationRoot` | function: function releaseActivationRoot(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 { releaseActivationRoot } from "@kungfu-tech/buildchain";` | `packages/core/release-activation-transaction.js:38` |
|
|
479
|
-
| `ReleaseCandidateRecoveryError` | class: class ReleaseCandidateRecoveryError | none | ReleaseCandidateRecoveryError | Construction and method errors follow the linked source implementation. | class-dependent | `import { ReleaseCandidateRecoveryError } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate-recovery.js:
|
|
479
|
+
| `ReleaseCandidateRecoveryError` | class: class ReleaseCandidateRecoveryError | none | ReleaseCandidateRecoveryError | Construction and method errors follow the linked source implementation. | class-dependent | `import { ReleaseCandidateRecoveryError } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate-recovery.js:56` |
|
|
480
480
|
| `renderBadgeBundleBlock` | function: function renderBadgeBundleBlock(facts) | facts | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { renderBadgeBundleBlock } from "@kungfu-tech/buildchain";` | `packages/core/readme-badges.js:840` |
|
|
481
481
|
| `renderBuildchainContractDriftIssueBody` | function: function renderBuildchainContractDriftIssueBody({ repository = "", workflow = "", runUrl = "", lockPath = "", evaluation, } = {}) | { repository = "", workflow = "", runUrl = "", lockPath = "", evaluation, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { renderBuildchainContractDriftIssueBody } from "@kungfu-tech/buildchain";` | `packages/core/buildchain-contract.js:985` |
|
|
482
482
|
| `renderHomebrewFormula` | function: function renderHomebrewFormula(facts) | facts | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { renderHomebrewFormula } from "@kungfu-tech/buildchain";` | `packages/core/homebrew.js:290` |
|
|
@@ -570,8 +570,8 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
570
570
|
| `verifyPublicationAdmission` | function: function verifyPublicationAdmission({ admission, registry, runnerProvenance, controlPlaneAudit, publicationEvidence, expected = {}, usedNonces = [], now = new Date(), } = {}) | { admission, registry, runnerProvenance, controlPlaneAudit, publicationEvidence, expected = {}, usedNonces = [], now = new Date(), } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyPublicationAdmission } from "@kungfu-tech/buildchain";` | `packages/core/publication-authority.js:791` |
|
|
571
571
|
| `verifyPublicationQualificationReceipt` | function: function verifyPublicationQualificationReceipt({ receipt, capability, gateAggregate, expected = {}, usedNonces = [], now = new Date(), } = {}) | { receipt, capability, gateAggregate, expected = {}, usedNonces = [], now = new Date(), } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyPublicationQualificationReceipt } from "@kungfu-tech/buildchain";` | `packages/core/publication-authority.js:1096` |
|
|
572
572
|
| `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` |
|
|
573
|
-
| `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:
|
|
574
|
-
| `verifyReleaseCandidateRecovery` | function: function verifyReleaseCandidateRecovery({ candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = new Date().toISOString(), } = {}) | { candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = 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 { verifyReleaseCandidateRecovery } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate-recovery.js:
|
|
573
|
+
| `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:133` |
|
|
574
|
+
| `verifyReleaseCandidateRecovery` | function: function verifyReleaseCandidateRecovery({ candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetRefSha = targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = new Date().toISOString(), } = {}) | { candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetRefSha = targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = 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 { verifyReleaseCandidateRecovery } from "@kungfu-tech/buildchain";` | `packages/core/release-candidate-recovery.js:398` |
|
|
575
575
|
| `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` |
|
|
576
576
|
| `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` |
|
|
577
577
|
| `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` |
|
|
@@ -832,7 +832,7 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
832
832
|
| `createPublicationControlPlaneAudit` | function: function createPublicationControlPlaneAudit({ repository, workflowPath, publisherWorkflowPath, environment, facts = [], observedAt, expiresAt, } = {}) | { repository, workflowPath, publisherWorkflowPath, environment, facts = [], observedAt, expiresAt, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createPublicationControlPlaneAudit } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-authority.js:208` |
|
|
833
833
|
| `createPublicationGateDecision` | function: function createPublicationGateDecision({ sourceSha, profile, required = false, rationale, policy = {}, } = {}) | { sourceSha, profile, required = false, rationale, policy = {}, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createPublicationGateDecision } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-authority.js:280` |
|
|
834
834
|
| `createPublicationQualificationReceipt` | function: function createPublicationQualificationReceipt({ capability, gateAggregate, consumerDecision, now = new Date(), } = {}) | { capability, gateAggregate, consumerDecision, now = new Date(), } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPublicationQualificationReceipt } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-authority.js:1035` |
|
|
835
|
-
| `createPublicationSealedBundle` | function: function createPublicationSealedBundle({ candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {}) | { candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPublicationSealedBundle } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-sealed-bundle.js:
|
|
835
|
+
| `createPublicationSealedBundle` | function: function createPublicationSealedBundle({ candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {}) | { candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPublicationSealedBundle } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-sealed-bundle.js:84` |
|
|
836
836
|
| `createPublicationSourceBundle` | function: function createPublicationSourceBundle({ cwd = process.cwd(), sourcePaths = [], output = ".buildchain/publication/source.tar.gz", } = {}) | { cwd = process.cwd(), sourcePaths = [], output = ".buildchain/publication/source.tar.gz", } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | local-filesystem-write, subprocess | `import { createPublicationSourceBundle } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-artifact.js:249` |
|
|
837
837
|
| `createReadmeBadgeEndpointRegistry` | function: function createReadmeBadgeEndpointRegistry({ kfdSpecs = undefined, kfdStandards = undefined } = {}) | { kfdSpecs = undefined, kfdStandards = undefined } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | subprocess | `import { createReadmeBadgeEndpointRegistry } from "@kungfu-tech/buildchain/core";` | `packages/core/readme-badges.js:133` |
|
|
838
838
|
| `createReleaseActivationReceiptSet` | function: function createReleaseActivationReceiptSet({ transaction, receipts = [], } = {}) | { transaction, receipts = [], } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createReleaseActivationReceiptSet } from "@kungfu-tech/buildchain/core";` | `packages/core/release-activation-transaction.js:311` |
|
|
@@ -1062,7 +1062,7 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
1062
1062
|
| `readReleaseTransaction` | function: function readReleaseTransaction(filePath) | filePath | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { readReleaseTransaction } from "@kungfu-tech/buildchain/core";` | `packages/core/publish-transaction.js:367` |
|
|
1063
1063
|
| `recordReleaseActivationPhase` | function: function recordReleaseActivationPhase(transaction, phaseId, { receiptRoots = [], failure = "" } = {}) | transaction, phaseId, { receiptRoots = [], failure = "" } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | may-write-or-invoke-external-actions | `import { recordReleaseActivationPhase } from "@kungfu-tech/buildchain/core";` | `packages/core/release-activation-transaction.js:217` |
|
|
1064
1064
|
| `recordReleasePropagationStage` | function: function recordReleasePropagationStage({ work, expectedWorkRoot, receipt } = {}) | { work, expectedWorkRoot, receipt } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | may-write-or-invoke-external-actions | `import { recordReleasePropagationStage } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-work-transitions.js:45` |
|
|
1065
|
-
| `recoveryFailure` | function: function recoveryFailure(error) | error | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { recoveryFailure } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate-recovery.js:
|
|
1065
|
+
| `recoveryFailure` | function: function recoveryFailure(error) | error | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { recoveryFailure } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate-recovery.js:529` |
|
|
1066
1066
|
| `redactBuildchainLogAttributes` | function: function redactBuildchainLogAttributes(attributes = {}) | attributes = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { redactBuildchainLogAttributes } from "@kungfu-tech/buildchain/core";` | `packages/core/logging.js:33` |
|
|
1067
1067
|
| `redactDiagnosticsValue` | function: function redactDiagnosticsValue(key, value, pattern = DEFAULT_SECRET_KEY_PATTERN) | key, value, pattern = DEFAULT_SECRET_KEY_PATTERN | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { redactDiagnosticsValue } from "@kungfu-tech/buildchain/core";` | `packages/core/diagnostics.js:953` |
|
|
1068
1068
|
| `redactIssueText` | function: function redactIssueText(value) | value | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { redactIssueText } from "@kungfu-tech/buildchain/core";` | `packages/core/issue-reporting.js:51` |
|
|
@@ -1072,7 +1072,7 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
1072
1072
|
| `RELEASE_ACTIVATION_PHASES` | constant: const RELEASE_ACTIVATION_PHASES | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_ACTIVATION_PHASES } from "@kungfu-tech/buildchain/core";` | `packages/core/release-activation-transaction.js:8` |
|
|
1073
1073
|
| `RELEASE_ACTIVATION_RECEIPT_SET_CONTRACT` | constant: const RELEASE_ACTIVATION_RECEIPT_SET_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_ACTIVATION_RECEIPT_SET_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-activation-transaction.js:5` |
|
|
1074
1074
|
| `RELEASE_CANDIDATE_PASSPORT_CONTRACT` | constant: const RELEASE_CANDIDATE_PASSPORT_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CANDIDATE_PASSPORT_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate.js:4` |
|
|
1075
|
-
| `RELEASE_CANDIDATE_RECOVERY_CONTRACT` | constant: const RELEASE_CANDIDATE_RECOVERY_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CANDIDATE_RECOVERY_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate-recovery.js:
|
|
1075
|
+
| `RELEASE_CANDIDATE_RECOVERY_CONTRACT` | constant: const RELEASE_CANDIDATE_RECOVERY_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CANDIDATE_RECOVERY_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate-recovery.js:15` |
|
|
1076
1076
|
| `RELEASE_CHECK_REPORT_CONTRACT` | constant: const RELEASE_CHECK_REPORT_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CHECK_REPORT_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-passport.js:33` |
|
|
1077
1077
|
| `RELEASE_EVIDENCE_ATTACHMENT_CONTRACT` | constant: const RELEASE_EVIDENCE_ATTACHMENT_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_EVIDENCE_ATTACHMENT_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-passport.js:34` |
|
|
1078
1078
|
| `RELEASE_PASSPORT_CHECK_MANIFEST_CONTRACT` | constant: const RELEASE_PASSPORT_CHECK_MANIFEST_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_PASSPORT_CHECK_MANIFEST_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-passport-contract.js:9` |
|
|
@@ -1091,7 +1091,7 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
1091
1091
|
| `RELEASE_PROPAGATION_WORK_CONTRACT` | constant: const RELEASE_PROPAGATION_WORK_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_PROPAGATION_WORK_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-work-constants.js:1` |
|
|
1092
1092
|
| `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/core";` | `packages/core/release-propagation-work-constants.js:4` |
|
|
1093
1093
|
| `releaseActivationRoot` | function: function releaseActivationRoot(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 { releaseActivationRoot } from "@kungfu-tech/buildchain/core";` | `packages/core/release-activation-transaction.js:38` |
|
|
1094
|
-
| `ReleaseCandidateRecoveryError` | class: class ReleaseCandidateRecoveryError | none | ReleaseCandidateRecoveryError | Construction and method errors follow the linked source implementation. | class-dependent | `import { ReleaseCandidateRecoveryError } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate-recovery.js:
|
|
1094
|
+
| `ReleaseCandidateRecoveryError` | class: class ReleaseCandidateRecoveryError | none | ReleaseCandidateRecoveryError | Construction and method errors follow the linked source implementation. | class-dependent | `import { ReleaseCandidateRecoveryError } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate-recovery.js:56` |
|
|
1095
1095
|
| `renderBadgeBundleBlock` | function: function renderBadgeBundleBlock(facts) | facts | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { renderBadgeBundleBlock } from "@kungfu-tech/buildchain/core";` | `packages/core/readme-badges.js:840` |
|
|
1096
1096
|
| `renderBuildchainContractDriftIssueBody` | function: function renderBuildchainContractDriftIssueBody({ repository = "", workflow = "", runUrl = "", lockPath = "", evaluation, } = {}) | { repository = "", workflow = "", runUrl = "", lockPath = "", evaluation, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { renderBuildchainContractDriftIssueBody } from "@kungfu-tech/buildchain/core";` | `packages/core/buildchain-contract.js:985` |
|
|
1097
1097
|
| `renderHomebrewFormula` | function: function renderHomebrewFormula(facts) | facts | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { renderHomebrewFormula } from "@kungfu-tech/buildchain/core";` | `packages/core/homebrew.js:290` |
|
|
@@ -1185,8 +1185,8 @@ Target: `./packages/core/index.js`. Public symbols: 562.
|
|
|
1185
1185
|
| `verifyPublicationAdmission` | function: function verifyPublicationAdmission({ admission, registry, runnerProvenance, controlPlaneAudit, publicationEvidence, expected = {}, usedNonces = [], now = new Date(), } = {}) | { admission, registry, runnerProvenance, controlPlaneAudit, publicationEvidence, expected = {}, usedNonces = [], now = new Date(), } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyPublicationAdmission } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-authority.js:791` |
|
|
1186
1186
|
| `verifyPublicationQualificationReceipt` | function: function verifyPublicationQualificationReceipt({ receipt, capability, gateAggregate, expected = {}, usedNonces = [], now = new Date(), } = {}) | { receipt, capability, gateAggregate, expected = {}, usedNonces = [], now = new Date(), } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { verifyPublicationQualificationReceipt } from "@kungfu-tech/buildchain/core";` | `packages/core/publication-authority.js:1096` |
|
|
1187
1187
|
| `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` |
|
|
1188
|
-
| `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:
|
|
1189
|
-
| `verifyReleaseCandidateRecovery` | function: function verifyReleaseCandidateRecovery({ candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = new Date().toISOString(), } = {}) | { candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = 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 { verifyReleaseCandidateRecovery } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate-recovery.js:
|
|
1188
|
+
| `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:133` |
|
|
1189
|
+
| `verifyReleaseCandidateRecovery` | function: function verifyReleaseCandidateRecovery({ candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetRefSha = targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = new Date().toISOString(), } = {}) | { candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetRefSha = targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = 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 { verifyReleaseCandidateRecovery } from "@kungfu-tech/buildchain/core";` | `packages/core/release-candidate-recovery.js:398` |
|
|
1190
1190
|
| `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` |
|
|
1191
1191
|
| `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` |
|
|
1192
1192
|
| `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` |
|
|
@@ -1727,9 +1727,9 @@ Target: `./packages/core/publication-sealed-bundle.js`. Public symbols: 3.
|
|
|
1727
1727
|
|
|
1728
1728
|
| Symbol | Kind and signature | Parameters | Return | Errors | Side effects | Example | Source |
|
|
1729
1729
|
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1730
|
-
| `createPublicationSealedBundle` | function: function createPublicationSealedBundle({ candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {}) | { candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPublicationSealedBundle } from "@kungfu-tech/buildchain/publication-sealed-bundle";` | `packages/core/publication-sealed-bundle.js:
|
|
1730
|
+
| `createPublicationSealedBundle` | function: function createPublicationSealedBundle({ candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {}) | { candidate, packageName, packageVersion, npmTarballPath, npmIntegrity, releaseAssetPaths = [], githubReleaseRequired = true, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPublicationSealedBundle } from "@kungfu-tech/buildchain/publication-sealed-bundle";` | `packages/core/publication-sealed-bundle.js:84` |
|
|
1731
1731
|
| `PUBLICATION_SEALED_BUNDLE_CONTRACT` | constant: const PUBLICATION_SEALED_BUNDLE_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PUBLICATION_SEALED_BUNDLE_CONTRACT } from "@kungfu-tech/buildchain/publication-sealed-bundle";` | `packages/core/publication-sealed-bundle.js:10` |
|
|
1732
|
-
| `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/publication-sealed-bundle";` | `packages/core/publication-sealed-bundle.js:
|
|
1732
|
+
| `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/publication-sealed-bundle";` | `packages/core/publication-sealed-bundle.js:133` |
|
|
1733
1733
|
|
|
1734
1734
|
## `@kungfu-tech/buildchain/paper`
|
|
1735
1735
|
|
|
@@ -1906,15 +1906,17 @@ Target: `./packages/core/release-candidate.js`. Public symbols: 5.
|
|
|
1906
1906
|
|
|
1907
1907
|
## `@kungfu-tech/buildchain/release-candidate-recovery`
|
|
1908
1908
|
|
|
1909
|
-
Target: `./packages/core/release-candidate-recovery.js`. Public symbols:
|
|
1909
|
+
Target: `./packages/core/release-candidate-recovery.js`. Public symbols: 7.
|
|
1910
1910
|
|
|
1911
1911
|
| Symbol | Kind and signature | Parameters | Return | Errors | Side effects | Example | Source |
|
|
1912
1912
|
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1913
|
-
| `
|
|
1914
|
-
| `
|
|
1915
|
-
| `
|
|
1916
|
-
| `
|
|
1917
|
-
| `
|
|
1913
|
+
| `rebindPublicationGateAggregateForEquivalentTree` | function: function rebindPublicationGateAggregateForEquivalentTree(gateAggregate, { evidenceSourceSha = "", targetSourceSha = "", targetSourceTreeSha = "", expectedSourceTreeSha = "" } = {}) | gateAggregate, { evidenceSourceSha = "", targetSourceSha = "", targetSourceTreeSha = "", expectedSourceTreeSha = "" } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { rebindPublicationGateAggregateForEquivalentTree } from "@kungfu-tech/buildchain/release-candidate-recovery";` | `packages/core/release-candidate-recovery.js:18` |
|
|
1914
|
+
| `recoveryFailure` | function: function recoveryFailure(error) | error | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { recoveryFailure } from "@kungfu-tech/buildchain/release-candidate-recovery";` | `packages/core/release-candidate-recovery.js:529` |
|
|
1915
|
+
| `RELEASE_CANDIDATE_RECOVERY_CONTRACT` | constant: const RELEASE_CANDIDATE_RECOVERY_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { RELEASE_CANDIDATE_RECOVERY_CONTRACT } from "@kungfu-tech/buildchain/release-candidate-recovery";` | `packages/core/release-candidate-recovery.js:15` |
|
|
1916
|
+
| `ReleaseCandidateRecoveryError` | class: class ReleaseCandidateRecoveryError | none | ReleaseCandidateRecoveryError | Construction and method errors follow the linked source implementation. | class-dependent | `import { ReleaseCandidateRecoveryError } from "@kungfu-tech/buildchain/release-candidate-recovery";` | `packages/core/release-candidate-recovery.js:56` |
|
|
1917
|
+
| `validateRecoveryTargetRef` | function: function validateRecoveryTargetRef({ targetSha, observedTargetSha, expectedTransactionId = "", existingTransaction = undefined, ancestry = undefined, } = {}) | { targetSha, observedTargetSha, expectedTransactionId = "", existingTransaction = undefined, ancestry = undefined, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { validateRecoveryTargetRef } from "@kungfu-tech/buildchain/release-candidate-recovery";` | `packages/core/release-candidate-recovery.js:134` |
|
|
1918
|
+
| `validateReleaseCandidateRecoveryReceipt` | function: function validateReleaseCandidateRecoveryReceipt({ receipt, passport, repository = "", targetChannel = "", targetRef = "", targetSha = "", targetTree = "", version = "", } = {}) | { receipt, passport, repository = "", targetChannel = "", targetRef = "", targetSha = "", targetTree = "", version = "", } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { validateReleaseCandidateRecoveryReceipt } from "@kungfu-tech/buildchain/release-candidate-recovery";` | `packages/core/release-candidate-recovery.js:176` |
|
|
1919
|
+
| `verifyReleaseCandidateRecovery` | function: function verifyReleaseCandidateRecovery({ candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetRefSha = targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = new Date().toISOString(), } = {}) | { candidateRepository, targetRepository, expectedRunId, expectedWorkflowFile, expectedWorkflowName, channel, targetRef, targetSha, targetRefSha = targetSha, targetTree, expectedSourceTree = "", expectedCandidateRoot = "", expectedRuntimeSha, expectedTransactionId = "", existingTransaction = undefined, run, workflow, pullRequest, ancestry, passport, buildSummary, controllerReceipts = [], platformManifests = [], platformManifestEvidence = [], productPayloadManifests = [], artifacts = [], publicationVersion = "", currentToolingSha, recoveryRunId = "", createdAt = 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 { verifyReleaseCandidateRecovery } from "@kungfu-tech/buildchain/release-candidate-recovery";` | `packages/core/release-candidate-recovery.js:398` |
|
|
1918
1920
|
|
|
1919
1921
|
## `@kungfu-tech/buildchain/stable-candidate-ledger`
|
|
1920
1922
|
|
|
@@ -186,7 +186,13 @@ of those identities still agree.
|
|
|
186
186
|
The recovery path conditionally skips consumer dependency installation and all
|
|
187
187
|
product `install`, `build`, `verify`, and platform-matrix jobs. It restores the
|
|
188
188
|
downloaded bytes as a content-addressed sealed bundle, so npm publication uses
|
|
189
|
-
the original `.tgz
|
|
189
|
+
the original `.tgz`. The explicit recovery entry binds the bundle identity to
|
|
190
|
+
the original candidate runtime recorded in the Passport; a newer recovery
|
|
191
|
+
tooling SHA is recorded only in the recovery evidence and cannot perturb the
|
|
192
|
+
durable payload root. A transaction-only re-resolution remains a narrower
|
|
193
|
+
finalization path and is not a substitute for the candidate-run entry when the
|
|
194
|
+
original complete artifact inventory must be reconstructed. Recovery may
|
|
195
|
+
regenerate only Buildchain-owned receipts,
|
|
190
196
|
attestations, signatures, Release Passport data, publication, and readback.
|
|
191
197
|
|
|
192
198
|
Success emits `kungfu-buildchain-release-candidate-recovery/v1` with
|
|
@@ -217,6 +223,25 @@ and `complete` transactions use the normal idempotent state machine. Matching
|
|
|
217
223
|
registry and GitHub bytes are preserved, only missing publication work is
|
|
218
224
|
performed, and conflicting public digests enter `repair_required`.
|
|
219
225
|
|
|
226
|
+
When the immutable recovery receipt proves that the transaction was already
|
|
227
|
+
`complete` before the recovery run began, Buildchain verifies the existing
|
|
228
|
+
public Release Passport bundle in place and reports the GitHub Release action
|
|
229
|
+
as `reused`. Buildchain-owned evidence regenerated by newer recovery tooling is
|
|
230
|
+
kept in the new recovery artifact; it does not replace same-name evidence that
|
|
231
|
+
was sealed by the original completed publication. Every declared product
|
|
232
|
+
payload is still compared byte-for-byte, a missing payload is uploaded from the
|
|
233
|
+
restored sealed bundle, and a conflicting payload digest fails closed. Ordinary
|
|
234
|
+
duplicate publication without a complete recovery receipt retains the stricter
|
|
235
|
+
same-name/same-digest rule for all assets.
|
|
236
|
+
|
|
237
|
+
After a transaction finalizes, the target branch can legitimately advance from
|
|
238
|
+
the original promotion SHA. Repeating explicit recovery accepts that movement
|
|
239
|
+
only when the caller supplies the exact durable transaction identity, the
|
|
240
|
+
transaction remains resumable, and GitHub proves the observed target head is a
|
|
241
|
+
descendant of the original transaction source. The recovery receipt records
|
|
242
|
+
both the immutable transaction SHA and the observed ref SHA. Missing identity,
|
|
243
|
+
unrelated advancement, or a repair state fails closed.
|
|
244
|
+
|
|
220
245
|
By default, the wrapper forwards GitHub Release publication to the underlying
|
|
221
246
|
`promote-buildchain-ref` semver model. Once the release transaction is complete,
|
|
222
247
|
the action creates or updates the public GitHub Release, applies
|
|
@@ -963,6 +963,12 @@ preserves an existing asset when its SHA-256 digest matches the regenerated
|
|
|
963
963
|
bytes, uploads only missing assets, and fails with an immutable-release
|
|
964
964
|
collision when a same-name asset has different bytes. It never deletes and
|
|
965
965
|
replaces an existing asset during retry or duplicate workflow delivery.
|
|
966
|
+
An explicit candidate recovery whose validated receipt records an already
|
|
967
|
+
complete transaction instead verifies the existing public Release Passport
|
|
968
|
+
bundle and preserves its Buildchain-owned evidence generation. Product payload
|
|
969
|
+
bytes remain digest-bound to the restored candidate, and missing product assets
|
|
970
|
+
alone may be filled from that sealed bundle. This exception is unavailable to
|
|
971
|
+
ordinary reruns or receipts from earlier transaction states.
|
|
966
972
|
|
|
967
973
|
Product payloads are included only through the explicit
|
|
968
974
|
`github-release-payload-patterns` input. Patterns match basenames inside the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "3.0.6
|
|
3
|
+
"version": "3.0.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",
|
|
@@ -36,7 +36,16 @@ function normalizeSha256(value, label) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function sha256File(filePath) {
|
|
39
|
-
|
|
39
|
+
const hash = crypto.createHash("sha256");
|
|
40
|
+
const descriptor = fs.openSync(filePath, "r");
|
|
41
|
+
const chunk = Buffer.allocUnsafe(8 * 1024 * 1024);
|
|
42
|
+
try {
|
|
43
|
+
let bytesRead = 0;
|
|
44
|
+
while ((bytesRead = fs.readSync(descriptor, chunk, 0, chunk.length, null)) > 0) hash.update(chunk.subarray(0, bytesRead));
|
|
45
|
+
} finally {
|
|
46
|
+
fs.closeSync(descriptor);
|
|
47
|
+
}
|
|
48
|
+
return hash.digest("hex");
|
|
40
49
|
}
|
|
41
50
|
|
|
42
51
|
function normalizeFile(entry, label) {
|
|
@@ -7,13 +7,51 @@ import {
|
|
|
7
7
|
validateReleaseCandidatePassport,
|
|
8
8
|
} from "./release-candidate.js";
|
|
9
9
|
import { releaseTransactionId } from "./publish-transaction.js";
|
|
10
|
+
import {
|
|
11
|
+
publicationAuthorityDigest,
|
|
12
|
+
publicationGateAggregateBindings,
|
|
13
|
+
} from "./publication-authority.js";
|
|
10
14
|
|
|
11
15
|
export const RELEASE_CANDIDATE_RECOVERY_CONTRACT =
|
|
12
16
|
"kungfu-buildchain-release-candidate-recovery/v1";
|
|
13
17
|
|
|
18
|
+
export function rebindPublicationGateAggregateForEquivalentTree(
|
|
19
|
+
gateAggregate,
|
|
20
|
+
{ evidenceSourceSha = "", targetSourceSha = "", targetSourceTreeSha = "", expectedSourceTreeSha = "" } = {},
|
|
21
|
+
) {
|
|
22
|
+
const bindings = publicationGateAggregateBindings(gateAggregate);
|
|
23
|
+
const evidenceSource = exactSha(evidenceSourceSha, "evidenceSourceSha");
|
|
24
|
+
const targetSource = exactSha(targetSourceSha, "targetSourceSha");
|
|
25
|
+
if (bindings.sourceSha !== evidenceSource) {
|
|
26
|
+
throw new Error("consumer Gate aggregate evidence source SHA mismatch");
|
|
27
|
+
}
|
|
28
|
+
if (evidenceSource === targetSource) return gateAggregate;
|
|
29
|
+
const targetTree = exactSha(targetSourceTreeSha, "targetSourceTreeSha");
|
|
30
|
+
const expectedTree = exactSha(expectedSourceTreeSha, "expectedSourceTreeSha");
|
|
31
|
+
if (targetTree !== expectedTree) throw new Error("consumer Gate aggregate source tree mismatch");
|
|
32
|
+
if (gateAggregate.candidateReuse !== undefined) {
|
|
33
|
+
throw new Error("consumer Gate aggregate already declares candidate reuse");
|
|
34
|
+
}
|
|
35
|
+
const { digest: _digest, ...payload } = gateAggregate;
|
|
36
|
+
const rebound = {
|
|
37
|
+
...payload,
|
|
38
|
+
sourceSha: targetSource,
|
|
39
|
+
candidateReuse: { action: "reused", evidenceSourceSha: evidenceSource, sourceTreeSha: expectedTree },
|
|
40
|
+
};
|
|
41
|
+
return { ...rebound, digest: `sha256:${publicationAuthorityDigest(rebound)}` };
|
|
42
|
+
}
|
|
43
|
+
|
|
14
44
|
const SHA_PATTERN = /^[0-9a-f]{40}$/;
|
|
15
45
|
const SHA256_PATTERN = /^sha256:[0-9a-f]{64}$/;
|
|
16
46
|
const TRUSTED_ASSOCIATIONS = new Set(["COLLABORATOR", "MEMBER", "OWNER"]);
|
|
47
|
+
const RESUMABLE_TRANSACTION_STATES = new Set([
|
|
48
|
+
"sealed",
|
|
49
|
+
"publishing",
|
|
50
|
+
"published",
|
|
51
|
+
"package-published",
|
|
52
|
+
"finalizing",
|
|
53
|
+
"complete",
|
|
54
|
+
]);
|
|
17
55
|
|
|
18
56
|
export class ReleaseCandidateRecoveryError extends Error {
|
|
19
57
|
constructor(code, message, nextAction) {
|
|
@@ -93,6 +131,48 @@ function normalizedRef(value) {
|
|
|
93
131
|
return String(value || "").replace(/^refs\/heads\//, "").trim();
|
|
94
132
|
}
|
|
95
133
|
|
|
134
|
+
export function validateRecoveryTargetRef({
|
|
135
|
+
targetSha,
|
|
136
|
+
observedTargetSha,
|
|
137
|
+
expectedTransactionId = "",
|
|
138
|
+
existingTransaction = undefined,
|
|
139
|
+
ancestry = undefined,
|
|
140
|
+
} = {}) {
|
|
141
|
+
const expected = exactSha(targetSha, "targetSha");
|
|
142
|
+
const observed = exactSha(observedTargetSha, "observedTargetSha");
|
|
143
|
+
if (observed === expected) return { advanced: false, observedSha: observed };
|
|
144
|
+
if (!expectedTransactionId) {
|
|
145
|
+
fail(
|
|
146
|
+
"target-ref-moved",
|
|
147
|
+
`target ref advanced from ${expected} to ${observed} without an explicit durable transaction identity`,
|
|
148
|
+
"Resume with the exact existing transaction identity, or select a new candidate explicitly; never rebuild implicitly.",
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
if (!existingTransaction || existingTransaction.id !== expectedTransactionId) {
|
|
152
|
+
fail(
|
|
153
|
+
"transaction-identity-conflict",
|
|
154
|
+
`target ref advanced but durable transaction ${expectedTransactionId} was not found exactly`,
|
|
155
|
+
"Enter repair_required and inspect the durable transaction before any retry.",
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
const state = String(existingTransaction.state || existingTransaction.publication_state || "");
|
|
159
|
+
if (!RESUMABLE_TRANSACTION_STATES.has(state)) {
|
|
160
|
+
fail(
|
|
161
|
+
"transaction-state-conflict",
|
|
162
|
+
`target ref advanced while durable transaction ${expectedTransactionId} is in non-resumable state ${state || "<empty>"}`,
|
|
163
|
+
"Preserve the transaction evidence and enter repair_required; do not republish or rebuild automatically.",
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
if (ancestry?.mergeIsAncestor !== true || !["ahead", "identical"].includes(String(ancestry?.status || ""))) {
|
|
167
|
+
fail(
|
|
168
|
+
"target-ancestry-mismatch",
|
|
169
|
+
`observed target ${observed} is not an ancestry-bound continuation of transaction source ${expected}`,
|
|
170
|
+
"Preserve the candidate and transaction evidence; inspect the target ref for unrelated advancement before retrying.",
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
return { advanced: true, observedSha: observed };
|
|
174
|
+
}
|
|
175
|
+
|
|
96
176
|
export function validateReleaseCandidateRecoveryReceipt({
|
|
97
177
|
receipt,
|
|
98
178
|
passport,
|
|
@@ -324,6 +404,7 @@ export function verifyReleaseCandidateRecovery({
|
|
|
324
404
|
channel,
|
|
325
405
|
targetRef,
|
|
326
406
|
targetSha,
|
|
407
|
+
targetRefSha = targetSha,
|
|
327
408
|
targetTree,
|
|
328
409
|
expectedSourceTree = "",
|
|
329
410
|
expectedCandidateRoot = "",
|
|
@@ -416,7 +497,14 @@ export function verifyReleaseCandidateRecovery({
|
|
|
416
497
|
mergeSha: String(pullRequest.mergeSha || ""),
|
|
417
498
|
tree: passport.source.treeHash,
|
|
418
499
|
},
|
|
419
|
-
target: {
|
|
500
|
+
target: {
|
|
501
|
+
channel: passport.target.channel,
|
|
502
|
+
ref: normalizedRef(targetRef),
|
|
503
|
+
sha,
|
|
504
|
+
observedRefSha: exactSha(targetRefSha, "targetRefSha"),
|
|
505
|
+
tree,
|
|
506
|
+
version,
|
|
507
|
+
},
|
|
420
508
|
recovered: {
|
|
421
509
|
candidateRoot,
|
|
422
510
|
buildSummaryRoot: `sha256:${passport.diagnostics.buildSummaryHash}`,
|