@kungfu-tech/buildchain 2.12.5-alpha.1 → 2.12.5-alpha.3

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.
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "2.12.5-alpha.1",
7
+ "version": "2.12.5-alpha.3",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v2",
@@ -89,7 +89,7 @@
89
89
  "alpha and stable channel selections use separate consumer contract locks by default"
90
90
  ],
91
91
  "breakingDigest": "sha256:c4597dfa89e1a58f1023905092b849644f5c080abf150aeba9c7e1cd5ed43962",
92
- "auditDigest": "sha256:00f575bb160b851361927a998b4dab66f7eade003f80d1fa5bc72bb68328835c"
92
+ "auditDigest": "sha256:13d6d3cfaadf68c32c38b4014956f6deab8c8c07e6d9a63ff5acf0d3d9cb04aa"
93
93
  },
94
94
  {
95
95
  "contractVersion": 1,
@@ -328,7 +328,7 @@
328
328
  "release-state SHA is recorded as a durable audit entrance"
329
329
  ],
330
330
  "breakingDigest": "sha256:b627e1b2ece9b6049517a942c5139e342e6077cdd3d8962d61cef8481b1f70ad",
331
- "auditDigest": "sha256:f452026600687ecc266651457a8c1151303210d312f0d16ad16e4c3f414ed170"
331
+ "auditDigest": "sha256:32fd54ceb8e1a0219918e7744797e3a1bf3f614bb8498028209275b98304ac5b"
332
332
  },
333
333
  {
334
334
  "contractVersion": 1,
@@ -377,7 +377,7 @@
377
377
  "prose-only public claims downgrade the release trust passport audit"
378
378
  ],
379
379
  "breakingDigest": "sha256:f0b636eb925ddbf45ff1a8872454ab7b4dd98857cac12bb75217830130e62a16",
380
- "auditDigest": "sha256:f452026600687ecc266651457a8c1151303210d312f0d16ad16e4c3f414ed170"
380
+ "auditDigest": "sha256:32fd54ceb8e1a0219918e7744797e3a1bf3f614bb8498028209275b98304ac5b"
381
381
  },
382
382
  {
383
383
  "contractVersion": 1,
@@ -549,7 +549,7 @@
549
549
  "agents can discover supported Node APIs without importing internal file paths"
550
550
  ],
551
551
  "breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945",
552
- "auditDigest": "sha256:b2d4e6e8a3839374cf0f39b2ad2ac60fcb10985611597c44f5273c0c16a5c27d"
552
+ "auditDigest": "sha256:3bcfa43a81ab6b7cab1a82deee789d412978df48496f8cc73b6edef71a38569a"
553
553
  },
554
554
  {
555
555
  "contractVersion": 1,
@@ -1374,7 +1374,7 @@
1374
1374
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
1375
1375
  ],
1376
1376
  "breakingDigest": "sha256:d40dd05d7e07473d4b2dc1b62fbb0ed6f06449b4d3a7c44a2e8014313e3c0273",
1377
- "auditDigest": "sha256:00f575bb160b851361927a998b4dab66f7eade003f80d1fa5bc72bb68328835c"
1377
+ "auditDigest": "sha256:13d6d3cfaadf68c32c38b4014956f6deab8c8c07e6d9a63ff5acf0d3d9cb04aa"
1378
1378
  },
1379
1379
  {
1380
1380
  "contractVersion": 1,
@@ -2549,5 +2549,5 @@
2549
2549
  }
2550
2550
  ],
2551
2551
  "compatibilityDigest": "sha256:2520207c5d6d6a737dd32251a42be9c5299644d9aebf690a8402ead1724ed495",
2552
- "contractDigest": "sha256:cc06a00825e7aa4d16ae647af346cf8457f177255b73beff65d086f022b66d11"
2552
+ "contractDigest": "sha256:2c9a5c8a22c208b3d58a99079831f0177d1f7c2fdecf9036257212fc91c6a7fa"
2553
2553
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-bundle",
4
- "generatedAt": "2026-07-14T01:49:12.636Z",
5
- "publishedAt": "2026-07-14T01:49:12.636Z",
4
+ "generatedAt": "2026-07-14T02:25:54.973Z",
5
+ "publishedAt": "2026-07-14T02:25:54.973Z",
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": "e80475ac79f2673396c1fb006f381d83d20d688d",
22
+ "sourceRevision": "fe6b044ccd9e27ee6d0c6c72fc8e25920303171b",
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": "2.12.5-alpha.1",
40
+ "version": "2.12.5-alpha.3",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "source": {
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "id": "kungfu-tech-buildchain",
6
6
  "name": "@kungfu-tech/buildchain",
7
- "version": "2.12.5-alpha.1",
7
+ "version": "2.12.5-alpha.3",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "source": {
@@ -86,7 +86,7 @@
86
86
  "specifier": "@kungfu-tech/buildchain/controller-evidence",
87
87
  "export": "./controller-evidence",
88
88
  "target": "./packages/core/controller-evidence.js",
89
- "digest": "sha256:e5db8c1534f634c525c00dd81e380157a8d7415e95471474574edd4cf92f0fb7",
89
+ "digest": "sha256:6aba1af5216feaec16581a1ea36fdf318cf4af4e03b22fe5399a8bf597b8c003",
90
90
  "summary": "Project-independent controller descriptors, source/runtime-bound plans, receipts, aggregates, and validation APIs.",
91
91
  "capabilityGroup": "reusable-build",
92
92
  "audience": [
@@ -281,7 +281,7 @@
281
281
  "specifier": "@kungfu-tech/buildchain/release-passport",
282
282
  "export": "./release-passport",
283
283
  "target": "./packages/core/release-passport.js",
284
- "digest": "sha256:f452026600687ecc266651457a8c1151303210d312f0d16ad16e4c3f414ed170",
284
+ "digest": "sha256:32fd54ceb8e1a0219918e7744797e3a1bf3f614bb8498028209275b98304ac5b",
285
285
  "summary": "Release passport collection, verification, explanation, and evidence APIs.",
286
286
  "capabilityGroup": "release-passport-trust",
287
287
  "audience": [
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-07-14T01:49:12.636Z",
5
- "publishedAt": "2026-07-14T01:49:12.636Z",
4
+ "generatedAt": "2026-07-14T02:25:54.973Z",
5
+ "publishedAt": "2026-07-14T02:25:54.973Z",
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": "e80475ac79f2673396c1fb006f381d83d20d688d",
22
+ "sourceRevision": "fe6b044ccd9e27ee6d0c6c72fc8e25920303171b",
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": "2.12.5-alpha.1",
35
+ "version": "2.12.5-alpha.3",
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-07-14T01:49:12.636Z",
5
- "publishedAt": "2026-07-14T01:49:12.636Z",
4
+ "generatedAt": "2026-07-14T02:25:54.973Z",
5
+ "publishedAt": "2026-07-14T02:25:54.973Z",
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": "e80475ac79f2673396c1fb006f381d83d20d688d",
22
+ "sourceRevision": "fe6b044ccd9e27ee6d0c6c72fc8e25920303171b",
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": "2.12.5-alpha.1",
40
+ "version": "2.12.5-alpha.3",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "2.12.5-alpha.1",
3
+ "version": "2.12.5-alpha.3",
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",
@@ -452,6 +452,7 @@ export function createControllerReceiptReference(receipt) {
452
452
 
453
453
  export function validateControllerReceiptReference(reference, {
454
454
  expectedSourceSha = "",
455
+ acceptedSourceShas = [],
455
456
  expectedRuntimeSha = "",
456
457
  requirePassed = false,
457
458
  } = {}) {
@@ -468,7 +469,10 @@ export function validateControllerReceiptReference(reference, {
468
469
  issues.push("controller receipt reference status is invalid");
469
470
  }
470
471
  if (requirePassed && reference.status !== "passed") issues.push("controller receipt reference status must be passed");
471
- if (expectedSourceSha && reference.sourceSha !== expectedSourceSha) issues.push("controller receipt reference source SHA mismatch");
472
+ const allowedSourceShas = new Set([expectedSourceSha, ...(acceptedSourceShas || [])].filter(Boolean));
473
+ if (allowedSourceShas.size > 0 && !allowedSourceShas.has(reference.sourceSha)) {
474
+ issues.push("controller receipt reference source SHA mismatch");
475
+ }
472
476
  if (expectedRuntimeSha && reference.runtimeSha !== expectedRuntimeSha) issues.push("controller receipt reference runtime SHA mismatch");
473
477
  return { ok: issues.length === 0, issues };
474
478
  }
@@ -477,6 +481,7 @@ export function normalizeControllerReceiptReferences({
477
481
  receipts = [],
478
482
  references = [],
479
483
  expectedSourceSha = "",
484
+ acceptedSourceShas = [],
480
485
  expectedRuntimeSha = "",
481
486
  requirePassed = false,
482
487
  } = {}) {
@@ -486,7 +491,12 @@ export function normalizeControllerReceiptReferences({
486
491
  ];
487
492
  const seen = new Set();
488
493
  for (const reference of normalized) {
489
- const validation = validateControllerReceiptReference(reference, { expectedSourceSha, expectedRuntimeSha, requirePassed });
494
+ const validation = validateControllerReceiptReference(reference, {
495
+ expectedSourceSha,
496
+ acceptedSourceShas,
497
+ expectedRuntimeSha,
498
+ requirePassed,
499
+ });
490
500
  if (!validation.ok) throw new Error(`controller receipt reference is invalid: ${validation.issues.join("; ")}`);
491
501
  if (seen.has(reference.controllerId)) throw new Error(`duplicate controller receipt reference: ${reference.controllerId}`);
492
502
  seen.add(reference.controllerId);
@@ -1019,10 +1019,16 @@ export function createReleasePassport({
1019
1019
  kfd1Section: normalizedKfd1?.passportSection,
1020
1020
  kfd3Section: normalizedKfd3?.passportSection,
1021
1021
  });
1022
+ const builtSourceSha = optionalString(release.builtSourceSha || release.built_source_sha);
1023
+ const promotionChannelSha = optionalString(release.promotionChannelSha || release.promotion_channel_sha);
1024
+ const treeEquivalent = release.treeEquivalent === true;
1022
1025
  const normalizedControllerReceipts = normalizeControllerReceiptReferences({
1023
1026
  receipts: controllerReceipts,
1024
1027
  references: controllerReceiptReferences,
1025
1028
  expectedSourceSha: sourceSha,
1029
+ acceptedSourceShas: treeEquivalent && promotionChannelSha === sourceSha && builtSourceSha
1030
+ ? [builtSourceSha]
1031
+ : [],
1026
1032
  requirePassed: true,
1027
1033
  });
1028
1034
  const publishArtifacts = normalizedPublishEvidence?.artifacts || [];
@@ -92,20 +92,20 @@ function routerControllerPlanJob() {
92
92
  controller-plan-digest: \${{ steps.plan.outputs.controller-plan-digest }}
93
93
  runtime-sha: \${{ steps.identities.outputs.runtime-sha }}
94
94
  steps:
95
- - name: Checkout selected Buildchain runtime
95
+ - name: Checkout Buildchain controller workflow shell
96
96
  uses: actions/checkout@v7.0.0
97
97
  with:
98
- repository: \${{ inputs.buildchain-repository }}
99
- ref: \${{ needs.resolve-channel.outputs.buildchain-ref }}
100
- path: .buildchain/runtime
98
+ repository: \${{ needs.resolve-channel.outputs.router-repository }}
99
+ ref: \${{ needs.resolve-channel.outputs.router-ref }}
100
+ path: .buildchain/controller-runtime
101
101
  persist-credentials: false
102
102
 
103
- - name: Resolve selected runtime identity
103
+ - name: Resolve controller workflow shell identity
104
104
  id: identities
105
105
  shell: bash
106
106
  run: |
107
- runtime_sha="$(git -C .buildchain/runtime rev-parse HEAD)"
108
- contract_digest="$(node -e 'const fs=require("fs"); const value=JSON.parse(fs.readFileSync(".buildchain/runtime/dist/site/buildchain-contract.json","utf8")); process.stdout.write(value.contractDigest)')"
107
+ runtime_sha="$(git -C .buildchain/controller-runtime rev-parse HEAD)"
108
+ contract_digest="$(node -e 'const fs=require("fs"); const value=JSON.parse(fs.readFileSync(".buildchain/controller-runtime/dist/site/buildchain-contract.json","utf8")); process.stdout.write(value.contractDigest)')"
109
109
  {
110
110
  echo "runtime-sha=\${runtime_sha}"
111
111
  echo "contract-digest=\${contract_digest}"
@@ -113,12 +113,12 @@ function routerControllerPlanJob() {
113
113
 
114
114
  - name: Create channel router controller plan
115
115
  id: plan
116
- run: node .buildchain/runtime/scripts/controller-evidence.mjs --mode plan
116
+ run: node .buildchain/controller-runtime/scripts/controller-evidence.mjs --mode plan
117
117
  env:
118
118
  BUILDCHAIN_CONTROLLER_ID: build-channel-router
119
119
  BUILDCHAIN_CONTROLLER_SOURCE_REPOSITORY: \${{ github.repository }}
120
120
  BUILDCHAIN_CONTROLLER_SOURCE_SHA: \${{ github.sha }}
121
- BUILDCHAIN_CONTROLLER_RUNTIME_REF: \${{ needs.resolve-channel.outputs.buildchain-ref }}
121
+ BUILDCHAIN_CONTROLLER_RUNTIME_REF: \${{ needs.resolve-channel.outputs.router-ref }}
122
122
  BUILDCHAIN_CONTROLLER_RUNTIME_SHA: \${{ steps.identities.outputs.runtime-sha }}
123
123
  BUILDCHAIN_CONTROLLER_CONTRACT_DIGEST: \${{ steps.identities.outputs.contract-digest }}
124
124
  BUILDCHAIN_CONTROLLER_INPUTS_JSON: \${{ toJSON(inputs) }}
@@ -153,12 +153,12 @@ function routerControllerReceiptJob() {
153
153
  controller-receipt-digest: \${{ steps.receipt.outputs.controller-receipt-digest }}
154
154
  controller-receipt-status: \${{ steps.receipt.outputs.controller-receipt-status }}
155
155
  steps:
156
- - name: Checkout selected Buildchain runtime
156
+ - name: Checkout Buildchain controller workflow shell
157
157
  uses: actions/checkout@v7.0.0
158
158
  with:
159
- repository: \${{ inputs.buildchain-repository }}
159
+ repository: \${{ needs.resolve-channel.outputs.router-repository }}
160
160
  ref: \${{ needs.controller-plan.outputs.runtime-sha }}
161
- path: .buildchain/runtime
161
+ path: .buildchain/controller-runtime
162
162
  persist-credentials: false
163
163
 
164
164
  - name: Download channel router controller plan
@@ -169,7 +169,7 @@ function routerControllerReceiptJob() {
169
169
 
170
170
  - name: Create channel router controller receipt
171
171
  id: receipt
172
- run: node .buildchain/runtime/scripts/controller-evidence.mjs --mode receipt
172
+ run: node .buildchain/controller-runtime/scripts/controller-evidence.mjs --mode receipt
173
173
  env:
174
174
  BUILDCHAIN_CONTROLLER_PLAN_PATH: .buildchain/controller/plan.json
175
175
  BUILDCHAIN_CONTROLLER_STAGES_JSON: >-
@@ -214,6 +214,15 @@ function generateChannelBuildWorkflowBase(source) {
214
214
 
215
215
  export function generateChannelBuildWorkflow(source) {
216
216
  const generated = generateChannelBuildWorkflowBase(source)
217
+ .replace(
218
+ " contract-lock-path: ${{ steps.lock.outputs.path }}\n",
219
+ [
220
+ " contract-lock-path: ${{ steps.lock.outputs.path }}",
221
+ " router-repository: ${{ steps.router.outputs.repository }}",
222
+ " router-ref: ${{ steps.router.outputs.ref }}",
223
+ "",
224
+ ].join("\n"),
225
+ )
217
226
  .replace("\n build:\n", `\n${routerControllerPlanJob()}\n\n build:\n`)
218
227
  .replace(
219
228
  " needs: resolve-channel\n uses: ./.github/workflows/.build.yml",