System Design Atlas

Water leak detection and repair orders

10 / 10Worked example

Design and evidence

Which tests link valid suspicion and proven restoration?

The final design reuses the complete runtime topology from step 6. Test markers connect key decisions to expected results and earlier steps to revisit. The following items form a test plan; measured evidence is still outstanding.

Starting point Give field service the reason for outstanding remedial work.

Assumptions for the example case

This fictional worked design assumes a bounded metering zone, minute-by-minute flow readings, manual confirmation of findings and one active repair order per confirmed finding. Numbers and quality targets are illustrative test assumptions. Automatic valve control, full hydraulic simulation and drinking water quality assessment are outside scope.

Overall architecture with evidence

Runtime architecture · time series and finding records

  1. 1 · Measurement committed
  2. 2 · Form suspicion
  3. 3 · Record the work order
  4. 4 · Verify after repair
Measuring stationMinute values
Control room interfaceFindings
Field service deviceLocal queue

Water network platform

Measurement ingestionSequence + Quality
Time-series datastoreMinute values
Suspected leak workerThree-reading sequence
Findings APIInvestigation + Order
Findings and work order storeB-111 · R-111
Post-repair inspection workerMeasurement after repair
Network documentationMetering-zone version
Measuring station → Measurement ingestionValue + quality
Measurement ingestion → Time-series storeCommit sequence
Time-series store → Suspected leak workerValid minute sequence
Control room interface → Findings APIConfirm finding
Field service device → Findings APISynchronise offline evidence
Findings API → Findings and work order storeB-111 + R-111
Network documentation → Findings APIZone version
Time-series store → Post-repair inspection workerNew readings
Findings and work order store → Post-repair inspection workerOpen work order
Post-repair inspection worker → Control room interfaceSubmit inspection evidence for review
Control room interface → Findings APIConfirm restoration or assign remedial work
Threshold Step 3/5Replay · Step 4Offline document · Step 7/9

Suspected leak detection reads measurements; the findings API manages the work order; post-repair inspection links both stores through the open repair case.

Measurements and repairs have different lifecycles. Store the time series separately and reference the finding evidence. Millions of readings do not overwhelm the work order view.

Test plan with review loops

ValidationExpected resultReturn to an earlier step
Concurrency in both ordersTwo control room operators confirm the same finding and start R-111 concurrently. Either commit order creates one work order; the second request reads the existing assignment.Steps 3 and 5
Identical and changed retriesThe station delivers the same sequence twice: it counts once towards the three-reading sequence. A changed value under the same sequence is quarantined. A duplicate repair report creates no second post-repair inspection.Step 4
Exact value or time limitAdditional flow of 20.00 litres/min does not exceed the threshold; 20.01 does. The sequence 20.01/20.01/20.01 creates a suspected leak; 20.01/invalid/20.01 breaks the sequence and creates none.Steps 2 and 5
Lost response and restartField service documents a repair offline and synchronises twice. One work record is created; the order stays in repariert until post-repair inspection provides evidence. Missing measurements after repair leave verification open rather than proving successful restoration.Steps 7 and 9

Concurrency in both orders

Expected result
Two control room operators confirm the same finding and start R-111 concurrently. Either commit order creates one work order; the second request reads the existing assignment.
Return to an earlier step
Steps 3 and 5

Identical and changed retries

Expected result
The station delivers the same sequence twice: it counts once towards the three-reading sequence. A changed value under the same sequence is quarantined. A duplicate repair report creates no second post-repair inspection.
Return to an earlier step
Step 4

Exact value or time limit

Expected result
Additional flow of 20.00 litres/min does not exceed the threshold; 20.01 does. The sequence 20.01/20.01/20.01 creates a suspected leak; 20.01/invalid/20.01 breaks the sequence and creates none.
Return to an earlier step
Steps 2 and 5

Lost response and restart

Expected result
Field service documents a repair offline and synchronises twice. One work record is created; the order stays in repariert until post-repair inspection provides evidence. Missing measurements after repair leave verification open rather than proving successful restoration.
Return to an earlier step
Steps 7 and 9

First end-to-end validation

End-to-end path
Test three consecutive readings, a confirmed finding and a duplicate offline repair. One work order stays open until a valid follow-up inspection.
Open decision
After that, several coupled districts will be added. Automatic valve control, complete hydraulic simulation and drinking water quality evaluation require their own follow-up design.

Test duplicate reports

Test duplicate reports

Test three consecutive readings, a confirmed finding and a duplicate offline repair.

The main path needs three different proofs.

An order remains open until valid follow-up inspection.

Alternative considered
Testing only the alarm leaves repair untested.
Trade-off
Test data needs a reading sequence and field service evidence.
Reassess
After that, several coupled districts will be added.

Terms in this step

Test duplicate reports
An order remains open until valid follow-up inspection.

Try it yourself

Connect detection and repair through two end-to-end tests and review loops.

A hint for your attempt

Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.

Compare with a possible solution
First part of the solution
A duplicate measurement sequence counts once and creates no artificial three-reading sequence; a failure returns to step 2/4.
Second part of the solution
A duplicate offline repair creates one record and stays open without post-repair inspection; a failure returns to step 7/9.

Apply to your project

Which corresponding assumption in your project would you check first? Consider this trigger: After that, several coupled districts will be added.

Transfer the system boundary, evidence and open decisions to the editable Markdown design template.

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
  1. Purpose and boundary

    Which corresponding assumption in your project would you check first? Consider this trigger: A validated diagnostic model is commissioned separately.

    In the example: The control room confirms the cause before issuing a repair order. A measurement deviation is a reason to investigate.

  2. Requirements

    Which corresponding assumption in your project would you check first? Consider this trigger: The domain rule is recalibrated.

    In the example: Reset the three-reading sequence after an invalid minute. Only three evidenced threshold exceedances trigger detection.

  3. Scale estimates

    Which corresponding assumption in your project would you check first? Consider this trigger: Longer connectivity outages become common.

    In the example: Test 2,000 measurements/s as a catch-up profile. Catch-up load exceeds the normal rate of 33.33 measurements/s.

  4. Interfaces

    Which corresponding assumption in your project would you check first? Consider this trigger: Replacing the station changes its identity.

    In the example: Use the station and sequence as a stable measurement identity. One measurement does not satisfy a sequence of three.

  5. Data and states

    Which corresponding assumption in your project would you check first? Consider this trigger: A finding requires several separate trades.

    In the example: Store exactly one active order per finding. R-111 is created once.

  6. Overall architecture

    Which corresponding assumption in your project would you check first? Consider this trigger: Long-term evidence needs archival access.

    In the example: Keep the time series separately and reference the finding evidence. Millions of measurements do not overwhelm the work order view.

  7. Critical flow

    Which corresponding assumption in your project would you check first? Consider this trigger: A separate physical acceptance process is agreed upon.

    In the example: Synchronise the work record once and keep follow-up inspection open. Duplicate synchronisation does not close the case without evidence of success.

  8. Bottlenecks and trade-offs

    Which corresponding assumption in your project would you check first? Consider this trigger: Device timestamps are unreliable.

    In the example: Separate measurement age from ingestion throughput. Fast ingestion does not prove that the network view is current.

  9. Operations and security

    Which corresponding assumption in your project would you check first? Consider this trigger: Recurring causes require network planning.

    In the example: Give field service the reason for outstanding remedial work. The finding remains open until evidence exists.

  10. Final design

    Which corresponding assumption in your project would you check first? Consider this trigger: After that, several coupled districts will be added.

    In the example: Test three consecutive readings, a confirmed finding and a duplicate offline repair. One work order stays open until a valid follow-up inspection.