From 75acfde645964cb5a81178ec7bbdc11357eb2e81 Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Fri, 10 Jul 2026 01:10:13 -0700 Subject: [PATCH] fix(review): stub the live-PR verification fetch in the checkbox commit-delivery test Main-red: PR #4600 added this test before #4359 (merged same day) started verifying the live PR head/ref/sha inside commitE2eTestToPrBranch before ever writing. #4600 merged on top of #4359 without picking up the stub every sibling commit-delivery test already got in #4359's own diff, so this one test 404s on the live-PR fetch and silently declines the commit -- zero git-write calls, gitWrites stays empty. Adds the same GET /pulls/{n} stub the passing sibling tests already use. --- test/unit/queue.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/queue.test.ts b/test/unit/queue.test.ts index 589b7be3d9..1ad4fd3873 100644 --- a/test/unit/queue.test.ts +++ b/test/unit/queue.test.ts @@ -26960,6 +26960,9 @@ describe("queue processors", () => { if (url === "https://api.gittensor.io/miners") return Response.json([]); if (url.includes("/access_tokens")) return Response.json({ token: "installation-token" }); if (url.includes("/collaborators/maintainer/permission")) return Response.json({ permission: "admin" }); + // #4359: commitE2eTestToPrBranch re-fetches the live PR to verify the head branch/commit hasn't + // moved since this pass cached it, before ever writing -- must match seedCheckboxPr's own head. + if (url.endsWith("/pulls/6011") && method === "GET") return Response.json({ head: { ref: "feature/checkout-retry", sha: "checkbox-4589-commit-sha", repo: { full_name: repoFullName } } }); if (url.includes("/git/commits/checkbox-4589-commit-sha") && method === "GET") return Response.json({ tree: { sha: "base-tree" } }); if (url.includes("/git/trees") && method === "POST") { gitWrites.push("tree");