@kungfu-tech/buildchain 2.14.18-alpha.10 → 2.14.18-alpha.2

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.
@@ -2154,7 +2154,6 @@
2154
2154
  "branch-protection-bypass-users",
2155
2155
  "dry-run",
2156
2156
  "expected-publication-version",
2157
- "generated-pull-request-token",
2158
2157
  "generated-ref-update-token",
2159
2158
  "generated-status-check-token",
2160
2159
  "github-release",
@@ -2213,7 +2212,7 @@
2213
2212
  "transaction-state-path",
2214
2213
  "verification-command"
2215
2214
  ],
2216
- "inputCount": 64
2215
+ "inputCount": 63
2217
2216
  },
2218
2217
  {
2219
2218
  "id": "report-buildchain-issue",
@@ -3910,8 +3909,8 @@
3910
3909
  "workflowRegistryPath": "dist/site/workflow-registry.json",
3911
3910
  "pageRegistryPath": "dist/site/page-registry.json",
3912
3911
  "cliRegistryDigest": "5ba7fd93a13993b05767b6f02d0626a7347f25c3d7cd4589ed4f70028c1f1bd1",
3913
- "workflowRegistryDigest": "c2abf629b205a96f536e8758c3d9cdb3eade6945294fe278774877ef41d90b60",
3914
- "pageRegistryDigest": "16a40ed6f3848fcb6a743f9d0369b04e956dfb7b8548b1a7a79266f76b928c80"
3912
+ "workflowRegistryDigest": "1c2d1662c528b7762c45f626b815387430b89f8d062085ca47fc7205460c12a5",
3913
+ "pageRegistryDigest": "01f6a9b7e4ac673595d60e55f305681b80b3f7a3cae711950c3417c9326f8d3f"
3915
3914
  },
3916
3915
  "comparison": {
3917
3916
  "missingCliRegistry": [],
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-07-24T15:05:40.482Z",
5
- "publishedAt": "2026-07-24T15:05:40.482Z",
4
+ "generatedAt": "2026-07-24T10:46:25.692Z",
5
+ "publishedAt": "2026-07-24T10:46:25.692Z",
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": "dd874a40c2a6c55f2b7939760104249f60017807",
22
+ "sourceRevision": "951a54ab893c75bb397024f5891a61e7d79db90e",
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.14.18-alpha.10",
35
+ "version": "2.14.18-alpha.2",
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-24T15:05:40.482Z",
5
- "publishedAt": "2026-07-24T15:05:40.482Z",
4
+ "generatedAt": "2026-07-24T10:46:25.692Z",
5
+ "publishedAt": "2026-07-24T10:46:25.692Z",
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": "dd874a40c2a6c55f2b7939760104249f60017807",
22
+ "sourceRevision": "951a54ab893c75bb397024f5891a61e7d79db90e",
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.14.18-alpha.10",
40
+ "version": "2.14.18-alpha.2",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -93,7 +93,7 @@
93
93
  "path": "docs/github-governance-authority.md",
94
94
  "plane": "verify",
95
95
  "exists": true,
96
- "digest": "sha256:8484b18d5b0fe6d61d102d6b9cb9e18beac9f47ecb516d430fb5427518e2931f"
96
+ "digest": "sha256:3103d7982c9a30b344c603566520aeb1d5d90c1c54958d9c1c2b7ae897359da8"
97
97
  },
98
98
  {
99
99
  "id": "release-candidate",
@@ -229,7 +229,7 @@
229
229
  "path": "docs/lifecycle-protocol.md",
230
230
  "plane": "use",
231
231
  "exists": true,
232
- "digest": "sha256:9c669d3d2d1926dc5b421207089cca85bac0a6dcdb5544c28a7e1659ba9ed5ee"
232
+ "digest": "sha256:ffe57d0a938d799033310d2f89e1b4b7502af5677b6b8ae90a1bbde239339982"
233
233
  },
234
234
  {
235
235
  "id": "reusable-build-surface",
@@ -245,7 +245,7 @@
245
245
  "path": "docs/publish-transaction.md",
246
246
  "plane": "verify",
247
247
  "exists": true,
248
- "digest": "sha256:cde5256d5f6443a6d32b47783900a0677e973855266af5a360db8d4d112bb677"
248
+ "digest": "sha256:8f6cc435f57807889827ad2c9bfec1e4ad94290fde6fe02e72a15967e7072edc"
249
249
  },
250
250
  {
251
251
  "id": "release-governance",
@@ -253,7 +253,7 @@
253
253
  "path": "docs/release-governance.md",
254
254
  "plane": "why",
255
255
  "exists": true,
256
- "digest": "sha256:5aa7fef2c831d14b4d1df4cddb45c6ce97929d8530eb14e3b3dfa3dee5e0d651"
256
+ "digest": "sha256:4e7c4649ee0fa7cea11ccb7031d5dd38046a3aef15dba6a00d24b3a12361b05f"
257
257
  },
258
258
  {
259
259
  "id": "release-flow",
@@ -1867,7 +1867,6 @@
1867
1867
  "branch-protection-bypass-users",
1868
1868
  "dry-run",
1869
1869
  "expected-publication-version",
1870
- "generated-pull-request-token",
1871
1870
  "generated-ref-update-token",
1872
1871
  "generated-status-check-token",
1873
1872
  "github-release",
@@ -1926,7 +1925,7 @@
1926
1925
  "transaction-state-path",
1927
1926
  "verification-command"
1928
1927
  ],
1929
- "inputCount": 64,
1928
+ "inputCount": 63,
1930
1929
  "capabilityGroup": "release-passport-trust",
1931
1930
  "status": "active"
1932
1931
  },
@@ -140,14 +140,6 @@ App configuration or unreadable provider state denies publication before
140
140
  provider mutation. The publication authority workflow is itself an explicit
141
141
  Code Owner path.
142
142
 
143
- The publication authority job and every reusable-workflow caller grant the
144
- built-in `GITHUB_TOKEN` only `actions: read`, `checks: read`, `contents: read`,
145
- and `pull-requests: read`. The dedicated auditor App independently recollects
146
- the organization-wide governance receipt, while these job-scoped permissions
147
- allow the exact publication transaction audit to resolve required check runs
148
- and merged pull-request review lineage. Omitting either read permission makes
149
- the transaction evidence incomplete and therefore non-qualifying.
150
-
151
143
  The output is sanitized. Public repositories retain their public identity.
152
144
  Private repositories expose only an identity root, visibility class, target
153
145
  ref, sanitized required-check bindings and fact roots, and a qualifying or
@@ -303,13 +303,12 @@ release bookkeeping. Buildchain also creates the configured required
303
303
  check on the exact generated version-state commit before patching the protected
304
304
  ref, then applies the protected ref update with the declared generated ref
305
305
  update token. The reusable wrapper uses the run-scoped `github.token` for that
306
- protected bookkeeping update. If finalization bookkeeping is still rejected,
306
+ protected bookkeeping update. If release finalization bookkeeping is still rejected,
307
307
  Buildchain creates or reuses a same-repository `buildchain/version-state/*` PR
308
- and reports `finalization-needed=true` so a later idempotent promotion run can
309
- resume. This fallback also applies to strict alpha target and dev
310
- reconciliation. The generated PR must pass the repository's normal protected
311
- checks, review, and merge-queue policy; Buildchain never weakens that policy or
312
- treats PR creation as completed finalization.
308
+ from the current target channel head and reports `finalization-needed=true` so
309
+ a later idempotent promotion run can resume. Strict alpha bookkeeping remains
310
+ fail-fast with a token/protection diagnostic instead of asking humans to review
311
+ a post-publish version-state PR.
313
312
 
314
313
  For `version.strategy = "anchored"` with `version.next = "manual"`, release
315
314
  promotion does not generate a Buildchain-owned version-state commit. In that
@@ -363,21 +363,6 @@ When publish transactions are enabled, promotion order is:
363
363
  7. move floating tags and channel refs;
364
364
  8. mark the transaction `complete`.
365
365
 
366
- When a protected channel requires a generated version-state pull request, the
367
- first run can stop at `finalizing` after registry publication. If the reviewed
368
- merge commit later contains that exact transaction release material but the
369
- exact tag is still absent, a retry performs finalization only: it reloads the
370
- same durable source, release material, tooling, evidence, version, and target
371
- bindings; creates the exact and floating tags at the transaction release SHA;
372
- and completes the passport from the transaction source tree. It does not rerun
373
- the provider mutation and does not authorize the newer composite channel tree
374
- as published material. A different source tree still requires a new version and
375
- a fresh release candidate.
376
-
377
- Deferred binary dispatch, controller-evidence bundling, and any consumer
378
- publication commit are skipped while `finalization-needed=true`. They run only
379
- after the exact public tag and complete release passport exist.
380
-
381
366
  Consumer products that expose a signed well-known channel can opt into one
382
367
  additional, deliberately final step with `publication-commit-command`. Before
383
368
  that command runs, Buildchain has already completed the transaction, created
@@ -441,12 +426,11 @@ the exact generated version-state commit so branch protection can
441
426
  validate the automation path without a second build, then uses the generated
442
427
  ref update token for the protected ref PATCH. If release finalization
443
428
  bookkeeping is still rejected, Buildchain creates or reuses a same-repository
444
- `buildchain/version-state/*` PR and leaves the transaction resumable with
445
- `finalization-needed=true`. Strict alpha uses the same protected PR fallback
446
- for both its target channel and subsequent dev reconciliation. A later
447
- idempotent run continues only after the provider shows that the PR reached the
448
- protected branch. The reusable wrapper binds that token to the run-scoped
449
- `github.token` and rejects user, team, or alternate App bypass actors.
429
+ `buildchain/version-state/*` PR based on the current target channel head and
430
+ leaves the transaction resumable with `finalization-needed=true`. Strict alpha
431
+ bookkeeping remains fail-fast. The reusable wrapper binds that token to the
432
+ run-scoped `github.token` and rejects user, team, or alternate App bypass
433
+ actors.
450
434
 
451
435
  If finalization fails after an exact Git tag, a channel branch, or dev/alpha
452
436
  sync ref has already moved, the next run reads the durable `finalizing` state
@@ -719,12 +719,10 @@ status checks are satisfied by machine-verifiable Buildchain evidence rather
719
719
  than a human PR. The protected ref PATCH itself uses the generated ref update
720
720
  token; the reusable wrapper binds it to the run-scoped `github.token`. If direct generated
721
721
  release finalization bookkeeping is still rejected, Buildchain creates or
722
- reuses a same-repository `buildchain/version-state/*` PR and records
723
- `finalization-needed=true` in the durable transaction output. Strict alpha
724
- follows the same provider-enforced PR path for its alpha and dev bookkeeping.
725
- The PR remains subject to the declared review, required checks, and merge-queue
726
- policy; publication resumes idempotently after that protected transaction
727
- lands.
722
+ reuses a same-repository `buildchain/version-state/*` PR based on the current
723
+ target channel head and records `finalization-needed=true` in the durable
724
+ transaction output. Strict alpha bookkeeping still fails with a
725
+ token/protection diagnostic instead of creating a post-publish PR.
728
726
 
729
727
  For a stable release, the wrapper also checks out the exact current development
730
728
  channel into `.buildchain/reconciliation/dev`. When the prepared next-alpha
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "2.14.18-alpha.10",
3
+ "version": "2.14.18-alpha.2",
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",
@@ -7,7 +7,7 @@ export const BUILDCHAIN_CONTROLLER_AGGREGATE_CONTRACT = "buildchain.controller-e
7
7
 
8
8
  const SHA256_PATTERN = /^sha256:[0-9a-f]{64}$/;
9
9
  const GIT_SHA_PATTERN = /^[0-9a-f]{40}$/;
10
- const STAGE_STATUSES = new Set(["passed", "failed", "skipped", "cancelled", "missing", "partial"]);
10
+ const STAGE_STATUSES = new Set(["passed", "failed", "skipped", "cancelled", "missing"]);
11
11
 
12
12
  const CONTROLLER_SPECS = [
13
13
  {
@@ -122,8 +122,6 @@ export function evaluatePublicationControlPlaneSnapshot({
122
122
  Array.isArray(branchPolicy.releaseReconciliation.changedPaths) &&
123
123
  branchPolicy.releaseReconciliation.changedPaths.length > 0
124
124
  );
125
- const sourceBranchBindingPass = branchPolicy.sourceSha === branchPolicy.headSha ||
126
- branchPolicy.sourceContainedInBranch === true;
127
125
  const providerTransactionBranchPass = branchPolicy.ref === branch &&
128
126
  branchPolicy.policyMode === "provider-enforced-transaction" &&
129
127
  branchPolicy.protected === true &&
@@ -134,7 +132,7 @@ export function evaluatePublicationControlPlaneSnapshot({
134
132
  branchPolicy.requiredCheckPassed === true &&
135
133
  /^[0-9a-f]{40}$/i.test(String(branchPolicy.requiredCheckSha || "")) &&
136
134
  branchPolicy.requiredCheckSha === branchPolicy.pullRequestHeadSha &&
137
- sourceBranchBindingPass &&
135
+ branchPolicy.sourceSha === branchPolicy.headSha &&
138
136
  sourceAuthorizationPass &&
139
137
  branchPolicy.mergedPullRequest === true &&
140
138
  branchPolicy.baseRef === branch &&
@@ -160,7 +158,6 @@ export function evaluatePublicationControlPlaneSnapshot({
160
158
  environmentPolicy.declared === true &&
161
159
  environmentPolicy.exists === true &&
162
160
  environmentPolicy.protected === true &&
163
- environmentPolicy.branchAuthorized === true &&
164
161
  (environmentPolicy.reviewRequired !== true || environmentPolicy.preventSelfReview === true),
165
162
  environmentPolicy,
166
163
  ),
@@ -239,16 +239,6 @@ function main() {
239
239
  const deploymentBranches = environment !== "none" && environmentState.deployment_branch_policy?.custom_branch_policies === true
240
240
  ? githubJson(`repos/${repository}/environments/${encodeURIComponent(environment)}/deployment-branch-policies?per_page=100`, "Environment deployment branch policy")
241
241
  : { branch_policies: [] };
242
- const exactEnvironmentBranchPolicy = (deploymentBranches.branch_policies || []).find((entry) =>
243
- entry?.type === "branch" && entry?.name === branch
244
- );
245
- const environmentBranchAuthorized = environment !== "none" && (
246
- (
247
- environmentState.deployment_branch_policy?.protected_branches === true &&
248
- branchState.protected === true
249
- ) ||
250
- Boolean(exactEnvironmentBranchPolicy)
251
- );
252
242
  const oidc = githubJson(`repos/${repository}/actions/oidc/customization/sub`, "OIDC subject policy");
253
243
  if (!["npm-trusted-publisher", "github-token", "oidc-role"].includes(publisherMode)) {
254
244
  throw new Error(`unsupported --publisher-mode: ${publisherMode}`);
@@ -287,24 +277,10 @@ function main() {
287
277
  message: sourceMessage,
288
278
  changedPaths: sourceChangedPaths,
289
279
  };
290
- const branchHeadSha = String(branchState.commit?.sha || "").toLowerCase();
291
- const sourceComparison = sourceSha === branchHeadSha
292
- ? null
293
- : githubJson(
294
- `repos/${repository}/compare/${sourceSha}...${branchHeadSha}`,
295
- "source protected-branch lineage",
296
- );
297
- const sourceContainedInBranch = sourceSha === branchHeadSha || (
298
- sourceComparison?.status === "ahead" &&
299
- String(sourceComparison?.merge_base_commit?.sha || "").toLowerCase() === sourceSha
300
- );
301
280
  let pullRequests = githubJson(`repos/${repository}/commits/${authorizationSha}/pulls`, "source pull-request lineage");
302
281
  let mergedPullRequest = (Array.isArray(pullRequests) ? pullRequests : []).find((entry) =>
303
282
  entry?.merged_at &&
304
- (
305
- String(entry.merge_commit_sha || "").toLowerCase() === authorizationSha ||
306
- String(entry.head?.sha || "").toLowerCase() === authorizationSha
307
- ) &&
283
+ entry.merge_commit_sha === authorizationSha &&
308
284
  entry.base?.ref === branch &&
309
285
  entry.head?.repo?.full_name === repository
310
286
  );
@@ -342,12 +318,10 @@ function main() {
342
318
  const login = String(review?.user?.login || "");
343
319
  if (login) latestReviews.set(login, review);
344
320
  }
345
- const pullRequestHeadSha = String(mergedPullRequest?.head?.sha || "").toLowerCase();
346
321
  const independentApprovals = [...latestReviews.values()].filter((review) =>
347
- review.state === "APPROVED" &&
348
- review.user?.login !== mergedPullRequest?.user?.login &&
349
- String(review.commit_id || "").toLowerCase() === pullRequestHeadSha
322
+ review.state === "APPROVED" && review.user?.login !== mergedPullRequest?.user?.login
350
323
  );
324
+ const pullRequestHeadSha = String(mergedPullRequest?.head?.sha || "").toLowerCase();
351
325
  const checkRuns = /^[0-9a-f]{40}$/.test(pullRequestHeadSha)
352
326
  ? githubJson(`repos/${repository}/commits/${pullRequestHeadSha}/check-runs?per_page=100`, "merged pull-request head check runs")
353
327
  : { check_runs: [] };
@@ -386,8 +360,7 @@ function main() {
386
360
  requiredCheckSha: pullRequestHeadSha,
387
361
  sourceSha,
388
362
  authorizationSha,
389
- headSha: branchHeadSha,
390
- sourceContainedInBranch,
363
+ headSha: String(branchState.commit?.sha || "").toLowerCase(),
391
364
  releaseReconciliation,
392
365
  mergedPullRequest: Boolean(mergedPullRequest),
393
366
  pullRequestNumber: mergedPullRequest?.number || 0,
@@ -464,13 +437,6 @@ function main() {
464
437
  protected: (environmentState.protection_rules || []).length > 0 ||
465
438
  environmentState.deployment_branch_policy?.protected_branches === true ||
466
439
  (deploymentBranches.branch_policies || []).length > 0,
467
- branchAuthorized: environmentBranchAuthorized,
468
- branchPolicyMode: environmentState.deployment_branch_policy?.protected_branches === true
469
- ? "protected-branches"
470
- : exactEnvironmentBranchPolicy
471
- ? "exact-custom-branch"
472
- : "unqualified",
473
- authorizedBranch: exactEnvironmentBranchPolicy?.name || "",
474
440
  reviewRequired: reviewRules.length > 0,
475
441
  preventSelfReview: reviewRules.some((rule) => rule.prevent_self_review === true),
476
442
  },
@@ -209,7 +209,6 @@ permissions:
209
209
  contents: write
210
210
  id-token: write
211
211
  issues: write
212
- pull-requests: write
213
212
 
214
213
  jobs:
215
214
  resolve-promotion:
@@ -410,7 +409,6 @@ jobs:
410
409
  contents: write
411
410
  id-token: write
412
411
  issues: write
413
- pull-requests: write
414
412
  with:
415
413
  ${alphaForwarded}
416
414
  secrets: inherit
@@ -426,7 +424,6 @@ ${alphaForwarded}
426
424
  contents: write
427
425
  id-token: write
428
426
  issues: write
429
- pull-requests: write
430
427
  with:
431
428
  ${stableForwarded}
432
429
  secrets: inherit