You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Re-review covers commits pushed mid-run, but the pullfrog check stays on the old head, so a required check never reaches the new head #136
When commits are pushed while a re-review is running, Pullfrog reviews and approves them in the same run, but the pullfrog check run stays on the SHA the run started from. The new head gets no pullfrog check, and no new run starts for it. With pullfrog required by branch protection, the PR is approved yet cannot merge until someone re-runs Pullfrog by hand. It happens to us regularly.
Timeline (private repo, times UTC, 2026-11-23)
Time
Event
12:12:26
Commit A pushed
12:12:36
Pullfrog dispatches "Review new commits on #… " (workflow_dispatch), pullfrog check run created on A
12:15:04
Commit B pushed
12:23:12
Commit C pushed (new head)
12:34:24
Review COMMENTED on A (one inline issue)
12:34:47
Review COMMENTED on C (resolves the inline thread)
12:55:46
Review APPROVED on C: "This run covered B and C, the two commits pushed while the review at A was being written."
12:56
pullfrog check: in_progress on A, absent on C
15:10
Still no pullfrog check on C: the PR has been mergeable but blocked for over two hours
15:12
Workaround: we re-ran that workflow run by hand (attempt 2)
So the agent knows it reviewed the new head and approves it there, but the check run that branch protection reads is still bound to A. CI and the other required review (CodeRabbit) were green on C from 12:28.
Setup: pullfrog/pullfrog@v0 via the generated pullfrog.yml (workflow_dispatch only), re-review on, pullfrog in main's required status checks.
Expected
When a run ends with a review on a head other than the one it started from, the pullfrog check is (also) completed on the head it reviewed. Alternatively, a push during a run queues a follow-up run on the new head instead of being folded into the current one without a check.
Ask
Post the pullfrog check run on the commit the final review was submitted on (the PR's head at the end of the run), not only on the dispatch SHA.
Or, if the run must stay bound to its starting SHA, start a run for the new head once it finishes.
Related: #107 (same symptom, a required Pullfrog check missing on the new head, from a different cause).
The bug is real, and the cause is in this repo. It is not a duplicate. #107 had the same symptom from a different path (the pullfrog-approval carry-forward), and that fix is already merged.
What happens in the reported timeline:
At dispatch the server seeds the pullfrog check in_progress on A. The payload carries only its id (payload.checkRun: { id }), so the check is bound to A for good.
The first create_pull_request_review sees that HEAD moved (mcp/review.ts:911). It returns newCommits and moves primary.checkoutSha forward, and the agent then reviews B..C inline. This is by design: it avoids a second run.
recordSubmittedReview pins toolState.review.reviewedSha and toolState.approval.sha to C.
postReviewCleanup (utils/reviewCleanup.ts:46) tells the server C was reviewed. dispatchFollowUpReReview then returns early because pr.head.sha === reviewedSha. This is correct: C was already reviewed, so no follow-up run starts.
reportStatusChecks (utils/statusChecks.ts:58) PATCHes only the seeded check on A. pullfrog-approval already goes to approval.sha (C), but the pullfrog run check has no equivalent. The terminal-create fallback at line 95 does use checkoutSha, so it would have landed on C. It just never runs when a seeded check exists.
The result: C ends up with an approving review and no pullfrog row. Branch protection waits forever, because nothing will ever dispatch for C.
Which fix: I recommend the issue's first option: post pullfrog on the head the run reviewed. The second option, a follow-up run, would spend a full run re-reviewing code that was just reviewed, and the safety net rightly refuses to do that.
Plan
1. Mirror the run check onto the reviewed head (utils/statusChecks.ts)
After finalizeRunStatusCheck, when a seeded check exists:
Find the covered SHA. Use approval?.sha ?? primary.checkoutSha, and only for runs whose selectedMode is Review or IncrementalReview. Build or Fix runs that push their own commits are out of scope: their push triggers its own re-review, which gets its own check.
Only on a clean run. Gate on params.runSucceeded. A failed run has not proven it covered the new head, and the absent check still tells the user to re-run.
Compare against the seeded head. Call checks.get on the seeded id and read head_sha. Stop if it equals the covered SHA, which is the normal case and costs one extra GET only on review runs. This means adding head_sha to RunStatusCheckOctokit's get response type in utils/runStatusCheck.ts.
Never duplicate a row. Call checks.listForRef(coveredSha, check_name: "pullfrog"), filtered by app.slug !== GITHUB_ACTIONS_APP_SLUG. If any Pullfrog-owned row exists, whether in_progress from a concurrent run or already completed, skip it and leave that row to its owner.
Create it already terminal. Otherwise call createTerminalRunStatusCheck on the covered SHA with the same conclusion, detailsUrl, reviewUrl and note. It must be created as completed, because the webhook and reaper backstops only know the seeded checkRunId and could never close a second in_progress row.
Keep it best-effort. Use .catch(log.debug), like every other post in this function.
Optionally, add a sentence to the mirrored row's summary such as "This run started on A and also reviewed the commits through C." That would need an optional extraLine param on terminalOutput and createTerminalRunStatusCheck.
2. Docs and comments
Update the header comment of reportStatusChecks. It currently says Pullfrog is only a PATCH of the seeded check.
Update the header of runStatusCheck.ts to say the action may also post one terminal row on the head the run reviewed.
3. Tests (new utils/statusChecks.test.ts, using vitest)
There is no unit test for reportStatusChecks today. Build a structural fake octokit (checks.get/update/create/listForRef, pulls.get) and cover these cases:
seeded on A, review on C, success → update on A, plus one create on C (completed, success)
seeded on A, review on A → no extra create
seeded on A, review on C, but a Pullfrog pullfrog row already on C → no create
a github-actions-owned pullfrog row on C is ignored → create still happens
runSucceeded: false → no mirror
no seeded check (fallback) → exactly one create, on checkoutSha (unchanged behaviour)
a Build-mode run → no mirror
Verification
Run pnpm vitest run utils/statusChecks.test.ts, then the typecheck and lint commands from the repo learnings.
Out of scope / follow-ups
The timeline's "12:56 in_progress on A" is most likely the run still finishing after the 12:55 review, since cleanup and finalize run after the agent exits. If A stays in_progress after the workflow ends, that is a separate server-side backstop problem (the webhook or reaper).
Until this ships, the workaround remains re-running the workflow run by hand, as the reporter did.
Activity
pullfrog commentedon Nov 23, 2026
Analysis
The bug is real, and the cause is in this repo. It is not a duplicate. #107 had the same symptom from a different path (the
pullfrog-approvalcarry-forward), and that fix is already merged.What happens in the reported timeline:
pullfrogcheckin_progresson A. The payload carries only its id (payload.checkRun: { id }), so the check is bound to A for good.create_pull_request_reviewsees that HEAD moved (mcp/review.ts:911). It returnsnewCommitsand movesprimary.checkoutShaforward, and the agent then reviews B..C inline. This is by design: it avoids a second run.recordSubmittedReviewpinstoolState.review.reviewedShaandtoolState.approval.shato C.postReviewCleanup(utils/reviewCleanup.ts:46) tells the server C was reviewed.dispatchFollowUpReReviewthen returns early becausepr.head.sha === reviewedSha. This is correct: C was already reviewed, so no follow-up run starts.reportStatusChecks(utils/statusChecks.ts:58) PATCHes only the seeded check on A.pullfrog-approvalalready goes toapproval.sha(C), but thepullfrogrun check has no equivalent. The terminal-create fallback at line 95 does usecheckoutSha, so it would have landed on C. It just never runs when a seeded check exists.The result: C ends up with an approving review and no
pullfrogrow. Branch protection waits forever, because nothing will ever dispatch for C.Which fix: I recommend the issue's first option: post
pullfrogon the head the run reviewed. The second option, a follow-up run, would spend a full run re-reviewing code that was just reviewed, and the safety net rightly refuses to do that.Plan
1. Mirror the run check onto the reviewed head (
utils/statusChecks.ts)After
finalizeRunStatusCheck, when a seeded check exists:approval?.sha ?? primary.checkoutSha, and only for runs whoseselectedModeisRevieworIncrementalReview. Build or Fix runs that push their own commits are out of scope: their push triggers its own re-review, which gets its own check.params.runSucceeded. A failed run has not proven it covered the new head, and the absent check still tells the user to re-run.checks.geton the seeded id and readhead_sha. Stop if it equals the covered SHA, which is the normal case and costs one extra GET only on review runs. This means addinghead_shatoRunStatusCheckOctokit'sgetresponse type inutils/runStatusCheck.ts.checks.listForRef(coveredSha, check_name: "pullfrog"), filtered byapp.slug !== GITHUB_ACTIONS_APP_SLUG. If any Pullfrog-owned row exists, whetherin_progressfrom a concurrent run or already completed, skip it and leave that row to its owner.createTerminalRunStatusCheckon the covered SHA with the sameconclusion,detailsUrl,reviewUrlandnote. It must be created ascompleted, because the webhook and reaper backstops only know the seededcheckRunIdand could never close a secondin_progressrow..catch(log.debug), like every other post in this function.Optionally, add a sentence to the mirrored row's summary such as "This run started on
Aand also reviewed the commits throughC." That would need an optionalextraLineparam onterminalOutputandcreateTerminalRunStatusCheck.2. Docs and comments
reportStatusChecks. It currently saysPullfrogis only a PATCH of the seeded check.runStatusCheck.tsto say the action may also post one terminal row on the head the run reviewed.3. Tests (new
utils/statusChecks.test.ts, using vitest)There is no unit test for
reportStatusCheckstoday. Build a structural fake octokit (checks.get/update/create/listForRef,pulls.get) and cover these cases:updateon A, plus onecreateon C (completed, success)createpullfrogrow already on C → nocreategithub-actions-ownedpullfrogrow on C is ignored →createstill happensrunSucceeded: false→ no mirrorcreate, oncheckoutSha(unchanged behaviour)Verification
Run
pnpm vitest run utils/statusChecks.test.ts, then the typecheck and lint commands from the repo learnings.Out of scope / follow-ups
in_progresson A" is most likely the run still finishing after the 12:55 review, since cleanup and finalize run after the agent exits. If A staysin_progressafter the workflow ends, that is a separate server-side backstop problem (the webhook or reaper).Task list (3/3 completed)
claude-opus-5-5(free via Pullfrog for OSS) | 𝕏