Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1f0809f
Retarget the UK build to FRS 2024-25: release object, re-pins, period…
juaristi22 Aug 20, 2026
49c1eb3
Regenerate the parity instruments from enhanced_frs_2024_25
juaristi22 Aug 20, 2026
badc121
Move the gate-side reference pins to the 2024-25 line
juaristi22 Aug 20, 2026
2ac2a9c
Review adjustments: reference label matches the pinned artifact; prec…
juaristi22 Aug 21, 2026
e9cbb2e
Adversarial-review dispositions: dual source pins on the HMRC family …
juaristi22 Aug 21, 2026
842e263
Merge branch 'uk-frs-2024-25-retarget-723' into uk-national-first-cal…
juaristi22 Aug 21, 2026
3ec5e15
Re-measure the UK spec-bundle and gate-battery digests on the merged …
juaristi22 Aug 21, 2026
2ccc963
Land the #623 run-readiness tooling: doctrine, honest parity trio, US…
juaristi22 Aug 21, 2026
9a8bd46
Merge origin/main (post-#735/#733): reconcile the seam onto the share…
juaristi22 Aug 22, 2026
ccb80a3
Drop the duplicate spine-driver failure handler reintroduced by the m…
juaristi22 Aug 22, 2026
43d3e2a
Pin the Ledger feed by content and size in the Logbook role pins
juaristi22 Aug 23, 2026
8eef7eb
Slice banded target measures: implement the declared groupby
juaristi22 Aug 23, 2026
f8ecfa7
Bind the two-child-limit references to real model variables
juaristi22 Aug 23, 2026
f24b401
Update the two-child-limit fixtures to the corrected binding
juaristi22 Aug 23, 2026
aa2fd22
Reduce person-level household conditions through person_household_id
juaristi22 Aug 23, 2026
53a6609
Pin-shape regression test for the armed run's Ledger role pin
juaristi22 Aug 24, 2026
e7d392b
Admit family_equal to the target-weight vocabulary and wire the doctr…
juaristi22 Aug 24, 2026
91074dd
Extend the loader-guarantee test to the corrected crosstab binding shape
juaristi22 Aug 24, 2026
96e7304
Relocate the UK national H5 I/O into national_frame and add the share…
juaristi22 Aug 24, 2026
971a969
Give the UK seam its simulated-measure provider and per-run doctrine …
juaristi22 Aug 24, 2026
e54e546
Add the calibration seam and its driver: calibrate whichever H5 you a…
juaristi22 Aug 24, 2026
38bb5f7
Address Vahid's review: absent holdout losses, drop the duplicated vi…
juaristi22 Aug 24, 2026
5597523
Merge remote-tracking branch 'origin/main' into uk-national-first-cal…
juaristi22 Aug 24, 2026
74b4d76
Skip the seam's H5 round-trip tests when pytables is absent
juaristi22 Aug 24, 2026
d154577
Merge remote-tracking branch 'origin/main' into uk-national-first-cal…
juaristi22 Aug 25, 2026
e4bee53
Count children as counts, and stop guessing which filter carries the …
juaristi22 Aug 25, 2026
a9db438
Put the calibration seam's attempts on the ratified chain, and seal w…
juaristi22 Aug 25, 2026
fa85878
Make the rule-1 scorer able to score, and say what the parity trio pr…
juaristi22 Aug 25, 2026
46630e7
Mirror the recomputed gate pins in the contract test's own copy
juaristi22 Aug 25, 2026
45d6583
Teach the reference generator the two new binding keys
juaristi22 Aug 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog.d/623-uk-calibration-review-fixes.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Count two-child-limit child targets as counts rather than household
indicators, attribute band edges to their own groupby dimension, make the
measure-provider fence answer only for routes it can take, put calibration
attempts on the ratified `uk/frs` Logbook chain with failure rows and unique
attempt ids, seal the verified Ledger identity into the run receipts, refuse
operator-supplied measure exclusions on release candidates, and let the rule-1
scorer materialize and authenticate what it scores.
3 changes: 3 additions & 0 deletions changelog.d/623-uk-national-run-readiness.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Add UK national Ledger-calibration run-readiness tooling, shared diagnostics,
synthetic incumbent scoring, and the held-run staging-candidate posture for
the first calibrated candidate.
4 changes: 4 additions & 0 deletions changelog.d/623-uk-target-surface-gate-note.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
State what the UK `uk_target_surface` gate proves — the solve's realized
target surface equals the declared register at name-and-period grain — rather
than claiming an incumbent comparison the frozen parity instrument cannot
source. Gate manifest and spec-fingerprint pins recomputed.
94 changes: 94 additions & 0 deletions docs/uk-national-calibration-runbook-623.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# UK national calibration runbook (#623)

This runbook documents the held licensed run for the first Ledger-calibrated UK
national candidate. It is not an instruction to run it in PR CI.

## Unblock conditions

Run only after one of these is true:

- WS-E spine is complete through E8 (#684) and E10 (#686).
- Maria explicitly names a different base spine for this run.

The input posture is a non-certified staging candidate at pre-clone grain,
matching the incumbent published national surface. The seam records that
posture itself and marks its artifact `shippable: false`: release certification
is the release-cut producer's job, not calibration's.

## Command shape

Calibration runs through `tools/calibrate_uk_national_dataset.py`. That driver
is the only one that builds the measure resolver and applies the committed
measure-exclusion register, and 187 of the activated references bind model
outputs that no frame carries — so it is the only path on which this target
surface materializes. The June builder
(`tools/build_uk_national_dataset.py`) constructs the calibration stage without
either and aborts on the first unmaterializable reference; it also rebuilds SPI
income onto its input, which a spine artifact already carries.

```bash
uv run --no-sync python tools/calibrate_uk_national_dataset.py \
--input-h5 data/ukds/acceptance/623-first-calibrated-candidate/input-spine.h5 \
--input-sha256 <sha256-of-input-spine-h5> \
--ledger-facts <ledger-consumer-artifact> \
--ledger-facts-sha256 <sha256> \
--ledger-manifest-sha256 <sha256> \
--staging-h5 data/ukds/acceptance/623-first-calibrated-candidate/populace_uk_2023.h5 \
--diagnostics-json data/ukds/acceptance/623-first-calibrated-candidate/calibration_diagnostics.json \
--build-record-json data/ukds/acceptance/623-first-calibrated-candidate/build_record.json \
--terminal-gate-json data/ukds/acceptance/623-first-calibrated-candidate/terminal_gates.json \
--release-id dev-623-first-calibrated-candidate
```

The diagnostics digest is measured, not declared: the seam writes the
diagnostics file, hashes its actual bytes, and only then constructs and signs
the terminal gate evidence. There is no `--calibration-diagnostics-sha256` to
supply, and no way for the receipt to claim an identity the file does not have.

Solve parameters are per-run overrides, not defaults. The campaign settings are
`--epochs 1500 --target-weight-rule family_equal`; each override is validated
through the doctrine dataclass and echoed as an explicit deviation in the
manifest, diagnostics and build record. `--release-candidate` refuses every
override flag, and refuses `--measure-exclusions`, so a release candidate is
always solved under declared doctrine against the committed target surface.

Signing the terminal gate report needs
`MICROCOSM_UK_TERMINAL_GATE_SIGNING_KEY` in the environment.

## Scoring

Rule 1 is decided by a separate tool run against the staged artifact, so run
identity never depends on the incumbent's bytes:

```bash
uv run --no-sync python tools/score_uk_national_candidate.py \
--candidate-h5 data/ukds/acceptance/623-first-calibrated-candidate/populace_uk_2023.h5 \
--candidate-sha256 <sha256-from-the-build-record> \
--incumbent-h5 <enhanced-frs-2024-25-h5> \
--incumbent-sha256 <sha256> \
--registry-json data/ukds/acceptance/623-first-calibrated-candidate/frozen-register.json \
--output-json data/ukds/acceptance/623-first-calibrated-candidate/score_vs_enhanced_frs.json
```

Both artifacts are verified against the supplied digests before they are read,
and both sides are scored on the same frozen register.

## Evidence directory

`data/ukds/acceptance/623-first-calibrated-candidate/` should contain:

- `build_record.json`
- `terminal_gates.json`
- `calibration_diagnostics.json`
- `score_vs_enhanced_frs.json`
- `logbook-spool/` (one row for the attempt, whatever its disposition)

Acceptance follows #578: the candidate must not regress incumbent battery
observables, and the score block decides rule 1. A rule-1 loss is evidence for
#686/#736, not a threshold-edit instruction.

The calibration battery is scoped to the calibration-relevant gates; the
spine-construction and imputation gates are out of scope here and are listed in
the report as scope exclusions with their rationale. A publishable
certification combines this with the spine build's own battery, which is
release-cut work (#757).
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class HdfWriteExclusion:
FrameSerializerSpec(
serializer_id="uk_single_year_h5",
writer=HdfWriteSite(
"packages/microcosm-build/src/microcosm/build/uk_runtime/national_build.py",
"packages/microcosm-build/src/microcosm/build/uk_runtime/national_frame.py",
"_write_uk_single_year_tables",
),
backend="pandas.HDFStore table",
Expand Down Expand Up @@ -177,7 +177,7 @@ class HdfWriteExclusion:
HdfWriteExclusion(
exclusion_id="uk_weight_root_attrs",
writer=HdfWriteSite(
"packages/microcosm-build/src/microcosm/build/uk_runtime/national_build.py",
"packages/microcosm-build/src/microcosm/build/uk_runtime/national_frame.py",
"_write_weight_metadata",
),
reason="Adds weight-kind and mass-log root attributes only.",
Expand Down
Loading
Loading