fix: Eval-Seitenzahlen im PageLabel-Namespace + Hash-Guard-Index#181
Merged
Conversation
#80, refs #151) - #80 Fund 1 (MED): eval_quality.py (v1) und eval_quality_v2/_v4.py lasen den physischen PDF-Index statt der Druckseiten-Labels aus /PageLabels (seit PR #79 der Namespace von source_anchors). Neue Helfer pdf_chunker.anchor_page_numbers/ physical_pages_by_anchor als gemeinsames Mapping; v1 uebersetzt Anker-Seiten vor dem pdf_doc-Zugriff zurueck (inkl. Folgeseite physisch+1, nicht Label+1); v2/v4 reichen die Anker-Seitenzahl durch _pdf_sentences/build_chunks/_pdf_artifacts durch. PDFs ohne Labels bleiben bit-identisch (i+1-Fallback unveraendert). - #80 Fund 2 (LOW): figure_alt.bind_figures_to_drafts loggt jetzt sichtbar, wenn Kandidaten existieren aber 0 Anker-Matches gebunden werden (typisch bei versions-gemischtem --load-drafts). Kein Verhaltens-Change, nur Sichtbarkeit. - #151 Punkt 3: eval_quality_v4.find_cached_eval scannte quality_history.jsonl linear bei jedem Aufruf (bis 24 MB, bis 10x/Lauf). Prozessweiter Index scannt einmal pro Pfad; save_result traegt neue Records direkt nach.
…Annahmen dokumentiert, Lücken-Label-Beweis - figure_alt: '0 Anker-Matches'-Warnung feuert nicht mehr bei ambiguous-Skips (die HATTEN Matches — Namespace-Verdacht wäre irreführend) + Test - _cached_eval_index: Konsistenz-Annahmen (append-only, save_result-only, Stage-8-sequenziell) im Docstring; Locking bei Parallelisierung mitdenken - neuer Test: springende Labels 159,160,200,201 beweisen physisch+1 statt Label+1 (Mapping bildet Lücke exakt ab) - build_labels: 'Druckseiten-Label bei gelabelten PDFs' klargestellt
This was referenced Jul 10, 2026
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 #80, refs #151 (Punkt 3).
#80 Fund 1 (MED): Stage-8-Eval las den physischen Seitenindex
Seit PR #79 tragen
source_anchorsDruckseiten-Labels —_pdf_sentences(v2) und der v1-NLI-Pfad indexierten aber weiter physisch. Folge bei Label-PDFs:best_page/Judge-Pool-Header in anderem Namespace als die Note; v1 prüfte die falsche Seite (Buch: Label 159 = physisch 178).Fix: Gemeinsames Mapping in
pdf_chunker(anchor_page_numbers,physical_pages_by_anchor) — wiederverwendet_resolve_page_numbers, keine zweite Label-Logik.build_chunks/_pdf_artifacts(Stage-8-Memo, #171) reichen es durch; v1 übersetzt Anker→physisch vor dempdf_doc-Zugriff, Folgeseite = physisch+1, nicht Label+1 (Labels springen — mit Lücken-Label-Fixture 159,160,200,201 bewiesen). PDFs ohne Labels: exakt unverändert (Regressionstests).#80 Fund 2 (LOW): stiller Figuren-Totalverlust sichtbar gemacht
bind_figures_to_drafts: stderr-Hinweis bei Kandidaten + 0 Matches (typisch: versions-gemischtes--load-drafts). Nur wenn ALLE Skipsno_matchsind — ambiguous-Skips hatten Matches (Codex-Fund).#151 Punkt 3: Hash-Guard ohne 24-MB-Linearscan pro Note
find_cached_evalbaut einmal pro Prozess einen In-Memory-Index (last-wins wie bisher);save_resulthält ihn nach. Zähler-Beweis: Datei-Open 3→1. Konsistenz-Annahmen im Docstring (append-only, Stage 8 sequenziell; Locking-Hinweis für die offene Parallelisierung).Verifikation
calls == [1, 160]→[1, 2, 3]; Hash-Guardassert 3 == 1→ grünruff format --check+ruff checkgrünbest_pagephysisch)Nebenbefunde (nicht in diesem PR)
eval_quality.pysource_coverage/covered_pagesmischt Label-Zahlen mit physischertotal_pages(vorbestehend, diagnostisch) — Kommentar folgt in Stage-8/Eval-Effizienz: PDF 3x pro Note, 24-MB-JSONL-Linearscan, Embeddings ohne Memoization, Cache-Rotation #151_claim_scores_from_judgefür nicht-auditierte Claims doppelt (bit-identisch, kein LLM-Call) — Kommentar folgt in Stage-8/Eval-Effizienz: PDF 3x pro Note, 24-MB-JSONL-Linearscan, Embeddings ohne Memoization, Cache-Rotation #151