fix: unpark the parked CI reds — Patrick ruling: red CI is never parked. @prax: relay mtime-cache flake root-caused (test relied on two writes sharing one mtime-granularity window — true locally, false on CI) — os.utime pins mtime so the cache contract tests deterministically, 50/50+20/20 loops green. @hooks: 4 Windows session_boot reds — _tmux_session_exists() real subprocess spawn (no tmux on Windows, WinError 2) mocked per ca096295 convention, execvp already mocked = zero real spawns left. 1028 prax + 102 session_boot green, devpulse-verified.
This commit is contained in:
@@ -39,6 +39,18 @@ PyPI version — not the changelog header.
|
||||
remaining Windows session_boot reds and the relay mtime-cache flake predate
|
||||
this PR and stay parked.
|
||||
|
||||
- **The parked reds, unparked — Patrick's ruling: red CI is never parked.**
|
||||
"If CI is red, it's because you or I left it red." Both remaining reds fixed
|
||||
by their owners the same hour. @prax root-caused the relay mtime-cache flake:
|
||||
the test only passed when two writes landed in the same mtime-granularity
|
||||
window (true locally, false on CI runners) — fixed by pinning mtime with
|
||||
`os.utime` so the cache contract is tested deterministically, proven 50/50 +
|
||||
20/20 loops. @hooks root-caused the four Windows session_boot reds: the boot
|
||||
path's `_tmux_session_exists()` ran a real `subprocess.run(["tmux", ...])`
|
||||
that Windows runners can't satisfy (WinError 2) — mocked in all four tests
|
||||
per the ca096295 convention, leaving `execvp` (already mocked) as the only
|
||||
terminal call. Ruling recorded in compass; the "forget CI" era is over.
|
||||
|
||||
## [2026-07-14]
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -206,6 +206,7 @@ class TestBoot:
|
||||
patch.object(session_boot, "_find_live_sessions", return_value=live),
|
||||
patch.object(session_boot, "_read_choice", return_value=""),
|
||||
patch.object(session_boot, "_find_tmux_session_for_pid", return_value=None),
|
||||
patch.object(session_boot, "_tmux_session_exists", return_value=False),
|
||||
patch(f"{_MOD}.os.execvp") as mock_exec,
|
||||
):
|
||||
session_boot.boot(cwd=str(tmp_path))
|
||||
@@ -264,6 +265,7 @@ class TestBoot:
|
||||
patch.object(session_boot, "_find_tmux", return_value="/usr/bin/tmux"),
|
||||
patch.object(session_boot, "_find_live_sessions", return_value=[]),
|
||||
patch.object(session_boot, "_read_choice", return_value=""),
|
||||
patch.object(session_boot, "_tmux_session_exists", return_value=False),
|
||||
patch(f"{_MOD}.os.execvp") as mock_exec,
|
||||
):
|
||||
session_boot.boot(cwd=str(tmp_path))
|
||||
@@ -892,6 +894,7 @@ class TestExtraArgsThreading:
|
||||
patch.object(session_boot, "_find_tmux", return_value="/usr/bin/tmux"),
|
||||
patch.object(session_boot, "_find_live_sessions", return_value=[]),
|
||||
patch.object(session_boot, "_read_choice", return_value=""),
|
||||
patch.object(session_boot, "_tmux_session_exists", return_value=False),
|
||||
patch(f"{_MOD}.os.execvp") as mock_exec,
|
||||
):
|
||||
session_boot.boot(cwd=str(tmp_path), extra_args=["--permission-mode", "plan"])
|
||||
@@ -1065,6 +1068,7 @@ class TestAutoNamer:
|
||||
patch.object(session_boot, "_find_tmux", return_value="/usr/bin/tmux"),
|
||||
patch.object(session_boot, "_find_live_sessions", return_value=[]),
|
||||
patch.object(session_boot, "_read_choice", return_value=""),
|
||||
patch.object(session_boot, "_tmux_session_exists", return_value=False),
|
||||
patch(f"{_MOD}.os.execvp") as mock_exec,
|
||||
):
|
||||
session_boot.boot(cwd=str(tmp_path))
|
||||
|
||||
@@ -450,12 +450,16 @@ class TestReadControl:
|
||||
|
||||
def test_mtime_cache_avoids_reread(self, tmp_path):
|
||||
"""Same mtime returns cached result without re-reading the file."""
|
||||
import os
|
||||
|
||||
relay = _import_relay()
|
||||
ctrl = tmp_path / "control.json"
|
||||
ctrl.write_text(json.dumps({"paused": False}))
|
||||
setattr(relay, "CONTROL_FILE", ctrl)
|
||||
first = relay._read_control()
|
||||
cached_mtime = ctrl.stat().st_mtime
|
||||
ctrl.write_text("INVALID JSON")
|
||||
os.utime(ctrl, (cached_mtime, cached_mtime))
|
||||
result = relay._read_control()
|
||||
assert result == first
|
||||
|
||||
|
||||
Reference in New Issue
Block a user