Skip to content

Define the Belgian calibration target contract - #819

Merged
MaxGhenis merged 4 commits into
mainfrom
be-calibration-target-contract
Aug 30, 2026
Merged

Define the Belgian calibration target contract#819
MaxGhenis merged 4 commits into
mainfrom
be-calibration-target-contract

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

  • Define and validate the Belgian calibration target-reference schema: required families, declared criticality/relative-tolerance tiers, basis periods, exact-period/source-projection policy, and typed geography vintages.
  • Keep multi-cell population and commune references explicitly non-executable until cell-specific fanout and source bindings exist.
  • Harden the shared resolver so identifiers and selectors obey the same assertion/period policies; reject unsupported exact subperiod aggregates and normalize academic-year aliases/ranges consistently.
  • Preserve numeric source-table identities while normalizing period tokens, with regression tests.

Scope

This is partial groundwork for #263: schema validation and resolver contracts only. The tier tolerances and calibration/validation roles are declared and validated metadata; this PR does not wire them into calibration or release gates.

Current Chronicle Belgian facts do not yet satisfy the complete declared target surface. This PR does not activate Belgian calibration, claim the existing selectors resolve, produce a diagnostic build, or complete #263. It does not implement #264.

Remaining work includes source packages/projections, cell-specific fanout and bindings, executable role/tolerance wiring, and the separate EUROMOD/FPB diagnostic surface.

Verification

  • Country-spec, ledger-target, authoring, and related UK suites: 249 passed
  • Full Ruff lint: passed
  • Changed-file formatting: passed
  • CI test-group verification: 313 test files assigned
  • git diff --check: passed
  • Final independent review: pending; this PR remains draft for that gate

The full-tree formatter reports 119 pre-existing unrelated files; this PR claims changed-file formatting only.

@MaxGhenis
MaxGhenis force-pushed the be-calibration-target-contract branch from ad635bc to 7a1d306 Compare August 30, 2026 01:24
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Addressed both independent review findings in commit 7a1d306a.

Should-address fixed

  • A1 — Period validation: Reject malformed untyped numeric ranges and month labels before literal equality can accept them. Declared period types now disambiguate valid annual ranges, while supported aliases and opaque publisher labels remain usable. Exact-period aggregation uses the same normalization.
  • A2 — Geography vintage: Enforce the declared vintage after resolution, including fact-key, source-record-ID, and direct-helper paths. Required pins reject missing or conflicting fact vintages; references without a vintage pin retain their previous behavior.

Verification

  • Added 184 regression/control cases covering schema validation, all four resolution routes, valid aliases, malformed periods, and matching/missing/conflicting vintages.
  • The five-file focused suite passed 433 tests after formatting and again after rebasing onto main at ba73e2f (Require explicit RuleSpec roots in the Axiom adapter #818). Suites: country-spec, ledger-target, target-reference authoring, UK target references, and UK ledger targets.
  • Independent verification: CLEAN, 2/2 approved fixes, with the new regression cases rerun and 100 additional in-memory probes.
  • Full Ruff lint, formatting of all four changed files, the 313-file CI test inventory, and git diff --check passed.
  • The rebase preserved the three existing PR commits and the repair commit unchanged, as verified by git range-diff.

The PR remains draft pending refreshed CI. This is partial, inactive groundwork for #263: no Belgian calibration activation, source-value changes, data publication, or #264 implementation. These checks validate code contracts, not a Belgian population release.

@MaxGhenis
MaxGhenis marked this pull request as ready for review August 30, 2026 02:20
@MaxGhenis
MaxGhenis merged commit a18c87e into main Aug 30, 2026
23 checks passed
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