From b3a24e3f79df810d42bb647fcae6dc507cf3b0f4 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 2 Jul 2026 00:54:36 +0000 Subject: [PATCH] fix: verify CICD cache tree objects --- scripts/src/hwlab-node/cleanup.test.ts | 4 ++-- scripts/src/hwlab-node/cleanup.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/src/hwlab-node/cleanup.test.ts b/scripts/src/hwlab-node/cleanup.test.ts index c58a2186..40cb331a 100644 --- a/scripts/src/hwlab-node/cleanup.test.ts +++ b/scripts/src/hwlab-node/cleanup.test.ts @@ -19,8 +19,8 @@ test("CI/CD repo cache is materialized for local shared render clones", () => { assert.doesNotMatch(script, /--filter=blob:none/u); assert.match(script, /reason=partial-clone-cache/u); - assert.match(script, /reason=missing-fetched-commit-object/u); - assert.match(script, /cat-file -e "refs\/remotes\/origin\/\$cicd_branch\^\{commit\}"/u); + assert.match(script, /reason=missing-fetched-tree-object/u); + assert.match(script, /cat-file -e "refs\/remotes\/origin\/\$cicd_branch\^\{tree\}"/u); assert.match(script, /remote\.origin\.promisor/u); assert.match(script, /remote\.origin\.partialclonefilter/u); assert.match(script, /clone --bare --depth=1 --single-branch/u); diff --git a/scripts/src/hwlab-node/cleanup.ts b/scripts/src/hwlab-node/cleanup.ts index 18da111d..181103c2 100644 --- a/scripts/src/hwlab-node/cleanup.ts +++ b/scripts/src/hwlab-node/cleanup.ts @@ -227,15 +227,15 @@ export function runtimeLaneCicdRepoEnsureScript(spec: HwlabRuntimeLaneSpec): str " git --git-dir=\"$cicd_repo\" config --unset-all remote.origin.partialclonefilter 2>/dev/null || true", " retry_git fetch-ci-cache-retry --git-dir=\"$cicd_repo\" fetch --depth=1 origin \"+refs/heads/$cicd_branch:refs/remotes/origin/$cicd_branch\" --prune", "fi", - "if ! git --git-dir=\"$cicd_repo\" cat-file -e \"refs/remotes/origin/$cicd_branch^{commit}\" 2>/dev/null; then", - " echo \"phase=git-ci-cache-rebuild reason=missing-fetched-commit-object\" >&2", + "if ! git --git-dir=\"$cicd_repo\" cat-file -e \"refs/remotes/origin/$cicd_branch^{tree}\" 2>/dev/null; then", + " echo \"phase=git-ci-cache-rebuild reason=missing-fetched-tree-object\" >&2", " rm -rf \"$cicd_repo\"", " retry_git clone-ci-cache-object-retry clone --bare --depth=1 --single-branch --branch \"$cicd_branch\" \"$cicd_url\" \"$cicd_repo\"", " git --git-dir=\"$cicd_repo\" config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'", " git --git-dir=\"$cicd_repo\" config --unset-all remote.origin.promisor 2>/dev/null || true", " git --git-dir=\"$cicd_repo\" config --unset-all remote.origin.partialclonefilter 2>/dev/null || true", " retry_git fetch-ci-cache-object-retry --git-dir=\"$cicd_repo\" fetch --depth=1 origin \"+refs/heads/$cicd_branch:refs/remotes/origin/$cicd_branch\" --prune", - " git --git-dir=\"$cicd_repo\" cat-file -e \"refs/remotes/origin/$cicd_branch^{commit}\"", + " git --git-dir=\"$cicd_repo\" cat-file -e \"refs/remotes/origin/$cicd_branch^{tree}\"", "fi", ].join("\n"); }