fix(extraction): #885 the pre-judge ceiling now names the candidates it cut - #891
Merged
Merged
Conversation
…it cut
The 24-candidate pre-judge ceiling was the ONLY drop in the extraction
pipeline that reported a bare count with no titles. Its siblings all name
names -- discarded_titles, judged_out_titles, the wrong-language and
recombined gates. In the wild run that surfaced this, every other drop named
names (4 wrong-language, 9 recombined, 10 judge, 1 staging) and this one said
"7".
That contradicted the principle the module already wrote for the sibling
notice in _unevidenced_notice: "The titles are load-bearing, not decoration.
A notice that only counted would leave the operator opening every derived
document to find the one." You cannot check against the source what you
cannot name.
merged extraction union exceeded the 24-candidate pre-judge ceiling;
1 merged candidate(s) never reached the judge: Subject 25
Three deliberate choices:
- pre_judge_dropped_titles is a SEPARATE field, not a replacement for the
int. Stored runs predating it carry () and still render the half they
always had; replacing the count would break reading historical data for a
cosmetic gain.
- The notice is ADDITIVE. The count and the ceiling explanation stay -- that
line is what an operator reads to understand why extraction stopped short,
and trading information for information is not an improvement.
- Same _CAP_NOTICE_TITLE_LIMIT + "(+N more)" shape as every sibling notice,
so the extraction notices read alike.
Naming the cut does NOT fix #885's substantive half: truncation is still
POSITIONAL over a list concatenated in window -- i.e. document -- order, so
the TAIL of a long source is what goes. This makes that observable, which is
the step before fixing it, and both the field docstring and the test say so.
The end-to-end test was extended rather than duplicated: it already builds 25
distinct candidates so the ceiling cuts exactly 1, and now asserts the notice
names "Subject 25". Mutating the implementation to take merged[:n] (the head)
instead of merged[n:] (the tail) turns it red -- so the assertion pins WHICH
candidate is dropped, not merely that some title appears.
Full suite 5658 passed, 1 skipped; ruff clean; mypy clean over 272 files.
Closes #885
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #885
The defect
The 24-candidate pre-judge ceiling was the only drop in the extraction pipeline that reported a bare count with no titles. In the wild run that surfaced this, every other drop named names — 4 wrong-language, 9 recombined, 10 judge, 1 staging — and this one said
7.That contradicts the principle the module already wrote for its sibling in
_unevidenced_notice:You cannot check against the source what you cannot name.
After
Three deliberate choices
pre_judge_dropped_titlessits beside the int. Stored runs predating it carry()and still render the half they always had; replacing the count would break reading historical data for a cosmetic gain._CAP_NOTICE_TITLE_LIMIT+(+N more)as every other title-bearing notice, so the extraction notices read alike.What this does NOT fix
#885 has two halves and this closes one. Truncation is still positional —
merged[:_MAX_JUDGE_CANDIDATES]over a list concatenated in window (document) order — so the tail of a long source is what goes, regardless of quality. Naming the cut makes that observable, which is the step before fixing it. Both the field docstring and the test record it, so the next person to touch this does not have to rediscover it.The substantive remedy — ordering candidates by something other than document position before the cut — needs measurement first and is left open.
Evidence
Subject 25. Mutating the implementation to takemerged[:n](the head) instead ofmerged[n:](the tail) turns it red — so the assertion pins which candidate is dropped, not merely that some title appears.ruffclean.mypyclean over 272 files.Found during the 0.2.10 manual E2E.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MZz1zEMqg4X5mDEwwfC6dj