Backlog: P0 archive reshaped to GitHub price-history mirror (relay pushes daily latest.json + history/YYYY-MM-DD.json to public fuelboard-data repo; app reads raw.githubusercontent); P3 production-mirror item absorbed into P0

This commit is contained in:
FuelBoard Contributor
2026-08-15 05:49:18 +01:00
parent 16bf9ba9dd
commit 817a829107
+19 -14
View File
@@ -11,14 +11,25 @@ Status: TODO / IN PROGRESS / DONE / BLOCKED.
## P0 — Next build ## P0 — Next build
- [ ] **Price history archive (start now — warm the data for Trends)**relay-api - [ ] **GitHub price-history mirror (start now — warm the data for Trends)**the
appends one daily snapshot (digest-change-triggered, once per calendar day) using relay does the GOV.UK heavy lifting (OAuth token stays in relay `.env`) and
the existing `relay_snapshot.py` shape; prune to ~90 days (~18 MB). No UI pushes a daily snapshot to a PUBLIC repo; the app reads from GitHub, so this
dependency: accumulating TODAY means the Trends graph launches with weeks of real doubles as the production data source (App Review can't reach the LAN relay) AND
history instead of an empty chart. Optional first-weeks tweak: hourly snapshots to the history archive the Trends graph (P1) reads. Shape: relay writes
build history faster, then settle to daily. Later add `latest.json` (tiny pointer: date, station_count, data_updated, available range)
`/api/v1/history?station=&fuel=&days=` (keyless, X-Client-tagged like + `history/YYYY-MM-DD.json` (full ~200 KB dump) and pushes once/day; the app
`/api/v1/stations`). 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 ## P1 — Soon
@@ -101,12 +112,6 @@ Status: TODO / IN PROGRESS / DONE / BLOCKED.
- [ ] **App Intents testing** — AppIntentsTesting (iOS 27) for intent coverage - [ ] **App Intents testing** — AppIntentsTesting (iOS 27) for intent coverage
instead of XCUITest when the Siri features land. 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 - [ ] **Fuel-price prediction** — "price tends up/down" arrow derived from the
price-history archive (P0). Cheap once the archive + Trends graph exist; keep a 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 separate phase. Backlog ancestry: this was the original "relay could keep a