Repository navigation
fix(tts): make test_isolation_mode_in_process_vs_subprocess host-family-aware (#2696) - #2697
rollroyces wants to merge 1 commit into
Conversation
…ly-aware (debpalash#2696) The assertion was added in commit 8e2928c (Sep 9 2026) with the comment 'The pre-existing OmniVoice backend is in-process — sanity check.' A later change in tts_backend.py introduced _effective_backend_class, which intentionally routes the canonical omnivoice id to the killable OmniVoiceMPSSubprocessBackend on Apple Silicon hosts. The new behaviour is documented in list_backends() and the comment for the 'omnivoice-subprocess' lazy-registry entry; the test was simply forgotten. On every Linux/Windows CI runner (host_family != mps) the assertion still passes; on every Apple Silicon Mac it now reads 'isolated_mode = subprocess' and fails. Local contributors see a red CI on a single test that is not a real regression, which masks any genuine future failure of the same test. Make the assertion host-family-aware: 'in-process' on non-MPS hosts, 'subprocess' on MPS hosts. The behaviour is unchanged; only the test adapts to it. Detected by detect_host_caps() — the same signal the underlying production code uses. Fixes debpalash#2696.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to This change aligns the isolation-mode test with the host-dependent behavior described for the backend; no production behavior changes, so no material merge risk remains. Pre-merge checks |
|
|
[Low impact] The PR appears safe to merge.
|
Summary
tests/backend/services/test_tts_backend_registry.py::test_isolation_mode_in_process_vs_subprocessfails on every Apple Silicon Mac. The assertion was added before_effective_backend_class()started routing the canonicalomnivoiceid toOmniVoiceMPSSubprocessBackendon MPS hosts — a documented, intentional behaviour. The test was forgotten and the stale comment "The pre-existing OmniVoice backend is in-process — sanity check." stayed in.This PR makes the assertion host-family-aware:
in-processon non-MPS hosts,subprocesson MPS hosts. The behaviour is unchanged; only the test adapts to it.detect_host_caps()is the same signal the production code uses, so there is no new dependency.Fixes #2696.
Changes
tests/backend/services/test_tts_backend_registry.py(line ~276): replaced the unconditionalassert out["omnivoice"]["isolation_mode"] == "in-process"with a host-family-aware assertion. The pre-existingfake-subandhealthy-inprocassertions are unchanged. The replacement comment documents WHY the assertion is now branched, with a pointer to the production docstring intts_backend.py:list_backends().Why the test was wrong, not the code
tts_backend.py:_effective_backend_class()was added later than the test and intentionally routesomnivoicetoOmniVoiceMPSSubprocessBackendon Apple Silicon.list_backends(): "On MPS, the canonicalomnivoiceid already resolves to the killable OmniVoice sidecar."omnivoice-subprocesslazy-registry entry exists to keep the configurableOMNIVOICE_TTS_BACKEND=omnivoice-subprocessoverride working, not to expose a second runtime.subprocesson Apple Silicon,in-processeverywhere else — and the test must read the same signal the runtime reads.Type
Testing
uv run --frozen pytest 'tests/backend/services/test_tts_backend_registry.py::test_isolation_mode_in_process_vs_subprocess' -q→ 1 passed (this host is Apple Silicon)uv run --frozen pytest tests/backend/services/test_tts_backend_registry.py -q→ 15 passed (whole file, no regression)assert 'subprocess' == 'in-process'. Un-stashed, it passes again. The "fails without this change" criterion is satisfied.Checklist
mainfix(tts): …)rollroyceswith AI assistance; reviewed, accepted, and signed)The test now expects
omnivoiceisolation mode to be"subprocess"on MPS hosts and"in-process"on other hosts. This matches the existing MPS routing and corrects the stale assertion without changing runtime behavior. No specific merge risk is evident from the supplied changes.