Apply a stock count correction with an explicit shortage
A warehouse count finds two damaged lights while three lights are reserved. Operations needs to record the loss without silently cancelling customer holds.
- Focused work estimate
- 3h + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Inventory modeling · Authorization · Compensating records
Estimated field mix
- Backend80%
- Security20%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional retailer sells bicycle parts from East and West warehouses. Cart reservations last ten minutes, payment callbacks arrive late, and warehouse counts occasionally need correction. The exercise has no real orders or payment integration.
Setup prerequisites
- Relational modeling
- Concurrent API requests
- State transitions
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
Acceptance criteria
- Append an authorized adjustment with reason and counted quantity.
- Represent a shortage when active reservations exceed the corrected on-hand quantity.
- Block new holds during a shortage while preserving existing reservation history.
Implementation constraints
- An inventory correction is not permission to cancel a paid allocation.
Verification to include
- Correct an unreserved SKU and inspect the new available balance.
- Create a shortage and assert existing holds survive while new requests fail.
Deliverables
- Stock adjustment command and shortage response contract
Rollout and recovery
Limit adjustments to a test warehouse role; reverse mistakes through a compensating adjustment.
Value of the work
For the engineer: Practice inventory invariants and timed state transitions while balancing customer experience with operational repair.
For the team: Inspect an engineer's handling of overselling, delayed callbacks, warehouse boundaries, and reversible schema changes.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.