Skip to content

Conversation

@wesm
Copy link
Collaborator

@wesm wesm commented Feb 1, 2026

Summary

  • Adds --batch flag to roborev fix that concatenates multiple review findings into a single agent prompt, so all issues are addressed in one pass instead of sequential single-job runs
  • roborev fix --batch 123 124 125 batches listed jobs; roborev fix --batch auto-discovers unaddressed jobs on the current branch
  • Reviews are greedily packed into batches respecting config.ResolveMaxPromptSize() (default 200KB); oversized single reviews get their own batch
  • Compatible with --branch, --all-branches, --newest-first (discovery mode only)
  • Rejects --branch/--all-branches/--newest-first when explicit job IDs are provided

Test plan

  • go build ./... passes
  • go test ./... passes
  • Unit tests for buildBatchFixPrompt (multi-entry, single-entry)
  • Unit tests for splitIntoBatches (fits-in-one, splitting, oversized-solo, empty, order, size-limit assertion)
  • Unit tests for formatJobIDs
  • Flag validation tests for all --batch mutual exclusions
  • Manual: roborev fix --batch with 2+ unaddressed jobs concatenates into single prompt

🤖 Generated with Claude Code

wesm and others added 4 commits February 1, 2026 07:13
Concatenates multiple review findings into a single prompt so an agent
addresses all issues in one pass instead of sequential single-job runs.

Supports explicit job IDs (--batch 123 124) or auto-discovery of
unaddressed jobs (--batch with no args). Reviews are greedily packed
into batches respecting max prompt size config.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tests buildBatchFixPrompt (multi-entry, single-entry), splitIntoBatches
(fits-in-one, splitting, oversized-solo, empty, order preservation),
formatJobIDs, and --batch/--unaddressed mutual exclusion validation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reject --branch/--all-branches/--newest-first with explicit batch IDs
- Fix size accounting mismatch: extract shared batchPromptHeader,
  batchPromptFooter, and batchEntrySize so splitIntoBatches and
  buildBatchFixPrompt use identical sizing
- Add test asserting built prompt respects size estimate
- Expand flag validation tests for all --batch mutual exclusions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Recompute entrySize with index 1 after starting a new batch, so the
size estimate matches the actual prompt position.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@wesm
Copy link
Collaborator Author

wesm commented Feb 1, 2026

I used this on a batch of 15 reviews and it worked fantastically

@wesm wesm merged commit 82e4a8c into main Feb 1, 2026
7 checks passed
@wesm wesm deleted the batch-fixing branch February 1, 2026 14:52
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.

2 participants