feat: zone provenance + NOTAM validity fields end-to-end (M1) - #9
Open
tomassasovsky wants to merge 1 commit into
Open
feat: zone provenance + NOTAM validity fields end-to-end (M1)#9tomassasovsky wants to merge 1 commit into
tomassasovsky wants to merge 1 commit into
Conversation
Implements milestone M1 of the authoritative zone coverage plan: the foundation every later milestone reasons about. - ZoneData (data DTO) gains a primitive `source` id (default bundled), nullable `confirmedBy`, and nullable UTC `activeFrom`/`activeTo`. - New `ZoneSourceIds` constants + `fromIdPrefix` fallback and a `parseUtcDateTime` helper in zones_api_client. - Source set explicitly by every producer (madhel/openaip/aip readers); remote + backend feed readers parse source/confirmedBy/validity, with an id-prefix fallback for feeds that predate the property. - Backend ingest writes the new properties; the AIP file is now parsed via the shared AipGeoJsonReader (removes a duplicate parser and fixes UTF-8 name mojibake). - New typed `ZoneSource` enum + `fromId` in the repository; FlyZone carries source/confirmedBy/activeFrom/activeTo, mapped in _toFlyZone. - ZoneDeduplicator priority and MapZoneDisplay openaip/madhel checks migrate from id-prefix heuristics to the typed source (active NOTAM outranks permanent sources for safety). - Tests: model defaults/equality/round-trip, source resolution, dedup priority (incl. AIP + NOTAM), reader parsing, mojibake repair. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
source+ nullableconfirmedBy) and NOTAM validity (nullable UTCactiveFrom/activeTo) through the zone pipeline end-to-end — the foundation milestone (M1) every later milestone of the authoritative-zone-coverage plan reasons about.ZoneData.sourceis a plain string id (likecategoryId), resolved to a typedZoneSourceenum in the repository (_toFlyZone).ZoneDeduplicatorpriority andMapZoneDisplay's OpenAIP/MADHEL checks migrate off id-prefix heuristics onto the typed source.AipGeoJsonReader, removing a duplicate parser and fixing a pre-existing UTF-8 name mojibake bug.Plan
feat: complete, authoritative airspace zone coverage — Milestone M1 (provenance + validity fields, the foundation PR).
Test plan
zones_api_client:dart test— 37 passing (model defaults/equality,fromIdPrefix,parseUtcDateTime, AIP reader incl. source + mojibake repair, remote reader source/validity round-trip + prefix fallback, madhel source).flight_rules_repository:dart test— 49 passing (ZoneSource.fromId,_toFlyZoneprovenance mapping, dedup priority incl. AIP + active-NOTAM-wins regression).backend_zones_api_client:flutter test— 5 passing (feed round-trip of source/confirmedBy/validity + prefix fallback).flutter test test/map_zone_display_test.dart test/map_zone_overlay_builder_test.dart test/zone_detail_card_test.dart— all passing.dart analyzeclean on all changed files;dart formatclean._toFeaturehas no isolated test — private + needs DB; covered indirectly by the reader round-trip tests).Deferred / follow-ups (out of M1 scope)
openAipOnly = truedebug flag inmap_zone_display.dart(ships the map showing only OpenAIP zones) — the plan assigns its deletion to M4. Unchanged by M1._parsePolygon/_parseCenterduplication across the 4 GeoJSON readers — pre-existing; candidate for a shared geometry helper in a later cleanup.zone_sync,zone_stale_banner) — pre-existing architectural debt.confirmedBy/activeFrom/activeToare wired but not yet produced (populated by M2/M5).🤖 Generated with Claude Code