diff --git a/tests/conftest.py b/tests/conftest.py index 274fc56..cf6beb8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -64,7 +64,9 @@ def write_script_launcher(directory: Path, name: str, body: str) -> Path: sidecar.write_text(body, encoding="utf-8") if sys.platform == "win32": launcher = directory / f"{name}.cmd" - launcher.write_text(f'@"{sys.executable}" "{sidecar}" %*\r\n', encoding="utf-8") + # `\n`, not `\r\n`: write_text translates it to the CRLF cmd wants, so an + # explicit `\r` would land on disk doubled (`\r\r\n`). + launcher.write_text(f'@"{sys.executable}" "{sidecar}" %*\n', encoding="utf-8") else: launcher = directory / name launcher.write_text( diff --git a/tests/test_engine.py b/tests/test_engine.py index 78703b7..f3b2ada 100644 --- a/tests/test_engine.py +++ b/tests/test_engine.py @@ -11,6 +11,7 @@ import pytest from conftest import ( + _OK, _file_exists_cmd, _spec_baseline, committing_crash_state, @@ -4739,9 +4740,6 @@ def test_fix_phase_session_env_fault_escalates(project): burning the remaining dev budget on repair sessions that never ran.""" write_sprint(project, {"1-1-a": "ready-for-dev"}) marker = project.project / "fixed.marker" - script = project.project / "check.sh" - script.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8") - script.chmod(0o755) def dev_with_marker(spec): marker.write_text("ok\n") @@ -4757,7 +4755,10 @@ def breaking_review(spec): policy = Policy( gates=GatesPolicy(mode="none"), notify=QUIET, - verify=VerifyPolicy(commands=(_file_exists_cmd(marker), f'"{script}"')), + # `_OK`, not a script file (#292): verify commands run through the host shell, + # and cmd hands a `.sh` path to ShellExecute instead of running it. Only the + # marker command carries signal here — the escalation is the session's. + verify=VerifyPolicy(commands=(_file_exists_cmd(marker), _OK)), limits=LimitsPolicy(max_dev_attempts=3), # budget left -> must not be spent ) engine, adapter = make_engine(