Skip to content

Reviewer: show every step it took and lead with a PR overview - #529

Merged
nambok merged 1 commit into
mainfrom
reviewer-activity
Nov 9, 2026
Merged

nambok merged 1 commit into
mainfrom
reviewer-activity

Conversation

@nambok

@nambok nambok commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

The PR reviewer now shows its work. While it reads a pull request it records each search, file view, folder listing and lookup, the short notes it writes on what it is checking, and the comments it keeps. The review's session page reads them live, grouped like a run log ("Search 3 times", "View 4 files"). The review posted on GitHub now leads with a PR Overview: one sentence on what the PR does, a Changes list, and a Reviewed Changes table with one line per file. When more than 15 files changed, the table is folded in a details block. Inline comments and the blocking rules are unchanged.

Changes

  • common::review_activity (new): the activity events and how they are kept.
    • Each kind is recorded by where it looked: a search keeps its query, a file view its path and line range, a lookup its tool name.
    • Tool results, file contents and other tool inputs (SQL, URLs, payloads) are never recorded.
    • Every text goes through the secret scrubber, and code blocks are dropped from notes.
    • Caps: 200 events and 40 notes per review, 160-byte labels, 400-byte notes. Events past the caps are counted, not kept.
    • Consecutive events of one kind are grouped, with titles in plain words.
  • common::review_overview (new):
    • The overview is held to the diff. Only files the diff changed are listed, in its order. A file the model didn't describe gets a line from its status ("New file (+40)", "Changed (+12/-3)").
    • It renders as markdown for GitHub, folding the table above 15 files.
    • It is saved on the session record.
  • common::review_session: activity is appended in batches, along with a count of dropped events. The overview is saved on the session too, and both are read back.
  • Worker:
    • The tool loop now takes a LoopObserver, which sees the agent's text before each batch of calls and each call when it ends. It replaces the bare tool-call callback, and the coder's run log keeps working through ToolCallFn.
    • review_activity::ActivityFeed appends what was recorded to the session every 3 seconds. It writes whatever is left when it is closed or dropped.
    • The reviewer prompt asks for an overview and for short progress notes: a bold heading plus one or two sentences, with no code and no secrets. summary now covers what the reviewer checked and what it found.
    • The review body leads with the overview, followed by the verdict and findings as before.
  • Gateway: GET /api/reviewer/session returns activity (the groups), activity_dropped and overview. docs/api/openapi.json is regenerated.

Verification

  • cargo fmt --check --all, cargo clippy --workspace --all-targets -- -D warnings: clean.
  • cargo test --workspace: 3778 passed, 20 ignored, 0 failed. New tests cover:
    • classifying tool calls, and keeping secrets and other tool inputs out of every event
    • size caps and char-boundary cuts
    • splitting notes into heading and text, with code dropped
    • the recorder's caps holding across drains
    • grouping consecutive events and the group titles
    • the overview held to the diff, its caps, open and folded tables, and table-cell escaping
    • the session's append and read-back for activity and overview, and the gateway's grouped response
    • the review output parsing an overview, and the prompt asking for one
  • The dashboard PR in CoderHelm/coderhelm shows the timeline and the overview. It reads these fields.

The reviewer now records what it does while it reads a pull request: each
search (its query), file view (path and line range), folder listing and
lookup (tool name only), the short notes it writes on what it is checking,
and the comments it keeps. Events are appended to the review's session
every few seconds and returned grouped by kind ("Search 3 times", "View 4
files"), so the session page can show the review live. Only where it
looked is kept, never what it read: no tool results or file contents, every
text scrubbed for secrets and capped, at most 200 events per review.

The posted review leads with a PR Overview: one sentence on what the PR
does, a few Changes bullets, and a Reviewed Changes table with one line per
changed file, folded in a details block above 15 files. Rows follow the
diff; a file the model left out gets a plain line from its status. The
overview is kept on the session for the dashboard. The verdict, findings
and what blocks are unchanged.

The tool loop takes a LoopObserver (text before tool calls and each call)
in place of the bare tool-call callback; the coder's run log uses it
through ToolCallFn unchanged.
@nambok
nambok merged commit 96909ed into main Nov 9, 2026
10 checks passed
@nambok
nambok deleted the reviewer-activity branch November 9, 2026 02:36
coderhelm Bot pushed a commit that referenced this pull request Dec 3, 2026
Moves dashboardRef from 6593784 to 1002bc7, carrying CoderHelm/coderhelm #502, #514, #513, #527, #530, #531, #533, #529, #536, #535, #499 and #537.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant