Quickstart Validation Scenarios
Quickstart Validation Scenarios
Feature: Weekly Cycle Flow Purpose: Verify orchestration layer works correctly
Setup Requirements
- State Authority subsystem fully functional (all tasks complete)
- Additional tables created (Configuration, SchedulingJobs, etc.)
- Orchestration automations enabled
- Test data: 5 active users with different weekly_anchors
Scenario 1: Auto-Scheduling
Goal: Verify scheduling automation creates cycles for all active users.
Steps
- Setup
- Ensure 5 users in
Activestate - Set weekly_anchors: U1=Monday, U2=Tuesday, U3=Wednesday, U4=Thursday, U5=Friday
- No cycles exist for next week
- Ensure 5 users in
- Trigger scheduling
- Manually run AutoScheduleCycles automation (or wait for Sunday 18:00)
- Verify
- SchedulingJob record created with users_eligible=5, cycles_created=5
- Each user has one Cycle in
Scheduledstate - Cycle.week_id matches expected week
- No duplicate cycles
- Re-run scheduling
- Trigger automation again
- Verify: cycles_skipped=5, cycles_created=0 (no duplicates)
Expected Outcome
- All active users scheduled
- Scheduling is idempotent
Scenario 2: Commitment Success
Goal: Verify commitment locks inventory when conditions met.
Steps
- Setup
- User U1 in
Activestate - Cycle C1 in
Scheduledstate with ship_date approaching - Box B1 planned with garments [G1, G2, G3] all
Available
- User U1 in
- Trigger commitment
- Advance time to commitment deadline
- Run AutoCommitCycles automation
- Verify
- C1 transitions to
Committed - G1, G2, G3 transition to
Reservedwith current_cycle_id = C1 - CommitmentBatch record created with cycles_committed=1
- C1 transitions to
Expected Outcome
- Cycle committed, inventory locked
Scenario 3: Commitment Blocked by Hold
Goal: Verify commitment blocked when user has hold.
Steps
- Setup
- User U1 in
HoldPaymentstate - Cycle C1 in
Scheduledstate
- User U1 in
- Trigger commitment
- Run AutoCommitCycles automation
- Verify
- C1 remains in
Scheduledstate - CommitmentBatch shows cycles_blocked=1
- Block reason logged
- C1 remains in
- Resolve hold
- Transition U1 to
Active - Re-run commitment
- Transition U1 to
- Verify
- C1 now commits successfully
Expected Outcome
- Holds properly block commitment
Scenario 4: Fulfillment to Shipment
Goal: Verify packing and shipping workflow.
Steps
- Setup
- Cycle C1 in
Committedstate
- Cycle C1 in
- Start fulfillment
- In FulfillmentQueue, click “Start Packing” for C1
- Verify: B1 transitions to
Picking, C1 toFulfillmentInProgress
- Pack box
- In BoxPacker, scan garments into B1
- Verify pack
- Verify: B1 transitions to
PackedVerified
- Ship
- In ShipmentDashboard, enter tracking number
- Click “Ship”
- Verify: B1 to
Shipped, C1 toOutboundInTransit, garments toInTransitOutbound - ShipmentBatch record created
Expected Outcome
- Smooth flow from fulfillment to shipment
Scenario 5: Delivery to Wear Window
Goal: Verify automatic window progression.
Steps
- Setup
- Cycle C1 in
OutboundInTransitstate
- Cycle C1 in
- Confirm delivery
- In CycleManager, enter delivery confirmation
- Verify: C1 transitions to
Delivered
- Wait for auto-progression
- Run AutoProgressWearWindow automation
- Verify: C1 transitions to
WearWindowOpen
- Simulate wear window end
- Manually set delivered_at to 6 days ago (past wear window)
- Run AutoProgressWearWindow
- Verify
- C1 transitions to
ReturnWindowOpen - ReturnReminder created for user
- C1 transitions to
Expected Outcome
- Automatic progression without user action
Scenario 6: Return Flow
Goal: Verify return receiving and closeout.
Steps
- Setup
- Cycle C1 in
ReturnWindowOpenstate
- Cycle C1 in
- Initiate return
- Enter return tracking (carrier pickup)
- Verify: C1 to
ReturnInTransit, B1 toReturning
- Receive return
- In ReceivingStation, scan B1 barcode
- Verify: B1 to
Received, C1 toCloseoutInspection - Garments transition to
ReceivedReturn
- Inspect garments
- In InspectionStation, grade each garment
- G1: A → Refurbish
- G2: B → Refurbish
- G3: D → Repair
- Trigger settlement
- Click “Settle Cycle”
- Verify: C1 to
Settled
- Close cycle
- Verify: C1 to
Closed, B1 toClosed
- Verify: C1 to
Expected Outcome
- Complete return flow with inspection and settlement
Scenario 7: Late Return Escalation
Goal: Verify overdue return handling.
Steps
- Setup
- Cycle C1 in
ReturnWindowOpenstate - Set return_window_ends to 4 days ago (overdue)
- Cycle C1 in
- Run overdue check
- Execute CheckOverdueReturns automation
- Verify: ReturnReminder (level 2) created
- Simulate further delay
- Set return_window_ends to 8 days ago
- Run CheckOverdueReturns
- Verify hold applied
- User U1 transitions to
HoldLogistics - Next cycle for U1 cannot commit
- User U1 transitions to
- Receive late return
- Scan return at receiving
- Complete inspection/settlement
- Verify hold released
- U1 transitions back to
Active - Next cycle can commit
- U1 transitions back to
Expected Outcome
- Progressive escalation, hold applied, released on return
Scenario 8: Exception - Missing Garment
Goal: Verify missing item handling at closeout.
Steps
- Setup
- Cycle C1 shipped with [G1, G2, G3]
- Return received
- Inspection reveals missing item
- Scan received: [G1, G2] (G3 missing)
- In InspectionStation, mark G3 as “Not Returned”
- Verify
MissingGarmentevent created for G3- G3 transitions to
Lost - Settlement includes loss charge
- Close cycle
- Verify: Cycle closes with settlement reflecting loss
Expected Outcome
- Missing items handled with proper accounting
Scenario 9: Full Week Simulation
Goal: Verify complete weekly flow for multiple users.
Steps
- Sunday: Run scheduling for 5 users
- Monday: Run commitment (should commit all)
- Tuesday: Pack and ship all boxes
- Wednesday: Enter delivery confirmations
- Thursday-Monday: Wear window (automatic)
- Monday: Return window opens (automatic)
- Tuesday: Returns picked up
- Wednesday: Returns received, inspected
- Wednesday: Settlement/closeout
Verify Throughout
- All automations run on schedule
- No manual intervention needed for normal flow
- Events logged at each step
- Final state: All cycles Closed, garments back to Available (or Retired/Repair)
Expected Outcome
- Complete weekly cadence executed
Scenario 10: Capacity Constraint
Goal: Verify behavior when inventory insufficient.
Steps
- Setup
- Create more cycles than available inventory can fill
- Some garments already Reserved to other cycles
- Run commitment
- Verify: Cycles with available inventory commit
- Cycles without inventory: Attempt substitution
- If no substitute: Cancel with reason
- Verify
- CommitmentBatch shows cycles_blocked with reason
- Cancelled cycles have clear explanation
- User notified (manual for pilot)
Expected Outcome
- Graceful handling of capacity constraints
Validation Checklist
| Scenario | Pass/Fail | Notes |
|---|---|---|
| 1. Auto-Scheduling | ||
| 2. Commitment Success | ||
| 3. Commitment Blocked | ||
| 4. Fulfillment to Shipment | ||
| 5. Delivery to Wear Window | ||
| 6. Return Flow | ||
| 7. Late Return Escalation | ||
| 8. Missing Garment | ||
| 9. Full Week Simulation | ||
| 10. Capacity Constraint |
All scenarios must pass before production pilot.