Skip to content

Rewrite the Belgian country package for donor transport - #1369

Draft
MaxGhenis wants to merge 2 commits into
mainfrom
be/transport-spec-b1
Draft

MaxGhenis wants to merge 2 commits into
mainfrom
be/transport-spec-b1

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Rewrites Microcosm's Belgian country package from its never-built BE-SILC design to the donor-transport design. Belgium becomes the second country on build/transport/, after New Zealand (decision d048). The package stays inactive: no transport_graph.json, receipt contract, rule bindings or scenarios yet.

What changes in build/be/

  • Donor: the same pinned populace-us Build P artifact NZ uses. Repository, revision, filename, size (462,915,783 bytes) and SHA-256 are copied exactly from build/nz/, in both the JSON and the typed projections.
  • Placeholders: the Chronicle consumer artifact and the rulespec-be tree are declared as unpinned references, following NZ's inactive-spec conventions. No placeholder hashes.
  • Spine: one US donor channel with assigned Belgian geography. No observed-region channel.
  • Vintages: donor 2024, target/policy year 2026 and geography NIS 2025. The 2026 year is method card BE-MC0, which is pending Max's ruling (d1902), and the description says so.
  • Geography: households draw NIS 2025 communes nationally, from the commune population package in Add Statbel commune population facts for NIS 2025 chronicle#383. Province, region and community are declared derived layers.
  • Release contract: private policyengine/populace-be-private, with no public artifacts. The SILC licence language is replaced by the Microcosm-BE provenance line (synthetic population, US survey donor pool reweighted). Publication stays Max's decision.
  • Catalogs: non-monetary columns only. Monetary columns wait for a shared EUR unit.
  • Target references: the SILC survey-year and offset fields are removed. These are still inactive groundwork; source periods and selectors are unchanged, and replacing them (with ageing to 2026) is later work.
  • SILC residue: rg -ni silc build/be returns nothing.

Shared files (cleared with the NZ hub before push)

  • country_spec.py: one new branch in the Belgian-only _attest_be_typed_geography_compatibility (~1939), whose single call site is gated on declared_country == "be". It accepts an empty observed-region constraint only with a <level>_nationally draw and no source_nuts1_preserved claim. The legacy observed-region path still requires preservation, and a new BE test proves it.
  • tests/engine_free/shared/test_country_spec.py: only TestBelgianPackage and TestCountryStagePlan change, both Belgian-only (stage renames and the new donor/geography contract). The one negative-case change, "province" → "district", exists because province is now a declared Belgian layer.
  • tests/engine_free/shared/test_spec_engine_country_bundles.py: Belgian assertions only. No NZ assertion changed, and Add NZ G8-r1 target references, ERP bridge and d1376 gates #1362's NZ resource additions are intact.
  • tests/golden/be_country_spec.json: regenerated with the test's own helpers. It's the only golden that changed.
  • There is no diff in build/nz/, build/transport/ or tools/ci_test_plan.py.

Checks (each file run separately on this branch)

File Result
test_spec_engine_country_bundles.py 22 passed
test_country_spec.py 137 passed, NZ golden byte-equal
test_nz_spec_package.py 1,192 passed
test_spec_only_country_packages.py 8 passed

Ruff lint and format pass, and git diff --check is clean. An independent GPT-6.1 Sol review approved c68994f with one docstring nit, which is fixed in dc157a7 (see the review comment).

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits October 23, 2026 10:17
Pin the reviewed US Build P donor, declare private inactive transport
inputs, and propose 2026 policy with NIS 2025 commune assignment.
Retain observed-region compatibility while allowing national donor
assignment; update Belgian contract tests and regenerate its golden.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ocstring

The module docstring still said the be/ package declares BE-SILC source
stages; it now declares the pinned populace-us support pool. Review nit
from the Sol review of c68994f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Independent review: GPT-6.1 Sol, APPROVE_WITH_NITS at c68994f (~/reviews/belgium-2026-10-12/transport-port/jobs/b1/review-c68994f2.md).

What the review checked:

  • Donor identity: the BE and NZ donor objects match exactly across the JSON and typed YAML (repository, revision, filename, size, SHA-256). There are no fabricated placeholder pins.
  • Loader branch: it's Belgian-only, and the observed-region path is unchanged. Seven in-memory attester cases passed.
  • Goldens: only the BE golden changed, and the repository's own helpers reproduced all three byte for byte.
  • Status: the package stays inactive, every release artifact stays private, and 2026 is marked as pending d1902.
  • CI plan: verification passed across 764 test files.

The one finding was a P3: the module docstring in country_spec.py still described "BE-SILC source stages". It's fixed in dc157a7, a docstring-only change. After the fix, test_country_spec.py and test_spec_engine_country_bundles.py pass: 159 tests.

Merge is pinned to head dc157a7 and gated on green checks and MERGEABLE.

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Held until 2026-10-29 12:00Z. Do not merge before then.

The UK hub asked for this hold, and the NZ hub is holding microcosm#1375 to the same date for the same reason. Both kernels below hash the source bytes of country_spec.py (source_hash, microcosm-graph kernel.py):

  • targets.compile@1 and targets.problem@1 take it through _COMPILE_MODULES (target_kernels.py:408–418).
  • The gate kernel takes it at gate_kernels.py:726.

So this PR changes their implementation hashes for every country. UK outputs don't change, but every cached UK graph node would recompute during the Budget window:

  • María's Monday cut and its certification (about 12:00Z on 10/26);
  • budget-final-regen (10/27);
  • Budget day (10/28).

Belgium doesn't need this before then. The PR is back to draft so no sweep merges it. It will be re-checked and merged on green at reviewed head dc157a7 after 10/29 12:00Z.

@MaxGhenis
MaxGhenis marked this pull request as draft October 23, 2026 23:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant