Summary
tests/test_engine.py::test_fix_phase_session_env_fault_escalates builds a POSIX verify script (check.sh with a #!/bin/sh shebang) and puts "<path>/check.sh" into VerifyPolicy(commands=...). The engine runs verify commands through the host shell — cmd /c on Windows — and cmd hands a document path to ShellExecute. On a machine with no .sh association (stock Windows), that pops the interactive "How do you want to open this file?" picker in the middle of the test run.
Its three sibling tests in the same file (test_review_verify_env_fault_escalates_instead_of_fix_session, test_skip_review_env_fault_escalates_not_defers, test_fix_phase_env_fault_escalates_instead_of_looping) all carry @pytest.mark.skipif(sys.platform == "win32", ...); this one does not.
Why it goes unnoticed
The test still passes on Windows — the fault it asserts comes from the injected SessionResult(env_fault=True), not from the script's exit code — so CI stays green and nothing flags it. The only symptom is a GUI dialog stealing focus on every local full-suite run (observed on Windows 11 during the #254 verification runs; confirmed root cause via cmd /c assoc .sh → "File association not found").
Suggested fix
The test's subject (#194: a fix session that lost its API connection escalates instead of burning dev budget) is not POSIX-specific, so a skip would lose real Windows coverage. Prefer a per-OS script, mirroring the platform split tests/conftest.py already uses for verify commands:
if sys.platform == "win32":
script = project.project / "check.cmd"
script.write_text("@exit 0\r\n", encoding="utf-8")
else:
script = project.project / "check.sh"
script.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8")
script.chmod(0o755)
Refs: #194
Summary
tests/test_engine.py::test_fix_phase_session_env_fault_escalatesbuilds a POSIX verify script (check.shwith a#!/bin/shshebang) and puts"<path>/check.sh"intoVerifyPolicy(commands=...). The engine runs verify commands through the host shell —cmd /con Windows — and cmd hands a document path to ShellExecute. On a machine with no.shassociation (stock Windows), that pops the interactive "How do you want to open this file?" picker in the middle of the test run.Its three sibling tests in the same file (
test_review_verify_env_fault_escalates_instead_of_fix_session,test_skip_review_env_fault_escalates_not_defers,test_fix_phase_env_fault_escalates_instead_of_looping) all carry@pytest.mark.skipif(sys.platform == "win32", ...); this one does not.Why it goes unnoticed
The test still passes on Windows — the fault it asserts comes from the injected
SessionResult(env_fault=True), not from the script's exit code — so CI stays green and nothing flags it. The only symptom is a GUI dialog stealing focus on every local full-suite run (observed on Windows 11 during the #254 verification runs; confirmed root cause viacmd /c assoc .sh→ "File association not found").Suggested fix
The test's subject (#194: a fix session that lost its API connection escalates instead of burning dev budget) is not POSIX-specific, so a skip would lose real Windows coverage. Prefer a per-OS script, mirroring the platform split
tests/conftest.pyalready uses for verify commands:Refs: #194