Fix all 8 findings from the adversarial review of the session's changes - #29
Merged
Merged
Conversation
Backup archive (data-loss / backward-compat): - image/jpg photos were written as .bin and re-imported as application/octet-stream, which the photo schema rejects — failing the WHOLE restore. EXT_OF now covers every mime the schema admits (+ a subtype fallback), so a written file always maps back to a valid image mime. - A photo-only story whose image is missing from the archive re-inlined to an empty story, which the schema rejects — aborting the entire restore. Such a now-empty story is dropped instead, so the rest still loads. - A schema-valid non-base64 photo data URL made atob() throw and abort the whole .zip export; decodeDataUrl now handles base64 AND percent-encoded/plain payloads and strips mime parameters. Travel: - coordsOf ignored kind="custom", so a custom pin (shown, tappable, added by the picker) had its route legs silently skipped in the arcs AND the distance. Added the custom branch mirroring the pool resolver. Stats filters: - A country drill sets country + minPop together, but the StatStrip counters and openWorld() cleared only country — so a world tile opened a list still gated at a prior population tier, contradicting its count. Both now reset minPop too (matching openCitiesFiltered). Coverage map: - A country whose mainland ring crosses the antimeridian (Russia) collapsed to a distorted sliver. Longitudes are now unwrapped (span > 180° → shift western lons +360) and projected consistently, so Russia frames as Russia. - The cached-land promise callback in RouteMap could touch an already-removed map after a fast Map→List→Map toggle; it now guards on map identity, not truthiness. Gate: tsc clean, 470 unit tests (new regressions: jpg/non-base64/missing-story archive, custom-stop arcs+distance), e2e green (stats-covmap, stats-drill, trip-legmodes, trip-reconstruction, import-security, a11y).
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.
A max-effort multi-agent review (7 areas × deep reviewer, every finding verified by 3 independent skeptics, majority-confirm to survive) surfaced 8 confirmed defects. This fixes all of them, each with a regression test.
Must-fix
image/jpgbroke restore — such photos were written as.binand re-imported asapplication/octet-stream, which the photo schema rejects, failing the whole restore.EXT_OFnow covers every mime the schema admits (+ subtype fallback).coordsOfhad nocustombranch, so a custom stop (which the picker shows, adds, and announces) had its legs silently skipped in both the arcs and the distance. Added the branch.minPopleak (StatStrip counters) — a world tile opened a list still gated at a prior population tier, contradicting its count. Now resetsminPoptoo.minPopleak (openWorld) — same leak on the coverage-hero/KPI tiles. Fixed to mirroropenCitiesFiltered.Should-fix
.zipexport — a schema-validdata:image/png;charset=utf-8,…madeatob()throw.decodeDataUrlnow handles base64 + percent-encoded/plain and strips mime params.Gate:
tscclean · 470 unit tests (new regressions for jpg / non-base64 / missing-story archives and custom-stop arcs+distance) · e2e green — stats-covmap, stats-drill, trip-legmodes, trip-reconstruction, import-security, a11y (axe WCAG 2.1 AA).🤖 Generated with Claude Code
https://claude.ai/code/session_014W6tgHRgLEugCsbKC9ccST
Generated by Claude Code