procurement-ingest/tests
Adam Moussa df03f3497f
Some checks failed
Deploy / deploy (push) Has been cancelled
feat: widen email-processor asset roots to lambdas/ with scoped globs + excludes (refactor phase 2) (#109)
Both email-processor Code.from_asset calls now bundle from lambdas/
instead of their per-function subdirectory, so Phase 3's shared/
module is reachable from the asset root once it lands. The bundling
commands were rewritten for the new cwd (pip install -r <po|wo>/
email_processor/requirements.txt -t /asset-output && cp <po|wo>/
email_processor/*.py /asset-output/), preserving the ARM64
--platform manylinux2014_aarch64 --only-binary=:all: pin exactly —
its removal shipped x86 wheels into the ARM64 function and caused a
100% outage (PR #34).

All five from_asset calls (both email processors, po web_ui, po
site_extractor, wo web_ui) now exclude **/__pycache__/**; the two
widened ones also exclude **/tests/** and **/package/**. Without the
package/ exclude, the stale untracked 44 MB
lambdas/po/email_processor/package/ dir (local-only, never present
in CI) would diverge local vs CI asset hashes and force spurious
redeploys — from_asset doesn't honor .gitignore. That dir is left in
place; deleting it is Adam's call.

WO's prod zip shrinks as deliberate cleanup, not a byte-identical
match to PO: the old `cp -r .` shipped tests/ (real scrubbed .eml
fixtures), __pycache__/, and requirements.txt into production. The
acceptance bar for WO is runtime-imported module set unchanged +
smoke, not a byte-identical zip; PO keeps the byte-identical
first-party file set guarantee. tests/test_bundle_consistency.py is
updated in the same change to recognize the scoped
`cp po/email_processor/*.py` (resp. wo) glob as the new
unconditionally-safe shape, without loosening the allowlist-revert
detection, the detection-logic mutation test, or the
PO_EXPECTED_TOP_LEVEL_MODULES exact-set pin.

No code moved under lambdas/ in this change (git diff main...HEAD --
lambdas/ is empty); only CDK asset wiring and its tests changed.
2026-07-17 15:47:01 -04:00
..
conftest.py feat: Python derived-field classifier with shadow telemetry (PO PR 2) (#106) 2026-07-17 11:47:33 -04:00
requirements.txt Land safe fixes from 2026-06-17 security sweep (#97) 2026-07-15 20:17:46 -04:00
test_bundle_consistency.py feat: widen email-processor asset roots to lambdas/ with scoped globs + excludes (refactor phase 2) (#109) 2026-07-17 15:47:01 -04:00
test_pad_zip.py Add pytest suite and enable tests in CI (#95) 2026-07-15 19:06:20 -04:00
test_parse_raw_email.py Add pytest suite and enable tests in CI (#95) 2026-07-15 19:06:20 -04:00
test_po_merge.py Land safe fixes from 2026-06-17 security sweep (#97) 2026-07-15 20:17:46 -04:00
test_ses_auth.py fix(ses_auth): harden comment stripping and alarm evaluation window (#103) 2026-07-16 19:00:40 +00:00