The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(cron): R3-S4 pin observable diagnostics without boundary races
yoniebansf28d961d0db8
diff --git a/tests/hermes_cli/test_cron_satellite_diagnostics.py b/tests/hermes_cli/test_cron_satellite_diagnostics.pyindex be2e2133e97..bead63f9089 100644--- a/tests/hermes_cli/test_cron_satellite_diagnostics.py+++ b/tests/hermes_cli/test_cron_satellite_diagnostics.py@@ -62,7 +62,8 @@ def test_status_preserves_profile_health_contract(served_root, capsys, monkeypatassert "has not reported a heartbeat" in outputif mode == "stale":assert "STALLED" in output- if mode in {"disabled", "excluded"}:+ if mode in {"disabled", "excluded", "unrelated_pid"}:+ assert "Gateway is not running" in outputassert "hermes gateway install" in outputassert "sudo hermes gateway install --system" in outputassert "hermes gateway run" in output@@ -114,10 +115,10 @@ def test_standalone_guidance_matches_profile_membership(served_root, monkeypatchassert ("hermes --profile default gateway restart" in output) == (home_kind == "named")[email protected]("detail", ["unreachable " * 30 + "\nsecret second line", "", None])[email protected]("detail", ["unreachable " * 30 + "\nsecret second line", ""])def test_doctor_bounds_persisted_fire_errors(served_root, capsys, detail):from cron import jobs- from hermes_cli.cron import _short_reason, cron_doctor+ from hermes_cli.cron import cron_doctorjobs.create_job(prompt="probe", schedule="every 1h")records = jobs.load_jobs()@@ -126,7 +127,9 @@ def test_doctor_bounds_persisted_fire_errors(served_root, capsys, detail):assert cron_doctor() == bool(detail)output = capsys.readouterr().outif detail:- assert f"missed scheduled fire at test-time: {_short_reason(detail)}" in output+ assert "missed scheduled fire at test-time: unreachable" in output+ line = next(line for line in output.splitlines() if "missed scheduled fire at" in line)+ assert len(line) < 200assert detail not in outputassert "secret second line" not in outputelse:@@ -143,7 +146,7 @@ def test_doctor_reports_persisted_dispatch_health(served_root, capsys, dispatch)jobs.note_fire_forward_failure(job["id"], "loopback unavailable")else:records = jobs.load_jobs()- delay = timedelta(hours=5) if dispatch == "catch_up" else timedelta(minutes=5)+ delay = timedelta(hours=5) if dispatch == "catch_up" else timedelta(minutes=6)records[0]["next_run_at"] = (datetime.now(timezone.utc) - delay).isoformat()jobs.save_jobs(records)assert len(jobs.get_due_jobs()) == 1diff --git a/tests/hermes_cli/test_gateway_multiplex_served_record.py b/tests/hermes_cli/test_gateway_multiplex_served_record.pyindex aedc30d6d92..844a69f8d27 100644--- a/tests/hermes_cli/test_gateway_multiplex_served_record.py+++ b/tests/hermes_cli/test_gateway_multiplex_served_record.py@@ -166,7 +166,7 @@ def test_service_verbs_refuse_served_profile_with_exit_78(served_root, monkeypatassert calls, f"--force must let `gateway {verb}` reach the service manager"-def test_status_surfaces_agree_for_a_satellite_profile(served_root, monkeypatch):+def test_satellite_gateway_identity_does_not_imply_cron_health(served_root, monkeypatch):import hermes_cli.gateway as gwimport hermes_cli.status as stimport hermes_cli.cron as cr