@kungfu-tech/buildchain 4.0.2-alpha.39 → 4.0.2-alpha.40

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.
@@ -1,3 +1,31 @@
1
+ ---
2
+ status: active
3
+ period: ongoing
4
+ theme: protected-publication-source
5
+ doc_type: reference
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-06
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-06
16
+ visible_context: Publication adapter, regression tests, and public GitHub commit metadata.
17
+ invisible_context_boundary: No credentials or private runtime state inspected.
18
+ ---
19
+
1
20
  # v4 release-candidate promote action
2
21
 
3
22
  This internal action validates a sealed v4 publication qualification receipt, aggregates the Buildchain Release Passport, and executes the fixed four-capability Release Tail Provider Plane. It has no command or shell extension input and is invoked by the v4 branch of the reusable `release-candidate-promote` workflow.
23
+
24
+ The protected publication source must match the qualified candidate's exact
25
+ Git tree. An exact commit is accepted directly; a final PR merge may also bind
26
+ through identical ordered parents. For repositories requiring linear history,
27
+ `squash-equivalent` requires a protected commit with one parent, a qualified
28
+ merge candidate with two parents, and the same first parent. GitHub must report
29
+ the exact PR as merged into the protected commit, and its head must equal the
30
+ candidate's second parent. Candidate qualification, workflow and repository
31
+ provenance, and artifact verification remain required before publication.
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "4.0.2-alpha.39",
7
+ "version": "4.0.2-alpha.40",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v4",
@@ -5444,5 +5444,5 @@
5444
5444
  "compatibilityFactCutRoot": "sha256:f61b975d4a96c921cc4bd37fb3ed9a0596b47004fe34dc7219979d697e3707f9",
5445
5445
  "compatibilityProofRegistryRoot": "sha256:b7194b811e4d3af2df4390bc4d1731e16a86215bd64ee18cb630dd5492f4fb63",
5446
5446
  "compatibilityDigest": "sha256:20411029d83211dff426fb6535a608902129844a5ccb4788db77d3f81becb839",
5447
- "contractDigest": "sha256:79921c4ffaa63b962a747ea2d6748dd73a0b01dda58cb596b4c18fb43634ab42"
5447
+ "contractDigest": "sha256:d255326bba602066d36fe883834521278f08da64de01849dbf5fe47a6ac43530"
5448
5448
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-bundle",
4
- "generatedAt": "2026-09-06T03:37:46.000Z",
5
- "publishedAt": "2026-09-06T03:37:46.000Z",
4
+ "generatedAt": "2026-09-06T06:41:17.000Z",
5
+ "publishedAt": "2026-09-06T06:41:17.000Z",
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": "54a23658004304d6eec29107ba6f843fa7dc0867",
22
+ "sourceRevision": "89ab54a52311f442b988647fc97ffc292dbceba2",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "package": {
39
39
  "name": "@kungfu-tech/buildchain",
40
- "version": "4.0.2-alpha.39",
40
+ "version": "4.0.2-alpha.40",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "source": {
@@ -331,7 +331,7 @@
331
331
  ],
332
332
  "maturity": "stable",
333
333
  "sourcePath": "actions/v4-release-candidate-promote/README.md",
334
- "digest": "sha256:3b3c3f01ca12069ba2fd67afa8e23d1aec19bf5e1d048bc4975e7503f9eb43bc",
334
+ "digest": "sha256:b50fc4f13ea9c680142df79c5ab984522cd85893f1ce12f1427e094569329746",
335
335
  "headings": [
336
336
  {
337
337
  "level": 1,
@@ -339,7 +339,7 @@
339
339
  "anchor": "v4-release-candidate-promote-action"
340
340
  }
341
341
  ],
342
- "markdown": "# v4 release-candidate promote action\n\nThis internal action validates a sealed v4 publication qualification receipt, aggregates the Buildchain Release Passport, and executes the fixed four-capability Release Tail Provider Plane. It has no command or shell extension input and is invoked by the v4 branch of the reusable `release-candidate-promote` workflow."
342
+ "markdown": "---\nstatus: active\nperiod: ongoing\ntheme: protected-publication-source\ndoc_type: reference\nsource_level: local-files\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-06\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-06\n visible_context: Publication adapter, regression tests, and public GitHub commit metadata.\n invisible_context_boundary: No credentials or private runtime state inspected.\n---\n\n# v4 release-candidate promote action\n\nThis internal action validates a sealed v4 publication qualification receipt, aggregates the Buildchain Release Passport, and executes the fixed four-capability Release Tail Provider Plane. It has no command or shell extension input and is invoked by the v4 branch of the reusable `release-candidate-promote` workflow.\n\nThe protected publication source must match the qualified candidate's exact\nGit tree. An exact commit is accepted directly; a final PR merge may also bind\nthrough identical ordered parents. For repositories requiring linear history,\n`squash-equivalent` requires a protected commit with one parent, a qualified\nmerge candidate with two parents, and the same first parent. GitHub must report\nthe exact PR as merged into the protected commit, and its head must equal the\ncandidate's second parent. Candidate qualification, workflow and repository\nprovenance, and artifact verification remain required before publication."
343
343
  },
344
344
  {
345
345
  "id": "action:validate-config",
@@ -21,7 +21,7 @@
21
21
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
22
22
  "path": "dist/site/public-surface-audit.json",
23
23
  "status": "passed",
24
- "sha256": "835f4de92b2901ad73894c302d74d2af6d3a33df3fa090efbaa782424ed4c359",
24
+ "sha256": "6db59a4c0acdd8d063bec9be6a766419f6fe7b9c8e2936730849f28b2535efc6",
25
25
  "summary": {
26
26
  "cliCommandCount": 117,
27
27
  "workflowCount": 114,
@@ -246,7 +246,7 @@
246
246
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
247
247
  "path": "dist/site/public-surface-audit.json",
248
248
  "status": "passed",
249
- "sha256": "835f4de92b2901ad73894c302d74d2af6d3a33df3fa090efbaa782424ed4c359",
249
+ "sha256": "6db59a4c0acdd8d063bec9be6a766419f6fe7b9c8e2936730849f28b2535efc6",
250
250
  "summary": {
251
251
  "cliCommandCount": 117,
252
252
  "workflowCount": 114,
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "id": "kungfu-tech-buildchain",
6
6
  "name": "@kungfu-tech/buildchain",
7
- "version": "4.0.2-alpha.39",
7
+ "version": "4.0.2-alpha.40",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "source": {
@@ -265,7 +265,7 @@
265
265
  ],
266
266
  "maturity": "stable",
267
267
  "sourcePath": "actions/v4-release-candidate-promote/README.md",
268
- "digest": "sha256:3b3c3f01ca12069ba2fd67afa8e23d1aec19bf5e1d048bc4975e7503f9eb43bc",
268
+ "digest": "sha256:b50fc4f13ea9c680142df79c5ab984522cd85893f1ce12f1427e094569329746",
269
269
  "headings": [
270
270
  {
271
271
  "level": 1,
@@ -273,7 +273,7 @@
273
273
  "anchor": "v4-release-candidate-promote-action"
274
274
  }
275
275
  ],
276
- "markdown": "# v4 release-candidate promote action\n\nThis internal action validates a sealed v4 publication qualification receipt, aggregates the Buildchain Release Passport, and executes the fixed four-capability Release Tail Provider Plane. It has no command or shell extension input and is invoked by the v4 branch of the reusable `release-candidate-promote` workflow."
276
+ "markdown": "---\nstatus: active\nperiod: ongoing\ntheme: protected-publication-source\ndoc_type: reference\nsource_level: local-files\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-06\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-06\n visible_context: Publication adapter, regression tests, and public GitHub commit metadata.\n invisible_context_boundary: No credentials or private runtime state inspected.\n---\n\n# v4 release-candidate promote action\n\nThis internal action validates a sealed v4 publication qualification receipt, aggregates the Buildchain Release Passport, and executes the fixed four-capability Release Tail Provider Plane. It has no command or shell extension input and is invoked by the v4 branch of the reusable `release-candidate-promote` workflow.\n\nThe protected publication source must match the qualified candidate's exact\nGit tree. An exact commit is accepted directly; a final PR merge may also bind\nthrough identical ordered parents. For repositories requiring linear history,\n`squash-equivalent` requires a protected commit with one parent, a qualified\nmerge candidate with two parents, and the same first parent. GitHub must report\nthe exact PR as merged into the protected commit, and its head must equal the\ncandidate's second parent. Candidate qualification, workflow and repository\nprovenance, and artifact verification remain required before publication."
277
277
  },
278
278
  {
279
279
  "id": "action:validate-config",
@@ -10929,8 +10929,8 @@
10929
10929
  "workflowRegistryPath": "dist/site/workflow-registry.json",
10930
10930
  "pageRegistryPath": "dist/site/page-registry.json",
10931
10931
  "cliRegistryDigest": "fbc23073bbae240489a2f826b2c26daadc58e704050c5f8df366509f5c5a1c3e",
10932
- "workflowRegistryDigest": "da65c24d1ca58d393cff163356f09261a9cd3392080caa49690c65b3786f0e74",
10933
- "pageRegistryDigest": "094908397a02731893e7dd90ad6d3d50e2af07de51ec62c617249e82691fe828"
10932
+ "workflowRegistryDigest": "da116382d57fad02e09e5e846f808560f731fc56a814bc385b156bed28cc46f8",
10933
+ "pageRegistryDigest": "3be2a3d02eeb4d4561022fd81de41c9853c9e196c3ced7466d88ce6766b24456"
10934
10934
  },
10935
10935
  "comparison": {
10936
10936
  "missingCliRegistry": [],
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-09-06T03:37:46.000Z",
5
- "publishedAt": "2026-09-06T03:37:46.000Z",
4
+ "generatedAt": "2026-09-06T06:41:17.000Z",
5
+ "publishedAt": "2026-09-06T06:41:17.000Z",
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": "54a23658004304d6eec29107ba6f843fa7dc0867",
22
+ "sourceRevision": "89ab54a52311f442b988647fc97ffc292dbceba2",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "package": {
34
34
  "name": "@kungfu-tech/buildchain",
35
- "version": "4.0.2-alpha.39",
35
+ "version": "4.0.2-alpha.40",
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-09-06T03:37:46.000Z",
5
- "publishedAt": "2026-09-06T03:37:46.000Z",
4
+ "generatedAt": "2026-09-06T06:41:17.000Z",
5
+ "publishedAt": "2026-09-06T06:41:17.000Z",
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": "54a23658004304d6eec29107ba6f843fa7dc0867",
22
+ "sourceRevision": "89ab54a52311f442b988647fc97ffc292dbceba2",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "package": {
39
39
  "name": "@kungfu-tech/buildchain",
40
- "version": "4.0.2-alpha.39",
40
+ "version": "4.0.2-alpha.40",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -2746,7 +2746,7 @@
2746
2746
  "status": "preview",
2747
2747
  "owner": "buildchain-workflows",
2748
2748
  "maturity": "preview",
2749
- "introducedVersion": "4.0.2-alpha.39",
2749
+ "introducedVersion": "4.0.2-alpha.40",
2750
2750
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2751
2751
  "deprecationReplacement": "",
2752
2752
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -3943,7 +3943,7 @@
3943
3943
  "status": "preview",
3944
3944
  "owner": "buildchain-workflows",
3945
3945
  "maturity": "preview",
3946
- "introducedVersion": "4.0.2-alpha.39",
3946
+ "introducedVersion": "4.0.2-alpha.40",
3947
3947
  "compatibilityPromise": "preserved-through-the-v3-major-line",
3948
3948
  "deprecationReplacement": "",
3949
3949
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -5970,7 +5970,7 @@
5970
5970
  "status": "preview",
5971
5971
  "owner": "buildchain-workflows",
5972
5972
  "maturity": "preview",
5973
- "introducedVersion": "4.0.2-alpha.39",
5973
+ "introducedVersion": "4.0.2-alpha.40",
5974
5974
  "compatibilityPromise": "preserved-through-the-v3-major-line",
5975
5975
  "deprecationReplacement": "",
5976
5976
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -6001,7 +6001,7 @@
6001
6001
  "status": "preview",
6002
6002
  "owner": "buildchain-workflows",
6003
6003
  "maturity": "preview",
6004
- "introducedVersion": "4.0.2-alpha.39",
6004
+ "introducedVersion": "4.0.2-alpha.40",
6005
6005
  "compatibilityPromise": "preserved-through-the-v3-major-line",
6006
6006
  "deprecationReplacement": "",
6007
6007
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -6032,7 +6032,7 @@
6032
6032
  "status": "preview",
6033
6033
  "owner": "buildchain-workflows",
6034
6034
  "maturity": "preview",
6035
- "introducedVersion": "4.0.2-alpha.39",
6035
+ "introducedVersion": "4.0.2-alpha.40",
6036
6036
  "compatibilityPromise": "preserved-through-the-v3-major-line",
6037
6037
  "deprecationReplacement": "",
6038
6038
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "4.0.2-alpha.39",
3
+ "version": "4.0.2-alpha.40",
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",
@@ -4,10 +4,8 @@ const SHA_PATTERN = /^[0-9a-f]{40}$/u;
4
4
 
5
5
  function exactSha(value, label) {
6
6
  const normalized = String(value || "").toLowerCase();
7
- if (!SHA_PATTERN.test(normalized)) {
8
- throw new Error(`${label} must be an exact Git SHA`);
9
- }
10
- return normalized;
7
+ if (SHA_PATTERN.test(normalized)) return normalized;
8
+ throw new Error(`${label} must be an exact Git SHA`);
11
9
  }
12
10
 
13
11
  function exactParents(value, label) {
@@ -26,16 +24,14 @@ export function bindV4ProtectedPublicationSource({
26
24
  if (!/^[^/\s]+\/[^/\s]+$/u.test(String(repository || ""))) {
27
25
  throw new Error("protected publication source requires owner/repository");
28
26
  }
29
- const protectedSource = {
30
- sha: exactSha(protectedCommit?.sha, "protected source SHA"),
31
- tree: exactSha(protectedCommit?.tree, "protected source tree"),
32
- parents: exactParents(protectedCommit?.parents, "protected source parents"),
33
- };
34
- const candidateSource = {
35
- sha: exactSha(candidateCommit?.sha, "candidate source SHA"),
36
- tree: exactSha(candidateCommit?.tree, "candidate source tree"),
37
- parents: exactParents(candidateCommit?.parents, "candidate source parents"),
38
- };
27
+ const [protectedSource, candidateSource] = [
28
+ ["protected", protectedCommit],
29
+ ["candidate", candidateCommit],
30
+ ].map(([kind, commit]) => ({
31
+ sha: exactSha(commit?.sha, `${kind} source SHA`),
32
+ tree: exactSha(commit?.tree, `${kind} source tree`),
33
+ parents: exactParents(commit?.parents, `${kind} source parents`),
34
+ }));
39
35
  if (protectedSource.tree !== candidateSource.tree) {
40
36
  throw new Error(
41
37
  "protected publication source tree does not match the qualified candidate tree",
@@ -45,13 +41,13 @@ export function bindV4ProtectedPublicationSource({
45
41
  let mode = "exact-commit";
46
42
  let pullRequestNumber = null;
47
43
  if (protectedSource.sha !== candidateSource.sha) {
48
- mode = "merge-equivalent";
49
44
  const sameParents =
50
- protectedSource.parents.length === candidateSource.parents.length &&
51
- protectedSource.parents.every(
52
- (parent, index) => parent === candidateSource.parents[index],
53
- );
54
- if (!sameParents) {
45
+ protectedSource.parents.join(",") === candidateSource.parents.join(",");
46
+ const squashParents =
47
+ protectedSource.parents.length === 1 &&
48
+ candidateSource.parents.length === 2 &&
49
+ protectedSource.parents[0] === candidateSource.parents[0];
50
+ if (!sameParents && !squashParents) {
55
51
  throw new Error(
56
52
  "protected publication source is not parent-equivalent to the qualified merge candidate",
57
53
  );
@@ -70,12 +66,14 @@ export function bindV4ProtectedPublicationSource({
70
66
  pullRequestNumber <= 0 ||
71
67
  pullRequest?.merged !== true ||
72
68
  pullRequestMerge !== protectedSource.sha ||
73
- !candidateSource.parents.includes(pullRequestHead)
69
+ !candidateSource.parents.includes(pullRequestHead) ||
70
+ (squashParents && candidateSource.parents[1] !== pullRequestHead)
74
71
  ) {
75
72
  throw new Error(
76
73
  "protected publication source does not match the merged pull request and qualified merge candidate",
77
74
  );
78
75
  }
76
+ mode = sameParents ? "merge-equivalent" : "squash-equivalent";
79
77
  }
80
78
 
81
79
  const binding = {