You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the Order Service,
I want each bot to validate and reserve stock when accepting an order,
so that active and queued orders do not overcommit the bot’s inventory.
Acceptance Criteria
Given a bot receives an order assignment
When it checks stock availability
Then it validates the order against available stock, not total stock.
Given the bot has enough available stock
When the order is accepted
Then the bot immediately reserves the requested item quantities.
Given the bot does not have enough available stock
When the order is validated
Then the bot rejects the order with an insufficient-stock response.
Given stock is reserved for an accepted order
When the reservation is created
Then the bot generates a stock update event.
Given a queued order has reserved stock
When earlier deliveries are completed
Then the queued order keeps its reservation until it is delivered or cancelled.
Given an order is completed
When delivery is finalized
Then the reserved stock is converted into fulfilled stock and deducted from the bot’s onboard inventory.
As the Order Service,
I want each bot to validate and reserve stock when accepting an order,
so that active and queued orders do not overcommit the bot’s inventory.
Acceptance Criteria
Given a bot receives an order assignment
When it checks stock availability
Then it validates the order against available stock, not total stock.
Given the bot has enough available stock
When the order is accepted
Then the bot immediately reserves the requested item quantities.
Given the bot does not have enough available stock
When the order is validated
Then the bot rejects the order with an insufficient-stock response.
Given stock is reserved for an accepted order
When the reservation is created
Then the bot generates a stock update event.
Given a queued order has reserved stock
When earlier deliveries are completed
Then the queued order keeps its reservation until it is delivered or cancelled.
Given an order is completed
When delivery is finalized
Then the reserved stock is converted into fulfilled stock and deducted from the bot’s onboard inventory.