Final design
Which tests prove contention protection and completion for maintenance findings in the overall architecture?
The final design retains the complete topology from step 6. Within the system boundary: interface → maintenance API → measurement windows, model references, findings and maintenance records; feature and model processing reads durably stored work from this datastore. Outside: sensor source. The processing receives or transmits the domain messages described in the main path; the result reaches the interface via the maintenance API. The proof plan complements maintenance finding B-30 with concurrency, retries, exact boundaries and terminal completion. The table specifies expected results for tests still to be run.
Starting point Closing a work order requires a maintenance report.
Assumptions for the example case
Own fictitious example design. Fictional suggestions for a single machine based on vibration trends, with human approval of work orders. Measurement windows last 60 seconds and are closed on the left, open on the right; a measurement at exactly 60 seconds belongs in the next window. All figures and test goals are illustrative assumptions.
Overall architecture with checks and review loops
Runtime topology · External entities, processes and datastores
- 1 · Sensor source → Measurement ingestion
- 2 · Measurement ingestion → Time-ordered measurement store
- 3 · Time-ordered measurement store → Feature and model processing
- 4 · Feature and model processing → Maintenance API
- 5 · Maintenance API → Relational maintenance store
Maintenance suggestion and work order
One finding per measurement window and model revision creates at most one work order approved by a human.
Test plan for the complete design
| Component | Test and expected result | Return to an earlier step |
|---|---|---|
| Maintenance API | Approval and dismissal both expect version 2: in either order, one commit wins; the losing decision receives a conflict and creates no maintenance order. | Steps 3 and 5 |
| Command journal | Identical retries take effect once; changed content produces a conflict. | Steps 4 and 7 |
| Domain boundary check | Check values 59, 60 and 61 seconds. Oracle: Measurement windows last 60 seconds and are closed on the left, open on the right; a measurement at exactly 60 seconds belongs in the next window. | Step 2 |
| Measurement windows, model references, findings and maintenance records | After erledigt or verworfen, an old suggestion creates no new order. A new measurement window receives a new finding. | Steps 5 and 9 |
| Feature and model processing | Model processing uniquely stores findings and window reference. Two examiners attempt release and rejection. The local version serializes the decisions; only the successful release commit creates a maintenance order. | Steps 6 and 7 |
Maintenance API
- Test and expected result
- Approval and dismissal both expect version 2: in either order, one commit wins; the losing decision receives a conflict and creates no maintenance order.
- Return to an earlier step
- Steps 3 and 5
Command journal
- Test and expected result
- Identical retries take effect once; changed content produces a conflict.
- Return to an earlier step
- Steps 4 and 7
Domain boundary check
- Test and expected result
- Check values 59, 60 and 61 seconds. Oracle: Measurement windows last 60 seconds and are closed on the left, open on the right; a measurement at exactly 60 seconds belongs in the next window.
- Return to an earlier step
- Step 2
Measurement windows, model references, findings and maintenance records
- Test and expected result
- After erledigt or verworfen, an old suggestion creates no new order. A new measurement window receives a new finding.
- Return to an earlier step
- Steps 5 and 9
Feature and model processing
- Test and expected result
- Model processing uniquely stores findings and window reference. Two examiners attempt release and rejection. The local version serializes the decisions; only the successful release commit creates a maintenance order.
- Return to an earlier step
- Steps 6 and 7
First end-to-end test and outstanding evidence
- End-to-end path
- A duplicate measurement window and conflicting reviews form the end-to-end test. Model processing uniquely stores findings and window reference. Two examiners attempt release and rejection. The local version serializes the decisions; only the successful release commit creates a maintenance order.
- Clarify before extending the scope
- Before real use, agree the sensor-source contract, retention, recovery targets and roles. All the limit values here are design assumptions. The proof table describes tests to be carried out; technical integration, browser testing and comprehension testing with readers follow separately.
Test a duplicate measurement window and a conflicting review end to end
Test a duplicate measurement window and a conflicting review end to end.
A model flags a maintenance need. Receiving the same measurement series twice must not create a second maintenance order. Completion requires technical and domain evidence.
Approval and dismissal both expect version 2: in either order, one commit wins; the losing decision receives a conflict and creates no maintenance order. The exercise specifies the input and expected result.
- Alternative considered
- An initial end-to-end path limited to lists and forms postpones the critical state checks.
- Trade-off
- The first end-to-end path needs controlled concurrency and failure points.
- Reassess
- Passing the counterexample tests and checks with readers provides grounds for extending the case.
Try it yourself
Choose two architectural decisions: concurrency protection and evidence-backed completion. For each, name the test, expected result and step to revisit.
A hint for your attempt
Link the markers of the overall architecture with the associated design steps.
Compare with a possible solution
- Concurrency control
- Approval and dismissal both expect version 2: in either order, one commit wins; the losing decision receives a conflict and creates no maintenance order. The invariant is expected: One machine finding per measurement window and model revision generates at most one approved maintenance order; a model output alone does not trigger a physical equipment effect. Deviation leads back to step 5 and to the command contract in step 4.
- Test completion and retries
- Initial state: an approved finding has exactly one maintenance order. Store the actual maintenance report and final review to complete the finding. Deliver the same measurement window with the same model revision again and attempt to approve the old finding again. Expected result: the finding remains complete, exactly one maintenance order remains, and the new approval receives a conflict. Only a new measurement window creates a new reviewable finding. Deviations lead back to step 9 for ownership and step 7 for the failure sequence.
Apply to your project
Which two counterexample tests will you run first in your own end-to-end implementation?
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 proof of maintenance findings would arise in your own project outside of the application?
In the example: A model suggestion receives a human review. Fictional suggestions for a single machine based on vibration trends, with human approval of work orders.
Requirements
Which rule of your project remains binding even with slow processing?
In the example: Measurement quality is part of the finding. Measurement windows last 60 seconds, inclusive at the start and exclusive at the end; a measurement at exactly 60 seconds belongs to the next window.
Scale estimates
Which single item concentrates the load more than the daily mean value when required for maintenance?
In the example: Test measurement rate and concurrent finding updates separately. An average of 10 events/s says little about 100 identical measurement-window deliveries for the same machine.
Interfaces
Which input fields make two change intentions different in your project?
In the example: Approval identifies the measurement window and model revision. The machine, measurement window, model revision, finding and review result must remain identical on replay.
Data and states
Which states must remain protected in your model against late replay?
In the example: The window and model version identify the finding. After erledigt or verworfen, an old suggestion creates no new order. A new measurement window receives a new finding.
Overall architecture
Which planned service boundary would distribute a currently local guarantee across the network?
In the example: Computation remains separate from the maintenance core. Measurement windows, model references, findings and maintenance records must express the same valid state.
Critical flow
What feedback could be missing even though the underlying action has already taken place?
In the example: One approval commit creates one maintenance order. A machine finding per measurement window and model revision produces at most one approved maintenance order; a model output alone triggers no physical equipment effect.
Bottlenecks and trade-offs
Which similar display could have two different causes in your project?
In the example: False alarm rates require confirmed feedback. A rising false-alarm proportion requires labelled feedback after maintenance review; a large computation backlog requires runtime measurements. More computation processes do not automatically improve model quality.
Operations and security
Which open state in your project needs a domain specialist as well as technical operations?
In the example: Closing a work order requires a maintenance report. After erledigt or verworfen, an old suggestion creates no new order. A new measurement window receives a new finding.
Final design
Which two counterexample tests will you run first in your own end-to-end implementation?
In the example: Test a duplicate measurement window and a conflicting review end to end. Approval and dismissal both expect version 2: in either order, one commit wins; the losing decision receives a conflict and creates no maintenance order.