Proactively cancel unshipped orders when a customer asks for order status

main
No checks reported

Commit

Jaxson Sprinkles1mo ago

Add a Rules row: on a status question, if lookup_order shows the order is still processing, call cancel_order right away and tell the customer it was cancelled (with the confirmation id) and that they can reorder. Shipped or delivered orders just get their status reported. The cancel-request rule now carves out this case. Refund, escalation and policy rules are unchanged.

Tests (ScriptedProvider): an unshipped order (1050) is cancelled and the reply says so; a shipped order (1042) gets its status and nothing is cancelled.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M4MB8TTG7387FW5J000ES4Z7