Skip to content

Commit 3bae4a8

Browse files
varunursekarclaude
andcommitted
Cover the unprovisioned-model category and fix a wrong annotation
Greptile (5/5, safe to merge) named the two gaps on this PR. UPSTREAM_MODEL_UNAVAILABLE had no tests. It is the taxonomy's most dangerous silent failure -- unclassified, a model that is configured but not deployed makes every call 404, the agent writes no answer, and each case is recorded as an informative task failure, i.e. the harness scoring the candidate down for a model that does not exist. Tests now pin the provider error codes it matches, its terminating/not-a-sample/counts-toward-invalidity policy, and the deliberate narrowness: a bare "does not exist" must stay unmatched, or it would swallow "loading container: file does not exist". load_build was annotated `-> dict` while returning `(dict, Path)`; the caller unpacks two values. Corrected rather than merely added. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 19e03b4 commit 3bae4a8

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

harness-engineering-bench/scripts/rescore_candidate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def log(message: str) -> None:
4848
print(f"[rescore] {message}", flush=True)
4949

5050

51-
def load_build(benchmark: str) -> dict:
51+
def load_build(benchmark: str) -> tuple[dict, Path]:
5252
import yaml # provided by the vero environment
5353

5454
path = BENCH_ROOT / benchmark / "baseline" / "build.yaml"

vero/tests/test_v05_error_taxonomy.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,45 @@ def test_classify_signal_recognizes_infrastructure_categories():
2020
)
2121

2222

23+
def test_classify_signal_recognizes_an_unprovisioned_upstream_model():
24+
"""A configured-but-not-deployed model must not be blamed on the candidate.
25+
26+
Left unclassified this is the worst silent failure in the taxonomy: every
27+
call 404s, the agent writes no answer, and each case is recorded as an
28+
informative task failure -- the harness scoring the candidate down for a
29+
model that does not exist.
30+
"""
31+
for signal in (
32+
"DeploymentNotFound",
33+
"model_not_found",
34+
"The API deployment for this resource does not exist",
35+
"openai.NotFoundError: model_not_found",
36+
):
37+
assert (
38+
classify_signal(signal) is ErrorCategory.UPSTREAM_MODEL_UNAVAILABLE
39+
), signal
40+
41+
# Deliberately narrow: a bare "does not exist" is a container/file problem,
42+
# not a missing model, and matching it here would swallow real infra errors.
43+
assert (
44+
classify_signal("loading container: file does not exist")
45+
is not ErrorCategory.UPSTREAM_MODEL_UNAVAILABLE
46+
)
47+
48+
49+
def test_unprovisioned_model_policy_is_terminating_and_not_a_sample():
50+
"""It is a permanent misconfiguration, so it stops the run and scores nothing."""
51+
p = policy(ErrorCategory.UPSTREAM_MODEL_UNAVAILABLE)
52+
assert p.retryable is False # every remaining case fails identically
53+
assert p.terminating is True
54+
assert p.is_informative_sample is False # never scored as a candidate failure
55+
# Unlike auth, still counts toward invalidity: if the terminating path is
56+
# ever bypassed, the aggregate must come out invalid rather than averaging
57+
# a shrinking set of survivors.
58+
assert p.counts_toward_invalidity is True
59+
assert p.diagnostic_code == "upstream_model_unavailable"
60+
61+
2362
def test_classify_signal_leaves_task_failures_unclassified():
2463
# The benign "produced no answer" marker and a candidate's own bug are not
2564
# infrastructure — the case-level classifier turns both into task failures.

0 commit comments

Comments
 (0)