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
@@ -1,6 +1,6 @@
# Story 3.1: Stale State Detection & Dimmed Display # Story 3.1: Stale State Detection & Dimmed Display
Status: review Status: done
## Story ## Story
@@ -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 ## Story 2.7: Operational Radar Loop, Startup Screen & Systemd Wiring
### [2-7] WaveshareDisplay SPI driver not yet wired — key production blocker ### [2-7] WaveshareDisplay SPI driver not yet wired — key production blocker
@@ -35,7 +35,7 @@
# - Dev moves story to 'review', then runs code-review (fresh context, different LLM recommended) # - Dev moves story to 'review', then runs code-review (fresh context, different LLM recommended)
generated: 2026-04-22 generated: 2026-04-22
last_updated: 2026-04-22 # 2-1 done, 2-2 done, 2-3 done, 2-4 done, 2-5 done, 2-6 done, 2-7 done, epic-2 done, epic-3 in-progress, 3-1 review last_updated: 2026-04-22 # 2-1 done, 2-2 done, 2-3 done, 2-4 done, 2-5 done, 2-6 done, 2-7 done, epic-2 done, epic-3 in-progress, 3-1 done
project: planeMapper project: planeMapper
project_key: NOKEY project_key: NOKEY
tracking_system: file-system tracking_system: file-system
@@ -64,7 +64,7 @@ development_status:
# Epic 3: Stale Data Resilience # Epic 3: Stale Data Resilience
epic-3: in-progress epic-3: in-progress
3-1-stale-state-detection-and-dimmed-display: review 3-1-stale-state-detection-and-dimmed-display: done
3-2-automatic-recovery-on-fresh-decode: backlog 3-2-automatic-recovery-on-fresh-decode: backlog
epic-3-retrospective: optional epic-3-retrospective: optional