test_vote_records_the_reason_each_attempt_failed¶
Tests › tests/test_grader.py
What this test is for
Why it exists
"3/3 calls failed" cannot tell a reader whether the judge was rate-limited, timed out, or replied without a verdict block — three failures needing three different responses. Recording only the tally made an unruled decision uninvestigable after the fact.
Given
monkeypatch.setattr(judge, "ask", lambda *_a, **_k: judge.Reply(error="rc=1: overloaded"))
When
voted = judge.vote("m", "a", "claude-x-1", 3)all("overloaded" in r for r in voted.reasons)monkeypatch.setattr(judge, "ask", lambda *_a, **_k: judge.Reply(text="I think it is fine."))voted = judge.vote("m", "a", "claude-x-1", 1)
Then
- ✓ voted.verdict is None
- ✓ voted.errors equals 3
- ✓ voted.reasons holds
- ✓ all("overloaded" in r for r in voted.reasons) holds
- ✓ voted.reasons[0] contains "no VERDICT line"
tests/test_grader.py:321 · its file's page
What it checks (3)
assert voted.verdict is None and voted.errors == 3observesvoteviavotedassert voted.reasons and all("overloaded" in r for r in voted.reasons)observesallassert "no VERDICT line" in voted.reasons[0]observesvoteviavoted
Where the product reaches it
dossier→_rank_enum_over_mirror→_class_side_is_only_enum_mirrors→all(flow)
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-054 inferred