fix(core): T9 concurrent-send test raced HTTP arrival order — pace off the expansion instead - #394
Conversation
|
Warning Review limit reached
Next review available in: 5 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: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (57)
📝 WalkthroughWalkthroughThe integration test now waits for slow attachment expansion before issuing the second send. It continues to verify that both sends complete without overlapping live runs and preserve message order. ChangesConcurrent send timing test
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
T9's same-tick case fired both sends from one tick and then asserted the transcript order. That order is an arrival property of two independent HTTP requests, not one the server can promise: whichever POST reached the session first entered the per-session serialize queue first. On a loaded CI runner the fast second send won that race and the transcript came back as ['same tick second', 'same tick first']. The second send now goes out once the first turn's attachment expander has been entered, so it still lands while the first holds the serialize lock - the overlap the test exists to rule out - while the order it asserts is the one the server actually owns. Verified by mutation: dropping the tail chain from liveRuns.serialize reproduces the exact CI diff, and the reworked test catches it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
720e321 to
2d9cfca
Compare
…ling a flag Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ode 22 baseline) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Found by PR #393's shard-3 red; RCA structurally exonerated that PR (no deadline-wrapped await exists in T9's path).
T9 fired two
chat.sends from one tick over two independent HTTP requests and asserted transcript order — a property of which POST reached the server first, which nothing guarantees (liveRuns.serializeis FIFO by arrival; the CI runner's loopback can complete handshakes out of order). The rewrite waits for the first send to enter its slow expansion (newonSlowExpansionhook on the test's paced extension) before releasing the second, so the overlap invariant (peakLiveRuns === 1) and the #332 ordering guarantee are exercised deterministically.Mutation-proof: with
serializebroken the rewritten test fails with the exact CI diff — it does not pass vacuously. 20× idle + 20× under 32-way CPU load, all green; core suite 433 passed; fallow 0 introduced.🤖 Generated with Claude Code
Summary by CodeRabbit