From e404dfe5651004ae95a7c4f3613f78043c0ef6bf Mon Sep 17 00:00:00 2001 From: liu weikai Date: Sat, 13 Jun 2026 13:06:34 +0800 Subject: [PATCH] Retire legacy filesystem map tile alias --- docs/audits/LEGACY_BURNDOWN_REGISTER.md | 2 +- .../MAP_TILE_SOURCE_CACHE_OWNERSHIP_AUDIT.md | 8 +-- ...0_MAP_TILE_SOURCE_CACHE_BURNDOWN_REPORT.md | 8 +-- .../PHASE7_FINAL_LEGACY_SURFACE_MATRIX.md | 2 +- ...INAL_RUNTIME_OWNERSHIP_READINESS_REPORT.md | 2 +- .../PHASE7_RUNTIME_OWNERSHIP_REGISTER.md | 2 +- .../REPOSITORY_LAYOUT_CURRENT_STATE_AUDIT.md | 2 +- .../UI_SHARED_COMPATIBILITY_SHIM_POLICY.md | 10 ++-- docs/audits/UI_SHARED_SPLIT_AUDIT.md | 5 +- .../MAP_TILE_SOURCE_CACHE_RUNTIME_SPEC.md | 8 +-- .../map_tiles/filesystem_map_tile_source.h | 3 - .../legacy_filesystem_map_tile_source.h | 3 - .../check_phase7_runtime_ownership_ready.py | 59 ++++++++----------- .../architecture/check_phase8_layout_ready.py | 32 ++-------- 14 files changed, 52 insertions(+), 94 deletions(-) delete mode 100644 modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h diff --git a/docs/audits/LEGACY_BURNDOWN_REGISTER.md b/docs/audits/LEGACY_BURNDOWN_REGISTER.md index 90177942..e48c7a2c 100644 --- a/docs/audits/LEGACY_BURNDOWN_REGISTER.md +++ b/docs/audits/LEGACY_BURNDOWN_REGISTER.md @@ -37,7 +37,7 @@ A legacy surface may remain temporarily only if it has: | `GPS` Team overlay Team Page state read | `TeamMapOverlaySource` over `ITeamUiSnapshotStore` and Team posring | ESP GPS map overlay still owns page-local marker widgets, but selected-member position data comes from the Team map source seam | Checker forbids `team_state.h`, `g_team_state`, and direct `team_ui_posring_load_latest` reads in GPS/map/dashboard consumers | Team legacy burn-down | burned-down | | `Contacts` Team Page state read | `ContactsTeamSnapshotSource` over `ITeamUiSnapshotStore` | Contacts composes Team chat/action sinks and reads Team display/id through a Contacts-local projection only | Checker forbids `team_state.h` and `g_team_state` in Contacts page code | Team legacy burn-down | burned-down | | `Team rich message row structured payload` | `TeamRichPayloadDisplay` / `TeamMessageRichPayload` / Team row renderer | `TeamChatPresentationSource` maps projected rich payloads into structured `MessageRow` fields and renderers consume those fields with text fallback | Checker requires `has_team_rich_payload` / `team_rich_payload` and forbids controller-side Team rich decode/formatting | Team legacy burn-down | burned-down | -| `Map tile path/cache legacy runtime` | `MapTileResolver` / `LegacyFilesystemMapTileSource` / map tile cache owner | Platform LVGL map tile runtimes call source/resolver; ESP decoded cache, Linux downloader cache, and uConsole path fields remain contained | Renderer consumes tile refs/source without direct path/cache ownership, and decoded/downloader caches are moved behind stable runtime adapters | 7.10 / 7.x | contained | +| `Map tile path/cache legacy runtime` | `MapTileResolver` / `FilesystemMapTileSource` / map tile cache owner | Platform LVGL map tile runtimes call source/resolver; ESP decoded cache, Linux downloader cache, and uConsole path fields remain contained | Renderer consumes tile refs/source without direct path/cache ownership, and decoded/downloader caches are moved behind stable runtime adapters | 7.10 / 7.x | contained | | `Map tile visible plan in platform renderer` | `MapTileRenderQueue` | Platform map tile runtimes still populate queue from legacy `MapTile` records | Dedicated map runtime computes visible queue and renderer consumes queue rows without mutating plan state | 7.11 / 7.x | contained | | `ESP decoded LVGL tile cache` | `LvglDecodedTileCache` / `IMapTileDecoderCache` | ESP map tile runtime still asks the LVGL cache adapter for decoded handles | Runtime-owned decoder cache is injected into a dedicated map tile renderer | 7.11 / 7.x | contained | | `Map overlay current/team marker projection` | `MapOverlaySnapshotSource` / `MapOverlayProjectionAdapter` / `MapOverlayProjector` in `modules/ui_map_runtime` | no main runtime callers of `LegacyMapOverlaySource`; alias headers and alias tests removed from build include surface | keep runtime map overlay headers as the only build-visible API | 9.5 | retired from build include surface | diff --git a/docs/audits/MAP_TILE_SOURCE_CACHE_OWNERSHIP_AUDIT.md b/docs/audits/MAP_TILE_SOURCE_CACHE_OWNERSHIP_AUDIT.md index c165edd3..fb82d9b9 100644 --- a/docs/audits/MAP_TILE_SOURCE_CACHE_OWNERSHIP_AUDIT.md +++ b/docs/audits/MAP_TILE_SOURCE_CACHE_OWNERSHIP_AUDIT.md @@ -10,10 +10,10 @@ The first burn-down slice moves Trail Mate offline tile directory mapping behind | Question | Current answer before 7.10 | 7.10 owner | | --- | --- | --- | -| Where is base tile path built? | `platform/*/ui/widgets/map/map_tiles.cpp` | `MapTileResolver` / `LegacyFilesystemMapTileSource` | -| Where is contour tile path built? | `platform/*/ui/widgets/map/map_tiles.cpp` | `MapTileResolver` / `LegacyFilesystemMapTileSource` | +| Where is base tile path built? | `platform/*/ui/widgets/map/map_tiles.cpp` | `MapTileResolver` / `FilesystemMapTileSource` | +| Where is contour tile path built? | `platform/*/ui/widgets/map/map_tiles.cpp` | `MapTileResolver` / `FilesystemMapTileSource` | | Who checks base tile availability? | Platform map tile runtime | `IMapTileSource::lookup(...)` | -| Who checks layer directories? | Platform map tile runtime | `LegacyFilesystemMapTileSource` | +| Who checks layer directories? | Platform map tile runtime | `FilesystemMapTileSource` | | Who draws tile widgets? | LVGL map tile runtime | Still LVGL map tile runtime | | Who owns decoded LVGL image cache? | ESP `map_tiles.cpp` global decode cache | Still contained legacy | | Who owns Linux downloaded tile cache? | `platform::linux_runtime::MapTileCache` | Still contained legacy | @@ -38,7 +38,7 @@ The first burn-down slice moves Trail Mate offline tile directory mapping behind `MapTileResolver` owns Trail Mate tile path mapping. -`LegacyFilesystemMapTileSource` owns filesystem-backed lookup and optional reads through `IMapTileFileSystem`. +`FilesystemMapTileSource` owns filesystem-backed lookup and optional reads through `IMapTileFileSystem`. Platform LVGL tile runtimes may continue to: diff --git a/docs/audits/PHASE7_10_MAP_TILE_SOURCE_CACHE_BURNDOWN_REPORT.md b/docs/audits/PHASE7_10_MAP_TILE_SOURCE_CACHE_BURNDOWN_REPORT.md index d37429a0..2b6fa763 100644 --- a/docs/audits/PHASE7_10_MAP_TILE_SOURCE_CACHE_BURNDOWN_REPORT.md +++ b/docs/audits/PHASE7_10_MAP_TILE_SOURCE_CACHE_BURNDOWN_REPORT.md @@ -12,8 +12,8 @@ This was a tile source/cache ownership slice. It did not rewrite LVGL tile rende | --- | --- | | Base tile directory mapping in platform map renderer code | routed through `MapTileResolver` | | Contour tile directory mapping in platform map renderer code | routed through `MapTileResolver` | -| Base tile availability check as direct path policy | routed through `LegacyFilesystemMapTileSource::lookup(...)` | -| Layer directory availability checks as direct path policy | routed through `LegacyFilesystemMapTileSource` | +| Base tile availability check as direct path policy | routed through `FilesystemMapTileSource::lookup(...)` | +| Layer directory availability checks as direct path policy | routed through `FilesystemMapTileSource` | | Map tile identity containing path assumptions | replaced by `MapTileRef` value object | ## Still Contained @@ -29,9 +29,9 @@ This was a tile source/cache ownership slice. It did not rewrite LVGL tile rende - Required map tile audit/spec/report. - Required map tile types/source/cache/resolver headers. -- Required `LegacyFilesystemMapTileSource`. +- Required `FilesystemMapTileSource`. - Required resolver/source smoke tests. -- Required platform map tile runtimes to call `LegacyFilesystemMapTileSource`. +- Required platform map tile runtimes to call `FilesystemMapTileSource`. - Forbid tile bitmap/cache objects in `MapWorkspaceSnapshot`. ## Remaining Work diff --git a/docs/audits/PHASE7_FINAL_LEGACY_SURFACE_MATRIX.md b/docs/audits/PHASE7_FINAL_LEGACY_SURFACE_MATRIX.md index 93e20b77..6ca36d3a 100644 --- a/docs/audits/PHASE7_FINAL_LEGACY_SURFACE_MATRIX.md +++ b/docs/audits/PHASE7_FINAL_LEGACY_SURFACE_MATRIX.md @@ -17,7 +17,7 @@ | Hostlink Team shadow state | `hostlink_bridge_radio.cpp` local runtime Team state | `ITeamUiSnapshotStore` / `ui::team_presence` | burned-down | `EvTeamState` is projected from canonical snapshot after Team shell handles events | Hostlink still owns Hostlink frame enqueue and Team AppData forwarding | Hostlink bridge split | | GPS Team overlay page-state read | ESP GPS map reads Team Page globals | `TeamMapOverlaySource` over `ITeamUiSnapshotStore` and Team posring | burned-down | ESP GPS map never includes `team_state.h`, reads `g_team_state`, or calls `team_ui_posring_load_latest` directly | GPS marker widgets remain page-local rendering | Phase 8 map overlay renderer | | Contacts Team Page state read | Contacts page reads Team Page globals | `ContactsTeamSnapshotSource` over `ITeamUiSnapshotStore` | burned-down | Contacts never includes `team_state.h` or reads/writes `g_team_state` | Contacts still owns Contacts page UI workflow and composes Team chat/action sinks | Team consumer closeout | -| Map tile source/path lookup | Platform tile runtime | `MapTileResolver` / `LegacyFilesystemMapTileSource` | contained | Dedicated map tile runtime injects source into renderers | Platform tile code still owns loading cadence | Phase 8 map tile runtime | +| Map tile source/path lookup | Platform tile runtime | `MapTileResolver` / `FilesystemMapTileSource` | contained | Dedicated map tile runtime injects source into renderers | Platform tile code still owns loading cadence | Phase 8 map tile runtime | | Map visible tile plan | Platform tile runtime | `MapTileRenderQueue` | contained | Dedicated map runtime computes queue without legacy `MapTile` records | LVGL tile record compatibility still exists | Phase 8 map tile renderer | | ESP decoded LVGL tile cache | `LvglDecodedTileCache` wrapper | `IMapTileDecoderCache` boundary | contained | Decoder cache is injected into a dedicated map tile renderer | LVGL image lifetime is platform-specific | Phase 8 map decoder cache | | Map overlay current position | Legacy GPS source adapter | `LegacyMapOverlaySource` / `MapOverlayProjector` | contained | Renderer consumes `MapOverlaySnapshot` directly for markers | Existing ESP marker widgets are still page-local | Phase 8 map overlay renderer | diff --git a/docs/audits/PHASE7_FINAL_RUNTIME_OWNERSHIP_READINESS_REPORT.md b/docs/audits/PHASE7_FINAL_RUNTIME_OWNERSHIP_READINESS_REPORT.md index 819c5545..1c89474e 100644 --- a/docs/audits/PHASE7_FINAL_RUNTIME_OWNERSHIP_READINESS_REPORT.md +++ b/docs/audits/PHASE7_FINAL_RUNTIME_OWNERSHIP_READINESS_REPORT.md @@ -16,7 +16,7 @@ contained, burned down, or explicitly deferred with removal conditions. | Team rich payload display | contained | `TeamRichPayloadProjector` / `TeamChatPresentationSource` | | Team position picker | burned-down | `TeamPositionPickerRenderer` | | Key verification | contained | `KeyVerificationModel` and source/sink adapters | -| Map tile source/cache | contained | `MapTileResolver`, `LegacyFilesystemMapTileSource`, cache ports | +| Map tile source/cache | contained | `MapTileResolver`, `FilesystemMapTileSource`, cache ports | | Map render queue/cache | contained | `MapTileRenderQueue`, `IMapTileDecoderCache`, LVGL cache wrapper | | Map overlay/route/tracker | contained/deferred | `MapOverlaySnapshot`, `LegacyMapOverlaySource`, route/tracker exit conditions | | GPS runtime scheduling | contained | `GpsPageRuntimePump`, `IGpsUiRefreshSink` | diff --git a/docs/audits/PHASE7_RUNTIME_OWNERSHIP_REGISTER.md b/docs/audits/PHASE7_RUNTIME_OWNERSHIP_REGISTER.md index 8c2adb1e..a731777e 100644 --- a/docs/audits/PHASE7_RUNTIME_OWNERSHIP_REGISTER.md +++ b/docs/audits/PHASE7_RUNTIME_OWNERSHIP_REGISTER.md @@ -19,7 +19,7 @@ has direct user-visible consequences and a bounded migration path. | radio send failure projection | explicitly deferred | 7.3 / final matrix | mapper supports structured failure; EventBus schema exit condition in `PHASE7_FINAL_LEGACY_SURFACE_MATRIX.md` | | Chat runtime event pump / store flush ownership | contained | 7.7 | owned by `ChatPageRuntimeEventPump` / `ChatPageRuntimeFacade`; controller is UI refresh sink | | Chat retry/cancel/clear failure actions | contained | 7.4 / 7.6 | owned by `ChatDeliveryActionRequest` / `ChatDeliveryActionService`; controller direct action ownership is forbidden | -| Map tile/cache ownership | contained | 7.10 | tile path mapping and filesystem availability are owned by `MapTileResolver` / `LegacyFilesystemMapTileSource`; decoded image cache remains contained legacy | +| Map tile/cache ownership | contained | 7.10 | tile path mapping and filesystem availability are owned by `MapTileResolver` / `FilesystemMapTileSource`; decoded image cache remains contained legacy | | Map tile render queue / decoded cache ownership | contained | 7.11 | visible tile plan is projected into `MapTileRenderQueue`; ESP decoded image cache is wrapped by `LvglDecodedTileCache`; LVGL widget records remain contained legacy | | Map overlay/route/tracker ownership | contained / explicitly deferred | 7.12 / Team burn-down | current GPS and Team overlays project through `MapOverlaySnapshot`; Team positions come through `TeamMapOverlaySource`; route/tracker overlay sources have exit conditions in final matrix | | GPS page timers/tasks | contained | 7.13 | refresh cadence is owned by `GpsPageRuntimePump`; LVGL timers are tick hooks only | diff --git a/docs/audits/REPOSITORY_LAYOUT_CURRENT_STATE_AUDIT.md b/docs/audits/REPOSITORY_LAYOUT_CURRENT_STATE_AUDIT.md index 3bd6dcfa..61cb3ac4 100644 --- a/docs/audits/REPOSITORY_LAYOUT_CURRENT_STATE_AUDIT.md +++ b/docs/audits/REPOSITORY_LAYOUT_CURRENT_STATE_AUDIT.md @@ -196,7 +196,7 @@ Examples recorded by Phase 7 include: - `LegacyTeamActionBridge` - `LegacyKeyVerificationSource` - `LegacyKeyVerificationActionSink` -- `LegacyFilesystemMapTileSource` +- `FilesystemMapTileSource` - `LegacyMapOverlaySource` `LegacyChatDeliveryEventBridge` was one of the recorded Phase 7 examples but diff --git a/docs/audits/UI_SHARED_COMPATIBILITY_SHIM_POLICY.md b/docs/audits/UI_SHARED_COMPATIBILITY_SHIM_POLICY.md index bbe00cb5..d9163c05 100644 --- a/docs/audits/UI_SHARED_COMPATIBILITY_SHIM_POLICY.md +++ b/docs/audits/UI_SHARED_COMPATIBILITY_SHIM_POLICY.md @@ -61,10 +61,10 @@ Main code must include the new owning module path. - new chat runtime helpers - new LVGL UX pack renderers -## Deprecated Alias Policy +## Retired Alias Policy -`LegacyFilesystemMapTileSource` is a deprecated compatibility alias for -`FilesystemMapTileSource`. +The old map tile source alias is retired. New and active code must use +`FilesystemMapTileSource` directly. New code must use: @@ -73,8 +73,8 @@ New code must use: ui::map_tiles::FilesystemMapTileSource ``` -The old alias may appear only in the compatibility alias declaration, docs, and -explicit compatibility tests. +Old map tile aliases must not reappear in active code, forwarding headers, or +compatibility tests. ## Exit Conditions diff --git a/docs/audits/UI_SHARED_SPLIT_AUDIT.md b/docs/audits/UI_SHARED_SPLIT_AUDIT.md index 993176fb..39af2631 100644 --- a/docs/audits/UI_SHARED_SPLIT_AUDIT.md +++ b/docs/audits/UI_SHARED_SPLIT_AUDIT.md @@ -166,7 +166,7 @@ Phase 8 should classify each `Legacy*` object before renaming: Examples to classify: -- `LegacyFilesystemMapTileSource` +- `FilesystemMapTileSource` - `LegacyMapOverlaySource` - `LegacyTeamActionBridge` - `LegacyKeyVerificationSource` @@ -229,8 +229,7 @@ Moved to `ui_lvgl_ux_packs`: - `TeamPositionPickerRenderer` - key verification modal renderer -`LegacyFilesystemMapTileSource` is now a compatibility alias for -`FilesystemMapTileSource`. New code should include +The old map tile source alias is retired. New code should include `ui_map_runtime/map_tiles/filesystem_map_tile_source.h`. ## Phase 8 Structural Consolidation Policy diff --git a/docs/specification/MAP_TILE_SOURCE_CACHE_RUNTIME_SPEC.md b/docs/specification/MAP_TILE_SOURCE_CACHE_RUNTIME_SPEC.md index 2706af65..4ed4a422 100644 --- a/docs/specification/MAP_TILE_SOURCE_CACHE_RUNTIME_SPEC.md +++ b/docs/specification/MAP_TILE_SOURCE_CACHE_RUNTIME_SPEC.md @@ -19,10 +19,10 @@ contour data-source credentials. | `MapTileFormat` | Format enum | Identify PNG/JPEG payload format | Decode ownership | | `MapTilePayload` | Data DTO | Optional byte payload returned by a source | Filesystem path ownership | | `IMapTileSource` | Port | Lookup/read tile payload by `MapTileRef` | LVGL rendering | -| `IMapTileFileSystem` | Port | Filesystem operations needed by legacy source | Tile path policy | +| `IMapTileFileSystem` | Port | Filesystem operations needed by filesystem source | Tile path policy | | `IMapTileCache` | Repository / Cache port | Runtime cache/fill contract | UI rendering | | `MapTileResolver` | Strategy | Resolve `MapTileRef` to Trail Mate storage path | LVGL, filesystem reads | -| `LegacyFilesystemMapTileSource` | Anti-Corruption Adapter | Wrap current filesystem tile lookup | Spread path mapping back to renderer | +| `FilesystemMapTileSource` | Source adapter | Wrap filesystem tile lookup behind `IMapTileSource` | Spread path mapping back to renderer | ## Directory Mapping @@ -92,9 +92,9 @@ Phase 7.10 introduces: - `IMapTileSource` - `IMapTileCache` - `MapTileResolver` -- `LegacyFilesystemMapTileSource` +- `FilesystemMapTileSource` -Existing platform map tile runtimes may keep LVGL drawing and decoded image cache logic temporarily, but path mapping must flow through `LegacyFilesystemMapTileSource`. +Existing platform map tile runtimes may keep LVGL drawing and decoded image cache logic temporarily, but path mapping must flow through `FilesystemMapTileSource`. ## Non-Goals diff --git a/modules/ui_map_runtime/include/ui_map_runtime/map_tiles/filesystem_map_tile_source.h b/modules/ui_map_runtime/include/ui_map_runtime/map_tiles/filesystem_map_tile_source.h index 1473daac..883a423c 100644 --- a/modules/ui_map_runtime/include/ui_map_runtime/map_tiles/filesystem_map_tile_source.h +++ b/modules/ui_map_runtime/include/ui_map_runtime/map_tiles/filesystem_map_tile_source.h @@ -34,8 +34,5 @@ class FilesystemMapTileSource final : public IMapTileSource MapTileResolver resolver_; }; -using LegacyFilesystemMapTileSource [[deprecated("Use FilesystemMapTileSource")]] = - FilesystemMapTileSource; - } // namespace map_tiles } // namespace ui diff --git a/modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h b/modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h deleted file mode 100644 index eb12f903..00000000 --- a/modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "ui_map_runtime/map_tiles/filesystem_map_tile_source.h" diff --git a/tools/architecture/check_phase7_runtime_ownership_ready.py b/tools/architecture/check_phase7_runtime_ownership_ready.py index 5a174495..dbea2c1f 100644 --- a/tools/architecture/check_phase7_runtime_ownership_ready.py +++ b/tools/architecture/check_phase7_runtime_ownership_ready.py @@ -44,20 +44,14 @@ PATH_ALIASES = { "modules/ui_map_runtime/include/ui_map_runtime/map_tiles/map_tile_decoder_cache.h", "modules/ui_shared/include/ui/map_tiles/map_tile_render_queue.h": "modules/ui_map_runtime/include/ui_map_runtime/map_tiles/map_tile_render_queue.h", - "modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h": - "modules/ui_map_runtime/include/ui_map_runtime/map_tiles/filesystem_map_tile_source.h", "modules/ui_shared/src/ui/map_tiles/map_tile_render_queue.cpp": "modules/ui_map_runtime/src/map_tiles/map_tile_render_queue.cpp", "modules/ui_shared/src/ui/map_tiles/map_tile_resolver.cpp": "modules/ui_map_runtime/src/map_tiles/map_tile_resolver.cpp", - "modules/ui_shared/src/ui/map_tiles/legacy_filesystem_map_tile_source.cpp": - "modules/ui_map_runtime/src/map_tiles/filesystem_map_tile_source.cpp", "modules/ui_shared/tests/test_map_tile_render_queue.cpp": "modules/ui_map_runtime/tests/test_map_tile_render_queue.cpp", "modules/ui_shared/tests/test_map_tile_resolver.cpp": "modules/ui_map_runtime/tests/test_map_tile_resolver.cpp", - "modules/ui_shared/tests/test_legacy_filesystem_map_tile_source.cpp": - "modules/ui_map_runtime/tests/test_filesystem_map_tile_source.cpp", "modules/ui_shared/include/ui/map_overlay/map_overlay_projector.h": "modules/ui_map_runtime/include/ui_map_runtime/map_overlay/map_overlay_projector.h", "modules/ui_shared/src/ui/map_overlay/map_overlay_projector.cpp": @@ -213,13 +207,10 @@ def check_required_files() -> int: "modules/ui_shared/include/ui/map_tiles/map_tile_cache.h", "modules/ui_shared/include/ui/map_tiles/map_tile_decoder_cache.h", "modules/ui_shared/include/ui/map_tiles/map_tile_render_queue.h", - "modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h", "modules/ui_shared/src/ui/map_tiles/map_tile_render_queue.cpp", "modules/ui_shared/src/ui/map_tiles/map_tile_resolver.cpp", - "modules/ui_shared/src/ui/map_tiles/legacy_filesystem_map_tile_source.cpp", "modules/ui_shared/tests/test_map_tile_render_queue.cpp", "modules/ui_shared/tests/test_map_tile_resolver.cpp", - "modules/ui_shared/tests/test_legacy_filesystem_map_tile_source.cpp", "modules/ui_presentation/include/ui_presentation/map/map_overlay_snapshot.h", "modules/ui_presentation/include/ui_presentation/map/map_overlay_source.h", "modules/ui_shared/include/ui/map_overlay/map_overlay_projector.h", @@ -413,7 +404,7 @@ def check_docs() -> int: "KeyVerificationModel", "Map tile/cache ownership", "MapTileResolver", - "LegacyFilesystemMapTileSource", + "FilesystemMapTileSource", ], "docs/audits/KEY_VERIFICATION_OWNERSHIP_AUDIT.md": [ "Key verification is a standalone runtime/presentation workflow", @@ -592,7 +583,7 @@ def check_docs() -> int: "Phase 7.10 establishes ownership for map tile source, path resolution, and tile availability lookup", "MapTileRef", "MapTileResolver", - "LegacyFilesystemMapTileSource", + "FilesystemMapTileSource", "IMapTileSource::lookup(...)", "MapWorkspaceSnapshot", "/maps/base/osm/{z}/{x}/{y}.png", @@ -609,13 +600,13 @@ def check_docs() -> int: "IMapTileSource", "IMapTileCache", "MapTileResolver", - "LegacyFilesystemMapTileSource", + "FilesystemMapTileSource", "Phase 7.10 does not", ], "docs/audits/PHASE7_10_MAP_TILE_SOURCE_CACHE_BURNDOWN_REPORT.md": [ "Phase 7.10 moved Trail Mate map tile path mapping and filesystem-backed availability lookup", "MapTileResolver", - "LegacyFilesystemMapTileSource", + "FilesystemMapTileSource", "MapTileRef", "Burned Down", "Still Contained", @@ -3449,8 +3440,8 @@ def check_map_tile_source_cache_boundary() -> int: cache_header = "modules/ui_shared/include/ui/map_tiles/map_tile_cache.h" resolver_header = "modules/ui_shared/include/ui/map_tiles/map_tile_resolver.h" resolver_source = "modules/ui_shared/src/ui/map_tiles/map_tile_resolver.cpp" - legacy_header = "modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h" - legacy_source = "modules/ui_shared/src/ui/map_tiles/legacy_filesystem_map_tile_source.cpp" + filesystem_header = "modules/ui_map_runtime/include/ui_map_runtime/map_tiles/filesystem_map_tile_source.h" + filesystem_source = "modules/ui_map_runtime/src/map_tiles/filesystem_map_tile_source.cpp" viewport_source = "modules/ui_shared/src/ui/widgets/map/map_viewport.cpp" snapshot_header = "modules/ui_presentation/include/ui_presentation/map/map_workspace_snapshot.h" esp_tiles = "platform/esp/arduino_common/src/ui/widgets/map/map_tiles.cpp" @@ -3535,10 +3526,10 @@ def check_map_tile_source_cache_boundary() -> int: if token in text: failures += fail(f"MapTileResolver owns forbidden storage/render token: {token}") - if exists(legacy_header): - text = read_text(legacy_header) + if exists(filesystem_header): + text = read_text(filesystem_header) for token in [ - "LegacyFilesystemMapTileSource", + "FilesystemMapTileSource", "IMapTileSource", "MapTileResolver", "lookup", @@ -3549,10 +3540,12 @@ def check_map_tile_source_cache_boundary() -> int: "anyContourDirectoryAvailable", ]: if token not in text: - failures += fail(f"LegacyFilesystemMapTileSource header missing token: {token}") + failures += fail(f"FilesystemMapTileSource header missing token: {token}") + if "LegacyFilesystemMapTileSource" in text: + failures += fail("FilesystemMapTileSource header still exposes LegacyFilesystemMapTileSource") - if exists(legacy_source): - text = strip_cpp_comments(read_text(legacy_source)) + if exists(filesystem_source): + text = strip_cpp_comments(read_text(filesystem_source)) for token in [ "MapTileStatus::Available", "MapTileStatus::Missing", @@ -3562,20 +3555,16 @@ def check_map_tile_source_cache_boundary() -> int: "MapTileLayer::ContourMajor25", ]: if token not in text: - failures += fail(f"LegacyFilesystemMapTileSource source missing token: {token}") - if ( - "LegacyFilesystemMapTileSource::lookup" not in text - and "FilesystemMapTileSource::lookup" not in text - ): - failures += fail("LegacyFilesystemMapTileSource source missing lookup implementation token") - if ( - "LegacyFilesystemMapTileSource::read" not in text - and "FilesystemMapTileSource::read" not in text - ): - failures += fail("LegacyFilesystemMapTileSource source missing read implementation token") + failures += fail(f"FilesystemMapTileSource source missing token: {token}") + if "FilesystemMapTileSource::lookup" not in text: + failures += fail("FilesystemMapTileSource source missing lookup implementation token") + if "FilesystemMapTileSource::read" not in text: + failures += fail("FilesystemMapTileSource source missing read implementation token") + if "LegacyFilesystemMapTileSource" in text: + failures += fail("FilesystemMapTileSource source still references LegacyFilesystemMapTileSource") for token in ["lvgl.h", "lv_obj_t", "std::filesystem", "FILE*", "fopen", "SD.open", "LittleFS", "SPIFFS"]: if token in text: - failures += fail(f"LegacyFilesystemMapTileSource owns forbidden platform token: {token}") + failures += fail(f"FilesystemMapTileSource owns forbidden platform token: {token}") if exists(snapshot_header): text = strip_cpp_comments(read_text(snapshot_header)) @@ -3649,7 +3638,7 @@ def check_map_tile_source_cache_boundary() -> int: "contained", "7.10", "MapTileResolver", - "LegacyFilesystemMapTileSource", + "FilesystemMapTileSource", "decoded image cache remains contained legacy", ]: if token not in text: @@ -3660,7 +3649,7 @@ def check_map_tile_source_cache_boundary() -> int: for token in [ "Map tile path/cache legacy runtime", "MapTileResolver", - "LegacyFilesystemMapTileSource", + "FilesystemMapTileSource", "ESP decoded cache", "Linux downloader cache", "uConsole path fields", diff --git a/tools/architecture/check_phase8_layout_ready.py b/tools/architecture/check_phase8_layout_ready.py index 0fd9780e..1c01fbb6 100644 --- a/tools/architecture/check_phase8_layout_ready.py +++ b/tools/architecture/check_phase8_layout_ready.py @@ -419,8 +419,8 @@ def check_audit_language() -> int: "new GPS runtime helpers", "new chat runtime helpers", "new LVGL UX pack renderers", - "LegacyFilesystemMapTileSource", - "deprecated compatibility alias", + "old map tile source alias is retired", + "Old map tile aliases must not reappear", "FilesystemMapTileSource", "check_phase8_layout_ready.py", ], @@ -2048,8 +2048,6 @@ def check_forwarding_headers() -> int: "ui_map_runtime/map_tiles/map_tile_decoder_cache.h", "modules/ui_shared/include/ui/map_tiles/map_tile_render_queue.h": "ui_map_runtime/map_tiles/map_tile_render_queue.h", - "modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h": - "ui_map_runtime/map_tiles/filesystem_map_tile_source.h", "modules/ui_shared/include/ui/map_overlay/map_overlay_projector.h": "ui_map_runtime/map_overlay/map_overlay_projector.h", "modules/ui_shared/include/ui/screens/chat/team_position_picker_renderer.h": @@ -2074,7 +2072,6 @@ def check_forwarding_headers() -> int: "modules/ui_shared/src/ui/screens/gps/gps_page_runtime_pump.cpp", "modules/ui_shared/src/ui/map_tiles/map_tile_resolver.cpp", "modules/ui_shared/src/ui/map_tiles/map_tile_render_queue.cpp", - "modules/ui_shared/src/ui/map_tiles/legacy_filesystem_map_tile_source.cpp", "modules/ui_shared/src/ui/map_overlay/map_overlay_projector.cpp", "modules/ui_shared/src/ui/presentation_sources/legacy_chat_delivery_event_bridge.cpp", "modules/ui_shared/src/ui/presentation_sources/legacy_chat_delivery_action_bridge.cpp", @@ -2113,8 +2110,6 @@ def check_authoritative_include_paths() -> int: "ui_map_runtime/map_tiles/map_tile_decoder_cache.h", "ui/map_tiles/map_tile_render_queue.h": "ui_map_runtime/map_tiles/map_tile_render_queue.h", - "ui/map_tiles/legacy_filesystem_map_tile_source.h": - "ui_map_runtime/map_tiles/filesystem_map_tile_source.h", "ui/map_overlay/map_overlay_projector.h": "ui_map_runtime/map_overlay/map_overlay_projector.h", "ui/presentation_sources/legacy_chat_delivery_action_bridge.h": @@ -2144,7 +2139,6 @@ def check_authoritative_include_paths() -> int: "modules/ui_shared/include/ui/map_tiles/map_tile_cache.h", "modules/ui_shared/include/ui/map_tiles/map_tile_decoder_cache.h", "modules/ui_shared/include/ui/map_tiles/map_tile_render_queue.h", - "modules/ui_shared/include/ui/map_tiles/legacy_filesystem_map_tile_source.h", "modules/ui_shared/include/ui/map_overlay/map_overlay_projector.h", "modules/ui_shared/include/ui/screens/chat/team_position_picker_renderer.h", "modules/ui_shared/include/ui/screens/chat/key_verification_modal_renderer.h", @@ -2359,22 +2353,12 @@ def check_runtime_module_boundaries() -> int: text = read_text(filesystem_header) if "class FilesystemMapTileSource" not in text: failures += fail("FilesystemMapTileSource class is missing") - if "using LegacyFilesystemMapTileSource" not in text: - failures += fail("LegacyFilesystemMapTileSource compatibility alias is missing") - if "[[deprecated" not in text: - failures += fail("LegacyFilesystemMapTileSource alias must be deprecated") - if "FilesystemMapTileSource;" not in text: - failures += fail("LegacyFilesystemMapTileSource must alias FilesystemMapTileSource") for path in iter_code_files(ROOT / "modules/ui_map_runtime"): text = path.read_text(encoding="utf-8", errors="ignore") - if "LegacyFilesystemMapTileSource" in text and path.as_posix().endswith( - "filesystem_map_tile_source.h" - ): - continue if "LegacyFilesystemMapTileSource" in text: failures += fail( - f"{path.relative_to(ROOT)} uses deprecated LegacyFilesystemMapTileSource" + f"{path.relative_to(ROOT)} uses retired LegacyFilesystemMapTileSource" ) ui_presentation_root = ROOT / "modules/ui_presentation" @@ -2411,10 +2395,6 @@ def check_retired_ui_legacy_adapters_module() -> int: def check_deprecated_alias_usage() -> int: - allowed = { - "modules/ui_map_runtime/include/ui_map_runtime/map_tiles/filesystem_map_tile_source.h", - } - failures = 0 for root_name in ["apps", "modules", "platform", "boards"]: for path in iter_code_files(ROOT / root_name): @@ -2422,12 +2402,8 @@ def check_deprecated_alias_usage() -> int: text = path.read_text(encoding="utf-8", errors="ignore") if "LegacyFilesystemMapTileSource" not in text: continue - if rel in allowed: - continue - if "PHASE8_LEGACY_ALIAS_COMPATIBILITY_TEST" in text: - continue failures += fail( - f"{rel} uses deprecated LegacyFilesystemMapTileSource alias; use FilesystemMapTileSource" + f"{rel} uses retired LegacyFilesystemMapTileSource alias; use FilesystemMapTileSource" ) return failures