From ce31b6b0fbe99a4a0cbe5f9456b72a792ae98e8b Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 14 Oct 2026 21:52:32 +0200 Subject: [PATCH] docs(M4.3): close adapter selection milestone Record the completed selection-policy behavior and verification, and add read-only auto/manual probe checks to the user acceptance checklist. Validation: full locked workspace formatting, all-target/all-feature check/test, doctest, strict Clippy, release, and no-default-feature check/test gates passed. --- checklist.md | 18 ++++++++++++++++++ task.md | 15 ++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/checklist.md b/checklist.md index d8c3e1b..9b30af4 100644 --- a/checklist.md +++ b/checklist.md @@ -85,6 +85,24 @@ used by the earlier commands. - [ ] Confirm the command exits normally without `Disconnected`, event-lane overflow, or an owner-thread panic. +## Adapter selection milestone + +These probes are read-only and do not alter the saved profile or live volumes. + +- [ ] Run + `cargo run --locked -p volume_lib --example pulse_fixture -- probe auto`. + Confirm it prints `selected=pulse`, reports + `PulseAudio (on PipeWire ...)`, and lists application-stream, volume, mute, + and subscription capabilities as `true`. +- [ ] Run + `cargo run --locked -p volume_lib --example pulse_fixture -- probe pulse` + and confirm the explicit selection succeeds with the same server identity. +- [ ] Run + `cargo run --locked -p volume_lib --example pulse_fixture -- probe pipewire`. + This must fail with an actionable `not built`/`pipewire` feature diagnostic; + it must not silently select `pulse` after the manual request fails. +- [ ] Confirm none of these probe commands changes application volume or mute. + The main TUI is still explicitly backed by demo state at this milestone. Passing this checklist validates the real Pulse control boundary that will feed the server and live multi-application/group TUI; it does not yet validate MIDI or diff --git a/task.md b/task.md index 9730056..52d125e 100644 --- a/task.md +++ b/task.md @@ -113,7 +113,13 @@ Dependencies: M3. reused sink-input indexes. Contract tests cover connection failure, reconnect epochs, add/change/remove and external edits, stereo/multichannel writes, rejected operations, stale handles, and explicit overflow-driven resync. -- [ ] **M4.3 Adapter policy:** configured/CLI override, auto probe order/capabilities, diagnostics and feature errors. Tests: manual failure never falls back; auto chooses one authority, skips incapable candidates and never substitutes ALSA Master for applications; disconnect follows retry policy. +- [x] **M4.3 Adapter policy:** configured/CLI override, auto probe order/capabilities, diagnostics and feature errors. Tests: manual failure never falls back; auto chooses one authority, skips incapable candidates and never substitutes ALSA Master for applications; disconnect follows retry policy. + Validated profile choices and ordered preferences now translate into a typed + runtime policy, with a non-persistent session/CLI override taking precedence. + Probes retain server identity, capability, availability, and unbuilt-feature + diagnostics. Auto mode stops at its first capable authority; manual mode + never falls back; application profiles reject hardware-only candidates. + Disconnect backoff remains pinned to the selected authority until a reload. - [ ] **M4.4 Real-daemon fixture:** isolated playback streams and external control client. Acceptance: server command and external change both converge to the observed value/mute; stream churn and daemon restart recover. Document commands and opt-in fixture requirements; do not label mocks as hardware verification. M4.2 verification on 2026-10-14: the scripted worker contract suite passes @@ -124,6 +130,13 @@ doctests, strict Clippy, release build, and no-default-feature checks/tests pass on Rust 1.88.0. M4.1 still awaits the standalone PulseAudio fixture, and M0.2 still requires a real Jenkins run. +M4.3 verification on 2026-10-14: deterministic policy tests cover manual and +automatic selection, session override precedence, incapable/unavailable +candidates, ALSA application rejection, compiled-feature errors, single +authority, and bounded same-backend reconnect. A read-only auto probe selected +the Pulse adapter and reported `PulseAudio (on PipeWire 1.6.9)` version 15.0.0; +an explicit native PipeWire request failed visibly without fallback. + ## M5 — MIDI transport, device identity, and first controller Dependencies: M3; M4 for full end-to-end acceptance.