claude/vigorous-stonebraker-41cc2d
safeviewing older commita9190b2 · incrementalpre-PRreviewed 2026-07-10 16:14 UTC0H · 0M · 5L · 7I- Purpose
- Atlas de Red — interactive map of Mexico's electrical grid (SEN) for public and professional use; open-source dataset published by Batu Energy.
- Goal
- Fix misleading region polygons by removing offshore islands that have no SEN grid connection from the CENACE control region footprints.
- Sub-goals
- Remove Isla Guadalupe, Cedros, Islas Marías, Alacranes, and Gulf islets from CENACE region polygons (no SEN connection)
- Preserve Cozumel in the Peninsular region (connected via submarine cable)
- What
- apps/web/public/atlas/data/atlas.json — RP (region polygon) entries reduced for 5 of 10 CENACE regions: Noroeste (2→1 poly), Baja California (4→1), Occidental (2→1 poly), Peninsular (3→2), Baja California Sur (4→1). No code changed.
- Why
- CENACE region polygons built from INEGI municipio geometry leaked in offshore islands with no grid connection, making the SEN atlas map misleading for users evaluating transmission and generation geography.
- Areas
- apps/web/public/atlas/data/atlas.json+1−1
- Blast
- 1 file, data-only, pure geographic correction. No TypeScript or logic changed.
Findings · 12
correctness4
No automated guard that removed islands have zero SEN connections
apps/web/public/atlas/data/atlas.json
The commit's claim is factually correct per public CENACE/CFE docs, but there is no test to catch misclassification if future commits re-add islands.
Occidental holes (rings 1–3) are inland water bodies, not topological errors
apps/web/public/atlas/data/atlas.json
The 4-ring Occidental polygon's holes center inside Lago de Chapala, Lago de Pátzcuaro, and highland basins — geometrically valid. Ring count decrease 5→4 reflects polygon removal, not ring removal.
Peninsular 2-polygon structure correctly represents Cozumel on SEN
apps/web/public/atlas/data/atlas.json
Polygon 1 centroid confirmed at lat≈20.43, lon≈−86.87 — correct for Cozumel. Retention justified by submarine cable SEN connection.
Islas Marías removal from Occidental is geographically consistent
apps/web/public/atlas/data/atlas.json
Islas Marías falls west of Occidental's outer longitude boundary (−105.76W), confirming it was a separate polygon correctly excised.
security1
No X-Content-Type-Options header for public static JSON (pre-existing)
apps/web/public/atlas/data/atlas.json
Not introduced by this diff. Vercel serves with correct MIME type; a nosniff header would be belt-and-suspenders hardening.
conventions2
No CHANGELOG or data-version signal for open-source dataset consumers
apps/web/public/atlas/data/atlas.json
atlas.json is published as MIT open-source data. Downstream consumers who pin the file have no in-file version marker to detect this semantic change.
Generation script or source dataset not referenced in commit message
apps/web/public/atlas/data/atlas.json
Commit explains intent but not the tool/command used to regenerate polygons, making future regeneration harder to trace.
tests1
No schema validation test for atlas.json
apps/web/public/atlas/data/atlas.json
A lightweight Vitest fixture (~20 lines) asserting required top-level keys, RP keys match REG set, all coords within Mexico bounding box, and rings have ≥3 points would prevent silent data regressions on future polygon edits.
improvement4
Island-exclusion rule undocumented in any generation artifact
apps/web/public/atlas/data/atlas.json
Rule (keep only main contiguous body; exception: SEN submarine-cable islands) exists only in this commit message. Codifying in the atlas-sen generation pipeline would prevent regression on next data rebuild.
Cozumel polygon has no visual or data distinction from mainland Peninsular
apps/web/public/atlas/data/atlas.json
Both Peninsular polygons render identically. A boolean island_connection field could let the map render a dashed outline or tooltip explaining the submarine cable.
No embedded provenance or generation timestamp in atlas.json
apps/web/public/atlas/data/atlas.json
A top-level _meta key or sidecar atlas.meta.json with generated date and source commit would let future maintainers quickly audit whether the island-exclusion rule was applied.
centerRegion() bounding-box fit includes Cozumel, widening Peninsular zoom slightly
apps/web/public/atlas/data/atlas.json
Minor UX quirk. A primary: true flag on the mainland polygon in the generation script would let the map zoom to the mainland first.
History · 10 commits
- a081002safeincremental0H · 0M · 0L2026-07-14 01:23
- 64dc83dneeds attentionincremental0H · 1M · 7L2026-07-13 20:03
- ec4eea3needs attentionincremental1H · 3M · 7L2026-07-13 18:42
- f4b4129safeincremental0H · 0M · 3L2026-07-13 04:34
- 8ea0c8asafeincremental0H · 0M · 3L2026-07-13 04:21
- 37ce28asafeincremental0H · 2M · 3L2026-07-10 17:22
- d28c6daneeds attentionincremental0H · 3M · 10L2026-07-10 16:59
- 754a65dneeds attentionincremental0H · 3M · 4L2026-07-10 16:39
- a9190b2safeincremental0H · 0M · 5L2026-07-10 16:14current
- 0bf12a0blockedfull1H · 2M · 4L2026-07-10 16:06