From 36209e3160657b8ce1a1ad7fffc3c968f60bab7b Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Fri, 5 Jun 2026 05:16:25 +0200 Subject: [PATCH] docs(review): note image_heavy only fires when scan detection is on Address PR #863 round 4: classify_from_text's docstring now states that the image_heavy flag (and the image-coverage trigger) are only set when image_coverage is supplied, so the flag reads zero for tenants with DOCUMENT_OCR_DETECT_SCANNED=false -- self-documenting the metric semantics. Co-Authored-By: Claude Opus 4.8 (1M context) --- nextcloud_mcp_server/document_processors/classifier.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nextcloud_mcp_server/document_processors/classifier.py b/nextcloud_mcp_server/document_processors/classifier.py index 3313d856..807f9eb2 100644 --- a/nextcloud_mcp_server/document_processors/classifier.py +++ b/nextcloud_mcp_server/document_processors/classifier.py @@ -246,6 +246,10 @@ def classify_from_text( ``page_boundaries`` are ``{page, start_offset, end_offset}`` indexing into ``full_text``; ``image_coverage[i]`` (if given) aligns with the i-th boundary. + + Note: the ``image_heavy`` flag (and the image-coverage trigger) are only set + when ``image_coverage`` is supplied, so for tenants with scan detection off + that flag is always zero -- the text-quality/empty signals still route. """ # image_coverage is expected to be one entry per page, capped at # MAX_SAMPLED_PAGES (see image_coverage_per_page). Any other length means the