Conversation
Contributor
🏆 Review leaderboardSep 25, 2026–Oct 2, 2026 · UTC
Ranked by distinct external PRs reviewed, then review rounds, then PR comments. Self-activity and bot activity are excluded. Show 9 more reviewers
|
axisrow
force-pushed
the
upstream/per-pr-run-review
branch
from
October 2, 2026 06:46
f665ca0 to
d921708
Compare
Contributor
Author
|
Friendly bump — happy to adjust anything here if reviewers have feedback. |
axisrow
force-pushed
the
upstream/per-pr-run-review
branch
from
October 4, 2026 05:13
1da2d19 to
220bb0e
Compare
…ards (#57) A worker session can accumulate multiple open PRs, but review triggering was session-wide: the Reviews tab's single trigger reviewed every eligible PR, and it was unclear which PR a pass would target. The action now lives on the object it acts on. - POST /sessions/{id}/reviews/trigger accepts an optional prUrl; when set, the engine plans only that PR (unknown URL -> 422), omitted keeps the session-wide sweep. Threading: controller -> service -> engine. - ao review trigger gains --pr <url>. - The inspector's PR cards get a "Run review" button next to Merge that triggers a review for that card's PR; pending spinner and error follow the merge button's pattern. Merged PRs don't offer it. - i18n: pr.review.runFor in all 8 locales. Refs OrchestratorInc#6132 Co-authored-by: axisrow <axisrow@users.noreply.github.com> Co-authored-by: Claude Code <noreply@anthropic.com> (cherry picked from commit 93d9901)
axisrow
force-pushed
the
upstream/per-pr-run-review
branch
from
October 4, 2026 05:46
220bb0e to
b222190
Compare
AgentWrapper
pushed a commit
that referenced
this pull request
Oct 6, 2026
A requested review now fetches the worker's open PRs fresh from the provider before deciding what is due, reusing the session claim path, so the pass reviews the commit really on the PR instead of whatever the SCM observer last saw. Refresh is bounded (10s) and best effort for tracked PRs: on failure the trigger falls back to stored facts and REVIEW_HEAD_NOT_OBSERVED. Auto-review does not refresh. ao review trigger --pr <url> (request prUrl, matching #6136) reviews only that PR. If AO does not track it yet it is attached first, never taken over from another active session (409 REVIEW_PR_OWNED_BY_OTHER_SESSION). With no tracked PR, the error now points at --pr. Workers are told to pass --pr right after opening a PR, and to re-trigger when ao review ls shows failed or cancelled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AgentWrapper
added a commit
that referenced
this pull request
Oct 6, 2026
…6262) * feat(review): let agents request AO native review of their own PRs Workers and orchestrators now start AO's native reviewer directly instead of spawning a generic worker to review: - ao review trigger/ls/cancel default to the calling AO session; trigger takes --agent/--model/--effort per pass, refuses inside reviewer panes, records the pass as source "agent", and turns on the session's review auto-inject unless --no-inject. - A head that is already being reviewed or already has a review is rejected with 409 REVIEW_ALREADY_RUNNING / REVIEW_HEAD_ALREADY_REVIEWED; --rerun reviews it again (migration 0175 narrows the unique key to running passes) or adds a reviewer with another agent alongside a running one. - Reviewers with different agents run concurrently: trigger no longer tears down a working reviewer, stale-pane cleanup and cancel cover every reviewer, and the list API exposes activeReviewers. - Approved verdicts are delivered to the worker when auto-inject is on, with wording that an AO approval is not a GitHub approval and never authorizes merging. - New project setting workersRequestReview chooses whether workers request a review when ready or ask first; the orchestrator prompt no longer routes code review to spawned workers. - With no reviewer configured, the reviewer defaults to the project's default worker agent and its model/effort, never its permissions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(review): keep parallel reviewers alive across worker restore Restoring a worker restored its selected reviewer by tearing down every other reviewer and cancelling its passes as "reviewer agent was switched". With concurrent reviewers that cancelled a reviewer still running alongside the selected one. Restore now releases only idle reviewer panes, and fails another reviewer's running passes only when its pane did not survive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(review): show agent-started reviews live and keep Chat reviewers on restore Found testing #6262 with real agents in a dev build: - The inspector never refreshed when a review started or finished outside the window (an agent's ao review trigger, auto-review, a reviewer's submit): local review_run CDC only refreshed workspaces. Refresh that session's reviews on review_run_created/updated. - When an agent picked a non-default reviewer (--agent codex) the selected reviewer stayed current although idle, so the working reviewer had no tab. List now reports the working reviewer as current when the selected one is idle. - Worker restore cancelled a running Chat reviewer as having no pane; Chat reviewers have none by design and are recovered by RecoverChatReviewers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(review): deliver AO reviews to workers only through PR comments One channel per review source. The worker now hears AO's reviewer the same way it hears any reviewer: the SCM observer forwards the reviewer's inline GitHub comments. AO no longer sends a separate verdict message, which delivered every review twice and turned optional inline suggestions into required work. - Remove post-submit verdict delivery (lifecycle ApplyReviewBatch and the review service's delivery step); results are recorded and stay complete. - The reviewer prompt requires an inline comment for every finding that needs a change, including design-level ones, and keeps optional suggestions in the summary, because the worker receives only inline comments. - Worker instructions, CLI output, skill and docs say findings arrive as PR review comments and the verdict is in ao review ls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(review): explain a pushed head AO has not observed yet Right after a push, ao review trigger could refuse with 'already reviewed, push new commits' because the SCM observer (30s cadence) had not seen the new commit, so the worker was told to push what it had just pushed. When the head AO knows is already reviewed, compare it with the workspace's remote-tracking ref for the PR branch; if the worker has pushed past it, return 409 REVIEW_HEAD_NOT_OBSERVED with both commits and a retry hint. No automatic retry: the worker retries once AO has seen the push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(review): refresh PRs from the provider and accept --pr on trigger A requested review now fetches the worker's open PRs fresh from the provider before deciding what is due, reusing the session claim path, so the pass reviews the commit really on the PR instead of whatever the SCM observer last saw. Refresh is bounded (10s) and best effort for tracked PRs: on failure the trigger falls back to stored facts and REVIEW_HEAD_NOT_OBSERVED. Auto-review does not refresh. ao review trigger --pr <url> (request prUrl, matching #6136) reviews only that PR. If AO does not track it yet it is attached first, never taken over from another active session (409 REVIEW_PR_OWNED_BY_OTHER_SESSION). With no tracked PR, the error now points at --pr. Workers are told to pass --pr right after opening a PR, and to re-trigger when ao review ls shows failed or cancelled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(review): say a not-yet-visible push clears in seconds A trigger now refreshes the PR from the provider itself, so the only remaining window is the provider's own lag right after a push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(review): address AO review of worker-requested review - Drop the local-git pushed-head probe. The trigger already re-reads the PR from the provider, and the probe misfired when the provider was ahead of the workspace's tracking ref. The already-reviewed message now says to retry after a just-made push. - Keep the selected-reviewer fields meaning the selected reviewer. Clients open a working non-selected reviewer from activeReviewers instead. - Remove trigger entry points with no production callers and the unused delivered-run writer; the delivered status stays for existing rows. - Cancel legacy harness-less runs once, not once per run. - Fix a stale ApplyReviewBatch mention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Prateek K <prateek@Prateeks-Mac-mini.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per-PR review targeting for multi-PR sessions: each PR card on a session learns which review run produced it, and a Run review action on the card launches a review scoped to that PR — instead of routing every review through the generic review tab and re-targeting by hand.
Run reviewon a card starts a new run pinned to that PR (backend: review targeting + HTTP endpoints; CLI:reviewflag wiring).Fixes #6132
Gates
go generate ./...regeneratedopenapi.yamlon the current base;api:ts→schema.tshas no drift;specgentests pass.go test -racegreen forinternal/review,internal/service/review,internal/cli,internal/httpd/controllers,internal/httpd/apispec/specgen.typecheck+typecheck:e2eclean; vitest: SessionInspector, session-reviews, i18n coverage — 137 passed.🤖 Generated with Claude Code