Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/queue/processors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3246,7 +3246,7 @@ async function reReviewStoredPullRequest(
]);
let pr = await getPullRequest(env, repoFullName, prNumber);
if (!pr || pr.state !== "open") return;
if (await hasAutoreviewPausedMarker(env, repoFullName, prNumber)) return;
const autoreviewPaused = await hasAutoreviewPausedMarker(env, repoFullName, prNumber);
const liveFacts = createLiveGithubFacts();
// #sweep-resync: RESYNC the stored PR to its LIVE head before reviewing. The self-host relay can drop the
// `synchronize` webhook (relay down), so a push/rebase never refreshes the stored head SHA + cached files; the
Expand Down Expand Up @@ -3381,7 +3381,7 @@ async function reReviewStoredPullRequest(
baseSha: live?.base?.sha ?? null,
liveFacts,
...(previewPollAttempt !== undefined ? { previewPollAttempt } : {}),
...(options.skipAiReview ? { skipAiReview: true } : {}),
...(options.skipAiReview || autoreviewPaused ? { skipAiReview: true } : {}),
...(options.force ? { forceAiReview: true } : {}),
hasPendingRefreshSignal: otherRefreshReasons || reviewsCacheStale,
},
Expand Down
4 changes: 2 additions & 2 deletions test/unit/queue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4259,7 +4259,7 @@ describe("queue processors", () => {
expect(skipAudit).toBeUndefined();
});

it("does not publish the re-review surface once a PR has an autoreview pause marker (#2164 regression)", async () => {
it("skips AI review but still enforces the gate once a PR has an autoreview pause marker (#2164 regression)", async () => {
let aiCalls = 0;
let commentPosted = false;
let checkRunWritten = false;
Expand Down Expand Up @@ -4318,7 +4318,7 @@ describe("queue processors", () => {
).resolves.toBeUndefined();
expect(aiCalls).toBe(0);
expect(commentPosted).toBe(false);
expect(checkRunWritten).toBe(false);
expect(checkRunWritten).toBe(true);
});

it("threads review.ai_model through the full webhook pipeline into ai.run's options (#selfhost-ai-model-override)", async () => {
Expand Down