Final design
The end-to-end test ends with all goods accounted for. Which conditions ensure this outcome?
Dispatch confirmation alone does not prove arrival.
Starting point Documented disposition of the goods closes the investigation.
Assumptions for the example case
A fictional shipment of 100 boxes of hygiene supplies between a warehouse and a distribution point. Local inventory ownership remains clear; offline devices document assigned shipments. All quantities, thresholds and operational targets in this design are illustrative assumptions.
Aid supplies with evidence
Central allocation, local supporting documents
Only the API allocates available stock; the offline device submits events through the adapter to the same shipment records.
Test plan with expected outcomes
| Input and initial state | Expected result | Return to an earlier step |
|---|---|---|
| C-49 has 100 available → Attempt two allocations of 100 in both arrival orders | One succeeds, the other is rejected; available stock 0. | Step 5 |
| U-49 stored with 98/2 → Identical replay; then 99/1 under the same identifier | One quantity effect; the changed replay conflicts. | Step 4 |
| S-49 dispatched 100 → Receipt sums 99/100/101 | 99 leaves 1 unaccounted for; 100 can be fully accounted for; 101 conflicts without changing quantities. | Step 2 |
| 98 accepted, 2 damaged → Accept the disposal record for 2 twice | Resolved and completed; exactly 100 accounted for; originating warehouse stock remains unchanged. | Step 5/10 |
C-49 has 100 available → Attempt two allocations of 100 in both arrival orders
- Expected result
- One succeeds, the other is rejected; available stock 0.
- Return to an earlier step
- Step 5
U-49 stored with 98/2 → Identical replay; then 99/1 under the same identifier
- Expected result
- One quantity effect; the changed replay conflicts.
- Return to an earlier step
- Step 4
S-49 dispatched 100 → Receipt sums 99/100/101
- Expected result
- 99 leaves 1 unaccounted for; 100 can be fully accounted for; 101 conflicts without changing quantities.
- Return to an earlier step
- Step 2
98 accepted, 2 damaged → Accept the disposal record for 2 twice
- Expected result
- Resolved and completed; exactly 100 accounted for; originating warehouse stock remains unchanged.
- Return to an earlier step
- Step 5/10
End-to-end test and unresolved agreements
- First end-to-end path
- Allocate 100 boxes, dispatch offline and record receipt as 98/2; test duplicate synchronisation and close the damage case with a disposal record.
- Clarify before real use
- Customs, transfer of ownership, donor documentation, storage and actual responsibilities must be agreed for each mission.
The end-to-end test ends with all goods accounted for.
Test offline replay and damage resolution together.
Dispatch confirmation alone does not prove arrival.
One successful allocation of 100; failures lead back to 5. 98 + 2 reaches closure with evidence; failures lead back to 2 and 9.
- Alternative considered
- The happy path overlooks lost quantities.
- Trade-off
- The test needs physical disposition categories.
- Reassess
- Extend to other goods after validating the evidence path.
Try it yourself
Map contention and damage tests to earlier design steps.
A hint for your attempt
Dispatch confirmation alone does not prove arrival.
Compare with a possible solution
- Contention
- One successful allocation of 100; failures lead back to 5.
- Disposition
- 98 + 2 reaches closure with evidence; failures lead back to 2 and 9.
Apply to your project
How does “The end-to-end test ends with all goods accounted for” apply to your own project?
Start your own design
Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.
Download design template (.md)Compare the ten tasks with the example case
Purpose and boundary
How does “Offline records document assigned goods” apply to your own project?
In the example: New allocations remain the warehouse team's responsibility.
Requirements
How does “Every box needs an evidenced disposition” apply to your own project?
In the example: The inventory balance distinguishes acceptance from damage.
Scale estimates
How does “Data buffers and goods use different units” apply to your own project?
In the example: Calculate storage capacity and goods quantities separately.
Interfaces
How does “Event identifiers remain stable across offline retries” apply to your own project?
In the example: Replay uses the same identifier and payload.
Data and states
How does “In transit is not a completed outcome” apply to your own project?
In the example: The remaining goods' whereabouts stay unresolved until evidenced.
Overall architecture
How does “The offline buffer is not a second inventory ledger” apply to your own project?
In the example: The synchronisation adapter accepts records; the API manages inventory.
Critical flow
How does “Resolve competing allocations before dispatch” apply to your own project?
In the example: Allocation checks and reserves stock atomically.
Bottlenecks and trade-offs
How does “Missing files and missing goods require different actions” apply to your own project?
In the example: Track technical discrepancies and physical discrepancies separately.
Operations and security
How does “Disposal closes the damage case” apply to your own project?
In the example: Documented disposition of the goods closes the investigation.
Final design
How does “The end-to-end test ends with all goods accounted for” apply to your own project?
In the example: Test offline replay and damage resolution together.