Replace Shipwright's tangle of status flags with an explicit state machine: one transition table, guards, an audit history and replay from an event log.
Transitions
One transition table that decides every status change, and an order that records its history.
Guards and replay
Dates that never go backwards, a 30-day return window, and rebuilding an order from its event log.
Partial shipments
Orders with several parcels: shipped when the first leaves, delivered when the last arrives.
What senior engineers look for in a code review, as a practical checklist: correctness, edge cases, tests, naming, structure and performance, with C++-specific points.
Name the rules your data must always obey, enforce them in one place, validate everything before changing anything, keep history append-only, and test invariants with random operations.
Model order statuses, CSV quoting and regex matching as state machines: one transition table, guards for business rules, event logs you can replay, and NFAs that track several states.
Build undo and redo the way editors do: edits as reversible commands, an undo and a redo stack, merging typing into words, grouping edits into one step, and a capped history.