Skip to content

Certify the Microcosm UK national build with Scottish property income targets - #795

Merged
juaristi22 merged 1 commit into
mainfrom
certify-uk-6608c43f
Dec 4, 2026
Merged

juaristi22 merged 1 commit into
mainfrom
certify-uk-6608c43f

Conversation

@juaristi22

@juaristi22 juaristi22 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

This certifies the Microcosm UK national build uk-frs-calibration-attempt-20261203T195135Z-6608c43f, which binds Scottish taxpayers' property income (PolicyEngine/microcosm#1868). Constituency and local-authority regions stay on uk-local-candidate-f100-s42-20261123T075147Z-7081d968, the local-area build in 6.20.3 and on main. Both certify on policyengine-uk 2.179.2, on which they were built (built_with_model_package), and the core stays at the bundle's pin, 3.34.10 (core_binding: bundle_pin).

The build is published on policyengine/populace-uk-private and listed, not current, in its releases.json. A certificate pins its build, so it does not need to be current.

Mechanical handoff; wrapper qualification pending unless reviewed receipts cover this exact candidate pair, commit and bundle. Microcosm's release-cut gates and passing tests do not establish wrapper qualification.

The national

uk-frs-calibration-attempt-20261203T195135Z-6608c43f (microcosm_uk_2024_25, release microcosm-uk-2024-25-national):

  • Build: a calibrate-only cut on the input spine of the current national, uk-frs-calibration-attempt-20261122T100732Z-b891aa69. It ran at that build's Microcosm commit 41053d980 plus the two target rows below (8563b2235, branch uk-scottish-property-1868-on-b891aa69, not for merge), with the same Chronicle feed (15040ea5), policyengine-uk 2.179.2 and policyengine-core 3.34.10.
  • Certification in Microcosm: 58 spine gates, 7 seam gates and 21 release-cut gates passed, and the release certification is shippable. It was certified at c00582df6, which carries 5674bc997 (the signed degenerate-surface exclusions of the fourteen UK totals), as b891aa69 was.
  • Publication: published 3 Dec at hub commit 80834866d45da9965518c4dc5561a0dd523549d3, listed, not current.
  • H5 sha256: 96b1c955105721d3db75b0796bb441bfe39bfd9fe52cca295fb7e0ec033581a7.

The local area

Unchanged: uk-local-candidate-f100-s42-20261123T075147Z-7081d968 (microcosm_uk_2024_25_dense) at hub commit 9da099465da06f020d9125f60e49c88180a9e607, as in 6.20.3 and on main. It was built on b891aa69's spine and does not have the two Scottish rows, so constituency and local-authority runs in Scotland do not get this fix. Runs for Scotland as a whole (country/scotland) filter the national file, so they do.

What changes in the data

No target bound Scotland's share of the UK property rows. The solve scaled Scottish landlord households to 1.84 times their prior weight, against 1.19 times elsewhere, and Scotland ended with about 7.5% of UK property income.

The build adds two rows, as their own loss family: the count of Scottish taxpayers with property income, and their net property income. The Scottish Government's technical factsheet (3 December, 2023-24 outturn) says about 4.5% of Scottish taxpayers have property income, and that it is about 1.2% of their total income. The rows apply these shares to SPI 2023-24 Table 3.11's Scottish taxpayers and total income, uprated to 2025: about 144,000 taxpayers and £1.52bn.

On this build:

  • both rows end about 0.1% above their targets;
  • 98.8% of rows end within 10% of their targets, as on b891aa69, no row moved outside 10%, and the weight-ratio gate passes;
  • Scotland has 4.7% of UK property income (stored 2024 values);
  • in 2027-28, on policyengine-uk 2.179.2, 4.4% of Scottish taxpayers have property income, and they have £1,630m of it (about £2.6bn on b891aa69). The Scottish Fiscal Commission's figure is £1,664m;
  • the property rates, 6p above the earnings rates, raise £91.5m static (£145.9m on b891aa69). The Commission's costing is £83.0m.

The remaining gap is the distribution: 94% of this income is taxable after allowances, against about 83% in the Commission's costing.

Impact

  • Only the UK national data moves, from b891aa69 to 6608c43f. UK results change where Scotland's property income enters, and a little elsewhere, where weights moved.
  • The model pin (2.179.2), the core pin (3.34.10), the lock, the local area, the US release, the dataset names and the household snapshots are unchanged.

UC coverage floor (#491)

The national passes for Great Britain in 2025 on policyengine-uk 2.179.2: benefit units with Universal Credit are at 0.908 of DWP's figure, and Universal Credit spend at 0.938 of the OBR's, against 0.909 and 0.940 for b891aa69. The floor asks for each within 10%. The receipt holds weighted national totals only.

How it was made

tools/certify_uk_cut_in_policyengine_py.py in PolicyEngine/microcosm at 7bd3960e2 (the tool and its imports are identical to Microcosm's main), with --keep-regional-release:

uv sync --frozen --extra uk --extra dev --python 3.13
.venv/bin/python scripts/bundle.py certify-data --country uk --data-producer populace --manifest-uri hf://dataset/policyengine/populace-uk-private@80834866d45da9965518c4dc5561a0dd523549d3/releases/microcosm-uk-2024-25-national/uk-frs-calibration-attempt-20261203T195135Z-6608c43f/release_manifest.json --regional-manifest-uri hf://dataset/policyengine/populace-uk-private@9da099465da06f020d9125f60e49c88180a9e607/releases/microcosm-uk-2024-25-dense/uk-local-candidate-f100-s42-20261123T075147Z-7081d968/release_manifest.json --model-version 2.179.2
uv lock --no-config --no-sources --default-index https://pypi.org/simple --python .venv/bin/python
uv sync --frozen --extra uk --extra dev --python 3.13
.venv/bin/python scripts/release_lock.py
.venv/bin/python scripts/bundle.py generate --include-tros
.venv/bin/python -c '<certified constant rewrite: policyengine.provenance.uk_qualification>' '<old UK record>' '<new UK record>'
PE_UPDATE_SNAPSHOTS=1 .venv/bin/python -m pytest tests/test_household_calculator_snapshot.py -q
.venv/bin/python scripts/bundle.py check --published-spm --include-tros --strict-tros
.venv/bin/python scripts/check_uk_uc_floor.py --dataset microcosm_uk_2024_25 --year 2025 --output ../pepy-certify-uk-6608c43f.uc_floor.json
  • b7ae55dd: the national, certified by one certify-data run, with both TROs, the certified test constants (tests/test_models.py, tests/test_release_manifests.py, tests/test_uk_regions.py) and the changelog fragment.

Tests

Local, at b7ae55dd, with the private data token: the bundle, release, TRO, model, compatibility, dataset, region and UK test files (56). All 1,915 tests passed, and none was skipped. The full suite runs in this PR's CI (make test on four Pythons).

bundle.py check --published-spm --include-tros --strict-tros and the release lock pass. The strict check's warning, that the US core is outside the US release's ==3.32.5 claim, predates this PR.

Needs a person before this leaves draft

  • Wrapper qualification. Attach exact-pair receipts for every required candidate gate, including the full reform contract, metrics review and reform responsiveness; attach and review scorecard replay evidence. Keep qualification pending until the evidence is reviewed. Record any explicit reviewer-approved exception; this script waives no gate.
  • One writer: the UK hub and María know this PR exists.

Disclosure

UK, Great Britain and Scotland-wide weighted totals and shares only. Each Scottish figure rests on 30 or more source households. No record-level value, maximum or minimum.

🤖 Generated with Claude Code

…Z-6608c43f

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

Copy link
Copy Markdown
Contributor Author

Comparison with b891aa69

Both files were scored on the same frozen register of 1,544 targets, and run on policyengine-uk 2.179.2 for 2025 and 2027-28.

  • Contents: the person, benefit unit and time-period tables are identical (tools/compare_uk_h5_payload.py in Microcosm). In the household table, only household_weight and the fourteen uk_total_* columns differ.
  • Targets: 1,536 of the 1,542 earlier targets move by less than 1 point, and none crosses the 10% or 25% line. 1,517 are within 10% on both files. The mean capped error on the earlier targets goes from 1.233% to 1.250%, and with the two new rows from 1.299% to 1.249%. Five errors grow by more than 1 point:
    • Scottish taxpayers with £200,000 or more: +1.6% to +7.3%;
    • UK property income, £15,000 to £20,000: −0.1% to −2.9%;
    • UK property income, £12,570 to £15,000: −11.2% to −13.7% (already outside 10%);
    • Scottish income tax, £100,000 to £150,000: +0.2% to +1.8%;
    • Scottish income tax, £50,000 to £70,000: +1.7% to +3.1%.
  • Weights: the effective sample size goes from 7,471 to 7,472. 3.9% of households move by more than 10%. Each region's households and people move by less than 0.25%. Scottish landlord households take 0.70 times their earlier weight.
  • UK outputs: totals move by less than 0.25% (property income −0.4%), poverty rates by less than 0.1 point and decile mean incomes by less than 0.6%. The Gini does not move.
  • Scottish outputs: income tax moves by less than 0.1%, property income falls by 38% and net income by 0.3%. Poverty rates move by less than 0.25 point. The largest move is child poverty after housing costs in 2027-28: +0.23 point.

Two side effects, both inside the gates:

  • Scottish self-employment income rises by 7.9%. Scotland's share of UK self-employment income goes from 6.5% to 7.0%, against 6.1% on the 2022-23 SPI tape, and no target binds it. Scottish income tax does not move, because its band rows are bound. Scottish NI rises by 0.7%.
  • More Scottish top earners. Scottish people with £150,000 or more rise by 4.5%. Their income tax stays on target: within 0.1% at £150,000 to £200,000 and at £200,000 or more.

🤖 Generated with Claude Code

@juaristi22
juaristi22 marked this pull request as ready for review December 4, 2026 00:04
@juaristi22
juaristi22 merged commit f29df76 into main Dec 4, 2026
25 of 30 checks passed
juaristi22 added a commit to PolicyEngine/uk-scottish-budget-2027-28 that referenced this pull request Dec 4, 2026
policyengine 6.22.0 certifies the national build that binds Scottish taxpayers'
property income (PolicyEngine/policyengine.py#795, PolicyEngine/microcosm#1868)
on the same policyengine-uk 2.179.2 and policyengine-core 3.34.10. The
local-area file does not change. The current-law outlook and every population
run are made again on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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