clone

an offline map explorer where each world, from a game map to a city's open data, ships as one .atlas file

analysis and e2e take the whole-Earth ground

Dami committed 7e3826a
The shared grounds fixture records the included volume's own declaration
-- the whole-sphere window carried as raster bounds, with the body and
its radius named -- and both lanes hold it: the extra keys change nothing
the systems read, a sphere naming the earth still divides synthetically,
and S2 still takes it. The Go predicate table says the same thing where
the seam's tests cannot reach.

The e2e registry installs the committed Earth bundle beside the packed
corpus, so the browser walks three volumes -- and, for the first time,
one with real rasters: the new spec asks the data plane for a tile and
gets an image back, which is the leg the tile-less corpus volumes could
never prove.
commit
7e3826a506e027eae8f3f0d02cb6d5fb4544ed58
parent
0de084f820b81d9a8477e2418a55bb091d3dc1a6
author
Dami <dami.etoile@gmail.com>
kind
test risk score 0.8 of 3, Jev's estimate
6 files changed, +98 -8
Manalysis/test/vectors.test.ts5+++--
Manalysis/testdata/cells/grounds.json36+++++++++++++++++++++++++++++-
Minternal/app/cells/predicate_test.go13+++++++++++
Mtests/cells/conformance_test.go1+
Mtests/e2e/app.spec.ts33+++++++++++++++++++++++----
Mtests/e2e/prep/main.go18+++++++++++++++
M analysis/test/vectors.test.ts +3 -2
M analysis/testdata/cells/grounds.json +35 -1
@@ -1,5 +1,5 @@
11 {2- "about": "The grounds every vector names. This is the shape issue #5 §5.4 de-globalizes into a `Ground` descriptor: a case that names its ground here is a case that has declared its inputs. Four grounds are hand-derived — the squares and the sphere every vector was worked out on — and two are read from the public corpus bundles under testdata/corpus/bundles/, so the descriptor a test stands on is the declaration a reader really meets. Both lanes consume this file: analysis/test/vectors.test.ts and tests/cells/conformance_test.go.",2+ "about": "The grounds every vector names. This is the shape issue #5 §5.4 de-globalizes into a `Ground` descriptor: a case that names its ground here is a case that has declared its inputs. Five grounds are hand-derived — the squares, the sphere every vector was worked out on, and the included Earth volume's own declaration — and two are read from the public corpus bundles under testdata/corpus/bundles/, so the descriptor a test stands on is the declaration a reader really meets. Both lanes consume this file: analysis/test/vectors.test.ts and tests/cells/conformance_test.go.",33 "reads": {44 "tileGridSize": "the volume's tile grid size — the world square, the last fallback for the surface",55 "lens.surface": "the lens's declared surface, preferred when present",
@@ -111,6 +111,40 @@
111111 "s2"112112 ]113113 },114+ "test/earth-8192x4096": {115+ "key": "test/earth-8192x4096",116+ "about": "The included Earth volume's declaration, hand-derived from the shipped bundle: the same whole-sphere equirectangular window as the sphere above, carried as the lens's raster bounds rather than a declared surface, with the body and its radius named. The extra keys change nothing the systems read: a sphere naming the earth is still divided synthetically, and S2 still takes it.",117+ "tileGridSize": 8192,118+ "lens": {119+ "surface": null,120+ "bounds": {121+ "x": 0,122+ "y": 0,123+ "width": 8192,124+ "height": 4096125+ }126+ },127+ "world": {128+ "attrs": {129+ "atlas.geometry.body": "earth",130+ "atlas.geometry.equirect.deg": "-180,90,180,-90",131+ "atlas.geometry.equirect.px": "0,0,8192,4096",132+ "atlas.geometry.projection": "equirect",133+ "atlas.geometry.radius_km": "6371.0088",134+ "atlas.geometry.surface": "sphere"135+ }136+ },137+ "surfaceExtent": [138+ 0,139+ -4096,140+ 8192,141+ 0142+ ],143+ "systems": [144+ "geohash",145+ "s2"146+ ]147+ },114148 "bend-or/2026-08-02/0": {115149 "key": "bend-or/2026-08-02/0",116150 "about": "Bend, Oregon — 2026-08-02, lens \"Basemap\". Read from the public corpus bundle at testdata/corpus/bundles/bend-or: a plane city that declares an earth Mercator window and names its body, so geohash divides it FOR REAL — genuine WGS84 addresses of the pictured ground, base depth 4 and floor 6 from the window's own 0.32909 x 0.23650 degree spans — and nothing else offers to.",
M internal/app/cells/predicate_test.go +13 -0
M tests/cells/conformance_test.go +1 -0
M tests/e2e/app.spec.ts +28 -5
@@ -9,6 +9,10 @@ import { expect, test, type Page } from "@playwright/test";
99 // quietly failing to serve is a red test and not a shorter loop.1010 const MARS = { slug: "mars", world: "global", title: "Mars", lenses: 2 };1111 const BEND = { slug: "bend-or", world: "2026-08-02", title: "Bend, Oregon", lenses: 1 };12+// The included Earth volume: the committed bundle the desktop embeds,13+// installed into the e2e registry by tests/e2e/prep beside the corpus. It is14+// the one entry with real rasters.15+const EARTH = { slug: "earth", world: "earth", title: "Earth", lenses: 1 };1216 1317 // island reads the page's own account of the arrangement: the inert JSON1418 // script node every explorer page carries.
@@ -39,7 +43,7 @@ test.describe("the doorways", () => {
3943 volumes: { slug: string; stamp: string; worlds: unknown[] }[];4044 };4145 const slugs = catalog.volumes.map((v) => v.slug).sort();42- expect(slugs).toEqual([BEND.slug, MARS.slug].sort());46+ expect(slugs).toEqual([BEND.slug, EARTH.slug, MARS.slug].sort());4347 for (const volume of catalog.volumes) {4448 expect(volume.stamp).toMatch(/^[0-9a-f]{64}$/);4549 expect(volume.worlds.length).toBeGreaterThan(0);
@@ -50,10 +54,28 @@ test.describe("the doorways", () => {
5054 const response = await page.goto("/v/nowhere/nothing");5155 expect(response?.status()).toBe(404);5256 });57+58+ // The raster leg, end to end: the included Earth carries real tiles, so the59+ // data plane can be asked for imagery and answer with an image — the one60+ // assertion the tile-less corpus volumes can never carry.61+ test("the included Earth serves a real raster tile", async ({ request }) => {62+ const response = await request.get("/data/catalog.json");63+ const catalog = (await response.json()) as {64+ volumes: { slug: string; stamp: string }[];65+ };66+ const earth = catalog.volumes.find((v) => v.slug === EARTH.slug);67+ expect(earth, "the catalog does not list earth").toBeTruthy();68+ const tile = await request.get(69+ `/data/v/${EARTH.slug}/${earth!.stamp.slice(0, 12)}/tiles/earth/0/0/0.jpg`,70+ );71+ expect(tile.ok()).toBeTruthy();72+ expect(tile.headers()["content-type"]).toBe("image/jpeg");73+ expect((await tile.body()).length).toBeGreaterThan(1000);74+ });5375 });5476 5577 test.describe("the explorer page", () => {56- for (const volume of [MARS, BEND]) {78+ for (const volume of [MARS, BEND, EARTH]) {5779 test(`${volume.slug} arrives arranged`, async ({ page }) => {5880 await page.goto(`/v/${volume.slug}/${volume.world}`);5981
@@ -63,9 +85,10 @@ test.describe("the explorer page", () => {
6385 expect(state.entry?.world).toBe(volume.world);6486 6587 // The topbar's selects say where the reader is and what else there is.66- // A crumb with one option is a fact, not a choice: both corpus volumes67- // carry a single world, so the world crumb reads but does not edit,68- // while the volume crumb (two volumes installed) stays a real select.88+ // A crumb with one option is a fact, not a choice: every installed89+ // volume carries a single world, so the world crumb reads but does not90+ // edit, while the volume crumb (three volumes installed) stays a real91+ // select.6992 await expect(page.locator("#volume-select")).toHaveValue(volume.slug);7093 await expect(page.locator("#volume-select")).toBeEnabled();7194 await expect(page.locator("#world-select")).toHaveValue(volume.world);
M tests/e2e/prep/main.go +18 -0