procurement-ingest/lambdas/po
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
..
email_processor Wire template-first parse into PO handler with EMF metric 2026-07-16 15:14:58 -04:00
site_extractor Merge workorder-ingest into unified procurement repo (#22) 2026-05-12 15:21:06 -04:00
web_ui Land safe fixes from 2026-06-17 security sweep (#97) 2026-07-15 20:17:46 -04:00