# European WWI integration spot checks

`before/` and `after/` contain SVG and PNG snapshots for 1914-12-31,
1916-12-31, 1918-03-03, 1918-07-15, 1918-11-11 and 1920-12-31.
Both sets use the same light palette and Europe crop (10°W–45°E, 35–62°N).
The renderer's crop winding and viewport clipping were corrected in this change.
The after images use the page's diagonal occupation hatch. These are political
colour renders, without flags, labels, population shading or event markers.

Reproduce from the rebuilt data, offline:

```sh
npm run render -- --annual-base --dates 1914-12-31,1916-12-31,1918-03-03,1918-07-15,1918-11-11,1920-12-31 --crop -10,45,35,62 --out docs/spotchecks/wwi/before
npm run render -- --dates 1914-12-31,1916-12-31,1918-03-03,1918-07-15,1918-11-11,1920-12-31 --crop -10,45,35,62 --out docs/spotchecks/wwi/after
```

`--annual-base` reads the retained main-builder input. Ordinary `--years` renders
also retain that annual source view and its existing regression fixture. Dated
renders and the live page use the cut hosts and occupations. Every exact key
date is an inspectable page step, including dates without chronicle events;
`[` / `]` navigate those steps. `#1918-03` continues to mean 1 March, and
`#1918-03-03` inspects the documented 3 March snapshot.

## Coverage limits

The requested complete European coverage is **not achieved by the supplied
source polygons**. The images document these omissions; a passing structural
check does not certify historical completeness.

- No Russian-held Galicia/Bukovina extent for 1914-12-31. Russian extents start
  with the single-day 1915-05-01 snapshot; later seasonal extents are supplied.
- No Ober Ost/Lithuania/Courland, Brest-Litovsk/Faustschlag, Ukraine or Baltic
  occupation front. Ober Ost is absent from the repository pin. Ukraine's state
  boundary is not used as a substitute for a military front.
- Pinned Lublin (2695683) and Regency Poland (2695684) have unclosed outer rings
  in the cached extracts and are omitted; `data/wwi.json` records both failures.
  The pinned Warsaw occupation is assembled and cited.
- Serbia, Romania and Venetia use the supplied joint Central Powers envelopes
  and an explicit coalition colour. Separate Austro-Hungarian/Bulgarian zones,
  Albanian occupations, and Romanian-occupied Hungary are absent.
- The 1920 image includes the three supplied right-bank Rhineland bridgeheads;
  national left-bank occupation zones are absent.
- Several front lines are valid for a single key day, or a documented seasonal
  interval. Missing months remain without an occupation overlay. The monthly
  dial never extrapolates a source line to an unsupported date.

The full local source inventory and individual caveats are in
[`sources-local/wwi/README.md`](../../../sources-local/wwi/README.md).
Every shipped overlay's `src` resolves in [`data/sources.json`](../../../data/sources.json).
No new polygons were traced during integration. Existing European digitisation
cites only US Military Academy federal atlas plates and CC0 OHM host boundaries.

## Build and validation design

`npm run build:data` first preserves existing early HYDE estimates and world
metadata, runs the main builder, then invokes the WWI overlay through the
existing overlay runner. Population is restored only by exact feature-property
identity. Occupation population is an area-proportional allocation of the annual
host estimate, not a new HYDE integration. The retained annual input is also
used by the existing attribute-report checks; live dated geometry has separate
schema, source, temporal-overlap and coverage checks. `npm test` runs both.

The only modified chunk is `b1914.json`. Its larger size is reported below.
Dated host intervals and shared topology cuts add records and vertices; final
quantization is repaired using the same date predicates. `b1939.json` is
unchanged because all supplied European occupations end by 1920. The retained
annual chunk and compressed early population snapshot are build/QA inputs,
not additional page downloads.

The repository's old optional `tests/month-dial-browser.mjs` still assumes 1939
is annual, although the integrated WWII lane already makes 1938–1946 monthly.
Its original assertion fails on that existing behavior. The integration browser
check uses 1930 for the annual control and the newly exposed exact WWI key dates;
it exercises month/hash/arrows, event playback, full-list/25-marker behavior,
and occupied/annexed hatches/tooltips in light/dark and flags/colours offline.

## Source maps used

- [Campaign Atlas to the Great War, plate 11, "Northwest Europe, 1915: The Stabilized Front](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/04/WWOne11-01.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 18, "Northwest Europe: Western Front, 1918](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/04/WWOne18-01.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 16, "Northwest Europe, 1917: Western Front, 1917](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/04/WWOne16Combined-01.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 23, "Northwest Europe: Western Front, 1918](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/04/WWOne23-01.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 31, "Northeastern Europe: Gorlice-Tarnow Breakthrough and Russian Withdrawal](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne31.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 35, "Southwestern Russia and Galicia: Brusilov Offensive](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne35.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 39, "The Balkans: The Salonikan Front](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne39.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 38, "Rumania, 1916: Rumanian Campaign, Final Operations, 26 November 1916 - 7 January 1917"](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/04/WWOne38.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 14, "Northeastern Italy, 1915-1917: Eleven Battles of the Isonzo, June 1915 - September 1917](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/04/WWOne14-01.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 15, "Northeastern Italy, 1915-1917: Battle of Caporetto](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/04/WWOne15-01.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [Campaign Atlas to the Great War, plate 20, "Northeastern Italy: Battle of Vittorio Veneto](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/04/WWOne20-01.jpg) — Department of History, US Military Academy, federal work, undated atlas plate/web edition 2025; `public-domain-US`.
- [OpenHistoricalMap relation 2695682](https://www.openhistoricalmap.org/relation/2695682), version 37, pinned timestamp 2026-05-17T08:08:18Z — CC0. Local plates also cite the CC0 OHM host outlines in the European inventory.

Browser validation is reproducible with `node docs/spotchecks/wwi/check-browser.mjs` using installed Chrome or Playwright Chromium; all external requests are blocked.

## Recorded chunk sizes

| Chunk | Before | After | Growth |
|---|---:|---:|---:|
| `b1914.json` | 1728391 bytes | 2867192 bytes | 1138801 bytes |

The 1138801-byte growth exceeds 300 KB. It retains 1580 date-bounded host/occupation records (including 136 occupation records), common coast/front junctions and repaired quantized boundaries. This is an explicit size exception, not a claimed 300 KB pass.

Validation: full `npm run build:data` and offline `npm test` pass; 7 European polygon tests pass; the committed offline Chrome integration check passes. Repeated overlay builds produce byte-identical chunk, metadata, source manifest and report files.

## Overseas integration, 1914–1923

The `overseas/` snapshots compare the retained annual input (`before/`) with
composed dated WWI/WWII output (`after/`), using the same political palette.
Each contains `world/` and `middle-east/` SVG/PNG pairs for 1914-12-31,
1916-12-31, 1917-12-31, 1918-11-11, 1920-08-10 and 1922-10-11. The Middle East
viewport is fitted to 20–60°E, 10–45°N and clipped to that geographic boundary;
it no longer retains the world aspect ratio and extra lateral geography.
`stats.json` records the actual projection. Feature counts and area sums remain
worldwide counts, not counts or areas clipped to the image viewport.

Reproduce offline after `npm run build:data`:

```sh
DATES=1914-12-31,1916-12-31,1917-12-31,1918-11-11,1920-08-10,1922-10-11
npm run render -- --annual-base --dates "$DATES" --out docs/spotchecks/wwi/overseas/before/world
npm run render -- --annual-base --dates "$DATES" --crop 20,60,10,45 --out docs/spotchecks/wwi/overseas/before/middle-east
npm run render -- --dates "$DATES" --out docs/spotchecks/wwi/overseas/after/world
npm run render -- --dates "$DATES" --crop 20,60,10,45 --out docs/spotchecks/wwi/overseas/after/middle-east
node scripts/flag-coverage.mjs
node docs/spotchecks/wwi/check-browser.mjs
```

Seven previously unbuilt source features now have stable IDs and participate in
the land-clipped, dated mosaic: Basra, Lower Mesopotamia, Baghdad, Mosul,
southern Palestine, the generalized British advance/OETA envelope, and German
South-West Africa. Tests check the actual shipped geometry at Basra on
1914-12-31 and Baghdad/Jerusalem on 1917-12-31. The original source caveats
remain: the Mesopotamian outlines are generalized, the Baghdad envelope includes
later gains, and the Palestine envelope holds a December line from its recorded
October start. These do not establish intermediate daily fronts.

Pinned OHM occupations now include Cyprus, Japanese Pacific possessions and
Kiaochow, Australian New Guinea/Nauru, New Zealand's occupation of Samoa,
Belgian Ruanda-Urundi, joint Anglo-French Togoland, and the British/French
Cameroon split. Joint Togoland has a distinct Allied colour. Dominion
occupiers keep their administering names and British-family colours.
Nauru and Western Samoa also use the pinned successor mandate units. The
Cameroon and Ruanda occupation end dates respect the mandate start qualifiers
in the cached CC0 Wikidata P31 claims (Q1028848, Q1028835, Q590743).
Egypt is a British protectorate, rather than an Egyptian-administered territory.
Iraq and Palestine use their pinned 1920-08-10 mandate starts. The month dial
and exact map steps continue through 1923; Mudros, Sèvres, Mudanya and Lausanne
are inspectable jumps. These key dates do not imply complete source coverage.

The dated corrections are in `build-wwi.mjs`. The annual `polity-attrs.json`
and its retained annual input are unchanged: updating that table also requires
regenerating `docs/spotchecks/attrs-report.json`, which is outside the allowed
paths for this task. This avoids returning another branch whose annual-source
QA fails with a large attribute-report mismatch. Annual-source and live-map
checks both run in `npm test`.

### Additional source maps used

All are Department of History, US Military Academy federal works,
*Campaign Atlas to the Great War*, undated plates, web edition 2025;
`public-domain-US`. These are inherited source polygons; this integration adds
no new tracing. The earlier European maps are listed above.

- [Plate 42, Eurasia, 1914: Ottoman Empire and Turkish Rail System](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne42.jpg): frontier and town context for the generalized Baghdad/Mosul envelopes, not an attested 1917–1918 front.
- [Plate 43, Lower Mesopotamia, 1914: Anglo-Indian Invasion and Operations in 1914](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne43.jpg): Basra and Shatt al-Arab.
- [Plate 47, Lower Mesopotamia: First Advance on Baghdad, and the First and Second Battles of Kut](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne47.jpg): lower Mesopotamia and Baghdad context.
- [Plate 48, Egypt and Palestine, 1914: Campaign in Egypt and Palestine, First Battle of Gaza](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne48.jpg): Egyptian frontier context for the southern Palestine edge.
- [Plate 49, Palestine, 1917: Operations Fall of 1917, Third Battle of Gaza, Capture of Jerusalem](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne49.jpg): southern Palestine.
- [Plate 50, Battle of Megiddo and Pursuit to Damascus](https://dhc.westpoint.edu/wp-content/uploads/sites/6/2025/01/WWOne50.jpg): the generalized British advance envelope, without separate OETA administration zones.
- [OpenHistoricalMap relation 2840010, German South-West Africa](https://www.openhistoricalmap.org/relation/2840010): CC0 colony outline used by the supplied South African occupation polygon. Its stated surrender date is 1915-07-09.

Every selected OHM relation, version, timestamp, URL and licence, and every local
polygon citation, is listed in the generated [`wwi-sources.json`](../../wwi-sources.json)
and [`data/sources.json`](../../../data/sources.json). No Rumsey, Commons,
Wikipedia, modern atlas, CC BY-SA, CC BY-NC or unknown-licence map was added.
Natural Earth remains the public-domain clipping land base.

### Unmet historical coverage

The complete acceptance criteria are **not met** by the supplied digitisation.
The images deliberately expose these gaps; passing tests certify the supported
geometry and provenance, not completeness.

- Russian eastern Anatolia and the Ottoman Caucasus advance are absent.
- Hejaz/Aqaba and the Arab Revolt extents are absent.
- OETA South/East/West are not separately delineated. One British advance
  envelope is shown, with the limitations above.
- Constantinople, Greek Smyrna, French Cilicia and Italian Antalya have no
  supplied source polygon. Constantinople's requested occupation start,
  1918-11-13, also falls after the 1918-11-11 acceptance image.
- The German East Africa 1916/1917 stages are absent. The mandate outline is
  not substituted for an unknown wartime front.
- French Togoland's separate post-partition extent and complete transitions
  from every Pacific occupation to a mandate remain incomplete in the pin.
- Ottoman and Levant base units retain the annual source outside the supplied
  dated occupation cuts; not every underlying polity has been replaced by its
  exact daily OHM version.
- The two unclosed European OHM rings remain dropped, as documented above.

[`sources-local/wwi/gaps.json`](../../../sources-local/wwi/gaps.json) and the
generated source inventory record these omissions for the next data slice.
A verified, freely licensed source extent is required before adding each one.

The retained annual chunk is 1,728,391 bytes; the current WWI output size and
record count are recorded in `data/wwi.json` before composing WWII. The increase
of about 2 MB includes dated host cuts, source units and occupations. It exceeds the earlier 300 KB size guideline;
only the 1914 chunk grows. No population source is downloaded or recomputed.

### Recorded validation for the overseas integration

- `npm ci --offline`: passed from the available package cache.
- `npm run build:data`: passed; after the final cached mandate-unit additions,
  `node scripts/run-overlays.mjs` also passed.
- `node scripts/flag-coverage.mjs`: regenerated the allowed flag fixture.
- `npm test`: passed offline, including both annual-source runner regressions,
  dated-source/overlap checks, flag coverage, point-control checks and renderer
  regression checks.
- `node --test tests/month-dial.test.mjs tests/10a-polygons.test.mjs tests/9a-polygons.test.mjs`:
  passed (22 tests).
- `node docs/spotchecks/wwi/check-browser.mjs`: passed against local Chrome,
  with external requests blocked, including the December 1923 boundary.
- Six dates × two views × before/after × SVG/PNG: all 48 files are present.
- `git diff --check`: passed. Git cannot commit here because `.git` is read-only.
