Repository navigation
test(audio): give the non-readiness cases an isolation budget - #6682
Conversation
"native open and non-readiness events cannot claim readiness" shortened the product's 15 s ready timeout to 20 ms. The timer starts before the socket opens, so on a loaded runner it fired before the client sent session.update, and the expected [session.update, session.close] came back empty (macOS control, run 37457452698). Use isolationBudgetMs, the helper for exactly this: 20 ms locally, a 5 s floor under CI or the full suite.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
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 audio-live CLI test now uses the CI watchdog helper to set the readiness timeout budget in the native non-readiness-event test. ChangesAudio-live test
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Other Merge Risk: ⚪ Minimal · up to The change adjusts the non-readiness test's timeout budget, with no product-code changes or actionable merge risk established by the supplied context. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50e1972655
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| expect(await handleAccessAudioCommand(argv, deps(f.server.port!, { audioReadyTimeoutMs: 20 }))).toBe(1); | ||
| // The ready timer starts before the socket opens; a 20 ms budget can expire before the | ||
| // client sends session.update on a loaded runner (macOS control, run 37457452698). | ||
| expect(await handleAccessAudioCommand(argv, deps(f.server.port!, { audioReadyTimeoutMs: isolationBudgetMs(20) }))).toBe(1); |
There was a problem hiding this comment.
Keep the scaled budget below the Bun test timeout
When this file runs through the repository's standard bun run test, focused-test, or test:changed wrapper, scripts/test.ts sets OCX_TEST_FULL_SUITE=1, so this call waits at least 5,000 ms on POSIX and 8,000 ms on Windows. However, the wrapper does not pass --timeout; bun test --help confirms that Bun's default per-test timeout is 5,000 ms. Because the product timer is armed only after this test has already started, these three cases time out before handleAccessAudioCommand can resolve, making the documented local validation commands fail deterministically. Either give the wrapper a larger per-test timeout or keep this test's scaled readiness budget strictly below that timeout.
AGENTS.md reference: AGENTS.md:L221-L223
Useful? React with 👍 / 👎.
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer integration (admin squash) per the owner's instruction. Exact head |
|
Maintainer integration (admin squash) per the owner's instruction. Exact head |
Summary
tests/cli/cli-access-audio-live.test.tsshortened the live audio ready timeout from 15 s to 20 ms for its three non-readiness cases. The timer starts before the WebSocket opens, so on a loaded runner it can fire before the client sendssession.update; the macOS control on run 37457452698 then saw[]where the test expects["session.update", "session.close"]. The cases now useisolationBudgetMs(20)fromtests/helpers/ci-watchdog.ts, which keeps 20 ms locally and raises the floor to 5 s under CI or the full suite. Product code is unchanged.Verification
tsc --noEmitexit 0.Checklist
devSummary by CodeRabbit