agent_task_bench cannot pin a total miss — a known-defect question requires a NON-EMPTY currently_returns, so the loudest failures are the ones the ratchet cannot guard #190
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#190
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while tracing #175. The mechanism is small; the consequence is that the benchmark's guard is weakest exactly where the product is worst.
Measured, at source
crates/mcp-server/tests/agent_task_bench.rs:The intent is right and the comment states it well: a known defect must be pinned so it cannot drift in either direction, including silently becoming correct. But
!pinned.is_empty()makes the pin unavailable to any question the product answers with nothing at all.A question whose tool returns an empty result cannot pin
currently_returns: [], because an empty pin is refused. So the author's only options are:known_defectand let the question just fail — ungraded, and indistinguishable from a question nobody has triaged; orBoth are in use today.
Measured consequence
One pin exists in the whole benchmark. And its two siblings from the same defect are unpinned for exactly this reason, each saying so in its own
verificationstring:flask.who_calls.stream_template_string— "NOT pinned withknown_defect/currently_returns, because the harness requires a NON-EMPTY pin and this tool returns nothing at all."flask.context_pack.send_from_directory— "Two tools, two questions, one missing edge. The expectation stays and this question's verdict unit is lost."So of the three graded questions that #175's defect costs, one is pinned and two are not — and the two that are not are the ones where the product returns less, i.e. the more severe failures.
Why this is a gap and not a preference
The pin's stated purpose is bidirectional drift detection. For an empty answer, the "silently becoming correct" half is the important one: when someone fixes the resolver, the question flips from empty to populated and nothing tells them. Recall moves, but recall is a floor — the suite stays green, and a fix reports itself only if a human notices a number rose. That is precisely the absorption the comment says it exists to prevent.
It is also the shape this repo has recorded before under a different name: absence is not a state. An absent pin and an empty pin are two different facts (
nobody triaged thisvswe measured this and it returns nothing), and the harness currently renders them identically.Repro
Then try to add
"known_defect": "...", "currently_returns": []toflask.who_calls.stream_template_stringand run the flask benchmark: the assertion fires.What must NOT be done
!pinned.is_empty()check. It exists for a real reason: an ABSENTcurrently_returnson aknown_defectrow would grade nothing, and defaulting a missing field to[]would make every un-pinned known defect silently vacuous. The fix has to distinguish explicitly empty from absent, which in serde terms isOption<Vec<_>>and not#[serde(default)].["none"],[""]) to satisfy the assertion. That is a fabricated measurement in a ground-truth file, and this repo has twice this session caught a record encoding a defect as truth.Measured vs inferred
The assertion text, its line, the per-oracle
known_defectcounts, and bothverificationstrings are measured on the tree atf6a878a. That a fix would go unnoticed today is inferred from the code path (recall is a floor and nothing else grades those two questions) — it has not been demonstrated by actually fixing #175, which is out of reach for other reasons.🤖 Generated with Claude Code
https://claude.ai/code/session_01K1zj5VcFJvJt3pQxe9259K
ALREADY FIXED on master
1d81180— verified against this issue's own repro, recommend closingPicked this up as a live item; it is not one. Every clause this issue asks for is in the tree, and the two questions it names by name are now graded.
The harness distinguishes absent from explicitly-empty, exactly as the "what must NOT be done" section required (
Option<Vec<_>>, not#[serde(default)]) —crates/mcp-server/tests/support/agent_bench.rs:223:!pinned.is_empty()is gone fromagent_task_bench.rs. What stands in its place refuses onlyNone, and its panic text answers the issue directly — "If this product returns NOTHING for this question, pin[]… Do NOT pin a placeholder like["none"]: a fabricated value in a ground-truth file is worse than no pin."The anti-vacuity guard the issue asked for exists and is not the obvious one. It does not simply assert "an empty pin still asserts something"; it identifies the one case where an empty pin would be vacuous and refuses it there:
Measured on the oracle, against this issue's own
grep -crepro (which reported 1):and the second row is precisely the question this issue said could not be pinned:
So the total-miss case is pinned, and a fix to #175 now reddens the bench instead of moving a floor nobody reads.
Not verified by me: the third question (
flask.context_pack.send_from_directory) is still unpinned — worth one look before closing, since #190's count was three.FIXED. Verified in the tree at
46f6006:currently_returns()is now-> Option<BTreeSet<String>>(crates/mcp-server/tests/support/agent_bench.rs:223), and the!pinned.is_empty()guard that made a total miss unpinnable is gone.The exact question this issue said could not be pinned —
flask.who_calls.stream_template_string— now carriescurrently_returns: []. Oracle counts moved 1 → 2.That distinction is the whole point: a known defect whose current answer is nothing was previously indistinguishable from a question nobody had pinned. An empty
currently_returnsis now a measurement — "this returns nothing today, and that is the defect being tracked" — rather than a shape the harness refused to accept.Closing.