From da3550f7a7a043682901f8ba4614d51e890153a6 Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Sat, 13 Jun 2026 15:29:53 +0200 Subject: [PATCH] docs(ingest): note suppressed metric is external-path-only (review round 3) The inline _process_pdf path does not emit document_escalation_suppressed_total; the "what-if OCR" counter is instrumented only on the per-tier external path (evaluate_escalation / _parse_pdf_tier). Comment the inline OCR gate so a reader doesn't mistake the omission for a bug. Deferred the assert_never nit (typing .assert_never is 3.11+; Literal+frozen already guard construction) and the pre-existing minimum-ValueError pass (only "ocr"/None are ever passed). Deck #324. Co-Authored-By: Claude Opus 4.8 (1M context) --- nextcloud_mcp_server/document_processors/registry.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nextcloud_mcp_server/document_processors/registry.py b/nextcloud_mcp_server/document_processors/registry.py index 188b567a..b7529dd7 100644 --- a/nextcloud_mcp_server/document_processors/registry.py +++ b/nextcloud_mcp_server/document_processors/registry.py @@ -247,6 +247,13 @@ class ProcessorRegistry: result, content, settings, record=True, filename=filename ) + # NOTE: the suppressed-escalation metric (document_escalation_suppressed_total, + # the "what-if OCR" signal; Deck #324) is intentionally NOT emitted on this + # inline/memory path -- it is instrumented only on the per-tier external + # path (vector/processor._parse_pdf_tier via evaluate_escalation). When OCR + # is off here the would-be escalation is simply not taken (the gate below); + # operators reading the suppressed counter are on the procrastinate fleet. + # # Escalate scanned / no-text-layer PDFs to OCR (tier-3) when enabled and # a provider is registered. The fast tier is terminal otherwise. Note: a # fast FAILURE (encrypted/corrupt -- result.success False, no