mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-29 06:50:43 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - GitHub review bots run automatic reviews for a specific pull request head > - When the head has moved on, the review tools refuse the stale review and explain why > - That explanation said "an authorized person can request a manual review", so an agent can read it as a blocker owned by a person > - On staging, a review task recovered for an already-merged PR did exactly that: it marked itself blocked and asked the PR author to request a review > - This pull request makes the refusal say the review is no longer needed and that the task should finish as done > - The benefit is that stale or merged-PR reviews close cleanly instead of waiting on a person ## Linked Issues or Issue Description Refs #23049 **Describe the bug** A review-bot task for a PR merged three days earlier was continued by the lost-wait recovery (#23049). Its automatic review targeted the PR's old head. The review tool refused with "no newer automatic review is queued for it. An authorized person can request a manual review", and the agent blocked the task, naming the PR author or a maintainer as owner. **Steps to reproduce** 1. An automatic review request targets head A of a pull request. 2. The pull request moves to head B (or is merged) with no newer automatic review queued. 3. The agent calls a review tool; the refusal tells it a person can request a manual review, and the agent blocks the task. **Expected behavior** The agent finishes the task as done; a merged or closed pull request needs no review, and nothing waits on a person. ## What Changed - `server/src/services/chat-github-reviews.ts`: `supersededAutomaticReview` receives the pull request. For a closed or merged PR the refusal says no review is needed; otherwise it says the review is no longer needed (or that a newer automatic review is queued). In every case it tells the agent to finish the task as done and not to block it or ask anyone to request a review. The error details add `pullRequestClosed`. - Test in `github-review-publications.integration.test.ts` for a closed and an open pull request whose head moved. ## Verification - New test (`tells a superseded automatic review to finish instead of waiting on a person`, closed and open): fails on master (the old message asks for a person), passes here. - `github-review-publications` and `github-review-workflow` integration suites: 39 passed. Server typecheck is clean. - After deploy: a recovered review for a merged PR should finish as done instead of blocking. ## Risks - Wording change for one refusal; the reason code and retryability are unchanged. ## Model Used - Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, with tool use and code execution. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [ ] I will address all Greptile and reviewer comments before requesting merge 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>