procurement-ingest/lambdas
Adam Moussa 3e70d56238
Merge PO revisions and handle out-of-order events
save_revision did a full put_item overwrite, so a revision omitting
line_items/supplier permanently deleted them. save_new_po used a
conditional put that silently dropped the PO when an out-of-order
cancellation had already created a skeleton row.

Switch both to field-level merge update_items: a revision now SETs
only the fields it carries, and a new_po backfills data into a
pre-existing Cancelled skeleton while preserving the Cancelled
status. No email can now delete data established by an earlier one.
2026-07-15 19:29:41 -04:00
..
po Merge PO revisions and handle out-of-order events 2026-07-15 19:29:41 -04:00
wo Require Secrets Manager key for Anthropic client 2026-07-15 19:29:41 -04:00