Repository navigation
[CI] Speed up expensive test fixtures (23–82% less time) - #26000
Conversation
df9bb23 to
45c5968
Compare
8c085dc to
f3a7d06
Compare
45c5968 to
334f83d
Compare
a3afa5c to
5d0e5e3
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe changes update test helpers for agent readiness and Stop timing, switch two filesystem fixtures to synchronous writes, and compare HTTP response bodies and relay frames by bytes. Existing readiness outcomes, Stop results, and test scenarios remain unchanged. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This PR only changes test fixtures to run faster, and it does not change production behavior. No concrete merge-blocking risk was found. 🚥 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
Expensive test fixtures finish sooner while exercising the same timeouts, real files, and binary responses.
What Changed
Advance a simulated clock after real Codex terminal/host setup finishes. Reuse the existing Claude stop-deadline helper to confirm the request is pending at 2,999ms and settles at its unchanged 3,000ms grace boundary. Preserve the recorded terminal screens and original readiness budgets. Wait for the Stop timer to be installed, verify it is still pending at 4,999ms, and advance through its original 7,000ms completion bound.
Create all 40,120 file-listing fixture files synchronously inside their isolated workers. Preserve paths, contents, real ripgrep listings, ignore/cap checks and deadlines.
Use native byte equality for large binary responses. Assert frame count, Buffer type, order and every byte, retaining the original comparison for mismatch diagnostics. Keep the independent complete-frame encoder and the real 1 MiB HTTP response, headers and streaming checks.
Why
Known timer waits, Promise scheduling before listing can start, and recursive Buffer-property comparisons add substantial fixture work. These changes exercise the same contracts directly. Production behavior and real runtime-contract clocks remain unchanged.
Measured on macOS arm64/M4 Max, Node 24.20.0, Bun 1.4.2, Vitest 5.0.3:
Each cohort used three sequential complete
pnpm testruns before, then three after, on an unchanged checkout except its measured fixture changes. No excluded warmup. Times include startup, setup, real operations, assertions, cleanup, reporting and exit. All 24 measured runs passed with identical file/case identities and outcomes in their cohort. These separate gains must not be added together. The 2× full-suite target remains unmet.Raw samples in seconds:
Ranges: Codex 38.2021–38.7895s → 7.8231–7.9602s; files 8.2496–8.3910s → 6.2061–6.7955s; bytes 10.3185–10.4172s → 3.8601–3.9225s. Claude range: 18.4429–18.6224s → 3.3355–3.3991s, measured at
334f83de115dwith only its test file changed. The byte comparison was measured at9cec1c4706f4with only its two test files changed; the reference frame generator was byte-identical before/after.Reproduce each cohort separately:
Linked Issue
Maintainer-requested test-performance follow-up. Targets main after #25998 merged; this PR adds seven test-file changes. Each measured cohort retains its frozen-source results above. Incorporates the file fixtures previously proposed in #26002 to avoid duplicate full CI runs. The Bun localization check remains a separate PR, #25999.
Visual Proof
N/A — test fixtures and assertions only; no rendered UI or interaction change.
Testing
Final qualification on head
5d0e5e3575c0: all 32 checks are terminal and passing or intentionally skipped, including all five full unit shards and final aggregate gates. CodeRabbit found no actionable issues or unresolved threads. A local combined full run on6ccaf42122448failed four cases while another workspace ran a complete suite concurrently; one failure was the unchanged 60s async cleanup hook in the large-file fixture, with no reported inventory assertion failure. Three subsequent quiet standard Bun/Vitest runs preserved the two-file, three-case cohort, exact names/outcomes and original deadlines, and completed cleanup successfully (7.1494s / 6.2189s / 5.6401s). Those reruns establish correctness rather than a new performance comparison; contention is a plausible cause of the timeout, not a proven diagnosis.macOS arm64: all measured runs preserve case identities and outcomes; all 66 cases pass under the Node fallback. Node typecheck, changed-code quality, formatting and lint pass. Terminal setup finishes before clock replacement, asynchronous rejection is observed during advancement, and teardown restores real timers. The five Claude cases retain all note, turn and event assertions, and also check the grace-minus-one boundary before completing. Existing integration cases retain their complete workloads. An independent byte-assertion probe verified rejection of changed bytes, missing frames and reordered frames.
Review
Independently reviewed real setup and timer-installation barriers, deadline boundaries, file counts/content, cleanup and byte-assertion equivalence. No workloads shrunk, assertions removed, skips added, deadlines reduced or production code changed. Native byte checks retain complete frame order and content, with original mismatch diagnostics.
Agent skill upstream boundary
Notes
Uses cross-platform timer, file/path and Buffer APIs. SQLite/runtime fixtures retain Node. No SSH protocol, platform behavior, native binary or window activation changes.
Checklist