Repository navigation
fix(eval): read a usage-limit outage as a harness failure, not a bad answer - #4133
Conversation
…answer The code benchmark scored today's Anthropic weekly-limit rejection as a coding failure, so the model took the blame for an outage it never saw. `_AGENT_ERRORS` exists precisely to prevent that and none of its seven patterns matched the live text: "You've hit your weekly limit · resets Sep 23, 8am (America/Los_Angeles)". Matching on the lead-in rather than the wording that changes. The adjective rotates (weekly / 5-hour / daily), the reset date is different every time, the apostrophe is sometimes U+2019, and a U+00B7 sits between `limit` and `resets` — so `"hit your"` is the only span that survives all four. `"usage limit"` covers the "reached your usage limit" phrasing that lead-in misses. The canary's issue template called this a monthly spend limit. It is a weekly usage limit today and something else next quarter, so it now points at the error line instead of naming a period.
|
Verdict: Approve. The code benchmark was publishing quota outages as coding failures — a run that never reached the model came back as "0 solved". This marks those turns as harness errors and drops them from the solve rate, matching what the scorecard already does when the credit balance runs out. The markers are deliberately short so they survive the parts of the message that change every outage (the period, the reset date, the apostrophe, the separator), and the tests pin that. One thing worth adding before or after merge: nothing in the test suite locks in that a normal answer which happens to mention a limit still gets scored. A too-eager marker doesn't produce a visibly wrong number — it quietly removes a task from the denominator, which is the harder kind of mistake to notice later. The PR description argues this can't happen today; a two-line negative test would make that claim fail loudly if someone shortens a marker further. Real-world evidence
# before (base code_bench.py restored)
[1/7] FAIL edit-fix-bugs 4P/2F (0.8s)
[SCORE] solved 0/7 (0%) · generation 0/2 · editing 0/5
{"tasks": 7, "ran": 7, "errors": 0, ...}
# after
[1/7] ERR edit-fix-bugs 4P/2F (0.8s)
[SCORE] solved 0/0 (0%) · generation 0/0 · editing 0/0
{"tasks": 7, "ran": 0, "errors": 7, "solved": 0, "solve_rate": 0, ...}
results.json → error: agent could not run: hit yourThe second marker fires independently on wording that shares no adjective, date, apostrophe or separator ( 🔍 Technical detailsIssues🟢 No negative case pins the false-positive boundary (
🟢 Matching is case-sensitive ( Strengths
|
The code benchmark has been blaming the model for an outage it never saw. When Anthropic refuses a call because the account hit its usage limit, the agent's "answer" is the rejection notice — and
code_benchscored that as a failed coding task._AGENT_ERRORSexists specifically to stop that, but none of its seven patterns matched the text the API actually returns, so every run during the current weekly limit (#4080) is reporting coding failures that are really harness failures. After this, those tasks are markedagent could not runand excluded from the solve rate, which is what the scorecard already does for an exhausted credit balance.This only makes the outage legible. It does not restore eval coverage — the limit is real and resets Sep 23.
🔍 Technical details
The live rejection, verbatim from PR #4096 run
35706759444job106755245481:Four things in it change between outages, so the pattern deliberately avoids all of them:
weeklytoday,5-hourordailynext month', sometimes U+2019limitandresets— which is whyutil/'s"limit resets"pattern never fired either"hit your"is the only span that survives all four, and the match atcode_bench.py:591is a plain case-sensitivemarker in result.answer, so a short fragment is the robust shape."usage limit"is added alongside it for the "reached your usage limit" phrasing, which the lead-in misses.On false positives:
"hit your"is generic enough to be worth a second look, but it does not appear in ordinary benchmark answers — including ones that discuss limits ("the rate limit on the API is 60/min", "clamp the percent at its upper limit"). The failure mode if it ever did fire wrongly is a task excluded from scoring, not a wrong score.This is a second copy of outage classification. #4120 fixes the other one (
util/classify_claude_probe.py) and does not touch this file.The canary's issue template is a one-line wording fix in the same class: it told admins to raise "the monthly spend limit", but this is a weekly usage limit that lapses on its own. It now points at the error line rather than naming a period.
Test plan
python -m pytest tests/unit/test_code_bench.py -q→ 52 passedrun_taskand comes back asresult.error, not a failed tasktest_a_usage_limit_matches_whatever_the_adjective_and_date_arecovers a different adjective, a different date, U+2019, a leading BOM, and the "reached your usage limit" wordingtest_the_fixture_still_carries_the_separator_that_broke_the_matchfails if anyone normalises the U+00B7 to a hyphenpython util/lint.py --black --isort→ clean