Final design
The end-to-end path includes a valid and a rejected path. What conditions ensure the result?
Only successful measurements would leave the time limit unchecked.
Starting point Hash verification blocks incomplete result versions.
Assumptions for the example case
Fictitious training laboratory with an aqueous control sample. The draft documents custody changes and results; diagnostic interpretation and clinical decisions are outside the case. All quantities, thresholds and operational objectives of this design are illustrative assumptions.
Laboratory architecture with counterexamples
Device adapter and authorised reviewer
The inbox and domain state share the relational data store; raw data stays separately in object storage.
Test plan with expected outcomes
| Input and initial state | Expected result | Return to an earlier step |
|---|---|---|
| P-40 in transit, version=2 → receipt A/B and B/A expected=2 | A custodian wins; loser conflict; exactly a confirmed receipt. | Step 5 and 7 |
| Receipt A committed → A identical, then other recipients under A | Identical result; altered repetition conflict. | Step 4 |
| Removal t=0 → Receipt at 7,199,999 / 7,200,000 / 7,200,001 ms | Only first receipt allowed in time; other rejections with reason. | Step 2 |
| E-40 measured → rawHash missing; then quality failure; alternatively, complete authorised review | Missing hash blocks release; failed quality review makes the measurement invalid; complete successful review releases it. | Step 5 and 10 |
P-40 in transit, version=2 → receipt A/B and B/A expected=2
- Expected result
- A custodian wins; loser conflict; exactly a confirmed receipt.
- Return to an earlier step
- Step 5 and 7
Receipt A committed → A identical, then other recipients under A
- Expected result
- Identical result; altered repetition conflict.
- Return to an earlier step
- Step 4
Removal t=0 → Receipt at 7,199,999 / 7,200,000 / 7,200,001 ms
- Expected result
- Only first receipt allowed in time; other rejections with reason.
- Return to an earlier step
- Step 2
E-40 measured → rawHash missing; then quality failure; alternatively, complete authorised review
- Expected result
- Missing hash blocks release; failed quality review makes the measurement invalid; complete successful review releases it.
- Return to an earlier step
- Step 5 and 10
End-to-end test and unresolved agreements
- First end-to-end path
- Accept the control sample, trigger concurrent receipt attempts, retry the instrument message and release the result with complete provenance. Separately, reject a sample exactly at the expiry boundary.
- Clarify before real use
- Procedure-specific acceptance criteria, actual signature requirements, retention and domain-specific quality assurance require separate agreements.
The end-to-end test covers a valid path and a rejected path.
Validate acceptance, concurrency, measurement association and result release together.
Only successful measurements would leave the time limit unchecked.
Sample receipt rejects exactly 120 minutes; error leads to step 2. Handover chain allows a winner in both orders; error leads to step 5 and 7.
- Alternative considered
- A result view with a demo value does not prove a chain of provenance.
- Trade-off
- Error points must be injected in a targeted manner.
- Reassess
- Only after this evidence will further procedures be added.
Try it yourself
Assign the time-limit test and concurrent receipt test to a module, expected result and design step to revisit.
A hint for your attempt
Only successful measurements would leave the time limit unchecked.
Compare with a possible solution
- Acceptance window
- Sample receipt rejects exactly 120 minutes; error leads to step 2.
- Change of depository
- Handover chain allows a winner in both orders; error leads to step 5 and 7.
Apply to your project
What is the equivalent of “The end-to-end path includes a valid and a rejected path” in your own design?
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
What is the equivalent of “sample and result bear separate responsibility.” in your own project?
In the example: Receipt and authorised result release remain separate decisions.
Requirements
What is the equivalent of “The acceptance window ends exactly.” in your own project?
In the example: At receipt, check that age is less than 120 minutes.
Scale estimates
What is the equivalent of “delivery generates the scanning peak.” in your own project?
In the example: Test average load and scanning peaks separately.
Interfaces
What is the equivalent of "The recipient belongs to the repeat contract." in your own project?
In the example: The key and input hash identify the same receipt.
Data and states
Which correspondence has "custody change and results remain comprehensible." in your own project?
In the example: The previous custodian remains authoritative until acceptance is confirmed.
Overall architecture
What is the equivalent of “Big raw data is outside the receiving commit.” in your own project?
In the example: Store raw data immutably and associate it by hash.
Critical flow
What is the equivalent of "The winning commit decides the custodian." in your own project?
In the example: Write the version check and receipt atomically.
Bottlenecks and trade-offs
Which equivalent has “Unallocated data is a domain workflow bottleneck” in your own project?
In the example: Count unassigned measurements separately by cause.
Operations and security
What is the equivalent of "Every release needs recoverable origin." in your own project?
In the example: Hash verification blocks incomplete result versions.
Final design
What is the equivalent of “The end-to-end path includes a valid and a rejected path” in your own design?
In the example: Validate acceptance, concurrency, measurement association and result release together.