Skip to content

fix: retire legacy map tile fallback - #66

Merged
torlando-tech merged 1 commit into
mainfrom
fix/retire-legacy-map-cache
Aug 8, 2026
Merged

fix: retire legacy map tile fallback#66
torlando-tech merged 1 commit into
mainfrom
fix/retire-legacy-map-cache

Conversation

@torlando-tech

Copy link
Copy Markdown
Owner

Summary

  • make the selected immutable PMAS/PMP map packs the only SD tile source used by Maps
  • remove initialization, enumeration, reads, repair, and deletion through the legacy coordinate-only cache
  • preserve existing legacy files on the SD card untouched
  • remove the unused lookup policy that encoded pack-to-legacy-cache fallback
  • update integration contracts to prevent fallback reintroduction

Why

The legacy cache is keyed only by tile coordinates and has no style, map-set, attribution, license, provenance, or transactional publication identity. Falling through from a selected pack to that cache can mix visual styles in one viewport and conceal invalid or incomplete pack state.

The runtime lookup order is now:

decoded PSRAM cache -> selected immutable map packs -> typed unavailable/error result

Data preservation

This change does not delete, migrate, enumerate, or modify existing pyxis-map/tiles files. It only stops production Maps from opening that legacy namespace.

Verification

Exact head: ca59aee704b968fed7a7bfd9c95a257f454919be

  • python3 -m pytest -q tests/build_scripts tests/native tests/tools — 251 passed
  • pio run -e tdeck — passed
  • pio run -e tdeck-release — passed
  • release audit — passed
  • embedded version: 0.3.1-87-gca59aee
  • tdeck: 2,669,680 bytes; SHA-256 1848b288aaa8359f5c4d3108eeb7182a015e339f7c6e8eed439e4a20663ddf33
  • tdeck-release: 2,662,256 bytes; SHA-256 69b84e2970fdaa8eb96821200b32a6a67402debd2403938f807db45df46cdd93

Physical validation

Pending. This PR does not claim device installation, framebuffer review, mixed-style elimination on hardware, or reboot persistence.

Scope

This PR retires the legacy runtime fallback only. The bounded installed-style records, browser-installer updates, and on-device style picker will follow separately.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the coordinate-only legacy tile-cache fallback so Maps reads exclusively from the decoded PSRAM cache and the selected immutable map pack, while leaving existing legacy files untouched.

  • Removes MapTileStore initialization, reads, corrupt-entry deletion, and associated state from MapScreen.
  • Deletes the obsolete pack-to-legacy lookup policy and its native tests.
  • Updates static integration contracts to enforce pack-only SD tile access and prevent fallback reintroduction.

Confidence Score: 5/5

The PR appears safe to merge, with the legacy fallback removed cleanly and no concrete regression identified in the remaining map-pack path.

The selected map pack uses the retained storage adapter independently of the removed legacy store, result propagation remains compatible with the presenter, and the legacy tile namespace is no longer reached by production Maps.

Important Files Changed

Filename Overview
lib/tdeck_ui/UI/LXMF/MapScreen.cpp Removes legacy-store initialization, fallback reads, and corrupt legacy-entry deletion while preserving decoded-cache-first and immutable-pack result handling.
lib/tdeck_ui/UI/LXMF/MapScreen.h Removes MapTileStore ownership and source-selection state, leaving MapTilePack as the sole compressed SD tile source.
lib/tdeck_ui/UI/LXMF/MapTileLookupPolicy.h Deletes the now-unused policy that orchestrated pack-to-legacy-cache fallback.
tests/build_scripts/test_map_screen_contract.py Updates static contracts to require pack-only access and prohibit legacy store wiring.
tests/build_scripts/test_map_tile_downloader_contract.py Strengthens production wiring assertions so neither legacy-cache nor network acquisition is connected to MapScreen.
tests/native/test_map_tile_lookup_policy.cpp Removes native tests for the deleted fallback policy.
tests/native/test_map_tile_lookup_policy.py Removes the compile-and-run wrapper for the deleted policy tests.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Request[Tile request] --> Cache{Decoded PSRAM cache hit?}
    Cache -->|Yes| Ready[Return READY]
    Cache -->|No| Pack[Read selected immutable map pack]
    Pack --> Result[Return typed pack result]
    Result --> Ready
    Result --> Unavailable[MISS / storage unavailable / invalid PNG / I/O error]
    Legacy[Legacy coordinate-only cache] -. no longer accessed .-> Unavailable
Loading

Reviews (1): Last reviewed commit: "fix: retire legacy map tile fallback" | Re-trigger Greptile

@torlando-tech
torlando-tech merged commit edeb4c9 into main Aug 8, 2026
5 checks passed
@torlando-tech
torlando-tech deleted the fix/retire-legacy-map-cache branch August 8, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant