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
pre-review: dismiss the review bot's stale approval at review run start (follow-up to #1719) #1720
Follow-up to fullsend-ai/fullsend#5417 and #1719. #1719 removes ready-for-merge at review run start. The review bot's own GitHub APPROVED review still has the same gap: after a push, it stays in effect until the next review run finishes.
The dismissal exists, but it only runs at the end. fullsend post-review calls dismissStaleApprovals after it posts the new verdict (fullsend internal/cli/postreview.go, around lines 446-483). Between the push and the end of the next review, a repo whose branch rules count the bot's approval can merge the new head on the old approval.
In scripts/pre-review.src.sh, right after the ready-for-merge removal, dismiss APPROVED reviews on the PR that were submitted by the review bot identity using REVIEW_TOKEN. Do not touch reviews by other users. Use a message like "Superseded: new review run started".
Add a forge helper in scripts/lib/github-review-ops.lib.sh, for example forge_dismiss_own_approvals.
Find the bot login the same way post-review does, from the token's own identity. Do not hard-code app names.
GitLab: no-op unless the review app's approval maps to a GitLab MR approval. If it does, revoke it with the same token. Otherwise document the no-op.
make script-build, and commit the bundles. make check-bundle must pass.
Tests in scripts/pre-review-test.sh:
a bot APPROVED review is dismissed;
an APPROVED review by another user is left alone;
there are no reviews, so no dismissal call is made;
a failed dismissal produces a warning and no success notice.
Add one sentence to docs/review.md next to the ready-for-merge sentence.
Out of scope
Workflow files (reusable-dispatch.yml). Pushes that do not start a review run keep the approval. Repos that need a hard gate should enable GitHub's "Dismiss stale pull request approvals when new commits are pushed".
On a test repo, a push to a PR the bot approved: the review run's pre-script dismisses the bot's approval before the sandbox starts. A new approval appears only if the new run approves.
Triage found this issue ready to implement. #1719 is merged, so nothing blocks it, and no open PR addresses it.
Notes for the implementer
The existing forge_remove_label_checked helper and the ready-for-merge block in scripts/pre-review.src.sh are the patterns to follow for the new helper and its fail-closed handling.
Deriving the bot login from the token's own identity mirrors logic that lives in the fullsend repo (postreview.go), not here. If the login cannot be resolved, warn and skip rather than dismissing anything. Only dismiss reviews in state APPROVED authored by that login.
Edge cases worth covering beyond the four requested tests: non-approval bot reviews are left alone, and a failed list call warns without blocking.
No workflow files are involved, so the code agent can proceed.
Proposed test case
stub gh reviews API; run the pre-review block:
1. bot APPROVED review -> 1 dismiss call, success notice
2. other-user APPROVED review -> no dismiss call
3. no reviews -> no dismiss call
4. dismiss call fails -> ::warning::, no success notice, exit 0
Next steps:
/fs-code — agent creates a PR to implement this issue
/fs-code <your instruction> — agent implements with your specific guidance
Activity
fullsend-ai-triage commentedon Oct 20, 2026
🤖 Finished Triage · ✅ Success · Started 8:17 PM UTC · Completed 8:19 PM UTC
Commit:
4fca9ba· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.23
fullsend-ai-triage commentedon Oct 20, 2026
Triage found this issue ready to implement. #1719 is merged, so nothing blocks it, and no open PR addresses it.
Notes for the implementer
forge_remove_label_checkedhelper and the ready-for-merge block inscripts/pre-review.src.share the patterns to follow for the new helper and its fail-closed handling.postreview.go), not here. If the login cannot be resolved, warn and skip rather than dismissing anything. Only dismiss reviews in stateAPPROVEDauthored by that login.Proposed test case
Next steps:
/fs-code— agent creates a PR to implement this issue/fs-code <your instruction>— agent implements with your specific guidancefullsend-ai-coder commentedon Oct 20, 2026
🤖 Finished Code · ✅ Success · Started 8:20 PM UTC · Completed 8:29 PM UTC
Commit:
4fca9ba· View workflow run →Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $2.24