Case study 05Back to work

Environmental data · Decision policy · Python

Current evidence.
No false confidence.

ClearCurrent turns fragmented forecast, alert, rainfall, field and historical-sample evidence into a deterministic decision record. It shows what is fresh, stale, missing, synthetic or conflicting before advice is presented.
Source records ingested
9,656
Automated tests
35
Failure replays
6
Historical site IDs
39
System thesis

A measurement is not yet a decision.

Water evidence arrives with different latency, authority and meaning. A laboratory sample may be real but historical. A forecast may be official but stale. Rainfall can change the conservative decision even when another feed appears reassuring.

The important engineering work is preserving those distinctions under failure. ClearCurrent refuses to turn incomplete evidence into a clean green status. Its strongest output is often unknown.

Decision path

From source record to replayable judgement.

  1. 01Normalize

    Validate source fields, units, timestamps and qualifiers before evidence enters the domain.

  2. 02Address

    Canonicalize each evidence envelope and derive its immutable SHA-256 identity.

  3. 03Evaluate

    Apply a versioned precedence policy across authority, freshness, rainfall and observations.

  4. 04Explain

    Persist the state, reasons, conflicts, limitations and every evidence record that influenced it.

Correctness boundaries

The places a polished dashboard can become dangerous.

The architecture treats overconfidence as a system failure, not a copywriting problem.

01

Authority is data

Official, observed and synthetic evidence remain explicit fields. A familiar-looking URL never grants authority.

02

Freshness is enforced

A Good forecast cannot be carried forward after its evidence window expires. Required stale inputs produce an unknown state.

03

Conflict stays visible

When recent rain conflicts with a reassuring forecast, the conservative rule wins and the disagreement remains in the record.

04

Samples stay historical

Laboratory results describe past conditions. They add context but cannot establish current recreational-water conditions.

05

Replay blocks leakage

An assessment cannot consume evidence observed after its requested time, preventing future information from entering a historical replay.

06

Outputs are immutable

Canonical evidence and policy inputs produce content-addressed records; the same facts produce the same assessment identifier.

Implementation

A portable vertical slice with a pure policy core.

DomainTyped immutable Python dataclasses · UTC event time
PolicyVersioned precedence · freshness windows · conservative fallback
IngestionDataVic CKAN adapter · schema validation · deterministic snapshot
StateSQLite · immutable assessment documents · content hashes
DeliveryStandard-library HTTP API · responsive replay console
Verification35 contract tests · six failure scenarios · CI integrity check
Verification evidence

What Milestone 1 proves today.

01Real ingestionThe adapter inspected 9,656 EPA Victoria historical records and reduced them to the latest record for 39 historical site identifiers.

02Tamper evidenceThe attributed snapshot records its resource identifier, transformation, source count, license and a deterministic hash over normalized records.

03Failure behaviourTests cover active alerts, Poor and Fair forecasts, recent rain, stale feeds, missing forecasts, source conflicts and future-data leakage.

04Honest confidenceConfidence describes evidence completeness and freshness—not the probability that water is safe—and synthetic replay evidence is capped.

05Runnable boundaryThe API, SQLite store and browser console run with Python 3.12 and no third-party runtime dependency.

Known limits

A strong prototype is not a public-health service.

ClearCurrent is not an EPA forecast, medical advice or a guarantee of water safety. The committed operational replay fixtures are synthetic. Users must still check current EPA Victoria forecasts, active alerts and visible conditions.

Production use would require an authorised live EPA API subscription, rainfall-gauge integration, geospatial site validation, service monitoring, accessibility testing with users, security review and stakeholder approval of the decision policy.

Inspect the evidence boundary

Start with the failure that looks reassuring.

A Good forecast plus fresh rainfall becomes avoid, and the conflict stays attached to the assessment. That is the system in one replay.