Skip to content

Phase 2: two collection guards that survive removal — and why the other two did not - #229

Merged
adamjohnwright merged 2 commits into
mainfrom
feat/per-collection-sweep-questions-2
Sep 17, 2026
Merged

adamjohnwright merged 2 commits into
mainfrom
feat/per-collection-sweep-questions-2

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Stacked on #228. Phase 2 of spec 009 — the blocking prerequisite, which is worth landing whether or not routing is ever built.

The method, because the obvious approach doesn't work

A question only guards a collection if the answer changes when that collection is removed. String-uniqueness in the CSVs isn't enough: P04637 looked like a clean ewas marker and turns out to be in disease_variants too.

So each candidate was asked twice — against the full Release97 bundle, and against a copy with exactly one collection removed.

collection with without result
ewas ✓ ✗ guards it — UniProt accessions live only there
summations ✓ ✗ guards it — the curated prose lives only there
complexes ✗ ✗ expected pattern wrong; the model describes the complex rather than listing component synonyms
reactions ✓ ✓ answered with the collection removed entirely

Two survived and are added here. Both verified passing against the real bundle with live MCP.

Why the other two failed, which is the actual finding

No reaction name is unique to reactions. The summations query covers Pathway OR ReactionLikeEvent, so every event name appears in both collections by construction. They overlap by design, not by accident.

That cuts both ways for spec 009, and the spec now says so:

  • The recall risk is lower than the spec assumed. If a question answers with a whole collection removed, routing away from it costs little — which argues for the change.
  • The gate hole is harder to close than the plan implied, and for a reason the plan had wrong. It isn't that nobody wrote the questions; it's that a collection whose content is duplicated elsewhere cannot be guarded by asking a question. For reactions the guard has to assert on retrieval — which documents were searched — not on the answer.

Tasks

T004 and T006 done and ticked. T008 ticked — the method is established, and it's what disqualified two candidates. T007 rewritten as a retrieval-level assertion. T005 left open rather than claimed: complexes needs a better candidate, and I'd rather it stay visible than be filled with a question that guards nothing.

That last point is the whole reason this phase exists — four questions that look like guards and aren't would be worse than knowing there are two.

🤖 Generated with Claude Code

… not

Phase 2 of spec 009 set out to add one sweep question per collection, each
failing if its collection stopped being searched. Building them changed what
the spec claims.

Method, since the obvious approach does not work: ask a candidate against the
full bundle and against a copy with exactly one collection removed. A question
guards a collection only if it answers with it and fails without it. Checking
string-uniqueness in the CSVs is not enough -- P04637 looked like an ewas
marker and is in disease_variants too.

Two of four candidates survived that test and are added here. ewas is guarded
by TP53's UniProt accession, summations by the curated prose for Selective
autophagy; both verified to fail with their collection removed.

The other two did not, and the reason is structural rather than a matter of
picking better words. Every reaction name also appears in summations, because
the summations query covers Pathway OR ReactionLikeEvent -- so the two
collections overlap by construction and no answer-level question can
distinguish them. reactions answered correctly with its collection removed
entirely. T007 is rewritten as a retrieval-level assertion; T005 needs a better
complexes candidate and is left open rather than claimed.

This cuts both ways for the feature and the spec now says so. Redundancy means
routing away from a collection costs less recall than the spec assumed, which
argues for the change. It also means the gate hole is harder to close than the
plan implied: a collection whose content is duplicated elsewhere cannot be
guarded by asking a question at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Base automatically changed from spec/009-plan-and-tasks to main September 17, 2026 14:40
@adamjohnwright
adamjohnwright merged commit 626cec9 into main Sep 17, 2026
10 checks passed
@adamjohnwright
adamjohnwright deleted the feat/per-collection-sweep-questions-2 branch September 17, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant