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.
This commit is contained in:
Teknium
2026-08-13 11:28:54 -07:00
parent efbbc993f6
commit 541fad3c3c
2 changed files with 14 additions and 6 deletions

View File

@@ -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()
# ---------------------------------------------------------------------------

View File

@@ -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: