docs(document-processors): round-2 review nits + classify_pdf glyph test

Address round-2 review on PR #914:
- Add corrupt_glyphs to the document_classifier_flag_total label comment (it is
  a live flag value emitted by record_document_classification).
- Mirror the full_text-vs-sampled control-ratio NOTE into classify_pdf so the
  diagnostic path's under-detection trade-off is documented in place.
- Add test_classify_pdf_glyph_corrupt_routes_structured for routing symmetry on
  the standalone classify_pdf path.

(SonarCloud quality gate is green — the prior S1244 finding was fixed last round.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-06-16 20:24:33 +02:00
co-authored by Claude Opus 4.8
parent d5286e39d6
commit 425eb839bf
3 changed files with 27 additions and 1 deletions
@@ -334,7 +334,7 @@ document_classifier_flag_total = Counter(
# so flag{image_heavy} is expected to exceed classified{recommended_tier=ocr}.
"astrolabe_document_classifier_flag_total",
"Tier-0 classifier flags raised on documents",
["flag"], # image_heavy | scanned | bad_text_layer
["flag"], # image_heavy | scanned | bad_text_layer | corrupt_glyphs
)
document_text_quality = Histogram(