fix(ingest): address review round 1 (Literal kind + log tidy)

- escalation: EscalationDecision.kind is now Literal["hop","suppressed"] so ty
  catches a bad kind statically (and the processor branch is exhaustive).
- processor: simplify the suppressed-escalation log line (no longer repeats
  to_tier / tier).
- registry: clarify _tier_available's ignore_enabled drops the OCR-enabled gate
  specifically (a future per-tier gate would extend the condition).

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:20:16 +02:00
co-authored by Claude Opus 4.8
parent a27ddb2d5a
commit f8e8645fc2
3 changed files with 9 additions and 9 deletions
+2 -4
View File
@@ -165,14 +165,12 @@ async def _parse_pdf_tier(
tier, decision.to_tier, decision.reason
)
logger.info(
"Escalation suppressed for %s %s->%s (reason=%s; %s disabled), "
"indexing at %s",
"Escalation suppressed for %s: %s->%s disabled (reason=%s), "
"indexing at current tier",
filename or "<bytes>",
tier,
decision.to_tier,
decision.reason,
decision.to_tier,
tier,
)
elif decision is not None:
record_document_escalation(tier, decision.to_tier, decision.reason)