review(3-1): story 3-1 passes all ACs — mark done, add deferred items

All 10 review criteria pass. No code changes required: implementation
matches spec exactly. Added two deferred-work items for only
requests.Timeout being caught (other fetch errors propagate without
stale marking) and the growing _run_one_cycle signature (RendererState
dataclass suggested for future). 103 tests pass, ruff clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Edholm
2026-04-22 23:51:16 -04:00
parent 833a7f0917
commit d97c66a53e
3 changed files with 17 additions and 3 deletions
@@ -165,6 +165,20 @@ Description: Trail entries are `(x, y)` pixel coordinates computed against the `
---
## Story 3.1: Stale State Detection & Dimmed Display
### [3-1] Only requests.Timeout is caught — other fetch errors propagate without stale marking
Story: `3-1-stale-state-detection-and-dimmed-display`
Category: Technical debt
Description: `_run_one_cycle` catches only `requests.Timeout`. Other fetch failures — `requests.ConnectionError`, `requests.HTTPError`, and JSON decode errors from dump1090 — propagate to the outer loop boundary and trigger the `except Exception: log.error(...)` handler. That handler retains the last rendered frame but does NOT mark aircraft as `is_stale=True`. As a result, if dump1090 is unreachable (connection refused) rather than slow (timeout), the display will silently show the previous frame without any staleness indication. Intentional limitation for MVP; future hardening would broaden the except clause or add a separate ConnectionError stale path.
### [3-1] _run_one_cycle parameter count will grow — consider RendererState dataclass
Story: `3-1-stale-state-detection-and-dimmed-display`
Category: Technical debt
Description: `_run_one_cycle` now takes 4 parameters (`renderer`, `fetcher`, `display`, `last_aircraft`). If further per-cycle state is needed (e.g. a stale-cycle counter for escalating display feedback, or a last-successful-fetch timestamp), the signature will grow awkwardly. Future hardening: introduce a `RendererState` dataclass to bundle mutable per-loop state so `_run_one_cycle` receives one state object rather than an expanding parameter list.
---
## Story 2.7: Operational Radar Loop, Startup Screen & Systemd Wiring
### [2-7] WaveshareDisplay SPI driver not yet wired — key production blocker