Files
VoiceStudio/backend/tests
Palash DebnathandClaude Opus 5 db48c7851c test: make the isolated backend session pass on Windows, and gate it there
Four tests in backend/tests/ cannot pass on a stock Windows checkout. The
`test` job runs that session on Linux only, so all four were invisible to CI
and hit every Windows contributor on their first `pytest` run — with failures
that have nothing to do with whatever they changed. Same class as #1990.

  - test_contained_subprocess_waitid_fallback.py simulates macOS by deleting
    os.waitid, then drives the fallback with os.waitpid/os.WNOHANG and
    start_new_session. Windows has none of those; os.WNOHANG is an
    AttributeError before the first assertion. The module is POSIX-only by
    premise, so it says so.
  - test_invalid_or_missing_desktop_drain_fd_fails_safe asserts a RuntimeError
    that cannot be raised off POSIX: backend_drain_fd returns None there before
    it reads the environment. The file already had this skipif on its sibling.
  - test_mps_proxy_survives_fatal_child_exit_and_recovers raced the OS. The
    child calls os._exit and the parent raises the moment its pipe hits EOF —
    before the process is reaped. Asserting poll() on the next line is a race
    Linux won and Windows lost every time. It waits for the death now, which is
    what the test actually claims.

Then the reason all four survived: nothing runs this session on Windows. The
smoke matrix already does a full `uv sync` there, so the session costs forty
seconds and now runs as a step in it. Verified green on Windows before adding
the gate — 355 passed, 8 skipped — so this cannot break main.

Kept to Windows deliberately: that is the platform I can verify here, and a
gate added blind on macOS would be a guess about a host I cannot run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ypcgSsh5j2PEonSJiAU1S
2026-09-10 00:34:58 -07:00
..