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
| M | analysis/ | 5 | +++-- |
| M | analysis/ | 36 | +++++++++++++++++++++++++++++- |
| M | internal/ | 13 | +++++++++++ |
| M | tests/ | 1 | + |
| M | tests/ | 33 | +++++++++++++++++++++++---- |
| M | tests/ | 18 | +++++++++++++++ |
@@ -97,12 +97,13 @@ function evaluate(ground: Ground, spec: Vector): unknown {
9797 }9898 9999 describe("the shared vectors: grounds", () => {100- // The four hand-derived grounds and the two corpus ones, by name: a fixture100+ // The five hand-derived grounds and the two corpus ones, by name: a fixture101101 // that silently lost a ground would otherwise pass by answering nothing.102- it("records the six grounds both lanes stand on", () => {102+ it("records the seven grounds both lanes stand on", () => {103103 assert.deepEqual(Object.keys(grounds).sort(), [104104 "bend-or/2026-08-02/0",105105 "mars/global/0",106+ "test/earth-8192x4096",106107 "test/sphere-8192x4096",107108 "test/square-1024",108109 "test/square-1024-bounds",@@ -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.",@@ -168,6 +168,19 @@ func TestApplicableSystemsAsksTheWorldTwoQuestions(t *testing.T) {
168168 semconv.KeyGeometrySurface: "plane",169169 }, []string{"geohash"}},170170 {"a sphere with a flattening takes both", marsAttrs, []string{"geohash", "s2"}},171+ // The included Earth volume's own declaration: the body and its172+ // radius change nothing the systems read. In particular, naming the173+ // earth on a *sphere* does not put geohash into its real mode --174+ // that mode is a plane's (see TestEarthMercatorAsksAllThreeQuestions)175+ // -- so the whole-planet picture divides synthetically, like Mars.176+ {"the included Earth's declaration takes both", map[string]string{177+ semconv.KeyGeometrySurface: semconv.SurfaceSphere,178+ semconv.KeyGeometryProjection: semconv.ProjectionEquirect,179+ semconv.KeyGeometryEquirectPx: "0,0,8192,4096",180+ semconv.KeyGeometryEquirectDeg: "-180,90,180,-90",181+ semconv.KeyGeometryBody: "earth",182+ semconv.KeyGeometryRadiusKM: "6371.0088",183+ }, []string{"geohash", "s2"}},171184 {"a sphere that declares no flattening takes neither but geohash", map[string]string{172185 semconv.KeyGeometrySurface: "sphere",173186 }, []string{"geohash"}},@@ -92,6 +92,7 @@ func TestGroundsAgreeOnSurfaceAndSystems(t *testing.T) {
9292 want := []string{9393 "bend-or/2026-08-02/0",9494 "mars/global/0",95+ "test/earth-8192x4096",9596 "test/sphere-8192x4096",9697 "test/square-1024",9798 "test/square-1024-bounds",@@ -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);@@ -13,6 +13,7 @@ import (
1313 "os"1414 "path/filepath"1515 16+ "github.com/FelineStateMachine/atlas/format/bundle"1617 "github.com/FelineStateMachine/atlas/tests/corpus"1718 )1819 @@ -47,5 +48,22 @@ func run() error {
4748 }4849 fmt.Println(path)4950 }51+52+ // The included Earth volume beside the corpus: the committed bundle the53+ // desktop embeds, installed whole through the format's own path. It is the54+ // one registry entry with real rasters, which is what lets a spec ask for55+ // a tile and get an image back.56+ included, err := filepath.Glob(filepath.Join("included", "*.atlas"))57+ if err != nil {58+ return err59+ }60+ if len(included) != 1 {61+ return fmt.Errorf("included/ holds %d bundles, want exactly the one Earth", len(included))62+ }63+ installed, err := bundle.Install(dir, included[0])64+ if err != nil {65+ return fmt.Errorf("installing %s: %w", included[0], err)66+ }67+ fmt.Println(installed.Locator)5068 return nil5169 }