diff --git a/BACKLOG.md b/BACKLOG.md index 7d6bf19..57bf427 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -11,14 +11,25 @@ Status: TODO / IN PROGRESS / DONE / BLOCKED. ## P0 — Next build -- [ ] **Price history archive (start now — warm the data for Trends)** — relay-api - appends one daily snapshot (digest-change-triggered, once per calendar day) using - the existing `relay_snapshot.py` shape; prune to ~90 days (~18 MB). No UI - dependency: accumulating TODAY means the Trends graph launches with weeks of real - history instead of an empty chart. Optional first-weeks tweak: hourly snapshots to - build history faster, then settle to daily. Later add - `/api/v1/history?station=&fuel=&days=` (keyless, X-Client-tagged like - `/api/v1/stations`). +- [ ] **GitHub price-history mirror (start now — warm the data for Trends)** — the + relay does the GOV.UK heavy lifting (OAuth token stays in relay `.env`) and + pushes a daily snapshot to a PUBLIC repo; the app reads from GitHub, so this + doubles as the production data source (App Review can't reach the LAN relay) AND + the history archive the Trends graph (P1) reads. Shape: relay writes + `latest.json` (tiny pointer: date, station_count, data_updated, available range) + + `history/YYYY-MM-DD.json` (full ~200 KB dump) and pushes once/day; the app + fetches `raw.githubusercontent.com/aptonline/fuelboard-data/main/latest.json`, + then only the missing day files for starred (station, fuel) pairs (deterministic + URLs — 404 = no data that day, leave a graph gap, never error). LAN relay stays + the fallback source. Setup: create the PUBLIC repo `aptonline/fuelboard-data` + (gh installed); GitHub PAT (aptonline) lives in relay `.env` only — never in the + repo or IPA. App Review: public repo required (reviewer fetches the data + themselves); HTTPS/ATS fine; plain JSON is not "remote code" (2.5.2-safe); bundle + a small fallback dump so the app never demos empty. Growth ~200 KB/day (~73 MB/yr + — no pruning for years); git history doubles as an audit trail. Optional + first-weeks tweak: hourly pushes to build history faster, then settle to daily. + Accumulating TODAY means the Trends graph launches with weeks of real history + instead of an empty chart. ## P1 — Soon @@ -101,12 +112,6 @@ Status: TODO / IN PROGRESS / DONE / BLOCKED. - [ ] **App Intents testing** — AppIntentsTesting (iOS 27) for intent coverage instead of XCUITest when the Siri features land. -- [ ] **Production data mirror (GitHub)** — relay pushes the synced dump - (`stations.json` + `latest.json` version pointer) to a PUBLIC GitHub repo; the - app fetches `raw.githubusercontent.com` with the LAN relay as fallback source. - Public repo required for App Review (reviewer must fetch the data themselves); - HTTPS/ATS fine; plain JSON data is not "remote code" (2.5.2-safe); bundle a small - fallback dump so the app never demos empty. Needs GitHub PAT (aptonline account). - [ ] **Fuel-price prediction** — "price tends up/down" arrow derived from the price-history archive (P0). Cheap once the archive + Trends graph exist; keep a separate phase. Backlog ancestry: this was the original "relay could keep a