procurement-ingest/lambdas/wo/email_processor
Adam Moussa 89bf47c1bb
Add offline WO parser test suite
Cover the deterministic parser with golden-file tests over 55 real
scrubbed .eml fixtures (both comment sub-shapes, username Submitted-By,
address present/absent, br+CRLF assign addresses), fail-closed
validation-gate rules, adversarial and prompt-injection cases that must
route to ai_fallback or parse without corrupting other fields, the issue
#23 comment_id idempotency invariants, and the Bedrock-fallback dispatch
plus EMF-metric emission with a mocked invoke_model.

Extend pytest.ini testpaths to discover the co-located suite, and update
tests/conftest.load_handler to put a handler's own directory on sys.path
so the WO handler's new `from template_parser import ...` resolves under
the existing shared handler tests. Point test_local.py at the new
template-first + Bedrock flow.

Refs: #23
2026-07-15 20:11:04 -04:00
..
tests Add offline WO parser test suite 2026-07-15 20:11:04 -04:00
__init__.py Merge workorder-ingest into unified procurement repo (#22) 2026-05-12 15:21:06 -04:00
handler.py Migrate WO processor to Bedrock and fix comment_id collision 2026-07-15 20:09:58 -04:00
requirements.txt Migrate WO processor to Bedrock and fix comment_id collision 2026-07-15 20:09:58 -04:00
template_parser.py Add deterministic template parser for WO emails 2026-07-15 20:09:29 -04:00