Repository navigation
fix(maps): preserve legacy light tile URL overrides (#364) - #366
Conversation
Review — CS-MacBook PR#366 — head 4fa356aDom: APPROVE with nits Independent, read-only review of the #364 follow-up ("preserve configured legacy light tile URL overrides"). Head verified via Findings
No correctness defects found. Items 1–2 are documented/accepted limitations; item 3 is an out-of-scope observation. Answers to the review pointsPrecedence (browser choice → configured default → legacy URL → built-in fallback). Confirmed by code trace and tests. No silent change for existing installs. Inset (node-detail) maps and dark/light. In the legacy case Browser check against a local server with both legacy shapes. Done — see e2e below. Both Hygiene. Tests (merged tree vs
|
| Suite | Result |
|---|---|
node test-frontend-helpers.js |
712 passed / 0 [T] |
node test-issue-332-tile-provider-fallback.js |
71 passed / 0 (incl. 15 new #364 cases) [T] |
sh test-all.sh |
235 files, all passed [T] |
cmd/server go test ./... |
ok 41.8s [T] |
cmd/ingestor go test ./... |
ok 109s [T] |
test-issue-332-no-carto-tiles-e2e.js (local Go server :13901, e2e-fixture.db prepared as in CI: freshen → migrate → seed-2073 → seed-199) |
21 passed / 0 [T] |
CI on the PR: Go Build & Test, Playwright E2E, and Docker build all pass; Deploy/Release/Badges skipped as expected for a non-release PR. No flaky reruns needed (#256/#267 not hit).
Mutants (mine)
- Remove the legacy branch in
getTileSpec(revert to master): unit suite → 6 red — exactly the "legacy URL applies" + fallback-recovery cases. [T] - Drop the
!getSelectedLightId()guard so legacy would override an explicit/configured choice: unit suite → 6 red — the "browser choice wins", "configured provider default wins", and "programmatic server default wins" cases (including explicitosm-standard). [T] - Remove the legacy branch, real-browser (rebuilt
public/, restarted server, reran e2e): 4 red — both config shapes' "node inset uses legacy URL" and both "explicit OSM recovery" steps; the dark-unchanged steps stayed green. Confirms the e2e is not passing vacuously. [T]
Together the mutants cover all four precedence levels at both the resolver and the real-browser layer. Source was restored to the head blob and the server stopped afterward.
Not verified / caveats
- Live stg/prod config file not inspected (no prod access); the "our config is unchanged" claim is architectural [A], resting on the provider-id (
lightDefault) form. maxZoomclamp for legacy URLs (finding fix(frontend): replace legacy scope confirmation glyphs #2) not exercised.- Mixed config (both
tiles.lightandmap.tiles.lightUrlset at once): the override ternary preferscfg.tilesand ignoresmap.tiles.lightUrl, consistent with the existingTILE_LIGHTlogic directly above it — not a regression, not separately tested. [A] - "Fork-guards 9 and 1" from the brief: I could not map that count to a concrete token in this diff. The only guard the PR adds is a defensive
try/catcharoundMC_getTileSpecingetActiveTileProvider, alongside the existingtypeof … === 'function'checks; no automation/CI guards were added or removed.
Relates to #364.
Change
Preserve both existing light tile configuration shapes,
tiles.lightandmap.tiles.lightUrl, in the shared registry resolver. Precedence is:The override is runtime metadata, not a new setting. A legacy URL has no registry vendor ID, overlay or inversion metadata, so inset maps retain their historical generic attribution rather than borrowing an unrelated provider's credit/filter. Dark resolution is unchanged.
Verification
Limitations
No new automatic tile-error fallback is added. Explicit selection requires the existing remount/reload lifecycle. Unknown legacy vendors retain historical generic attribution. Zoom-cap handling and simultaneous mixed use of deprecated and modern configuration shapes are unchanged. No new config, dependencies or workflow changes.
Scope and safety
ff9a501c17396aada504e87d44c0f503e2740b8e.