Skip to content

Fix all 8 findings from the adversarial review of the session's changes - #29

Merged
davd-gzl merged 1 commit into
mainfrom
claude/journal-redesign-spec-kit-ku0l3d
Jul 22, 2026
Merged

davd-gzl merged 1 commit into
mainfrom
claude/journal-redesign-spec-kit-ku0l3d

Conversation

@davd-gzl

Copy link
Copy Markdown
Collaborator

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

  1. Backup: image/jpg broke restore — such 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 (+ subtype fallback).
  2. Backup: missing image aborted the whole restore — a photo-only story whose image is absent re-inlined to an empty story that the schema rejects. It's now dropped so the rest still loads.
  3. Travel: custom pins didn't draw or measurecoordsOf had no custom branch, 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.
  4. Stats: minPop leak (StatStrip counters) — a world tile opened a list still gated at a prior population tier, contradicting its count. Now resets minPop too.
  5. Stats: minPop leak (openWorld) — same leak on the coverage-hero/KPI tiles. Fixed to mirror openCitiesFiltered.

Should-fix

  1. Coverage map: antimeridian collapse — Russia's mainland ring crosses the date line, collapsing the silhouette to a sliver. Longitudes are now unwrapped and projected consistently (verified: Russia frames as Russia).
  2. Backup: non-base64 photo aborted the .zip export — a schema-valid data:image/png;charset=utf-8,… made atob() throw. decodeDataUrl now handles base64 + percent-encoded/plain and strips mime params.
  3. RouteMap: stale-map race — the cached-land callback could touch an already-removed map after a fast Map→List→Map toggle; now guards on map identity.

Gate: tsc clean · 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

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).
@davd-gzl
davd-gzl merged commit 05e7a26 into main Jul 22, 2026
4 checks passed
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