Skip to content

Certify the Microcosm UK pair built on policyengine-uk 2.179.2 - #766

Merged
juaristi22 merged 2 commits into
mainfrom
uk-certify-microcosm-pair-b2179c
Nov 24, 2026
Merged

juaristi22 merged 2 commits into
mainfrom
uk-certify-microcosm-pair-b2179c

Conversation

@juaristi22

@juaristi22 juaristi22 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

This certifies the Microcosm UK pair built on PolicyEngine/microcosm#1687, on policyengine-uk 2.179.2 and policyengine-core 3.34.10, so each build certifies on its own build. Both builds come from that PR's commits, not main's: it is still open, and it lands with a merge commit, so those commits stay in main's history. Both builds are published on policyengine/populace-uk-private and listed, not current, in its releases.json; a certificate pins its build, so neither needs to be current.

The national

uk-frs-calibration-attempt-20261122T100732Z-b891aa69 (microcosm_uk_2024_25, release microcosm-uk-2024-25-national):

The local area

uk-local-candidate-f100-s42-20261123T075147Z-7081d968 (microcosm_uk_2024_25_dense, release microcosm-uk-2024-25-dense). Constituency and local-authority regions route to it (regional_release_kind: local_area).

  • Build: the national's spine, on policyengine-uk 2.179.2. It also certifies on its own build, with no accepted model mismatch and no input-surface audit.
    • It uses the parameters of the last local cut: 150,000 households, seed 42 and the same warm start.
    • Build 1 ran at the Microcosm PR's a26cefbde. Its gate-only target-fit failures are signed in 640f25222, and build 2 ran there.
  • Gates:
    • Build 2 reused build 1's solve exactly: 0 rows differ.
    • It passed all 7 local gates and is shippable.
    • The diagnostic high-value-homes support check fails, as on earlier local cuts.
  • Publication: published 23 Nov at hub commit 9da099465da06f020d9125f60e49c88180a9e607, listed, not current, with --allow-missing-staging: its staging uploads failed while the build machine slept.
  • H5 sha256: cf1c98acd76467cd8421df67820e49c9e8bfc4b4f64eb0af27adf88994d63a15.

Both files carry the stored new-claimant draw and the fourteen UK totals described below.

What the data carries

Young people and NEET

Since PolicyEngine/microcosm#1663, which the Microcosm PR is based on, the build closes the gaps that the benchmarks check of the Milburn review dashboard (PolicyEngine/uk-milburn-review-dashboard#1) found behind its young people figures:

  • PIP: England's cases at 16–19 and 20–24 bind in place of a single 16–24 band.
  • The UC health element: young people aged 16 to 24 receiving the LCWRA element in England and Wales bind to DWP's count (Table 28 of the Young people and work interim report). Claims without a linked DWP record, other than SPI rows and claims with their own ESA award, now draw LCWRA at the rate of the linked claims in their cell (the youngest claimant's age band, the disability-benefit proxy and an FRS condition that limits activities a lot), where they used to take policyengine-uk's proxy.
  • Young employees: PAYE RTI's employees aged 18 to 24 bind, counted at the FRS interview, and a dependent child's own FRS pay counts as employment income.

On the national above, for 2025, against each publisher's figure:

  • young people receiving the UC health element in England and Wales: +0.1%;
  • RTI employees aged 18 to 24: +0.1%;
  • England's PIP cases at 16–19: +0.1%, and at 20–24: +0.2%;
  • NEET people aged 16 to 24, held out of the solve and checked against ONS: −3.0%, against +4.3% on the current default (fcfac709).

The gaps Vahid raised: a dependent child's pay

Vahid's final review of PolicyEngine/microcosm#1663 found two Microcosm stages that misread the dependent child's pay that PR brought into employment_income. PolicyEngine/microcosm#1687 fixes both:

  • Salary sacrifice: the forest is fitted on adults' job records and now predicts for adult records alone, so no dependent child carries a sacrifice. The stage's SPI bonus draw takes adults alone too.
  • HMRC pay leaf: a dependent child's pay (CHILD.CHEARNS) now counts as HMRC employment income, so children with pay above the personal allowance count in HMRC's employment-income rows, in their own income band.

The new-claimant health element by claim date

policyengine-uk pays the lower new-claimant health element to a share of the UC claims with the health element each year. policyengine-uk 2.179.0 lets a dataset store the draw it compares with that share, and the build stores it ordered by claim recency (the FRS's UCSTART) and then age, uniform overall. The most recent claims take the new-claimant rate first, and the engine keeps DWP's share each year. In 2027-28, 19% of Great Britain's units with an LCWRA claimant aged 16 to 24 are on the new-claimant rate, against 11% when the engine draws at random.

The UK totals

The release writes policyengine-uk's fourteen uk_total_* UK totals (2.178.0) on every household, each the sum of its component at the file's weights. A simulation of part of the file (a region, an extract or a household subset) then gives each household its share of the national totals: business rates, corporate Stamp Duty Land Tax and land, consumer-incident tax changes and the carbon tax's corporate part. A simulation of the whole file reads the same shares as before.

Impact

  • The UK model pin moves from 2.177.7 to 2.179.2. UK baselines on this bundle carry policyengine-uk 2.177.8 to 2.179.2. Among those changes:
    • a carer's UC award with the carer element counts against the severe disability premium, Pension Credit's severe disability addition and Scotland's working-age Council Tax Reduction carer premium (2.177.9);
    • Council Tax Reduction's pensioner schemes add the disabled child and enhanced disability premiums for each qualifying child (2.178.1 and 2.178.8);
    • Child Benefit and Child Tax Credit count a 16-year-old who has left education until the 31 August after their birthday (2.178.3);
    • the LHA size criteria count other families' children and add a foster parent's bedroom (2.178.7);
    • Marriage Allowance's least-tax search applies the rate test at the statutory limits (2.179.1);
    • the UC qualifying young person test leaves out a person reporting their own legacy benefit (2.179.2).
  • The shared core pin stays at 3.34.10, on which both builds were made. policyengine-uk 2.179.2's QUALIFIED_CORE_VERSIONS names only 3.34.9, and policyengine-uk doesn't enforce it at runtime. On 3.34.10, two of its stored-draw tests fail; both cover data that supplies no draw, and both files here supply one (Lock policyengine-uk 2.179.2 and store UC's new-claimant draw by claim recency microcosm#1687 has the detail).
    • The strict TRO check's warning, that the US core is outside the US release's ==3.32.5 claim, predates this PR.
  • The data moves from fcfac709 and e2745e59 to the builds above. UK results change with both.
  • Snapshots: only the UK model surface moves: its parameter count bucket goes from 50 to 51 hundreds and its variable count bucket from 14 to 15. Every UK and US household value is unchanged.
  • Dataset names: the same nine UK names resolve, and the dataset overlays and the US release 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.909 of DWP's figure and Universal Credit spend at 0.940 of the OBR's, against 0.912 and 0.942 for fcfac709 on 2.177.7. The floor asks for each within 10%. The receipt holds weighted national totals only.

Commits

  • 47e1d4e4: the pair, certified by one certify-data run. It also carries the lock, in which only policyengine-uk moves; both TROs; the certified test constants; and the changelog fragment.
  • 5a0ced3e: the household calculator snapshots, regenerated on 2.179.2.

Tests

Local, at 5a0ced3e, counted by --junitxml: the whole suite, 4,911 tests over 152 files, in five processes run one at a time. 4,890 passed, 21 were skipped and none failed:

  • the bundle, release, TRO, model and UK test files (44): 1,612 passed;
  • the other 108 test files: 3,278 passed and 21 skipped.

bundle.py check, the strict TRO check, the release lock, uv lock --check and ruff 0.17.6 (format and lint) pass.

Disclosure

National figures only: Great Britain, England and Wales, and England. Each rests on 30 or more survey households. No record-level value, maximum or minimum, and no sub-national figure.

🤖 Generated with Claude Code

juaristi22 and others added 2 commits November 23, 2026 14:48
The national build uk-frs-calibration-attempt-20261122T100732Z-b891aa69 and
the local-area build uk-local-candidate-f100-s42-20261123T075147Z-7081d968,
both from PolicyEngine/microcosm#1687 and each pinned in its build folder at
the hub commit that published it, certified by one certify-data run with
--model-version 2.179.2. The lock moves policyengine-uk alone; the TROs, the
certified test constants and the changelog fragment move with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the UK model surface's count buckets move: parameters 50 to 51
hundreds, variables 14 to 15.

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

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I checked the pins against the hub and PyPI and found nothing blocking.

Checked:

  • Hub files: all ten files the manifest pins match at their revisions. The two H5s match by LFS oid (national ae116bc3… at a80a4bf7, local area cf1c98ac… at 9da09946). The calibration npz, calibration_diagnostics.json, release_cut_gates.json, release_certification.json, spine_gates.json, terminal_gates.json and score_vs_reference.json match too. So do the two release manifests (national b856e61a…, as in uk.trace.tro.jsonld; local area b6e77842…, as regional_source_manifest_sha256).
  • Certification: release_certification.json says shippable: true with 58 spine, 7 seam and 21 release-cut gates passed, as the description says. Both build IDs are listed in releases.json.
  • Wheel: the policyengine-uk 2.179.2 wheel sha256 (a1da93b5…) and sdist hash in manifest.json, the TRO and uv.lock match PyPI.
  • Consistency: the version and build-ID swaps are consistent across pyproject.toml, uv.lock, the manifest, both TROs and the three test files.
  • CI: all checks pass at 5a0ced3.

One wording point:

  • PolicyEngine/microcosm#1687 merged on 23 Nov (527ad49). The description still says "it is still open".
  • The commits it cites (41053d980, a26cefbde, 640f25222, 5674bc997) are now all ancestors of microcosm main.
  • That line could now just say both builds come from #1687's commits, which are in main's history.

Not an issue:

  • policyengine-uk 2.179.3 is out, but it only changes tests (for policyengine-core#570), so staying on 2.179.2 is fine.
  • The 3.34.10 core against QUALIFIED_CORE_VERSIONS naming 3.34.9 is disclosed. A follow-up in policyengine-uk adding 3.34.10 to that list would remove the caveat.

Review drafted with AI assistance and checked against the code at 5a0ced3.

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.

2 participants