Wet-stock reconciliation — at1 wetstock

Fuel-tank numbers never balance exactly — the question is whether a discrepancy is noise or a leak. at1 wetstock reconciles daily dips, deliveries and pump totals with a model-coupled residual plus a CUSUM change-detector, separating a real leak or meter drift from ordinary scatter, and issues a certified report: a loss rate, a 95% confidence interval, and an estimated onset date.

Use it

# CSV: one row per tank per day, ascending date order (all volumes in litres)
#   date,tank,opening_dip,deliveries,pump_sales,closing_dip
#   2025-01-01,T07,20000.0,0.0,4500.0,15480.0

# reconcile a tank history -> certified JSON report (verdict, loss rate, 95% CI, onset date)
at1 wetstock reconcile tank_07.csv -o wetstock-report.json
#   exit code 2 when any tank is flagged -> drop into a CI step or a cron alert

What it tells you

  • Leak vs noise — a model-coupled residual separates a real loss from daily scatter, rather than a spreadsheet eyeball.
  • Leak vs meter drift — a constant litres-per-day loss reads as a leak; a loss that scales with throughput reads as meter drift. When the evidence can't separate them it says so (mechanism ambiguous) instead of guessing.
  • When it started — the CUSUM detector estimates the onset date, so you know not just that there's a loss but roughly when it began.

Honest scope

This is a statisticalreconciliation — it flags and sizes a loss with a confidence interval; it does not physically locate a leak or replace a certified calibration. Detection power depends on how clean and regular your daily readings are: sparse, erratic or mis-entered dips widen the interval and delay onset detection, and small losses need more days to separate from noise. The right check is your acceptance test on real data: run it over a tank with a known historical loss and see if the report matches. Validated on synthetic tank histories; partner acceptance on real forecourt data is pending.

See the marketing overview at Wet-Stock.

← CLI reference