Skip to content

Tests: lift engine coverage for the AirPods fix past the 88% gate - #141

Merged
alexkroman merged 1 commit into
claude/airpods-lag-diagnosis-63h108from
test/airpods-coverage-lift
Aug 13, 2026
Merged

Tests: lift engine coverage for the AirPods fix past the 88% gate#141
alexkroman merged 1 commit into
claude/airpods-lag-diagnosis-63h108from
test/airpods-coverage-lift

Conversation

@claude

@claude claude Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Requested by Dylan Fox · Slack thread

Tests only — no production changes. Adds Tests/BlurtEngineTests/MicCaptureWarmTests.swift, covering the warm-recorder lifecycle in MicCapture+Warm.swift: prepare-once via warmUp(), the bringingUpCapture refusal window, device-identity validation in takeWarmRecorder(matching:) (reuse, device-change discard, unreadable-route discard on either side), the stale-expiry generation ticket in releasePreparedRecorder(generation:), and the scheduled re-warm.

Why: #133 keeps failing the merge queue deterministically at 87.37% engine line coverage against the 88% floor #139 raised (all 574 tests pass). MicCapture+Warm.swift is gate-counted — the gate's exclusion regex matches only Audio/MicCapture.swift and Audio/AudioRoute(Monitor)?.swift literally — but had no tests, which is where the shortfall lives. Its lifecycle logic never begins capture, so it runs off-hardware; the device-identity tests inject their own AudioRoute.InputSnapshot rather than reading the runner's real routing. Merging this into the branch should clear the gate.

Verification: scripts/check.sh --portable is green locally; the tests were authored off-Mac, so CI on this PR is the compile/coverage verification.


Generated by Claude Code

MicCapture+Warm.swift is gate-counted (the coverage exclusion matches only
Audio/MicCapture.swift itself) but had no tests, which is what holds the
branch at 87.37% against the 88% floor. Cover the warm lifecycle's decisions
off-hardware: prepare-once, the bring-up-window refusal, device-identity
validation before reuse, the stale-expiry generation ticket, and the
scheduled re-warm. Device identity is driven through an injected input
snapshot so the test machine's real routing never decides a test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CNFeP9D8k1HJ1piwyidUv3
@alexkroman
alexkroman merged commit 81a3d81 into claude/airpods-lag-diagnosis-63h108 Aug 13, 2026
1 check passed
@alexkroman
alexkroman deleted the test/airpods-coverage-lift branch August 13, 2026 21:49
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.

2 participants