Repository navigation
Preserve title lines when classification metadata shares a native block #52
Description
Observed regression
The fresh, query-independent 10,000-paper field build at f9f7c13 changed the title candidate for private corpus ID d21604 from 145 characters to 33 characters while its source PDF, first-page image, and native text hashes remained identical. Source-image and native-line review found classification metadata at the start of a native block followed by the actual title in later lines of that same block. The old 145-character candidate included metadata; the new 33-character candidate is an author block. Neither candidate is a reviewed title.
The cause is block-level eligibility in extract_fields: lines are joined before _title_like, so METADATA_START rejects the entire mixed block. The following author block is not reliably rejected by _author_like when it carries affiliation markers. This is a field selection defect, not an OCR result or a source-location failure. The private source-bound diagnosis is validation_v3_private/issue22-ocr-corpus-retrieval-20260928-01/D21604_TITLE_ROLE_DIAGNOSIS.json, SHA-256 3614b822b486842f6c5bd2bd478ea97fea6552a3bc55a1bdb0e6e00727104879. Keep source text and images outside the public repository.
Implementation
- Partition mixed native blocks into source line or span role runs before title eligibility. Preserve each run's exact native line IDs, offsets, boxes, typography, source/page identity, and unreviewed status. Metadata removal must not delete neighboring title text or create a reconstructed title unsupported by the source.
- Reject author and affiliation runs with source-backed marker/role evidence, including letter and numeric affiliation markers. Preserve genuine titles containing initials, digits, institution names, or scientific notation; do not use an ID-specific override or known-query target.
- Keep candidate generation query-independent. Version the title policy and field provenance, and invalidate dense caches when fields change. A title candidate alone remains retrieval-only and cannot authorize abstract promotion or graph admission.
- Add public authored PDF/native fixtures for metadata-plus-title in one block, author-plus-affiliation markers in the next block, and counterexamples where the same words are genuine title text. Cover both line ordering and visual typography. Report the real
d21604source-image readback privately without publishing its title or author names.
Acceptance
-
d21604no longer selects either the metadata-contaminated old candidate or the author-only current candidate; the chosen title has exact source-line provenance and an attributed image check. If ambiguous, retain an explicit review state rather than guess. - The authored mixed-block and author-marker negatives pass, while genuine numeric/initial/institution-title positives remain eligible.
- Existing f115 boilerplate/title and f076 image-only OCR behaviors remain intact.
- A fresh 10,000-document field build accounts for all IDs and reports every changed title candidate, provenance, source verification, held state, and output hash. Rebuild affected dense rankings, reject stale caches, and rerun the frozen 60-query candidate/rerank protocol with the same target-label rotation check.
- Distinguish the field-policy change from the local OCR change in before/after metrics. Do not claim a pure OCR improvement from the current combined-field trial.
- Publish source-faithful code, tests, a redacted receipt, and documentation; keep all private PDFs, text, labels, and full rankings external.
Links and dependency
Parent: #22 (under epic #12). Discovered during #22 and blocks a repaired-field interpretation of its final acceptance. #21's assessment wiring remains closed; this issue concerns title role selection. The current #22 native-plus-OCR trial is frozen and remains a valid partial baseline for its exact field hash, not evidence that this regression is fixed.
Activity
CompleteDotTech commentedon Sep 29, 2026
Completed and verified in merged PR #66, following the title-role implementation already on main. The redacted 10,000-paper receipt binds the private field build, frozen protocol, trial result, and final driver readback by SHA-256.
This completes #52's title-role and frozen-query acceptance. The absence of 10,000 V4 abstract assessments and competing-result relevance judgments continues under #53 and #22; no full retrieval or GraphRAG qualification is claimed here.