fix: recover from microphone disconnects
PR and Push Build/Test / build-and-test (push) Successful in 12m29s

This commit is contained in:
2026-08-03 15:57:30 +02:00
parent 75250f6041
commit b9547ae4c4
16 changed files with 574 additions and 40 deletions
@@ -0,0 +1,14 @@
## 1. Microphone recovery behavior
- [x] 1.1 Add a failing behavior test proving active microphone capture moves to a newly resolved capture source after the current source fails.
- [x] 1.2 Refactor the microphone device-provider boundary so recovery orchestration is platform-independent and individual NAudio capture lifetimes remain Windows-specific.
- [x] 1.3 Implement bounded-delay microphone recovery that re-resolves devices after creation failures, capture failures, and unexpected capture completion until recording cancellation.
- [x] 1.4 Add coverage proving capture recovers when no microphone is initially available and a later resolution succeeds.
- [x] 1.5 Add a failing selection test and fall back to an active endpoint when the selected and Windows-default endpoints are unavailable.
## 2. Verification
- [x] 2.1 Refactor the touched capture path for DRYness, SOLID boundaries, and KISS while preserving behavior.
- [x] 2.2 Run the focused microphone-selection and audio-source behavior tests plus the Windows application build.
- [x] 2.3 Run the full solution test suite and `openspec validate recover-microphone-disconnect --strict`.
- [x] 2.4 Verify the local health and recording-status surfaces without interrupting an active meeting run.