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
@@ -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).