feat: live-first architecture — parallel peers, file output, no aggregate pass#8
Open
AnamKwon wants to merge 17 commits into
Open
feat: live-first architecture — parallel peers, file output, no aggregate pass#8AnamKwon wants to merge 17 commits into
AnamKwon wants to merge 17 commits into
Conversation
- claude-live: --append-system-prompt + Write(promptDir:*) for scoped file output - gemini-live: --approval-mode auto_edit + --admin-policy (ALLOW .peer-review/, DENY shell+other) - codex-live: REVIEWER_CODEX_HOME isolation (no MCP dialogs), --sandbox workspace-write - All live sessions: dual-channel output (file primary, capture-pane fallback) - Markers split into parts in prompt file to prevent false-positive capture-pane extraction - Parallel worker: jobs for different (reviewer,cwd) pairs run concurrently via promise chains - POST /reclaim endpoint + reclaimStaleClaims() to recover jobs on worker restart - Session crash detection in waitUntilReady (throws immediately if tmux session dies) - Fresh UUID for new sessions (prevents slow startup from old conversation history loading) - setupReviewerCodexHome() creates isolated CODEX_HOME with auth + workspace trust + empty MCP Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Remove synthesis aggregate pass (runMultiPeerAggregatePrompt + runReviewCommand aggregate) - All peer results delivered directly to host — no redundant LLM synthesis call - claude-live added as default peer for claude host (separate tmux session = independent review) - peersFor() now allows -live variants of the host's own base (separate interactive sessions) - Default peers for claude host: [codex-live, gemini-live, claude-live] - resolveGeminiAutoPeerReadiness: always ok=true (OAuth works without API key for gemini-live) - resolveAutoPeerSetupConfig: target's own -live variant included in --peers=auto - --peers=auto now produces: codex-live,gemini-live,claude-live for claude host Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add POST /reclaim that resets all claimed jobs back to pending. Called at worker startup to recover jobs lost when a prior worker crashed before completing delivery. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Change default from clear-between-reviews to keep-history. Live sessions now accumulate repo knowledge across reviews, giving richer and more consistent feedback over time. To restore old behavior: CODE_ASSISTANT_PEERS_REVIEWER_CLEAR=always Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Auto-setup recommendation now includes claude-live for claude host, consistent with the new default peers list. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Complete rewrite focused on live mode as the default: - Live vs Headless comparison table - Review history (session memory) explanation - Architecture diagrams: parallel peers, no aggregate pass - Security mechanism comparison (claude/gemini/codex) - Improved setup guide and troubleshooting section - Reduced from 1027 lines to 337 lines for better readability Key changes reflected: - All reviewers default to live (tmux) mode - Review history kept by default (no clear between reviews) - Peers: codex-live + gemini-live + claude-live in parallel - No aggregate synthesis pass - Gemini works with OAuth, no API key required Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Update Korean, Japanese, and Chinese README translations to reflect: - New default peers include claude-live - History kept by default (REVIEWER_CLEAR change) - Gemini works without API key via OAuth Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Test POST /reclaim resets claimed jobs to pending - Update test expectations for new default peers (includes claude-live) - Update gemini auto-readiness test for OAuth-first approach Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Verify that jobs for different (reviewer,cwd) pairs run concurrently: - Job B for key B starts before job A for key A finishes - Jobs for the same key are still serialized Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Before: 4 independent sleep-before-check layers each adding up to 1000ms, for a worst-case ~4s idle time after a reviewer finishes writing. Changes: - DEFAULT_POLL_INTERVAL_MS: 1000ms → 250ms (reviewer.ts) - deliver(): check-before-sleep with adaptive backoff (50ms→100ms→…→250ms) eliminates the unconditional pre-check sleep - reviewViaBroker(): check immediately on first iteration (check-before-sleep), hardcoded 1000ms → 250ms (broker-client.ts + reviewer-command.ts) - wait_for_peer_review: default poll 1000ms → 500ms, min clamp 250ms → 100ms - Schema description updated to reflect new 500ms default After: worst-case overhead ~0.5s (2× adaptive backoff cap), expected ~0.25s. No logic changes — purely polling cadence improvements. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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
This PR transforms the reviewer architecture to be fully live-first: all reviews run in persistent tmux sessions by default, peer results go directly to the host (no aggregate synthesis), and the reviewer accumulates repo knowledge across sessions.
Key changes
capture-panescraping as primary extraction path(reviewer, cwd)pairs run concurrently; same-pair jobs are still serialized via promise chainsREVIEWER_CLEAR=alwaysto opt outgeminiCLI is sufficient;--peers=autoalways includes gemini-livePOST /reclaim— broker endpoint to recover stale claimed jobs on worker restartDefault peers (before → after)
Review flow (before → after)
Security
Each live reviewer restricts writes to
.peer-review/only:Write(promptDir:*)in--allowedTools--admin-policywith ALLOW.peer-review/(500), DENY elsewhere (100), DENY shell (600)REVIEWER_CODEX_HOMEisolation (no MCP dialogs),--sandbox workspace-writeTest plan
bun testpasses (166 tests)bun cli.ts setup claude --peers=auto --dry-runshowsclaude-live,codex-live,gemini-live🤖 Generated with Claude Code