From bd61ef532f301b3d36d768bcf9527db192114a32 Mon Sep 17 00:00:00 2001 From: Godopu Date: Sun, 25 Oct 2026 17:00:25 +0000 Subject: [PATCH] refactor(stall_watch): HerdrSource needs the herdr name, no fallback to the original (Issue #71) Refs #71 Co-Authored-By: Claude Opus 5.5 --- .agents/skills/lib_py/stall_watch.py | 4 ++-- tests/test_issue60_linux_fixes.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.agents/skills/lib_py/stall_watch.py b/.agents/skills/lib_py/stall_watch.py index 400c56b..7fa2717 100644 --- a/.agents/skills/lib_py/stall_watch.py +++ b/.agents/skills/lib_py/stall_watch.py @@ -155,12 +155,12 @@ class HerdrError(Exception): class HerdrSource(object): """Every herdr and OS read the judgement needs, in one place.""" - def __init__(self, target, agent, session=None, name=None): + def __init__(self, target, agent, session=None, *, name): self.target, self.session = target, session or None # `name` is the name herdr knows the agent by (#66), worked out once # by StallWatch (#71); the kind is read off the original name, whose # suffix a long name's hash replaces. - self.name = name or target + self.name = name self.agent = resolve_agent(agent, target) adapter = get_adapter(self.agent) if self.agent else None self.resident = tuple(adapter.resident_children) if adapter else () diff --git a/tests/test_issue60_linux_fixes.py b/tests/test_issue60_linux_fixes.py index 534585b..e5efcfc 100644 --- a/tests/test_issue60_linux_fixes.py +++ b/tests/test_issue60_linux_fixes.py @@ -96,7 +96,7 @@ def test_the_1x_capture_still_reads_empty(): @pytest.mark.parametrize("name", HOME_SCREENS) def test_stall_watch_sees_the_2x_home_box_empty(name, monkeypatch): - src = stall_watch.HerdrSource("t", "opencode") + src = stall_watch.HerdrSource("t", "opencode", name="t") monkeypatch.setattr(src, "_herdr", lambda *args: _pane(name)) assert src.input_empty() is True