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) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-06-13 15:29:53 +02:00
co-authored by Claude Opus 4.8
parent c0fd7dd67b
commit da3550f7a7
@@ -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