procurement-ingest/lambdas/po/email_processor
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
..
handler.py Wire template-first parse into PO handler with EMF metric 2026-07-16 15:14:58 -04:00
requirements.txt Migrate PO processor to Bedrock 2026-07-15 20:10:14 -04:00
ses_auth.py Add fail-closed SES sender authentication (INFRA-107) (#98) 2026-07-15 20:58:47 -04:00
template_parser.py Implement PO new_po extraction and value-level gate 2026-07-16 15:14:25 -04:00