Repository navigation
test: give each drained write its own deadline in the short-chunks reader test - #13999
Conversation
…ader test `asyncReaderSurvivesManyShortChunksAheadOfTheConsumer` polled for 200 serial drains against one 5 s deadline. Each poll sleeps 1 ms, and on a loaded host each sleep wakes much later, so the shared budget ran out partway through and the test failed at `drainedEveryWrite` with nothing wrong in the reader. Each write now gets its own 5 s, so a reader that stops draining still fails on the write it stalls on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 10 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
Self-review before auto-merge.
Enabling squash auto-merge with the user's go-ahead. — Ibex g1 🌿 |
06c2101 ci: route streamed validation by capability instead of by lane name (manaflow-ai#14002) 1773c54 ci(e2e): start builds from main's DerivedData so test-only changes skip the app compile (manaflow-ai#14016) c890374 ci: pin the nightly runner guards to the whole expression (manaflow-ai#13997) 8abd2e9 ci: flag condition polls bounded by a Task.yield() count (manaflow-ai#14019) e4ca672 ci(ios): record the cmux.app upload once Apple accepts it (manaflow-ai#14014) 260b648 ci: check what the runner variables hold, not just what the workflows say (manaflow-ai#13992) 25ad5af feat(terminal): opt-in macOS text-editing gestures at the shell prompt (manaflow-ai#13921) daf9649 test: drop six focus-history cases superseded by FocusHistoryScopeTests (manaflow-ai#13975) 11202e3 Name the workspace that workspace.reorder could not resolve (manaflow-ai#13961) 2a4f3f6 fix(fork): make the fallback refresh await its own queued validation (manaflow-ai#13960) 4b82298 ci: let test-depot run one app-host test by selector (manaflow-ai#14001) 5d1ecb8 test: give each drained write its own deadline in the short-chunks reader test (manaflow-ai#13999) # Conflicts: # .github/workflows/ci-guards.yml # .github/workflows/ci-health-report.yml # .github/workflows/ios-appstore-upload.yml # .github/workflows/ios-streamed-validate.yml # .github/workflows/iroh-release-gate.yml # .github/workflows/nightly.yml # .github/workflows/test-depot.yml # .github/workflows/test-e2e.yml
Summary
asyncReaderSurvivesManyShortChunksAheadOfTheConsumerfails on a loaded host with nothing wrong in the reader. It writes 200 one-byte chunks and, after each, polls in 1 ms sleeps until the reader has drained it, but all 200 polls share one 5 s deadline. When each 1 ms sleep wakes tens of milliseconds late, the shared budget runs out partway through and the test fails attry #require(drainedEveryWrite).Each write now gets its own 5 s deadline. A reader that stops draining still fails, on the write where it stalls; a slow host no longer adds up 200 slow wakeups against one budget. Test-only change.
Testing
Full
CmuxControlSocketpackage suite (swift test), five runs each on the same shared Mac at load average 215–275 from concurrent peer builds:drainedEveryWriteupstream/mainFive runs each is a small sample. It shows the failure reproduces on main under load and did not recur with the change; it does not bound the remaining flake rate. The test passed 3 of 3 when run alone at load ~100, which is why it shows up mainly under full-suite parallelism.
Demo Video
Not applicable: test-only change, no UI or runtime behavior.
Checklist
— Ibex g1 🌿
Run:
run_cmux_section_a_landing_review_repairs_and_test_flake_repairs_2026_09_23_20260923_fca3ce2b🤖 Generated with Claude Code
Summary by cubic
Fixes
asyncReaderSurvivesManyShortChunksAheadOfTheConsumerfailing on loaded hosts. The test polled all 200 one-byte writes against one shared 5 s deadline, and late 1 ms sleep wakeups under load exhausted that budget partway through, failing the test with nothing wrong in the reader. Each write now gets its own 5 s deadline, so a reader that stops draining still fails on the write where it stalls. Test-only change.Written for commit 34a08b4. Summary will update on new commits.