Tests: lift engine coverage for the AirPods fix past the 88% gate - #141
Merged
alexkroman merged 1 commit intoAug 13, 2026
Merged
Conversation
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
3 tasks
alexkroman
merged commit Aug 13, 2026
81a3d81
into
claude/airpods-lag-diagnosis-63h108
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Dylan Fox · Slack thread
Tests only — no production changes. Adds
Tests/BlurtEngineTests/MicCaptureWarmTests.swift, covering the warm-recorder lifecycle inMicCapture+Warm.swift: prepare-once viawarmUp(), thebringingUpCapturerefusal window, device-identity validation intakeWarmRecorder(matching:)(reuse, device-change discard, unreadable-route discard on either side), the stale-expiry generation ticket inreleasePreparedRecorder(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.swiftis gate-counted — the gate's exclusion regex matches onlyAudio/MicCapture.swiftandAudio/AudioRoute(Monitor)?.swiftliterally — 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 ownAudioRoute.InputSnapshotrather than reading the runner's real routing. Merging this into the branch should clear the gate.Verification:
scripts/check.sh --portableis green locally; the tests were authored off-Mac, so CI on this PR is the compile/coverage verification.Generated by Claude Code