From 767884146d239a3a945e3892205886ac490724db Mon Sep 17 00:00:00 2001 From: jing Date: Mon, 13 Jul 2026 16:30:17 +1000 Subject: [PATCH] wave2 phase 4: historical record & replay (true time-travel) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scrubbing off-live now REPLAYS actual recorded traffic instead of just hiding aircraft (orbits were already computable in the past; live traffic was not). - record.py (new, dev-only daemon): every 180s fetches through the local proxy (so the shared cache dedupes quota — never hits OpenSky directly), reduces to airborne essentials, zlib-compresses into SQLite data/history.db (WAL), keeps 72h, prunes + checkpoints hourly. Wired into John's ~/.jobs heartbeat. - serve.py: GET history/aircraft?t= returns the nearest snapshot within ±10 min (read-only per-request sqlite connection — WAL means never locks the recorder), else a JSON 404. - aircraft.js: onClockTick drives replay when not-live. Build loop factored into renderPlanes() shared by live + replay. Replayed aircraft show amber ("replay ·