Skip to content

X-Air test: count the mix-state queries instead of timing the read - #18

Merged
Skeyelab merged 1 commit into
mainfrom
fix/xair-mix-state-count
Dec 3, 2026
Merged

Skeyelab merged 1 commit into
mainfrom
fix/xair-mix-state-count

Conversation

@Skeyelab

@Skeyelab Skeyelab commented Dec 3, 2026

Copy link
Copy Markdown
Member

Refs ericdahl-dev/ShowRecorder#1249

The flake

XAirDriverTests "A Mixer that ignores mix-state queries still gives names, without a timeout per query" limited driver.sources to 3 s of wall clock. It failed on busy CI runners with nothing wrong:

  • ShowRecorder run 45054661598 (main, Debug): elapsed → 4.219958083 seconds; the test took 12.1 s in all.
  • ShowRecorder run 46191614497, attempt 2 (release/1.2, Debug): elapsed → 3.349081375 seconds.

Two of the 3 seconds were the test's own timeouts: the USB routing was left unanswered (1 s) and the first mix-state query is unanswered by design (1 s). That left 1 s for about 40 loopback round trips.

The fix

The test means: the driver asks for mix state once, gets no answer, and stops asking. The fake Mixer records every query, so the test now checks that exactly one mix-state query (/ch/01/mix/on) was sent. No clock.

  • The USB routing is answered, as in the other tests of this suite (#462), so the mix state is the only silence.
  • The reply timeout is Loopback.mixedTimeout (3 s) in place of 1 s, so a slow answer to a name on a busy runner is not taken for silence. It costs one 3 s wait.

Test only; no product code changes. Checked by reading and by macOS CI here: MixerLink needs Network.framework, so the test was not run locally (Linux).

ShowRecorder release/1.2 keeps its own copy of this test and needs the same change by hand.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VCgWWseQZtUzcSRzjqqQJQ

…howRecorder #1249)

The test for a Mixer that ignores mix-state queries limited the read to 3 s of wall clock. Two of those seconds
were its own timeouts (the USB routing and the first mix-state query, 1 s each), which left 1 s for about 40
loopback round trips; a busy CI runner took 4.22 s and 3.35 s with nothing wrong.

What the test means is that the driver asks for mix state once and then stops. The fake records every query, so
the test now checks that exactly one mix-state query was sent. The routing is answered, as in the other tests,
and the reply timeout is the shared 3 s one, so a slow answer to a name is not mistaken for silence.

Refs ericdahl-dev/ShowRecorder#1249

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgWWseQZtUzcSRzjqqQJQ
@Skeyelab
Skeyelab enabled auto-merge (squash) December 3, 2026 06:40
@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Skeyelab
Skeyelab merged commit 14526aa into main Dec 3, 2026
5 checks passed
@Skeyelab
Skeyelab deleted the fix/xair-mix-state-count branch December 3, 2026 06:45
Skeyelab added a commit that referenced this pull request Dec 3, 2026
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgWWseQZtUzcSRzjqqQJQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant