@kungfu-tech/buildchain 3.0.4 → 3.0.5-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/site/buildchain-contract.json +23 -18
- package/dist/site/buildchain-site.json +13 -13
- package/dist/site/controller-registry.json +6 -2
- package/dist/site/kfd-claims.json +6 -4
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +3 -3
- package/dist/site/node-api-registry.json +96 -5
- package/dist/site/page-registry.json +6 -6
- package/dist/site/public-surface-audit.json +12 -8
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +7 -7
- package/dist/site/workflow-registry.json +10 -6
- package/docs/auditable-demo.md +7 -0
- package/docs/node-api-reference.md +12 -3
- package/docs/release-propagation.md +34 -0
- package/package.json +1 -1
- package/packages/core/release-propagation-capture.js +150 -0
- package/packages/core/release-propagation-stage-evidence.js +1 -1
- package/packages/core/release-propagation.js +5 -0
- package/scripts/auditable-demo-renditions.mjs +2 -3
- package/scripts/capture-package-release-propagation.mjs +240 -0
|
@@ -1001,6 +1001,7 @@
|
|
|
1001
1001
|
"release-passport-output-dir",
|
|
1002
1002
|
"release-passport-platform-manifest-paths",
|
|
1003
1003
|
"release-passport-product-name",
|
|
1004
|
+
"release-propagation-config-path",
|
|
1004
1005
|
"required-artifact-count",
|
|
1005
1006
|
"required-status-check",
|
|
1006
1007
|
"runner-preset",
|
|
@@ -1009,7 +1010,7 @@
|
|
|
1009
1010
|
"target-sha",
|
|
1010
1011
|
"trusted-publishing"
|
|
1011
1012
|
],
|
|
1012
|
-
"inputCount":
|
|
1013
|
+
"inputCount": 95,
|
|
1013
1014
|
"secrets": [
|
|
1014
1015
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
1015
1016
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -1042,9 +1043,10 @@
|
|
|
1042
1043
|
"publication-commit-evidence-path",
|
|
1043
1044
|
"publication-commit-payload-root",
|
|
1044
1045
|
"publication-commit-url",
|
|
1045
|
-
"release-candidate-artifact"
|
|
1046
|
+
"release-candidate-artifact",
|
|
1047
|
+
"release-propagation-work-artifact"
|
|
1046
1048
|
],
|
|
1047
|
-
"outputCount":
|
|
1049
|
+
"outputCount": 20
|
|
1048
1050
|
},
|
|
1049
1051
|
{
|
|
1050
1052
|
"id": ".release-docker",
|
|
@@ -2249,6 +2251,7 @@
|
|
|
2249
2251
|
"release-passport-output-dir",
|
|
2250
2252
|
"release-passport-platform-manifest-paths",
|
|
2251
2253
|
"release-passport-product-name",
|
|
2254
|
+
"release-propagation-config-path",
|
|
2252
2255
|
"required-artifact-count",
|
|
2253
2256
|
"required-status-check",
|
|
2254
2257
|
"runner-preset",
|
|
@@ -2257,7 +2260,7 @@
|
|
|
2257
2260
|
"target-sha",
|
|
2258
2261
|
"trusted-publishing"
|
|
2259
2262
|
],
|
|
2260
|
-
"inputCount":
|
|
2263
|
+
"inputCount": 87,
|
|
2261
2264
|
"secrets": [
|
|
2262
2265
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
2263
2266
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -2302,9 +2305,10 @@
|
|
|
2302
2305
|
"publication-commit-evidence-path",
|
|
2303
2306
|
"publication-commit-payload-root",
|
|
2304
2307
|
"publication-commit-url",
|
|
2305
|
-
"release-candidate-artifact"
|
|
2308
|
+
"release-candidate-artifact",
|
|
2309
|
+
"release-propagation-work-artifact"
|
|
2306
2310
|
],
|
|
2307
|
-
"outputCount":
|
|
2311
|
+
"outputCount": 32
|
|
2308
2312
|
},
|
|
2309
2313
|
{
|
|
2310
2314
|
"id": "release-governance-reconcile",
|
|
@@ -7024,8 +7028,8 @@
|
|
|
7024
7028
|
"workflowRegistryPath": "dist/site/workflow-registry.json",
|
|
7025
7029
|
"pageRegistryPath": "dist/site/page-registry.json",
|
|
7026
7030
|
"cliRegistryDigest": "0db010925d1c60209c3dac8bc2797537f307ab21bc68084263e79004c5c16ff7",
|
|
7027
|
-
"workflowRegistryDigest": "
|
|
7028
|
-
"pageRegistryDigest": "
|
|
7031
|
+
"workflowRegistryDigest": "b5b860965abf645e1618d7840db544d638fd8ea3d0ee04ed00ccd4c8f8ccaabb",
|
|
7032
|
+
"pageRegistryDigest": "fda54ffd3528f81630f0fabf91ab777a471f9d6bbd89f5f995d1dc383e077264"
|
|
7029
7033
|
},
|
|
7030
7034
|
"comparison": {
|
|
7031
7035
|
"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-02T01:14:59.679Z",
|
|
5
|
+
"publishedAt": "2026-08-02T01:14:59.679Z",
|
|
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": "99ce7a8de4cd35f81d743b63d723bee2d4c26f80",
|
|
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.
|
|
35
|
+
"version": "3.0.5-alpha.0",
|
|
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-02T01:14:59.679Z",
|
|
5
|
+
"publishedAt": "2026-08-02T01:14:59.679Z",
|
|
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": "99ce7a8de4cd35f81d743b63d723bee2d4c26f80",
|
|
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.
|
|
40
|
+
"version": "3.0.5-alpha.0",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"path": "docs/auditable-demo.md",
|
|
70
70
|
"plane": "verify",
|
|
71
71
|
"exists": true,
|
|
72
|
-
"digest": "sha256:
|
|
72
|
+
"digest": "sha256:4d32c82b652decfbb26b441c203fe34e70daa86022bb4baed9da02a5d6cf5831"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"id": "install",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"path": "docs/release-propagation.md",
|
|
134
134
|
"plane": "use",
|
|
135
135
|
"exists": true,
|
|
136
|
-
"digest": "sha256:
|
|
136
|
+
"digest": "sha256:3b7a2a0437f8a3a4e5cff7e05a2a8c427be597d85e93d49d5e35ba2a2b089afc"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"id": "readme-badges",
|
|
@@ -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:38f051f579fb93dc7d8b4f2c70acd622c020e867394344b5e932568cd8d2ad83"
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
"id": "build-facts",
|
|
@@ -490,6 +490,7 @@
|
|
|
490
490
|
"release-passport-output-dir",
|
|
491
491
|
"release-passport-platform-manifest-paths",
|
|
492
492
|
"release-passport-product-name",
|
|
493
|
+
"release-propagation-config-path",
|
|
493
494
|
"required-artifact-count",
|
|
494
495
|
"required-status-check",
|
|
495
496
|
"runner-preset",
|
|
@@ -498,7 +499,7 @@
|
|
|
498
499
|
"target-sha",
|
|
499
500
|
"trusted-publishing"
|
|
500
501
|
],
|
|
501
|
-
"inputCount":
|
|
502
|
+
"inputCount": 95,
|
|
502
503
|
"secrets": [
|
|
503
504
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
504
505
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -531,9 +532,10 @@
|
|
|
531
532
|
"publication-commit-evidence-path",
|
|
532
533
|
"publication-commit-payload-root",
|
|
533
534
|
"publication-commit-url",
|
|
534
|
-
"release-candidate-artifact"
|
|
535
|
+
"release-candidate-artifact",
|
|
536
|
+
"release-propagation-work-artifact"
|
|
535
537
|
],
|
|
536
|
-
"outputCount":
|
|
538
|
+
"outputCount": 20,
|
|
537
539
|
"surface": "reusable-workflow",
|
|
538
540
|
"capabilityGroup": "api-cli-reference",
|
|
539
541
|
"status": "active",
|
|
@@ -2148,6 +2150,7 @@
|
|
|
2148
2150
|
"release-passport-output-dir",
|
|
2149
2151
|
"release-passport-platform-manifest-paths",
|
|
2150
2152
|
"release-passport-product-name",
|
|
2153
|
+
"release-propagation-config-path",
|
|
2151
2154
|
"required-artifact-count",
|
|
2152
2155
|
"required-status-check",
|
|
2153
2156
|
"runner-preset",
|
|
@@ -2156,7 +2159,7 @@
|
|
|
2156
2159
|
"target-sha",
|
|
2157
2160
|
"trusted-publishing"
|
|
2158
2161
|
],
|
|
2159
|
-
"inputCount":
|
|
2162
|
+
"inputCount": 87,
|
|
2160
2163
|
"secrets": [
|
|
2161
2164
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
2162
2165
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -2201,9 +2204,10 @@
|
|
|
2201
2204
|
"publication-commit-evidence-path",
|
|
2202
2205
|
"publication-commit-payload-root",
|
|
2203
2206
|
"publication-commit-url",
|
|
2204
|
-
"release-candidate-artifact"
|
|
2207
|
+
"release-candidate-artifact",
|
|
2208
|
+
"release-propagation-work-artifact"
|
|
2205
2209
|
],
|
|
2206
|
-
"outputCount":
|
|
2210
|
+
"outputCount": 32,
|
|
2207
2211
|
"surface": "release-governance",
|
|
2208
2212
|
"capabilityGroup": "reusable-build",
|
|
2209
2213
|
"status": "active",
|
package/docs/auditable-demo.md
CHANGED
|
@@ -47,6 +47,13 @@ fixed 80-200 by 24-80 terminal cells, 10,000 events, and 4 MiB of canonical
|
|
|
47
47
|
base64 bytes. It must contain a passed completion sentinel and an explicitly
|
|
48
48
|
empty authority-grant list. Existing three-file adapters remain valid.
|
|
49
49
|
|
|
50
|
+
The completion sentinel names a consumer-owned versioned schema, the exact
|
|
51
|
+
`qualified` status, a content root, and an event count. Buildchain validates
|
|
52
|
+
that envelope generically; it does not reinterpret a command-specific result
|
|
53
|
+
as Agent Work Lab evidence or grant authority from the schema name. The
|
|
54
|
+
consumer projection and its retained source artifact remain responsible for
|
|
55
|
+
the exact claim boundary.
|
|
56
|
+
|
|
50
57
|
Terminal bytes are volatile observations, not Work, Warrant, capability, or
|
|
51
58
|
publication authority. First-party or System identity, KFD compliance, Product
|
|
52
59
|
System metadata, package metadata, scan output, registry history, and
|
|
@@ -24,7 +24,7 @@ Signatures and source locations are mechanical. JavaScript return types remain c
|
|
|
24
24
|
|
|
25
25
|
## `@kungfu-tech/buildchain`
|
|
26
26
|
|
|
27
|
-
Target: `./packages/core/index.js`. Public symbols:
|
|
27
|
+
Target: `./packages/core/index.js`. Public symbols: 541.
|
|
28
28
|
|
|
29
29
|
| Symbol | Kind and signature | Parameters | Return | Errors | Side effects | Example | Source |
|
|
30
30
|
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
@@ -199,6 +199,7 @@ Target: `./packages/core/index.js`. Public symbols: 538.
|
|
|
199
199
|
| `createKfdBadgeSpecsFromStandards` | function: function createKfdBadgeSpecsFromStandards(standardsMetadata) | standardsMetadata | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createKfdBadgeSpecsFromStandards } from "@kungfu-tech/buildchain";` | `packages/core/readme-badges.js:126` |
|
|
200
200
|
| `createKfdSupportProjection` | function: function createKfdSupportProjection({ matrix, matrixRoot = "", gateResults = [], authorityPath = ".buildchain/kfd/support-matrix.json", expectedSourceSha = "", checkedAt = new Date().toISOString(), } = {}) | { matrix, matrixRoot = "", gateResults = [], authorityPath = ".buildchain/kfd/support-matrix.json", expectedSourceSha = "", checkedAt = 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 { createKfdSupportProjection } from "@kungfu-tech/buildchain";` | `packages/core/kfd-product-gates.js:716` |
|
|
201
201
|
| `createKungfuBuildInfoProjection` | function: function createKungfuBuildInfoProjection({ moduleFact, cwd = process.cwd(), now = nowIso() } = {}) | { moduleFact, cwd = process.cwd(), now = nowIso() } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createKungfuBuildInfoProjection } from "@kungfu-tech/buildchain";` | `packages/core/build-facts.js:520` |
|
|
202
|
+
| `createPackageReleasePropagationCapture` | function: function createPackageReleasePropagationCapture({ config: configInput, upstreamRelease: upstreamReleaseInput, expectedBaseShas = {}, } = {}) | { config: configInput, upstreamRelease: upstreamReleaseInput, expectedBaseShas = {}, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPackageReleasePropagationCapture } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-capture.js:101` |
|
|
202
203
|
| `createPaperAlphaPlan` | function: function createPaperAlphaPlan({ cwd = process.cwd(), sourceRef = "", targetRef = "", } = {}) | { cwd = process.cwd(), sourceRef = "", targetRef = "", } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPaperAlphaPlan } from "@kungfu-tech/buildchain";` | `packages/core/paper.js:2655` |
|
|
203
204
|
| `createPaperBuildPlan` | function: function createPaperBuildPlan({ cwd = process.cwd(), sourceSha = "", pullToolchain = true, } = {}) | { cwd = process.cwd(), sourceSha = "", pullToolchain = true, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPaperBuildPlan } from "@kungfu-tech/buildchain";` | `packages/core/paper.js:2592` |
|
|
204
205
|
| `createPaperResumePlan` | function: function createPaperResumePlan({ cwd = process.cwd(), buildchainRef = "", } = {}) | { cwd = process.cwd(), buildchainRef = "", } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | local-filesystem-write | `import { createPaperResumePlan } from "@kungfu-tech/buildchain";` | `packages/core/paper.js:2713` |
|
|
@@ -362,8 +363,10 @@ Target: `./packages/core/index.js`. Public symbols: 538.
|
|
|
362
363
|
| `normalizeKfd3DistributionDeclaration` | function: function normalizeKfd3DistributionDeclaration(distribution, { surfaceId = "surface" } = {}) | distribution, { surfaceId = "surface" } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { normalizeKfd3DistributionDeclaration } from "@kungfu-tech/buildchain";` | `packages/core/kfd3-surface-register.js:73` |
|
|
363
364
|
| `normalizeKfdStandardId` | function: function normalizeKfdStandardId(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 { normalizeKfdStandardId } from "@kungfu-tech/buildchain";` | `packages/core/kfd.js:455` |
|
|
364
365
|
| `normalizeLifecycleStage` | function: function normalizeLifecycleStage(stage, label = "lifecycle stage", lifecycle = {}) | stage, label = "lifecycle stage", lifecycle = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { normalizeLifecycleStage } from "@kungfu-tech/buildchain";` | `packages/core/buildchain-config.js:1333` |
|
|
366
|
+
| `normalizePackageReleasePropagationConfig` | function: function normalizePackageReleasePropagationConfig(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 { normalizePackageReleasePropagationConfig } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-capture.js:63` |
|
|
365
367
|
| `normalizeReleasePropagationGraph` | function: function normalizeReleasePropagationGraph(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 { normalizeReleasePropagationGraph } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation.js:163` |
|
|
366
368
|
| `normalizeStableCandidateLedger` | function: function normalizeStableCandidateLedger(input, expected = {}) | input, expected = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { normalizeStableCandidateLedger } from "@kungfu-tech/buildchain";` | `packages/core/stable-candidate-ledger.js:76` |
|
|
369
|
+
| `PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT` | constant: const PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/release-propagation-capture.js:17` |
|
|
367
370
|
| `PAPER_ALPHA_PLAN_CONTRACT` | constant: const PAPER_ALPHA_PLAN_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PAPER_ALPHA_PLAN_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/paper.js:90` |
|
|
368
371
|
| `PAPER_BUILD_PLAN_CONTRACT` | constant: const PAPER_BUILD_PLAN_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PAPER_BUILD_PLAN_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/paper.js:89` |
|
|
369
372
|
| `PAPER_FLEET_AUDIT_CONTRACT` | constant: const PAPER_FLEET_AUDIT_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PAPER_FLEET_AUDIT_CONTRACT } from "@kungfu-tech/buildchain";` | `packages/core/paper-fleet.js:19` |
|
|
@@ -615,7 +618,7 @@ Target: `./packages/core/build-facts.js`. Public symbols: 15.
|
|
|
615
618
|
|
|
616
619
|
## `@kungfu-tech/buildchain/core`
|
|
617
620
|
|
|
618
|
-
Target: `./packages/core/index.js`. Public symbols:
|
|
621
|
+
Target: `./packages/core/index.js`. Public symbols: 541.
|
|
619
622
|
|
|
620
623
|
| Symbol | Kind and signature | Parameters | Return | Errors | Side effects | Example | Source |
|
|
621
624
|
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
@@ -790,6 +793,7 @@ Target: `./packages/core/index.js`. Public symbols: 538.
|
|
|
790
793
|
| `createKfdBadgeSpecsFromStandards` | function: function createKfdBadgeSpecsFromStandards(standardsMetadata) | standardsMetadata | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createKfdBadgeSpecsFromStandards } from "@kungfu-tech/buildchain/core";` | `packages/core/readme-badges.js:126` |
|
|
791
794
|
| `createKfdSupportProjection` | function: function createKfdSupportProjection({ matrix, matrixRoot = "", gateResults = [], authorityPath = ".buildchain/kfd/support-matrix.json", expectedSourceSha = "", checkedAt = new Date().toISOString(), } = {}) | { matrix, matrixRoot = "", gateResults = [], authorityPath = ".buildchain/kfd/support-matrix.json", expectedSourceSha = "", checkedAt = 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 { createKfdSupportProjection } from "@kungfu-tech/buildchain/core";` | `packages/core/kfd-product-gates.js:716` |
|
|
792
795
|
| `createKungfuBuildInfoProjection` | function: function createKungfuBuildInfoProjection({ moduleFact, cwd = process.cwd(), now = nowIso() } = {}) | { moduleFact, cwd = process.cwd(), now = nowIso() } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createKungfuBuildInfoProjection } from "@kungfu-tech/buildchain/core";` | `packages/core/build-facts.js:520` |
|
|
796
|
+
| `createPackageReleasePropagationCapture` | function: function createPackageReleasePropagationCapture({ config: configInput, upstreamRelease: upstreamReleaseInput, expectedBaseShas = {}, } = {}) | { config: configInput, upstreamRelease: upstreamReleaseInput, expectedBaseShas = {}, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPackageReleasePropagationCapture } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-capture.js:101` |
|
|
793
797
|
| `createPaperAlphaPlan` | function: function createPaperAlphaPlan({ cwd = process.cwd(), sourceRef = "", targetRef = "", } = {}) | { cwd = process.cwd(), sourceRef = "", targetRef = "", } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPaperAlphaPlan } from "@kungfu-tech/buildchain/core";` | `packages/core/paper.js:2655` |
|
|
794
798
|
| `createPaperBuildPlan` | function: function createPaperBuildPlan({ cwd = process.cwd(), sourceSha = "", pullToolchain = true, } = {}) | { cwd = process.cwd(), sourceSha = "", pullToolchain = true, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPaperBuildPlan } from "@kungfu-tech/buildchain/core";` | `packages/core/paper.js:2592` |
|
|
795
799
|
| `createPaperResumePlan` | function: function createPaperResumePlan({ cwd = process.cwd(), buildchainRef = "", } = {}) | { cwd = process.cwd(), buildchainRef = "", } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | local-filesystem-write | `import { createPaperResumePlan } from "@kungfu-tech/buildchain/core";` | `packages/core/paper.js:2713` |
|
|
@@ -953,8 +957,10 @@ Target: `./packages/core/index.js`. Public symbols: 538.
|
|
|
953
957
|
| `normalizeKfd3DistributionDeclaration` | function: function normalizeKfd3DistributionDeclaration(distribution, { surfaceId = "surface" } = {}) | distribution, { surfaceId = "surface" } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { normalizeKfd3DistributionDeclaration } from "@kungfu-tech/buildchain/core";` | `packages/core/kfd3-surface-register.js:73` |
|
|
954
958
|
| `normalizeKfdStandardId` | function: function normalizeKfdStandardId(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 { normalizeKfdStandardId } from "@kungfu-tech/buildchain/core";` | `packages/core/kfd.js:455` |
|
|
955
959
|
| `normalizeLifecycleStage` | function: function normalizeLifecycleStage(stage, label = "lifecycle stage", lifecycle = {}) | stage, label = "lifecycle stage", lifecycle = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { normalizeLifecycleStage } from "@kungfu-tech/buildchain/core";` | `packages/core/buildchain-config.js:1333` |
|
|
960
|
+
| `normalizePackageReleasePropagationConfig` | function: function normalizePackageReleasePropagationConfig(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 { normalizePackageReleasePropagationConfig } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-capture.js:63` |
|
|
956
961
|
| `normalizeReleasePropagationGraph` | function: function normalizeReleasePropagationGraph(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 { normalizeReleasePropagationGraph } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation.js:163` |
|
|
957
962
|
| `normalizeStableCandidateLedger` | function: function normalizeStableCandidateLedger(input, expected = {}) | input, expected = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { normalizeStableCandidateLedger } from "@kungfu-tech/buildchain/core";` | `packages/core/stable-candidate-ledger.js:76` |
|
|
963
|
+
| `PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT` | constant: const PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/release-propagation-capture.js:17` |
|
|
958
964
|
| `PAPER_ALPHA_PLAN_CONTRACT` | constant: const PAPER_ALPHA_PLAN_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PAPER_ALPHA_PLAN_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/paper.js:90` |
|
|
959
965
|
| `PAPER_BUILD_PLAN_CONTRACT` | constant: const PAPER_BUILD_PLAN_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PAPER_BUILD_PLAN_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/paper.js:89` |
|
|
960
966
|
| `PAPER_FLEET_AUDIT_CONTRACT` | constant: const PAPER_FLEET_AUDIT_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PAPER_FLEET_AUDIT_CONTRACT } from "@kungfu-tech/buildchain/core";` | `packages/core/paper-fleet.js:19` |
|
|
@@ -1879,17 +1885,20 @@ Target: `./packages/core/release-passport-contract.js`. Public symbols: 5.
|
|
|
1879
1885
|
|
|
1880
1886
|
## `@kungfu-tech/buildchain/release-propagation`
|
|
1881
1887
|
|
|
1882
|
-
Target: `./packages/core/release-propagation.js`. Public symbols:
|
|
1888
|
+
Target: `./packages/core/release-propagation.js`. Public symbols: 25.
|
|
1883
1889
|
|
|
1884
1890
|
| Symbol | Kind and signature | Parameters | Return | Errors | Side effects | Example | Source |
|
|
1885
1891
|
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1886
1892
|
| `claimReleasePropagationWork` | function: function claimReleasePropagationWork({ work, expectedWorkRoot, authority, familyState, } = {}) | { work, expectedWorkRoot, authority, familyState, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { claimReleasePropagationWork } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work-transitions.js:17` |
|
|
1887
1893
|
| `completeReleasePropagationWork` | function: function completeReleasePropagationWork({ work, expectedWorkRoot, receipt, completionDecision, } = {}) | { work, expectedWorkRoot, receipt, completionDecision, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { completeReleasePropagationWork } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work-transitions.js:110` |
|
|
1894
|
+
| `createPackageReleasePropagationCapture` | function: function createPackageReleasePropagationCapture({ config: configInput, upstreamRelease: upstreamReleaseInput, expectedBaseShas = {}, } = {}) | { config: configInput, upstreamRelease: upstreamReleaseInput, expectedBaseShas = {}, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createPackageReleasePropagationCapture } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-capture.js:101` |
|
|
1888
1895
|
| `createReleasePropagationLock` | function: function createReleasePropagationLock({ graph, edge, sourceNode, targetNode, upstreamRelease, downstreamChannel, } = {}) | { graph, edge, sourceNode, targetNode, upstreamRelease, downstreamChannel, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createReleasePropagationLock } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation.js:199` |
|
|
1889
1896
|
| `createReleasePropagationReceipt` | function: function createReleasePropagationReceipt({ plan, target = "", lockResult, prOutcome, stagingState = "pending", productionState = "not-requested", observedAt = "", } = {}) | { plan, target = "", lockResult, prOutcome, stagingState = "pending", productionState = "not-requested", observedAt = "", } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createReleasePropagationReceipt } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation.js:370` |
|
|
1890
1897
|
| `createReleasePropagationStageReceipt` | function: function createReleasePropagationStageReceipt({ work, stage, outcome = "success", observedAt, actor, summary, evidence, failure = null, } = {}) | { work, stage, outcome = "success", observedAt, actor, summary, evidence, failure = null, } = {} | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { createReleasePropagationStageReceipt } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work.js:214` |
|
|
1891
1898
|
| `createReleasePropagationWork` | function: function createReleasePropagationWork({ plan, target = "", workContext, expectedDownstreamBaseSha, } = {}) | { plan, target = "", workContext, expectedDownstreamBaseSha, } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { createReleasePropagationWork } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-work.js:111` |
|
|
1899
|
+
| `normalizePackageReleasePropagationConfig` | function: function normalizePackageReleasePropagationConfig(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 { normalizePackageReleasePropagationConfig } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-capture.js:63` |
|
|
1892
1900
|
| `normalizeReleasePropagationGraph` | function: function normalizeReleasePropagationGraph(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 { normalizeReleasePropagationGraph } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation.js:163` |
|
|
1901
|
+
| `PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT` | constant: const PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT | none | value | Import does not declare a throw contract. | none-on-import | `import { PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation-capture.js:17` |
|
|
1893
1902
|
| `planReleasePropagation` | function: function planReleasePropagation({ graph: graphInput, upstreamRelease: releaseInput, sourceNode = "" } = {}) | { graph: graphInput, upstreamRelease: releaseInput, sourceNode = "" } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { planReleasePropagation } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation.js:248` |
|
|
1894
1903
|
| `readReleasePropagationJson` | function: function readReleasePropagationJson(value, { cwd = process.cwd(), label = "json" } = {}) | value, { cwd = process.cwd(), label = "json" } = {} | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { readReleasePropagationJson } from "@kungfu-tech/buildchain/release-propagation";` | `packages/core/release-propagation.js:304` |
|
|
1895
1904
|
| `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/release-propagation";` | `packages/core/release-propagation-work-transitions.js:45` |
|
|
@@ -316,6 +316,40 @@ target; publication itself does not open a Site PR.
|
|
|
316
316
|
}
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
+
A managed npm package uses the parallel generic contract and passes its path to
|
|
320
|
+
the release-candidate promotion workflow:
|
|
321
|
+
|
|
322
|
+
```json
|
|
323
|
+
{
|
|
324
|
+
"schemaVersion": 1,
|
|
325
|
+
"contract": "kungfu-buildchain-package-release-propagation",
|
|
326
|
+
"sourceNode": "kfd",
|
|
327
|
+
"graph": {
|
|
328
|
+
"schemaVersion": 1,
|
|
329
|
+
"contract": "kungfu-buildchain-release-propagation-graph",
|
|
330
|
+
"nodes": [],
|
|
331
|
+
"edges": []
|
|
332
|
+
},
|
|
333
|
+
"targets": ["site-libkungfu-dev"]
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
```yaml
|
|
338
|
+
with:
|
|
339
|
+
release-propagation-config-path: .buildchain/release-propagation.json
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
The config is read with `git show` from the exact finalized release SHA. Its
|
|
343
|
+
root fields, graph fields, nodes, edges, targets, and execution profiles reject
|
|
344
|
+
unknown fields. After npm publication and the public GitHub Release are
|
|
345
|
+
complete, Buildchain independently reads npm `version`, `dist.integrity`, and
|
|
346
|
+
`gitHead`, resolves annotated Git tags to their commit, downloads the public
|
|
347
|
+
`buildchain.release.json` asset, and compares its bytes with the finalized
|
|
348
|
+
Passport. Only an exact source SHA, tag target, npm `gitHead`, package version,
|
|
349
|
+
integrity, and Passport digest can produce the capture artifact. The promotion
|
|
350
|
+
output `release-propagation-work-artifact` names the restart-safe artifact set.
|
|
351
|
+
No downstream checkout, branch, or pull request is created by this step.
|
|
352
|
+
|
|
319
353
|
Each graph target owns an exact GitHub web-surface execution profile: workflow,
|
|
320
354
|
base and managed branch, lock path, consumer commands, production status URL,
|
|
321
355
|
and production artifact readback URLs. The sealed workflow rejects extra config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5-alpha.0",
|
|
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",
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertCommitSha,
|
|
3
|
+
} from "./release-propagation-work-control.js";
|
|
4
|
+
import {
|
|
5
|
+
assertExactFields,
|
|
6
|
+
assertPlainObject,
|
|
7
|
+
assertString,
|
|
8
|
+
} from "./release-propagation-common.js";
|
|
9
|
+
import {
|
|
10
|
+
createReleasePropagationWork,
|
|
11
|
+
normalizeReleasePropagationGraph,
|
|
12
|
+
planReleasePropagation,
|
|
13
|
+
verifyReleasePropagationWork,
|
|
14
|
+
} from "./release-propagation.js";
|
|
15
|
+
import { normalizeUpstreamRelease } from "./release-propagation-release.js";
|
|
16
|
+
|
|
17
|
+
export const PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT =
|
|
18
|
+
"kungfu-buildchain-package-release-propagation";
|
|
19
|
+
|
|
20
|
+
function assertAllowedFields(value, allowed, required, label) {
|
|
21
|
+
const object = assertPlainObject(value, label);
|
|
22
|
+
const unknown = Object.keys(object).filter((field) => !allowed.has(field));
|
|
23
|
+
if (unknown.length > 0) {
|
|
24
|
+
throw new Error(`${label} has unknown fields: ${unknown.sort().join(", ")}`);
|
|
25
|
+
}
|
|
26
|
+
for (const field of required) {
|
|
27
|
+
if (!(field in object)) throw new Error(`${label}.${field} is required`);
|
|
28
|
+
}
|
|
29
|
+
return object;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function assertStrictGraph(graph) {
|
|
33
|
+
const value = assertAllowedFields(
|
|
34
|
+
graph,
|
|
35
|
+
new Set(["schemaVersion", "contract", "channelPolicy", "nodes", "edges"]),
|
|
36
|
+
["schemaVersion", "contract", "nodes", "edges"],
|
|
37
|
+
"package release propagation config graph",
|
|
38
|
+
);
|
|
39
|
+
if (!Array.isArray(value.nodes) || !Array.isArray(value.edges)) {
|
|
40
|
+
throw new Error("package release propagation config graph nodes and edges must be arrays");
|
|
41
|
+
}
|
|
42
|
+
value.nodes.forEach((node, index) => assertAllowedFields(
|
|
43
|
+
node,
|
|
44
|
+
new Set([
|
|
45
|
+
"id", "repository", "package", "lockPath", "baseRef", "workflow",
|
|
46
|
+
"executionProfile",
|
|
47
|
+
]),
|
|
48
|
+
["id", "repository"],
|
|
49
|
+
`package release propagation config graph nodes[${index}]`,
|
|
50
|
+
));
|
|
51
|
+
value.edges.forEach((edge, index) => assertAllowedFields(
|
|
52
|
+
edge,
|
|
53
|
+
new Set([
|
|
54
|
+
"id", "from", "to", "channels", "channelPolicy", "channelMap",
|
|
55
|
+
"lockPath", "prBaseRef",
|
|
56
|
+
]),
|
|
57
|
+
["from", "to"],
|
|
58
|
+
`package release propagation config graph edges[${index}]`,
|
|
59
|
+
));
|
|
60
|
+
return normalizeReleasePropagationGraph(value);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function normalizePackageReleasePropagationConfig(input) {
|
|
64
|
+
const config = assertExactFields(input, [
|
|
65
|
+
"schemaVersion", "contract", "sourceNode", "graph", "targets",
|
|
66
|
+
], "package release propagation config");
|
|
67
|
+
if (config.schemaVersion !== 1 || config.contract !== PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT) {
|
|
68
|
+
throw new Error(`package release propagation config must use ${PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT} v1`);
|
|
69
|
+
}
|
|
70
|
+
const sourceNode = assertString(config.sourceNode, "package release propagation config sourceNode");
|
|
71
|
+
if (!/^[A-Za-z0-9._-]+$/.test(sourceNode)) {
|
|
72
|
+
throw new Error("package release propagation config sourceNode must be a canonical node id");
|
|
73
|
+
}
|
|
74
|
+
if (!Array.isArray(config.targets) || config.targets.length === 0) {
|
|
75
|
+
throw new Error("package release propagation config targets must be a non-empty array");
|
|
76
|
+
}
|
|
77
|
+
const targets = config.targets.map((target, index) => {
|
|
78
|
+
const value = assertString(target, `package release propagation config targets[${index}]`);
|
|
79
|
+
if (!/^[A-Za-z0-9._-]+$/.test(value)) {
|
|
80
|
+
throw new Error("package release propagation config targets must be canonical node ids");
|
|
81
|
+
}
|
|
82
|
+
return value;
|
|
83
|
+
});
|
|
84
|
+
const canonicalTargets = [...new Set(targets)].sort();
|
|
85
|
+
if (JSON.stringify(targets) !== JSON.stringify(canonicalTargets)) {
|
|
86
|
+
throw new Error("package release propagation config targets must be sorted and unique");
|
|
87
|
+
}
|
|
88
|
+
const graph = assertStrictGraph(config.graph);
|
|
89
|
+
const source = graph.nodes.find((node) => node.id === sourceNode);
|
|
90
|
+
if (!source) throw new Error("package release propagation config sourceNode is absent from graph");
|
|
91
|
+
if (!source.package) throw new Error("package release propagation source node must declare a package");
|
|
92
|
+
return {
|
|
93
|
+
schemaVersion: 1,
|
|
94
|
+
contract: PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT,
|
|
95
|
+
sourceNode,
|
|
96
|
+
graph,
|
|
97
|
+
targets: canonicalTargets,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function createPackageReleasePropagationCapture({
|
|
102
|
+
config: configInput,
|
|
103
|
+
upstreamRelease: upstreamReleaseInput,
|
|
104
|
+
expectedBaseShas = {},
|
|
105
|
+
} = {}) {
|
|
106
|
+
const config = normalizePackageReleasePropagationConfig(configInput);
|
|
107
|
+
const upstreamRelease = normalizeUpstreamRelease(upstreamReleaseInput);
|
|
108
|
+
const source = config.graph.nodes.find((node) => node.id === config.sourceNode);
|
|
109
|
+
if (source.repository !== upstreamRelease.repository) {
|
|
110
|
+
throw new Error("package release propagation source repository disagrees with release envelope");
|
|
111
|
+
}
|
|
112
|
+
if (source.package !== upstreamRelease.package?.name) {
|
|
113
|
+
throw new Error("package release propagation source package disagrees with release envelope");
|
|
114
|
+
}
|
|
115
|
+
const plan = planReleasePropagation({
|
|
116
|
+
graph: config.graph,
|
|
117
|
+
upstreamRelease,
|
|
118
|
+
sourceNode: config.sourceNode,
|
|
119
|
+
});
|
|
120
|
+
const plannedTargets = plan.targets.map((target) => target.target).sort();
|
|
121
|
+
if (JSON.stringify(plannedTargets) !== JSON.stringify(config.targets)) {
|
|
122
|
+
throw new Error("package release propagation targets must exactly match the release-channel plan");
|
|
123
|
+
}
|
|
124
|
+
const works = plan.targets.map((target) => {
|
|
125
|
+
const expectedBaseSha = expectedBaseShas[target.target]
|
|
126
|
+
|| expectedBaseShas[target.repository]
|
|
127
|
+
|| "";
|
|
128
|
+
assertCommitSha(
|
|
129
|
+
expectedBaseSha,
|
|
130
|
+
`expected downstream base SHA for ${target.target}`,
|
|
131
|
+
);
|
|
132
|
+
const work = createReleasePropagationWork({
|
|
133
|
+
plan,
|
|
134
|
+
target: target.target,
|
|
135
|
+
expectedDownstreamBaseSha: expectedBaseSha,
|
|
136
|
+
});
|
|
137
|
+
const status = verifyReleasePropagationWork(work);
|
|
138
|
+
if (status.lifecycle !== "paused" || status.nextAction?.action !== "claim") {
|
|
139
|
+
throw new Error("captured package propagation work must remain paused at claim");
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
target: target.target,
|
|
143
|
+
repository: target.repository,
|
|
144
|
+
propagationKey: target.propagationKey,
|
|
145
|
+
work,
|
|
146
|
+
status,
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
return { config, upstreamRelease, plan, works };
|
|
150
|
+
}
|
|
@@ -58,7 +58,7 @@ function exactClaims(entry, fields, label) {
|
|
|
58
58
|
function releaseClaims(work) {
|
|
59
59
|
return {
|
|
60
60
|
releaseRoot: work.upstream.releaseRoot,
|
|
61
|
-
releaseLockRoot: work.downstream.
|
|
61
|
+
releaseLockRoot: `sha256:${work.downstream.lockSha256}`,
|
|
62
62
|
sourceSha: work.upstream.release.sourceSha,
|
|
63
63
|
tagTargetSha: work.upstream.release.tagTargetSha,
|
|
64
64
|
};
|
|
@@ -471,3 +471,8 @@ export {
|
|
|
471
471
|
recordReleasePropagationStage,
|
|
472
472
|
repairReleasePropagationWork,
|
|
473
473
|
} from "./release-propagation-work-transitions.js";
|
|
474
|
+
export {
|
|
475
|
+
PACKAGE_RELEASE_PROPAGATION_CONFIG_CONTRACT,
|
|
476
|
+
createPackageReleasePropagationCapture,
|
|
477
|
+
normalizePackageReleasePropagationConfig,
|
|
478
|
+
} from "./release-propagation-capture.js";
|
|
@@ -16,7 +16,6 @@ const RENDITION_SET_NON_AUTHORITIES = [
|
|
|
16
16
|
"runtime-authority",
|
|
17
17
|
...TERMINAL_CAPTURE_NON_AUTHORITIES,
|
|
18
18
|
];
|
|
19
|
-
|
|
20
19
|
export function validateTerminalCapture(value, scene, helpers) {
|
|
21
20
|
const { decodeBase64, digestPattern, exactKeys, integer, invariant, maxBytes, maxEvents, text } = helpers;
|
|
22
21
|
exactKeys(
|
|
@@ -53,10 +52,10 @@ export function validateTerminalCapture(value, scene, helpers) {
|
|
|
53
52
|
}
|
|
54
53
|
exactKeys(value.completion, ["schema", "status", "reportRoot", "eventCount"], [], "terminalCapture.completion");
|
|
55
54
|
invariant(
|
|
56
|
-
value.completion.schema
|
|
55
|
+
/^[a-z0-9][a-z0-9._/-]*\/v[1-9][0-9]*$/u.test(value.completion.schema)
|
|
57
56
|
&& value.completion.status === "qualified"
|
|
58
57
|
&& digestPattern.test(value.completion.reportRoot),
|
|
59
|
-
"terminal capture completion sentinel is not a qualified
|
|
58
|
+
"terminal capture completion sentinel is not a qualified versioned result",
|
|
60
59
|
);
|
|
61
60
|
integer(value.completion.eventCount, 1, 100_000, "terminalCapture.completion.eventCount");
|
|
62
61
|
invariant(value.exitCode === 0, "terminal capture exitCode must be zero");
|