Repository navigation
[CI] test: advance retry clocks instead of waiting in real time - #26220
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe WSL hook relay recovery tests and native chat composer draft store tests replace real-time waits with Vitest fake timers. The tests advance timers to exercise their existing recovery and retry checks. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The reviewed changes only adjust timer control in tests; no code-level merge blocker is evident. Proceed with the usual pending CI checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
ELI5
These two test suites spend less time waiting for retry timers while checking the same behavior. Their complete test command takes 47.44% less time in the measured comparison.
What Changed
Use Vitest’s virtual timeout clock for composer draft retries and the existing mocked WSL relay recovery policy. Advance the original retry and observation windows explicitly. Date and performance clocks remain real, and existing assertions, deadlines, held asynchronous operations and cleanup remain intact.
Why
The tests need to observe timer-driven policy, so advancing those timers gives the same checks without waiting in real time. This keeps the cases and their asynchronous boundaries instead of shortening windows or changing production behavior.
Linked Issue
N/A — maintainer performance work requested by the user.
Visual Proof
N/A — test fixtures only; no product UI or behavior changes.
Testing
tc:node,tc:web, changed code quality and formatting passed. Full Linux ARM CI passed: all 11,678 physical files ran exactly once (11,538 passed / 140 existing skips), with 112,609 passing cases, one existing expected failure, and 1,052 existing skips; zero errors or omissions. Stock artifacts establish totals and routing, while the local qualifications establish exact named-case parity. No Windows result is claimed.Measurements cover the whole
pnpm testcommand for these two files on frozen source0d8289997296413ed1629f7256885c27c277b436, with four workers and filesystem module caching disabled. Three alternating pairs used the same cases, routing, setup and flags:Every pair improved; the scoped speedup is 1.9025×. This measures two suites, not the complete suite or the requested overall 2× goal.
Review
CodeRabbit reviewed the exact head with zero actionable comments. Its generic docstring advisory was considered: the touched anonymous test callbacks are already explicit, and the repository requires brief comments for non-obvious behavior; no redundant docstrings were added. Independent source review checked fake-clock boundaries, retained asynchronous operations, exact audit removal and the report validator. Production modules, actual Node runtime contracts and routing are unchanged.
Agent skill upstream boundary
Notes
WSL recovery still exercises its existing injected policy dependencies; no local or remote process is launched by this change. Native process, PTY, SQLite and real latency contracts keep their existing clocks and runtime routes. Two qualification preflight checks rejected external activity before launching any child; those records are retained and are not timing samples.
Checklist