core+app: reviewer chat — ask the agent about the review, adopt drafted comments#37
Merged
Merged
Conversation
…ed comments
Implements cockpit-docs/REVIEWER_CHAT.md: a workspace-level 'Ask agent'
panel with one persistent thread per PR (cleared when the head moves).
Each turn is a stateless one-shot spawn in the review's worktree,
provably read-only (--disallowedTools Write/Edit/NotebookEdit/Bash/Task),
transient (no session, no fleet row, no gate contact), streamed over
dedicated chat-stream/chat-complete events with a per-PR turn registry
and a 5-minute hard timeout. Draft comments come back inline as a
{"drafts":[...]} block parsed out of the answer and rendered as
adopt-able cards feeding the existing guarded comment path (§9).
… settling Reviewer MINORs: the turn registry now locks through a poison-recovering helper (a panic in the driver could otherwise leak the claim and wedge a PR's chat until restart); config/worktree/spawn failures settle IN the thread (question kept, error: true reply appended, claim released, chat-complete emitted) instead of erroring the command and leaving the error only in a banner. MultiEdit added to the denylist. Spec synced with the error flag.
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.
What
The reviewer chat (design:
cockpit-docs/REVIEWER_CHAT.md, in this diff). An ✦ Ask agent toggle in the review workspace opens a docked, resizable panel on whatever tab is active — one persistent conversation per PR with the read-only reviewer agent.claudein the review's worktree with the full context assembled deterministically (intent, findings, diff, recap, local comments, GitHub conversation, prior transcript capped at 40 messages, the question). New prompt golden pinned.--disallowedTools Write,Edit,MultiEdit,NotebookEdit,Bash,Taskand no permission-mode flags — it can read/grep the worktree freely and can never mutate or prompt.review.agent— invisible to the fleet, the gate, andmax_parallel_agents. Dedicatedchat-stream/chat-completeevents keep it off the AgentPanel timeline. Per-PR turn registry (poison-recovering locks), Stop button, 5-minute hard timeout.{"drafts":[...]}block, parsed out of the answer (tolerant, fence-stripping) and rendered as adopt-able cards feeding the existing guarded comment path — agent text reaches GitHub only via explicit adopt + confirmed Mirror/Submit (§9).error: truereply, pending state released) — the review is never blocked by chat.Verified
cargo fmt --check·clippy -D warnings·cargo test(583: new parser/prompt/golden/clear/registry coverage) ·tsc·vitest409 (+13: store slice, panel render incl. draft adoption + error turns, width/persistence helpers) ·vite build. Reviewer agent pass: SHIP; its three MINORs fixed (poison-safe registry, in-thread failure settling ×2) + MultiEdit denylist NIT.🤖 Generated with Claude Code