Files
CatoandClaude Opus 5.5 5f27700b14 feat(places): a new country pack takes its country over from the world pack; generated data refreshed monthly (#577)
* fix(law): a recut keeps the mark of a text read by OCR

The weekly recut wrote every cantonal version it examined back with the plain
importer version, so a text read from a scan by OCR (`…+ocr`) lost the mark
that says how it was read, and an older version so marked was examined again
at the head of every run. Any version carrying this reader's version with a
mark (+archive, +ocr, or both) is now current, and a version brought up to
date keeps every mark it had.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJdjaMYdbLjujoC3k

* feat(places): a pack of its own takes a country over from the world pack

Adding a pack is how a country gets places in depth, and the path had never
run: a new pack's root resolved to the world pack's row, which kept its pack
and path; the new pack's places hung under world/...; and a world file still
stating the country would set the root's level back and give it a parent.

- A pack may `yield` (the world pack does): it holds a place only until a
  pack of the place's own names it.
- Then the place moves: same row (its figures and records stay), new pack and
  path, the new path canonical in place_paths and the old one redirecting, and
  the parents other sources stated for it superseded.
- What the world pack held under a moved place that the batch does not restate
  ends that day; restated later, it moves and is current again.
- A batch of a yielding pack leaves alone a place another pack holds and every
  place it states under one, so a world file not yet regenerated, the
  countries' or the subdivisions', cannot take a country back.
- An integration test adds Quuxland, a made-up country the world pack holds
  first, and checks all of it, rerun-safe on one database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJdjaMYdbLjujoC3k

* feat(data): one command refreshes every generated dataset, and a monthly workflow opens the PR

The world's profiles, its countries, every country's subdivisions, the world
list's photographs and the law plan were refreshed only when someone ran three
to five commands on a laptop, in an order nobody wrote down; all were last
read on 2026-11-10.

- `pnpm run data:refresh [--only a,b] [--list]` (scripts/data-refresh.ts)
  runs the generators in the order they build on each other. One that fails
  keeps its old files and is reported; the rest still run. A new generator is
  one entry.
- .github/workflows/data-refresh.yml runs it on the 4th of each month (or on
  dispatch, for some), and opens a pull request when anything changed, as
  bitbaum/substrata's recheck-data.yml does; the sweep merges it on green CI
  and the deploy's places-data job imports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJdjaMYdbLjujoC3k

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 09:27:44 +01:00
..