Remove hardcoded OpenCode model, fix flaky worker pool tests#264
Merged
Conversation
Test that CommandLine() and Review() omit --model when Model is empty and include it when explicitly set. Covers both the string output path and actual subprocess args via mockAgentCLI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined ReviewVerdict: No Medium/High/Critical issues found; changes look clean and ready to merge. All four reviews (security + default from both agents) reported no issues, with no conflicting findings to reconcile. Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
TestWorkerPoolCancelRunningJob failed intermittently under -race because the test used fake SHAs in a non-git directory. Prompt building failed immediately (git log exit 128), so the job never reached the agent's Review() and exhausted retries before cancellation could fire. Initialize tmpDir as a real git repo in newWorkerTestContext and use the actual HEAD SHA in TestWorkerPoolE2E, TestWorkerPoolConcurrency, and TestWorkerPoolCancelRunningJob. Replace the hardcoded sleep+poll in the cancel test with waitForJobStatus for robustness. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined ReviewVerdict: No Medium/High/Critical issues found; this PR appears clean. Findings (Medium+)None. Only low-severity suggestions were reported (and are omitted per your criteria). Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
hughdbrown
pushed a commit
to hughdbrown/roborev
that referenced
this pull request
Feb 16, 2026
…-dev#264) ## Summary - Remove hardcoded `opencode/minimax-m2.1-free` model which is obsolete - Only pass `--model` flag when explicitly configured by user - Add tests for `CommandLine()` and `Review()` verifying `--model` is omitted when empty and present when set - Fix flaky `TestWorkerPoolCancelRunningJob` by initializing test dirs as real git repos with real commit SHAs, so prompt building succeeds and the job reaches the agent's `Review()` where cancellation can reliably fire Original fix by @midnattsol (supersedes roborev-dev#260). Test coverage added per review feedback. Fixes roborev-dev#259 ## Test plan - [x] `TestOpenCodeModelFlag` — verifies `CommandLine()` string output - [x] `TestOpenCodeReviewModelFlag` — verifies actual subprocess args via `mockAgentCLI` - [x] Existing `TestOpenCodeReviewFiltersToolCallLines` still passes - [x] `TestWorkerPoolCancelRunningJob` passes consistently under `-race -count=10` - [x] `TestWorkerPoolE2E` and `TestWorkerPoolConcurrency` now exercise the full prompt-build → agent-review path 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: midnattsol <juanjo@delasheras.dev> Co-authored-by: Claude Opus 4.6 <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
opencode/minimax-m2.1-freemodel which is obsolete--modelflag when explicitly configured by userCommandLine()andReview()verifying--modelis omitted when empty and present when setTestWorkerPoolCancelRunningJobby initializing test dirs as real git repos with real commit SHAs, so prompt building succeeds and the job reaches the agent'sReview()where cancellation can reliably fireOriginal fix by @midnattsol (supersedes #260). Test coverage added per review feedback.
Fixes #259
Test plan
TestOpenCodeModelFlag— verifiesCommandLine()string outputTestOpenCodeReviewModelFlag— verifies actual subprocess args viamockAgentCLITestOpenCodeReviewFiltersToolCallLinesstill passesTestWorkerPoolCancelRunningJobpasses consistently under-race -count=10TestWorkerPoolE2EandTestWorkerPoolConcurrencynow exercise the full prompt-build → agent-review path🤖 Generated with Claude Code