Skip to content

test(audio): give the non-readiness cases an isolation budget - #6682

Merged
lidge-jun merged 1 commit into
devfrom
codex/audio-live-ready-budget
Oct 6, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/audio-live-ready-budget

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

tests/cli/cli-access-audio-live.test.ts shortened 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 sends session.update; the macOS control on run 37457452698 then saw [] where the test expects ["session.update", "session.close"]. The cases now use isolationBudgetMs(20) from tests/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

  • Test-only change; no local tests were run, per the owner's instruction. Hosted PR CI runs the file on Linux and macOS.
  • tsc --noEmit exit 0.

Checklist

  • Targets dev
  • Test-only; no product behavior change
  • No secrets or private data

Summary by CodeRabbit

  • Tests
    • Adjusted the audio-live CLI test’s readiness timeout to account for CI isolation.

"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.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 6, 2026 11:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T11:50:50.893424Z 50e1972 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 98dae4a4-276e-4c96-b097-06e08046e21e
📥 Commits

Reviewing files that changed from the base of the PR and between d01d36d and 50e1972.

📒 Files selected for processing (1)
  • tests/cli/cli-access-audio-live.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The audio-live CLI test now uses the CI watchdog helper to set the readiness timeout budget in the native non-readiness-event test.

Changes

Audio-live test

Layer / File(s) Summary
Use the watchdog timeout budget
tests/cli/cli-access-audio-live.test.ts
The test imports isolationBudgetMs and passes isolationBudgetMs(20) instead of a fixed 20 ms timeout. The change is at lines 6 and 129–131.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 50e19

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)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding an isolation budget to the audio-live non-readiness tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun
lidge-jun merged commit f494403 into dev Oct 6, 2026
31 of 33 checks passed
@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration (admin squash) per the owner's instruction. Exact head 50e1972655: PR CI run 37458840738 success (13 jobs, 11 deliberate skips). Test-only change. No local tests were run (owner instruction).

@lidge-jun
lidge-jun deleted the codex/audio-live-ready-budget branch October 6, 2026 12:17
@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration (admin squash) per the owner's instruction. Exact head 50e1972655: PR CI run 37458840738 success (13 jobs, 11 deliberate skips). Test-only change. No local tests were run (owner instruction).

@lidge-jun lidge-jun mentioned this pull request Oct 6, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant