Review story 1.4: location resolution passes all ACs

All 5 ACs verified: ICAO lookup via importlib.resources, Nominatim
geocoding with User-Agent and timeout, exact error messages, mocked
HTTP in tests, portal POST /find-location returns 200 on success and
error. 45 tests pass, ruff clean. Sprint status updated to done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Edholm
2026-04-22 22:48:02 -04:00
parent 6231e3157e
commit 6216e933a6
3 changed files with 17 additions and 3 deletions
@@ -1,6 +1,6 @@
# Story 1.4: Location Resolution (ICAO & Address)
Status: review
Status: done
## Story
@@ -40,3 +40,17 @@ Description: Actual captive portal detection behaviour (iOS/Android/Windows trig
Story: `1-3-wifi-hotspot-and-captive-portal-form`
Category: Infrastructure/environment
Description: `provision.py` provisioning loop currently exits after one iteration (placeholder `provisioned = True`) — full sequence wired in Story 1.5.
---
## Story 1.4: Location Resolution (ICAO & Address)
### [1-4] Nominatim geocoding runtime verification
Story: `1-4-location-resolution-icao-and-address`
Category: Runtime verification
Description: Nominatim geocoding verified in tests with mocks only; real geocoding requires internet access and can only be confirmed on device at provisioning time. No automated test covers live HTTP to Nominatim.
### [1-4] ICAO heuristic false-positive risk
Story: `1-4-location-resolution-icao-and-address`
Category: Technical debt
Description: ICAO heuristic (`len(query) == 4 and query.isalpha()`) may misclassify 4-letter words (e.g. "BATH", "YORK") as ICAO codes, causing them to be looked up in `airports.csv` before falling back to Nominatim. Acceptable for MVP given the provisioning context, but noted for future hardening (e.g. validate against a known ICAO prefix list).
@@ -35,7 +35,7 @@
# - Dev moves story to 'review', then runs code-review (fresh context, different LLM recommended)
generated: 2026-04-22
last_updated: 2026-04-22
last_updated: 2026-04-22 # 1-4 marked done after Phase 5 review
project: planeMapper
project_key: NOKEY
tracking_system: file-system
@@ -47,7 +47,7 @@ development_status:
1-1-project-scaffold-and-verified-entry-points: done
1-2-configuration-read-write-wipe: done
1-3-wifi-hotspot-and-captive-portal-form: done
1-4-location-resolution-icao-and-address: ready-for-dev
1-4-location-resolution-icao-and-address: done
1-5-provisioning-execution-tile-download-cache-validation-and-wifi-kill: backlog
epic-1-retrospective: optional