@kungfu-tech/buildchain 4.0.1-alpha.32 → 4.0.1-alpha.34

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": "4.0.1-alpha.32",
7
+ "version": "4.0.1-alpha.34",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v4",
@@ -1646,7 +1646,7 @@
1646
1646
  "resume-from-candidate-run is fail-closed and uses a fresh caller event instead of rerunning a frozen startup graph"
1647
1647
  ],
1648
1648
  "breakingDigest": "sha256:9db8dd07152855d03ff30f9c571438593c689d3e8139fa45431d000f548242f5",
1649
- "auditDigest": "sha256:50da0716d65b488b0fae6f3d8f486754eb3769ff79ffb91bc0c110e0b2d709c8",
1649
+ "auditDigest": "sha256:9113ee5ba1b58ce2dbe51ae284a2915cb04a1cad27a9560142421df37a0eb4fb",
1650
1650
  "compatibleBreakingDigests": [
1651
1651
  "sha256:aa30f22e3af0a89841310bdbdc900844dd95a66974db173fa140a71bbd7e82c0"
1652
1652
  ],
@@ -5082,7 +5082,7 @@
5082
5082
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
5083
5083
  ],
5084
5084
  "breakingDigest": "sha256:015d8de793adbd4c539416be7d7512e18cc92097e629b0203fa06d2c183e98bd",
5085
- "auditDigest": "sha256:50da0716d65b488b0fae6f3d8f486754eb3769ff79ffb91bc0c110e0b2d709c8"
5085
+ "auditDigest": "sha256:9113ee5ba1b58ce2dbe51ae284a2915cb04a1cad27a9560142421df37a0eb4fb"
5086
5086
  },
5087
5087
  {
5088
5088
  "contractVersion": 1,
@@ -5308,5 +5308,5 @@
5308
5308
  "compatibilityFactCutRoot": "sha256:f61b975d4a96c921cc4bd37fb3ed9a0596b47004fe34dc7219979d697e3707f9",
5309
5309
  "compatibilityProofRegistryRoot": "sha256:b7194b811e4d3af2df4390bc4d1731e16a86215bd64ee18cb630dd5492f4fb63",
5310
5310
  "compatibilityDigest": "sha256:5de1c69386510b74b17eb70141b8bdd07063d62c504f91db5e84b67c6d4b64a2",
5311
- "contractDigest": "sha256:135bedca097f930757f8d491a65c1ec9d3a8ba00fb9799607d08b0c85cc17c30"
5311
+ "contractDigest": "sha256:1cd711c4379d653bd154dc8fd781282fb3497aa68480b35054e9eff336f4a58d"
5312
5312
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-bundle",
4
- "generatedAt": "2026-08-23T19:29:29.393Z",
5
- "publishedAt": "2026-08-23T19:29:29.393Z",
4
+ "generatedAt": "2026-08-23T23:30:13.157Z",
5
+ "publishedAt": "2026-08-23T23:30:13.157Z",
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": "5583b5ff48a2402ee872b2f55d86bc1e025e0da7",
22
+ "sourceRevision": "411fd491bb0b21c8fc28a6e2f505b3e4e4a133d0",
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.1-alpha.32",
40
+ "version": "4.0.1-alpha.34",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "source": {
@@ -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": "5e5cfb9f62ff44407fa7b1ff83ba790eab6e39202e54b06a88632052bff0d374",
24
+ "sha256": "d52aad240b46495a2a930ba48847adc17159d1d0ca2751759f62570e0f332865",
25
25
  "summary": {
26
26
  "cliCommandCount": 117,
27
27
  "workflowCount": 76,
@@ -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": "5e5cfb9f62ff44407fa7b1ff83ba790eab6e39202e54b06a88632052bff0d374",
249
+ "sha256": "d52aad240b46495a2a930ba48847adc17159d1d0ca2751759f62570e0f332865",
250
250
  "summary": {
251
251
  "cliCommandCount": 117,
252
252
  "workflowCount": 76,
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "id": "kungfu-tech-buildchain",
6
6
  "name": "@kungfu-tech/buildchain",
7
- "version": "4.0.1-alpha.32",
7
+ "version": "4.0.1-alpha.34",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "source": {
@@ -8846,7 +8846,7 @@
8846
8846
  "workflowRegistryPath": "dist/site/workflow-registry.json",
8847
8847
  "pageRegistryPath": "dist/site/page-registry.json",
8848
8848
  "cliRegistryDigest": "ea47a31ce7ef3577f23e22055ab7be7715c3af494bcef63f76b426f2883086aa",
8849
- "workflowRegistryDigest": "18b0e74a1b260889a1f582336d439c148f1e474a6a8edcee4d0df214f142f236",
8849
+ "workflowRegistryDigest": "ba26bf58130e1b70b3a4f38f5d87313797c77d700d407f949fc62faf45287104",
8850
8850
  "pageRegistryDigest": "619910e5c57fb8e94ea1525de1fb7699c412a8dafd7269bc9354cc6c4fe83f48"
8851
8851
  },
8852
8852
  "comparison": {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-08-23T19:29:29.393Z",
5
- "publishedAt": "2026-08-23T19:29:29.393Z",
4
+ "generatedAt": "2026-08-23T23:30:13.157Z",
5
+ "publishedAt": "2026-08-23T23:30:13.157Z",
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": "5583b5ff48a2402ee872b2f55d86bc1e025e0da7",
22
+ "sourceRevision": "411fd491bb0b21c8fc28a6e2f505b3e4e4a133d0",
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.1-alpha.32",
35
+ "version": "4.0.1-alpha.34",
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-23T19:29:29.393Z",
5
- "publishedAt": "2026-08-23T19:29:29.393Z",
4
+ "generatedAt": "2026-08-23T23:30:13.157Z",
5
+ "publishedAt": "2026-08-23T23:30:13.157Z",
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": "5583b5ff48a2402ee872b2f55d86bc1e025e0da7",
22
+ "sourceRevision": "411fd491bb0b21c8fc28a6e2f505b3e4e4a133d0",
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.1-alpha.32",
40
+ "version": "4.0.1-alpha.34",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -2027,7 +2027,7 @@
2027
2027
  "status": "preview",
2028
2028
  "owner": "buildchain-workflows",
2029
2029
  "maturity": "preview",
2030
- "introducedVersion": "4.0.1-alpha.32",
2030
+ "introducedVersion": "4.0.1-alpha.34",
2031
2031
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2032
2032
  "deprecationReplacement": "",
2033
2033
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2048,7 +2048,7 @@
2048
2048
  "status": "preview",
2049
2049
  "owner": "buildchain-workflows",
2050
2050
  "maturity": "preview",
2051
- "introducedVersion": "4.0.1-alpha.32",
2051
+ "introducedVersion": "4.0.1-alpha.34",
2052
2052
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2053
2053
  "deprecationReplacement": "",
2054
2054
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2069,7 +2069,7 @@
2069
2069
  "status": "preview",
2070
2070
  "owner": "buildchain-workflows",
2071
2071
  "maturity": "preview",
2072
- "introducedVersion": "4.0.1-alpha.32",
2072
+ "introducedVersion": "4.0.1-alpha.34",
2073
2073
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2074
2074
  "deprecationReplacement": "",
2075
2075
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2119,7 +2119,7 @@
2119
2119
  "status": "preview",
2120
2120
  "owner": "buildchain-workflows",
2121
2121
  "maturity": "preview",
2122
- "introducedVersion": "4.0.1-alpha.32",
2122
+ "introducedVersion": "4.0.1-alpha.34",
2123
2123
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2124
2124
  "deprecationReplacement": "",
2125
2125
  "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.1-alpha.32",
3
+ "version": "4.0.1-alpha.34",
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",
@@ -41,10 +41,7 @@ import {
41
41
  verifyV4RuntimeAuthorizationReceipt,
42
42
  } from "../packages/core/v4-runtime-ref-resume-authority.js";
43
43
 
44
- function env(name, fallback = "") {
45
- return process.env[name] || fallback;
46
- }
47
-
44
+ function env(name, fallback = "") { return process.env[name] || fallback; }
48
45
  function requiredEnv(name) {
49
46
  const value = env(name).trim();
50
47
  if (!value) throw new Error(`${name} is required for candidate recovery`);
@@ -57,9 +54,7 @@ function splitRepository(repository) {
57
54
  return { owner: match[1], repo: match[2], fullName: `${match[1]}/${match[2]}` };
58
55
  }
59
56
 
60
- function splitPatterns(value = "") {
61
- return String(value || "").split(/\r?\n|,/).map((entry) => entry.trim()).filter(Boolean);
62
- }
57
+ function splitPatterns(value = "") { return String(value || "").split(/\r?\n|,/).map((entry) => entry.trim()).filter(Boolean); }
63
58
 
64
59
  function patternMatcher(pattern) {
65
60
  const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replaceAll("*", ".*");
@@ -700,8 +695,12 @@ export function createRecoveredPublicationCandidate({
700
695
  };
701
696
  return { ...payload, candidateDigest: publicationArtifactCandidateDigest(payload) };
702
697
  }
703
-
704
- export function createRecoveredPublication({ downloads, bundleRoot, repository, passport, candidateRuntimeSha, publishArtifactKind, publishPackageMain, releasePatterns, platformManifests }) {
698
+ export function resolveRecoveredPublicationVersion({ artifactVersion, channel, rematerializeOnResume = false } = {}) {
699
+ const version = String(artifactVersion || "").trim(), match = version.match(/^(\d+\.\d+\.\d+)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/u);
700
+ if (!match) throw new Error(`recovered npm artifact has invalid publication version: ${version || "<empty>"}`);
701
+ return channel === "release" && rematerializeOnResume ? match[1] : version;
702
+ }
703
+ export function createRecoveredPublication({ downloads, bundleRoot, repository, passport, candidateRuntimeSha, publishArtifactKind, publishPackageMain, releasePatterns, platformManifests, channel, rematerializeOnResume = false }) {
705
704
  const allFiles = downloads.flatMap((download) => download.files.map((file) => ({
706
705
  path: path.relative(bundleRoot, file.absolutePath).split(path.sep).join("/"),
707
706
  size: file.size,
@@ -732,6 +731,7 @@ export function createRecoveredPublication({ downloads, bundleRoot, repository,
732
731
  const npmReleaseAssets = allFiles.filter((file) => releaseMatchers.length
733
732
  ? releaseMatchers.some((matcher) => matcher.test(path.basename(file.path)))
734
733
  : file.path.toLowerCase().endsWith(".tgz"));
734
+ const publicationVersion = resolveRecoveredPublicationVersion({ artifactVersion: main.metadata.ref, channel, rematerializeOnResume });
735
735
  const candidate = createRecoveredPublicationCandidate({
736
736
  allFiles,
737
737
  repository,
@@ -751,12 +751,12 @@ export function createRecoveredPublication({ downloads, bundleRoot, repository,
751
751
  npmArtifacts,
752
752
  allFiles,
753
753
  releaseAssets: npmReleaseAssets,
754
- version: manifest.npm.version,
754
+ version: publicationVersion,
755
755
  publishRequiredArtifacts: generatePublishRequiredArtifacts({
756
756
  kind: "npm",
757
757
  tarballPaths: npmArtifacts.map((entry) => entry.file.absolutePath),
758
758
  mainPackage: publishPackageMain,
759
- }),
759
+ }).map((artifact) => rematerializeOnResume ? { ...artifact, ref: publicationVersion } : artifact),
760
760
  };
761
761
  }
762
762
 
@@ -865,7 +865,7 @@ export async function resumeFromCandidateRun({
865
865
  channel, targetRef, targetSha,
866
866
  expectedSourceTree = "", expectedCandidateRoot = "",
867
867
  candidateRuntimeSha, runtimeSha,
868
- transactionId = "", artifactName = "", artifactPatterns = "", releasePatterns = "",
868
+ transactionId = "", artifactName = "", artifactPatterns = "", releasePatterns = "", rematerializeOnResume = false,
869
869
  requiredArtifactCount = 0,
870
870
  publishArtifactKind = "npm", publishPackageMain = "",
871
871
  outputDir = ".buildchain/release-candidate-recovery",
@@ -908,7 +908,7 @@ export async function resumeFromCandidateRun({
908
908
  publishArtifactKind,
909
909
  publishPackageMain,
910
910
  releasePatterns,
911
- platformManifests: platformManifestEvidence.manifests,
911
+ platformManifests: platformManifestEvidence.manifests, channel, rematerializeOnResume,
912
912
  });
913
913
  const stageCapsules = resolveRecoveredStageCapsules({
914
914
  candidateRuntimeSha,
@@ -1048,7 +1048,7 @@ export async function resumeFromCandidateRunCli() {
1048
1048
  expectedCandidateRoot: env("BUILDCHAIN_RESUME_EXPECTED_CANDIDATE_ROOT"),
1049
1049
  candidateRuntimeSha: requiredEnv("BUILDCHAIN_RESUME_EXPECTED_CANDIDATE_RUNTIME_SHA"),
1050
1050
  runtimeSha: requiredEnv("BUILDCHAIN_RESUME_RUNTIME_SHA"),
1051
- transactionId: env("BUILDCHAIN_RESUME_TRANSACTION_ID"),
1051
+ transactionId: env("BUILDCHAIN_RESUME_TRANSACTION_ID"), rematerializeOnResume: env("BUILDCHAIN_PUBLISH_REMATERIALIZE_ON_RESUME") === "true",
1052
1052
  artifactName: env("BUILDCHAIN_ARTIFACT_NAME"),
1053
1053
  artifactPatterns: env("BUILDCHAIN_ARTIFACT_PATTERNS"),
1054
1054
  releasePatterns: env("BUILDCHAIN_GITHUB_RELEASE_PAYLOAD_PATTERNS"),