order-parse: document that both order lanes must send the RFC Message-ID
ci / lint-test (push) Successful in 1m1s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-10-03 18:59:56 +10:00
co-authored by Claude Opus 5.5
parent d75589e128
commit e956f39ffc
+5 -1
View File
@@ -526,7 +526,11 @@ export function parseOrderHTML(html: string, meta: MessageMeta): ParsedOrder {
} else { } else {
// DoorDash carries no order id anywhere in the receipt, so the provider // DoorDash carries no order id anywhere in the receipt, so the provider
// message id is the only stable identity available. That is correct for // message id is the only stable identity available. That is correct for
// ingestion idempotency: one receipt is one order. // ingestion idempotency: one receipt is one order — PROVIDED every caller
// sends the same id for the same email. Two lanes post here (n8n Order
// Processor and ingestion-engine order_handoff); both must send the bare
// RFC Message-ID. n8n sent Gmail's own id until 2026-10-03 and one order
// became txns 7268 + 7269.
if (!meta.messageId) { if (!meta.messageId) {
throw new OrderParseError("no order id in body and no messageId supplied"); throw new OrderParseError("no order id in body and no messageId supplied");
} }