procurement-ingest/lambdas
Adam Moussa 3418c7c819
Wire template-first parse into PO handler with EMF metric
Run try_deterministic_parse ahead of the Bedrock extractor and
fall back only on a miss/invalid (fail-closed) result. The shared
enrich_parsed post-stage and the save_cancellation/save_revision/
save_new_po routing are untouched, so both paths write identical
DynamoDB shapes and the po-ingest-site-extractor stream contract
is preserved.

Each record emits one ParseMethod EMF line (Seahaven/PoIngest/
ParseOutcome, dimension sets [ParseMethod] and
[ParseMethod,TemplateId], ReasonCode/po_number ride-alongs)
mirroring the WO idiom. The metric fires before the Bedrock call
so a Bedrock-side error still records the ai_fallback outcome.

Refs: #99
2026-07-16 15:14:58 -04:00
..
po Wire template-first parse into PO handler with EMF metric 2026-07-16 15:14:58 -04:00
wo feat: template-first WO parser + Bedrock fallback, PO Bedrock switch (#99) 2026-07-16 12:45:11 -04:00