Add governed Statbel release promotion
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-17 00:19:47 +02:00
parent 6187a9d41d
commit d0a8a3ad15
14 changed files with 1401 additions and 28 deletions
+52
View File
@@ -1,3 +1,55 @@
## Sprint 228 - Governed Statbel population release promotion (2026-07-17)
Implemented:
- Added `scripts/manage_statbel_population_release.py` with four separate
operator actions for the approved Kempen scope. `plan` is read-only; `stage`
requires exact year/layout confirmation and performs bounded fresh download
plus preflight only; `review` requires a named explicit approval; `apply`
requires the exact staged-plan and review-evidence SHA-256 values.
- Derived the only accepted population and matching sector-geometry URLs from
the allowlisted catalog year/layout contract. The coordinator accepts no
arbitrary source URL or process, and current, older, unavailable, ambiguous
or catalog-drifted releases are not stageable.
- Bound catalog identity, source archives, preflight manifest, derived
snapshot, scope/national accounting, ZZZZ totals, baseline trend and geometry
repairs into `staged-plan.json`. Bound the named human decision to that plan
in `review-evidence.json`; successful apply records the immutable Dataset in
`applied-evidence.json` without deleting prior snapshots.
- Extended `provision_mol_population_history.py` with a complete all-or-none
release config for one future year. Existing 2021-2025 arguments remain
compatible. Source downloads now enforce response and streaming byte bounds,
validate final official URLs and discover the latest retained baseline from
actual snapshot files rather than a hardcoded year list.
- Replaced the population operator's 200-row workspace lookup with complete,
total-consistent pagination. This keeps repeated apply idempotent in the live
project with 2,429 Datasets.
- Added Docker/readiness packaging and updated source, API, persistence,
storage and operator documentation. No API route, migration, scheduler,
automatic fetch or frontend behavior changed.
Validation:
- 15 focused Sprint 228 tests and 38 combined Sprint 194/227/228 tests passed.
Coverage includes release ordering, future URL/layout validation, dynamic
baseline discovery, bounded downloads, >200-row pagination, stage/apply
command separation, plan/review hashes, source/review tampering, evidence-root
confinement, catalog drift, named review, apply evidence and current-edition
refusal.
- Complete readiness passed with 830 backend tests, 110 documented routes,
one Alembic head `202607160001`, frontend typecheck and production build.
Static Alembic SQL, shell syntax, target Ruff and diff checks passed.
- A compatibility run against the live Tower API used the temporary candidate
scripts before deployment. The official Statbel catalog reported
`NodeID6475`, remote/local edition `2025`, layout `new`, catalog hash
`64b17ce059a9c2f936d4b5741b20aed4b178409d8b5be81be86e6fdc9fe7c9d9` and
decision `current`; `plan` wrote no evidence. A deliberate `stage` attempt
for that current edition exited 1 with `not safely stageable: current` and
left the database Dataset count unchanged at 2,429.
Boundary:
- No newer population edition is currently advertised, so no real stage,
review or apply was executed. Their complete state machine is fixture-tested;
the first future release must still pass all four explicit operator phases.
## Sprint 227 - Statbel population import compatibility preflight (2026-07-16)
Implemented: