@kungfu-tech/buildchain 2.12.7-alpha.21 → 2.12.7-alpha.22

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.7-alpha.21",
7
+ "version": "2.12.7-alpha.22",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v2",
@@ -2679,5 +2679,5 @@
2679
2679
  }
2680
2680
  ],
2681
2681
  "compatibilityDigest": "sha256:af162b86ab4506e9b5f1d3c59b41f3fd57fbad79ff4d749a7f12ff16460517f8",
2682
- "contractDigest": "sha256:048014d9eac273cb507311984dda5030552741df29ed2177f0b9a347d932a423"
2682
+ "contractDigest": "sha256:881914b796ebf2deda418a3840791433aa1502aab1e7f2db03da228f938180e6"
2683
2683
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-bundle",
4
- "generatedAt": "2026-07-15T12:26:57.218Z",
5
- "publishedAt": "2026-07-15T12:26:57.218Z",
4
+ "generatedAt": "2026-07-15T13:10:00.779Z",
5
+ "publishedAt": "2026-07-15T13:10:00.779Z",
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": "97973413b7ba208df42a3ead28d2b80067a3ecc8",
22
+ "sourceRevision": "57c59542464de6d6fa053d83117cf74d018707e9",
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.7-alpha.21",
40
+ "version": "2.12.7-alpha.22",
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.7-alpha.21",
7
+ "version": "2.12.7-alpha.22",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "source": {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-07-15T12:26:57.218Z",
5
- "publishedAt": "2026-07-15T12:26:57.218Z",
4
+ "generatedAt": "2026-07-15T13:10:00.779Z",
5
+ "publishedAt": "2026-07-15T13:10:00.779Z",
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": "97973413b7ba208df42a3ead28d2b80067a3ecc8",
22
+ "sourceRevision": "57c59542464de6d6fa053d83117cf74d018707e9",
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.7-alpha.21",
35
+ "version": "2.12.7-alpha.22",
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-15T12:26:57.218Z",
5
- "publishedAt": "2026-07-15T12:26:57.218Z",
4
+ "generatedAt": "2026-07-15T13:10:00.779Z",
5
+ "publishedAt": "2026-07-15T13:10:00.779Z",
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": "97973413b7ba208df42a3ead28d2b80067a3ecc8",
22
+ "sourceRevision": "57c59542464de6d6fa053d83117cf74d018707e9",
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.7-alpha.21",
40
+ "version": "2.12.7-alpha.22",
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.7-alpha.21",
3
+ "version": "2.12.7-alpha.22",
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",
@@ -222,10 +222,32 @@ export function fetchSourceCommit({
222
222
  sourceTreeSha = "",
223
223
  timeoutMs,
224
224
  env = {},
225
+ allowFullFetchRetry = false,
225
226
  runGit = git,
226
227
  containsCommit = hasCommit,
227
228
  }) {
228
229
  const fetchEnv = isolatedGitFetchEnv(env, targetPath);
230
+ const fetch = (refspec) => {
231
+ const options = { cwd: targetPath, timeoutMs, env: fetchEnv };
232
+ try {
233
+ runGit(["fetch", "--no-tags", "--depth=1", remoteName, refspec], options);
234
+ return "shallow";
235
+ } catch (error) {
236
+ if (
237
+ !allowFullFetchRetry
238
+ || !/dumb http transport does not support shallow capabilities/i.test(
239
+ String(error?.message || error || ""),
240
+ )
241
+ ) {
242
+ throw error;
243
+ }
244
+ // Dumb HTTP mirrors are intentionally simple static cache endpoints.
245
+ // Retry only that explicit capability mismatch without --depth; all
246
+ // network fallbacks remain shallow and bounded by their own policy.
247
+ runGit(["fetch", "--no-tags", remoteName, refspec], options);
248
+ return "full";
249
+ }
250
+ };
229
251
  try {
230
252
  runGit(["remote", "remove", remoteName], { cwd: targetPath, timeoutMs, stdio: "ignore" });
231
253
  } catch {
@@ -239,13 +261,9 @@ export function fetchSourceCommit({
239
261
 
240
262
  if (fetchRef) {
241
263
  try {
242
- runGit(["fetch", "--no-tags", "--depth=1", remoteName, `+${fetchRef}:refs/buildchain/source-ref`], {
243
- cwd: targetPath,
244
- timeoutMs,
245
- env: fetchEnv,
246
- });
264
+ const fetchMode = fetch(`+${fetchRef}:refs/buildchain/source-ref`);
247
265
  if (containsCommit(targetPath, sha, timeoutMs)) {
248
- return { selector: "ref", checkoutSha: sha };
266
+ return { selector: "ref", checkoutSha: sha, fetchMode };
249
267
  }
250
268
  if (/^refs\/pull\/\d+\/merge$/.test(fetchRef) && sourceTreeSha) {
251
269
  const fetchedSha = runGit(["rev-parse", "refs/buildchain/source-ref^{commit}"], {
@@ -257,7 +275,7 @@ export function fetchSourceCommit({
257
275
  timeoutMs,
258
276
  });
259
277
  if (fetchedTree === sourceTreeSha) {
260
- return { selector: "ref-tree", checkoutSha: fetchedSha };
278
+ return { selector: "ref-tree", checkoutSha: fetchedSha, fetchMode };
261
279
  }
262
280
  }
263
281
  } catch (error) {
@@ -269,15 +287,11 @@ export function fetchSourceCommit({
269
287
  }
270
288
  }
271
289
 
272
- runGit(["fetch", "--no-tags", "--depth=1", remoteName, `+${sha}:refs/buildchain/source`], {
273
- cwd: targetPath,
274
- timeoutMs,
275
- env: fetchEnv,
276
- });
290
+ const fetchMode = fetch(`+${sha}:refs/buildchain/source`);
277
291
  if (!containsCommit(targetPath, sha, timeoutMs)) {
278
292
  throw new Error(`fetched ${fetchRef || sha}, but ${sha} is not available`);
279
293
  }
280
- return { selector: "sha", checkoutSha: sha };
294
+ return { selector: "sha", checkoutSha: sha, fetchMode };
281
295
  }
282
296
 
283
297
  export function runBoundedFetch({ attempts = 1, fetch, onAttempt = () => {}, onRetry = () => {}, shouldRetry = () => true }) {
@@ -433,7 +447,9 @@ export function lockedSourceCheckout({
433
447
  fetchRef,
434
448
  sourceTreeSha: treeSha,
435
449
  timeoutMs,
450
+ allowFullFetchRetry: true,
436
451
  });
452
+ evidence.cache.fetchMode = fetchResult.fetchMode;
437
453
  checkoutSha = fetchResult.checkoutSha || sha;
438
454
  checkoutFetchedCommit(targetPath, checkoutSha, timeoutMs);
439
455
  } else {
@@ -478,6 +494,7 @@ export function lockedSourceCheckout({
478
494
  shouldRetry: retryableGitFetchError,
479
495
  });
480
496
  evidence.cache.githubFetchAttempts = fetchResult.attempts;
497
+ evidence.cache.fetchMode = fetchResult.value.fetchMode;
481
498
  checkoutSha = fetchResult.value.checkoutSha || sha;
482
499
  } catch (error) {
483
500
  evidence.durationMs = Date.now() - startedAt;