test(autoCombo): raise timeout on tieredRotation stress tests - #203
Conversation
The 3 rotation stress tests pay a one-time ~2.6s DB init (first getTaskFitness call boots the SQLite migrations) plus many selectProvider iterations. Combined with vitest collection overhead this exceeds vitest's default 5000ms per-test limit and the tests time out. Raise each to a 30000ms budget rather than thinning the sample, so iteration counts and statistical validity are unchanged.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Note
|
L17 Latency Budget ReportChecked against: budgets/rest-endpoints.yaml. |
|
Code Review SummaryStatus: No blocking issues in changed code | Recommendation: Not actionable — PR is already merged Overview
Files Reviewed (1 file)
NoteThis PR is already in state MERGED and cannot be un-merged via review feedback. Reviewed by step-3.7-flash-20260528 · Input: 54.4K · Output: 4.5K · Cached: 311.7K |



Problem
Three stress tests in
tests/unit/autoCombo/tieredRotation.test.tshit vitest's default 5000ms per-test limit and time out:smart combo rotates within top tier across many requests(50 iterations, 4-candidate pool)cheap combo pulls from rest tier (lower scores) more often than smart(200 iterations, 2-candidate pool)rotates across all 43 Cerebras connection IDs, not just one(43-candidate pool, 200 iterations)The first
getTaskFitness()call in the file boots the SQLite migration runner (~2.6s one-time DB init). Combined with vitest's collection/pool overhead and the per-test iteration work, each test blows past the 5s default.Fix (Option A — per-test timeout)
Added
{ timeout: 30000 }to each of the threeit(...)calls. Chosen over reducing iteration counts (Option C) because Option A preserves the sample sizes and cannot alter the tests' statistical validity — the tests still exercise the exact same rotation behavior they were written to verify. Tests are not skipped or disabled.Validation
The file is vitest-native (
vi.mockat the top), and the vitest runner is currently broken in worktrees (EXIT=194, zero output — tracked separately). Per Hard Rule #18, the rotation logic + timing were validated with a standalonetsxtiming probe reproducing all three tests' bodies:All three assertions pass; the DB-init cost (~2.6s) is what pushes the file over the 5s default. The 30000ms budget resolves it with no change to test behavior.