Final design
Which tests verify concurrency protection and work-order completion in the overall architecture?
The final step uses the complete topology from step 6. Inside the boundary: interface → shift work order API → work order revisions, device sequences and resolution records. Synchronisation processing reads durable work from this datastore. The local gateway is external. Processing exchanges the domain messages described in the main flow; results reach the interface through the API. The evidence plan for work order A-35 covers concurrency, retries, boundaries and terminal completion. The table contains expected results of tests yet to be executed.
Starting point Safety authorisations retain their dedicated procedures.
Assumptions for the example case
A fictional example design for offline documentation of previously authorised routine work, with separate safety procedures. Zone information is marked stale from age 300 seconds; this does not authorise entry or work. All figures and test targets are illustrative assumptions.
Overall architecture with checks and review loops
Runtime topology
- 1 · Offline zone with device → Local device journal
- 2 · Local Device Journal → Synchronization Processing
- 3 · Synchronisation processing → Shift work order API
- 4 · Shift work order API → Relational central datastore
Offline work documentation
An offline report records an action against the received revision and grants no authorisation.
Test plan for the complete design
| Component | Test and expected result | Return to an earlier step |
|---|---|---|
| Shift work order API | The central change and offline completion both use revision 2. If completion wins, it is recorded and the change conflicts. If the change wins, the late completion opens an investigation case; the actual report is preserved rather than discarded as though the action never happened. | Steps 3 and 5 |
| Command journal | Identical retries take effect once; changed content produces a conflict. | Steps 4 and 7 |
| Domain boundary check | Test 299, 300 and 301 seconds. Expected result: zone information is marked stale from age 300 seconds; this does not authorise entry or work. | Step 2 |
| Work order revisions, device sequences and resolution records | After abgeschlossen, replay creates no second completion. A late new report for a cancelled work order creates an investigation task rather than silently reactivating it. | Steps 5 and 9 |
| Synchronization processing | After a connection interruption, the gateway resends events. The API stores the report and validation result before acknowledging it. A gap in the device sequence keeps completion open; the shift supervisor receives the conflicting work-order state together with the original report. | Steps 6 and 7 |
Shift work order API
- Test and expected result
- The central change and offline completion both use revision 2. If completion wins, it is recorded and the change conflicts. If the change wins, the late completion opens an investigation case; the actual report is preserved rather than discarded as though the action never happened.
- 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
- Test 299, 300 and 301 seconds. Expected result: zone information is marked stale from age 300 seconds; this does not authorise entry or work.
- Return to an earlier step
- Step 2
Work order revisions, device sequences and resolution records
- Test and expected result
- After abgeschlossen, replay creates no second completion. A late new report for a cancelled work order creates an investigation task rather than silently reactivating it.
- Return to an earlier step
- Steps 5 and 9
Synchronization processing
- Test and expected result
- After a connection interruption, the gateway resends events. The API stores the report and validation result before acknowledging it. A gap in the device sequence keeps completion open; the shift supervisor receives the conflicting work-order state together with the original report.
- Return to an earlier step
- Steps 6 and 7
First end-to-end test and outstanding evidence
- End-to-end path
- Test offline completion against a concurrent central change end to end. After a connection interruption, the gateway resends events. The API stores the report and validation result before acknowledging it. A gap in the device sequence keeps completion open; the shift supervisor receives the conflicting work-order state together with the original report.
- Clarify before extending the scope
- Agree the real local-gateway contract, retention periods, recovery targets and assigned roles. Every limit here is a design assumption. The evidence table describes tests to execute; technical integration, browser checks and comprehension checks with readers follow separately.
Test offline completion against a concurrent central change end to end
Test offline completion against a concurrent central change end to end.
A device loses its connection. Underground, completed routine work is documented locally while the shift supervisor plans a central change. Completion requires technical and business evidence.
The central change and offline completion both use revision 2. If completion wins, it is recorded and the change conflicts. If the change wins, the late completion opens an investigation case; the actual report is preserved rather than discarded as though the action never happened. 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
- The central change and offline completion both use revision 2. If completion wins, it is recorded and the change conflicts. If the change wins, the late completion opens an investigation case; the actual report is preserved rather than discarded as though the action never happened. Expected invariant: An offline report records a claimed action against the received work order revision; it grants no new safety authorisation or work permission. A deviation leads back to step 5 and the command contract in step 4.
- Test completion and retries
- Start with a reconciled work order whose device event sequence is complete and whose completion is confirmed by the shift supervisor. Redeliver its last device record identically twice. Expected result: one completion and an unchanged event sequence. In a separate test, a work order whose cancellation has already been delivered and acknowledged receives a new authentic execution record. Preserve it as investigation evidence without silently reactivating the work order. Revisit step 9 for responsibility and step 7 for the failure sequence if results differ.
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
Which evidence for a work order would originate outside the application in your own project?
In the example: Offline storage records the assigned revision. Fictional offline documentation of previously authorised routine work, with explicitly separate safety procedures.
Requirements
Which rule of your project remains binding even with slow processing?
In the example: Outdated zone information is visibly marked. Zone information is marked stale from age 300 seconds; this does not authorise entry or work.
Scale estimates
Which single entity concentrates load more than the daily average when reconciling underground work orders?
In the example: Reconnection determines the peak load profile. An average of 0.2 events/s says little about a gateway uploading 1000 buffered events after reconnecting.
Interfaces
Which input fields make two change intentions different in your project?
In the example: Each device has its own event namespace. The device, work order revision, local event number, actual time and report must remain identical on replay.
Data and states
Which states must remain protected in your model against late replay?
In the example: A conflict preserves both the original report and the central state. After abgeschlossen, replay creates no second completion. A late new report for a cancelled work order creates an investigation task rather than silently reactivating it.
Overall architecture
Which planned service boundary would distribute a currently local guarantee across the network?
In the example: The local gateway buffers independently of headquarters. Work order revisions, device sequences and resolution 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: Acknowledge only after durable acceptance. An offline report documents a claimed action against the received work order revision; it grants no new safety authorisation or work permission.
Bottlenecks and trade-offs
Which similar display could have two different causes in your project?
In the example: Diagnose connectivity and processing separately. Coverage gaps, local storage shortages and central processing backlogs need separate measurements. A new server does not eliminate a coverage gap.
Operations and security
Which open state in your project needs a domain specialist as well as technical operations?
In the example: Safety authorisations retain their dedicated procedures. After abgeschlossen, replay creates no second completion. A late new report for a cancelled work order creates an investigation task rather than silently reactivating it.
Final design
Which two counterexample tests will you run first in your own end-to-end implementation?
In the example: Test offline completion against a concurrent central change end to end. The central change and offline completion both use revision 2. If completion wins, it is recorded and the change conflicts. If the change wins, the late completion opens an investigation case; the actual report is preserved rather than discarded as though the action never happened.