From e68096a7800af66e07f557c28b9de8c241f0ce8e Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Fri, 5 Jun 2026 03:24:13 +0200 Subject: [PATCH] test(review): correct the junk-layer test comment The high ocr_frac is driven by each segment being shorter than MIN_PAGE_CHARS (needs_ocr), not by text quality; quality drives bad_text_layer separately. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/unit/test_doc_classifier.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_doc_classifier.py b/tests/unit/test_doc_classifier.py index 587e1caa..d875a04b 100644 --- a/tests/unit/test_doc_classifier.py +++ b/tests/unit/test_doc_classifier.py @@ -188,8 +188,9 @@ def test_classify_from_text_no_pages_routes_fast(): def test_classify_from_text_junk_layer_flags_bad_text_layer(): - # Non-zero chars but low quality on every page (high ocr_frac) -> ocr + - # bad_text_layer (gated on ocr_frac, matching classify_pdf). + # Each short segment ( high ocr_frac, and + # total_chars>0 with mean_quality bad_text_layer (gated on ocr_frac, matching classify_pdf). text = "x1y2zx1y2z" c = clf.classify_from_text( text,