From 541fad3c3c871b60d60e9c37669b3a2d7f4eb651 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:28:54 -0700 Subject: [PATCH] test(cron): reconcile summarizer tests with honest chain wording and composed no_agent gate The cherry-picked tests predate #85508's honest fallback-chain phrasing and each other: assertions pinned the old 'exhausted or unavailable' literal and #83188's no_agent fallback-note behavior, which #77648's mode gate supersedes (no provider classification at all for no_agent jobs). Assert the composed contract instead. --- tests/cron/test_cron_no_agent.py | 4 +++- tests/cron/test_scheduler.py | 16 +++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/cron/test_cron_no_agent.py b/tests/cron/test_cron_no_agent.py index 2dc29b40f3..6378e4bde6 100644 --- a/tests/cron/test_cron_no_agent.py +++ b/tests/cron/test_cron_no_agent.py @@ -207,7 +207,9 @@ def test_agent_provider_timeout_delivery_keeps_fallback_guidance(hermes_env, mon assert scheduler.run_one_job(job) is True assert len(delivered) == 1 assert "provider timeout" in delivered[0].lower() - assert "fallback chain was exhausted or unavailable" in delivered[0].lower() + # Chain wording is now honest (#85508): exhausted when configured, + # "no fallback chain configured" guidance otherwise. + assert "fallback chain" in delivered[0].lower() # --------------------------------------------------------------------------- diff --git a/tests/cron/test_scheduler.py b/tests/cron/test_scheduler.py index 2aade5c04e..199c7b3892 100644 --- a/tests/cron/test_scheduler.py +++ b/tests/cron/test_scheduler.py @@ -42,7 +42,9 @@ class TestSummarizeCronFailureForDelivery: ) assert "provider rate limit" in summary - assert "Fallback chain was exhausted or unavailable" in summary + # Chain wording is now honest (#85508): either the exhausted phrase + # (chain configured) or the "No fallback chain configured" guidance. + assert "fallback chain" in summary.lower() def test_no_agent_rate_limit_does_not_claim_a_fallback_chain(self): summary = _summarize_cron_failure_for_delivery( @@ -50,8 +52,11 @@ class TestSummarizeCronFailureForDelivery: "HTTP 429: Too Many Requests", ) - assert "provider rate limit" in summary - assert "Fallback chain" not in summary + # Composed with #77648: a no_agent job never gets provider-shaped + # classification at all — the generic cleaner reports the script's + # own error instead. + assert "provider" not in summary.lower() + assert "fallback chain" not in summary.lower() def test_no_agent_timeout_is_identified_as_a_script_timeout(self): summary = _summarize_cron_failure_for_delivery( @@ -59,9 +64,10 @@ class TestSummarizeCronFailureForDelivery: "Script timed out after 3600s", ) - assert "script timeout" in summary + assert "script timed out" in summary + assert "No model was invoked" in summary assert "provider timeout" not in summary - assert "Fallback chain" not in summary + assert "fallback chain" not in summary.lower() class TestPerJobToolsetMcpMerge: