procurement-ingest/lambdas/po/email_processor
Adam Moussa 33b33fe256
Implement PO new_po extraction and value-level gate
Replace the extract_new_po scaffold stub with the full
section-windowed extractor (duplicate-label anchoring, sentinel
ship-to, label-keyed U+2022 bullet split, Decimal money from three
anchored contexts only) and add value-level gate rules V1-V13.
Both new_po_not_implemented scaffold guards are removed; rules 6-8
(unrecognized_status, multiline_unsupported, non_usd) go live.

The gate re-derives every byte proof from the email body so an
extractor bug cannot vouch for itself: amount re-serialization
with a digit/comma border check (the thousands-separator
truncation kill switch), sum(lines)==total against both Total
blocks, anchor/supplier identity proofs, USPS address shape on
the raw pre-enrichment zip, bullet label discipline, and
sentinel/artifact hygiene. Any failure falls closed to the LLM;
a validation failure is never a parsed result.

Refs: #99
2026-07-16 15:14:25 -04:00
..
handler.py Merge main into WO template-parser + Bedrock branch 2026-07-15 21:15:11 -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