Freeze an Order Item's Recipe at order time

Price was already snapshotted per Order Item so later menu changes
don't rewrite history, but the Recipe (Step list) wasn't: advancing an
Order Item looked up its next Step from the live menuItemSteps table,
so an operator editing a Menu Item's Recipe mid-cook could silently
reshape an Order already in flight (different Machine Tag, duration,
or Step order than what the customer paid for).

Adds order_item_steps as a per-Order-Item copy of the Recipe, taken at
placement time; placeOrder, advanceOrderItemStep, and getOrderStatus
now all read from that snapshot instead of the live menu. Recorded as
docs/adr/0005 and added Recipe as a formal CONTEXT.md term.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-09 19:55:05 +02:00
co-authored by Claude Sonnet 5
parent d291312139
commit 9c3ad51686
8 changed files with 732 additions and 43 deletions
+7
View File
@@ -15,6 +15,13 @@
"when": 1788972318759,
"tag": "0001_graceful_frank_castle",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1788976393301,
"tag": "0002_large_lake",
"breakpoints": true
}
]
}