Skip to content

The agent that grows with you

fix(ci): stabilize macOS tool and process coverage

ethernetdd3d51d316b7
diff --git a/.github/workflows/tests-os.yml b/.github/workflows/tests-os.yml
index 19d1956a422..998f39ee108 100644
--- a/.github/workflows/tests-os.yml
+++ b/.github/workflows/tests-os.yml
@@ -81,6 +81,7 @@ jobs:
- name: Set up locked Python and test dependencies
uses: ./.github/actions/setup-pm
with:
+ packages: ripgrep
extras: '["all", "dev", "telegram", "anthropic", "mistral", "fal", "modal", "daytona", "hindsight", "parallel-web"]'
prune-python-cache: true
diff --git a/tests/hermes_cli/test_dashboard_procs_kill_grace.py b/tests/hermes_cli/test_dashboard_procs_kill_grace.py
index c11e5654e77..4b8437cc1a9 100644
--- a/tests/hermes_cli/test_dashboard_procs_kill_grace.py
+++ b/tests/hermes_cli/test_dashboard_procs_kill_grace.py
@@ -191,7 +191,9 @@ _STOPPER_CHILD = textwrap.dedent(
snapshot = dp._posix_descendants([backend])
killed, failed = [], []
dp._kill_pids_posix([backend], killed, failed)
- marker.write_text(f"{os.getpid() in snapshot} {killed} {failed}")
+ tmp = marker.with_suffix(".tmp")
+ tmp.write_text(f"{os.getpid() in snapshot} {killed} {failed}")
+ os.replace(tmp, marker)
"""
)
@@ -216,11 +218,14 @@ def test_stopper_running_as_backend_descendant_survives_the_sweep(tmp_path):
stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
)
try:
+ # The marker is the stopper's LAST act, written after its post-kill descendant sweep; the
+ # backend's SIGKILL is observable before that, so wait for the marker, not the exit.
deadline = time.monotonic() + 30.0
- while backend.poll() is None and time.monotonic() < deadline:
+ while not marker.exists() and time.monotonic() < deadline:
time.sleep(0.05)
- assert backend.returncode == -signal.SIGKILL, "the stopper never SIGKILLed the wedged backend"
assert marker.exists(), "stopper died before finishing the stop: it swept itself"
+ backend.wait(timeout=10)
+ assert backend.returncode == -signal.SIGKILL, "the stopper never SIGKILLed the wedged backend"
in_snapshot, _, rest = marker.read_text().partition(" ")
assert in_snapshot == "False"
assert rest == f"[{backend.pid}] []"
diff --git a/tests/tools/test_kill_verify_tree_death.py b/tests/tools/test_kill_verify_tree_death.py
index 22729852cd7..eec7c04d83b 100644
--- a/tests/tools/test_kill_verify_tree_death.py
+++ b/tests/tools/test_kill_verify_tree_death.py
@@ -105,6 +105,7 @@ def test_kill_with_dead_tree_still_reports_killed():
@pytest.mark.platforms("posix") # POSIX signal escalation; Windows uses taskkill
[email protected]_system_guard_bypass # SIGKILL may target a snapshotted child after it is reparented
def test_escalated_kill_of_sigterm_ignoring_child_reports_killed(tmp_path, monkeypatch):
"""The #115490 scenario itself: a child that ignores SIGTERM is SIGKILLed after the grace
window, and the verification must give the kernel a moment to reap it — poll() right