fix(review): don't REQUEST_CHANGES on pending CI — pollutes MAX_ROUNDS counter #148
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/review-skill-pending-ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause (observed on PR #147)
Reviewer agent submitted
REQUEST_CHANGESthree times in a row on PR #147. The actual code feedback was resolved in round 1 (try/catch scope fix inefe9a83). Rounds 2 and 3 explicitly said the code was correct but flagged "CI was still waiting" as the reason for REQUEST_CHANGES. Three REQUEST_CHANGES →MAX_ROUNDS=3tripped → force-merge from #137 fired → boss squash-merged the PR despite the (meaningless) outstanding REQUEST_CHANGES.The outcome was correct — the PR was clean and shipped — but the signal was garbage. The force-merge terminator is supposed to break reviewer-author deadlocks on real disagreement, not on CI runner latency. If this stays in place, every PR where the reviewer arrives before CI will eat the same 3-round meat-grinder before landing.
Source of the behavior
skills/review.mdstep 5 instructed the reviewer toREQUEST_CHANGESon pending CI:That path treats infrastructure state as a code defect.
Fix
Pending-CI carve-out added to both
skills/review.md(full review) andskills/review-delta.md(round 2+ resume path). On pending/running/waiting CI, the reviewer now:create_issue_comment— informational only, does not advance the review workflow ("Stepping off the review request — will be re-dispatched automatically when CI completes").delete_review_requeststo remove itself from the PR'srequested_reviewerslist.create_pull_reviewcall.Why that's safe
When CI settles (
action_run_success/action_run_failurewebhook),decidePostCiActionruns the three-way routing:requested_reviewers→ case 6 "POST requested_reviewers" → re-request.Event-driven re-review, no polling, no MAX_ROUNDS slot wasted on CI flakiness.
What about the ticket that warned against COMMENT-type reviews (#111)?
#111's warning is aboutcreate_pull_reviewwithstate: "COMMENT"— that does not advance Forgejo's review lifecycle, so the dispatcher can't see it. This fix usescreate_issue_comment(plain issue comment), notcreate_pull_review— different API, doesn't claim to be a verdict. The dispatcher correctly ignores it; Forgejo doesn't treat it as a review at all.No code changes
Skills are runtime-loaded — takes effect on the next reviewer dispatch after merge. Skill files alone; TypeScript untouched.
Test plan
issue_commentis posted + reviewer is removed fromrequested_reviewerslist (not a new review submission).action_run_successre-requests the reviewer (service log:"requested review from reviewer").Closes nothing directly — follow-up to #137 (force-merge) and #147 (force-merge firing on a clean PR).