Skip to content

Certify the Microcosm UK pair from microcosm#1535 on policyengine-uk 2.174.1 (national eeb6093e, local area 38605444) - #744

Merged
juaristi22 merged 4 commits into
mainfrom
uk-certify-microcosm-pair-1535
Nov 9, 2026
Merged

juaristi22 merged 4 commits into
mainfrom
uk-certify-microcosm-pair-1535

Conversation

@juaristi22

@juaristi22 juaristi22 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

This certifies the Microcosm UK pair from PolicyEngine/microcosm#1535 on policyengine-uk 2.174.1, the version that built both cuts, so each certifies on its own build. It supersedes #731, the PolicyEngine/microcosm#1491 pair on 2.165.1.

The national

microcosm-uk-2024-25-national-20261107T020434Z-eeb6093e (microcosm_uk_2024_25):

The local area

microcosm-uk-2024-25-dense-20261107T173210Z-38605444 (microcosm_uk_2024_25_dense). Constituency and local-authority regions route to it (regional_release_kind: local_area).

Impact

  • The UK model pin moves from 2.151.0 to 2.174.1.
    • Since 2.170.0 (Autumn Budget 2026 measures in current law policyengine-uk#2719), current law includes these Autumn Budget 2026 measures:
      • the Household Energy Payment and the Pension Tax Allowance;
      • the Carer's Allowance taper;
      • the higher savings and property income rates;
      • the £3,000 trading allowance;
      • the fuel duty and electricity VAT extensions.
    • UK baselines on this bundle include them.
  • The data moves from the 2.151.0 pair (a6299504 and c9df4b86) to eeb6093e and 38605444. UK results change with both.
  • The household snapshots move with the model.
    • The four UK households gain the £100 Household Energy Payment.
    • The couple with two children also gains £870 of funded childcare.
    • The two households on Universal Credit gain £150 of Warm Home Discount in HBAI income.
    • The US snapshots don't change.
  • The Test jobs get 150 minutes, as on Certify the Microcosm UK pair from microcosm#1491 on policyengine-uk 2.165.1 (national 0639b9c7, local area 83802786) #731. On 2.165.1 they took 86 to 105 minutes on Python 3.11 to 3.13, and main's limit of 105 (Let the Test jobs run for 105 minutes #737) would cancel them.

Commits

  • 8cd66bfb: the pair, certified by one certify-data run. It also carries:
    • the lock, in which only policyengine-uk moves;
    • the release lock and the TROs;
    • the certified test constants and the changelog fragment.
  • b3370346: the household calculator snapshots, regenerated on 2.174.1 (PE_UPDATE_SNAPSHOTS=1).
  • 12a6a8cb: the Test jobs' 150-minute limit, in the pull-request and push workflows.
  • 9aa9e7bb: the changelog fragment, rewritten to name both cuts and the model move.

How it was made

uv sync --frozen --extra uk --extra dev --python 3.13
uv pip install policyengine-uk==2.174.1
python scripts/bundle.py certify-data --country uk --data-producer populace \
  --manifest-uri "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-national-20261107T020434Z-eeb6093e/releases/microcosm-uk-2024-25-national/release_manifest.json" \
  --regional-manifest-uri "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-dense-20261107T173210Z-38605444/releases/microcosm-uk-2024-25-dense/release_manifest.json" \
  --model-version 2.174.1
uvx --from uv==0.13.4 uv lock --no-config --no-sources --default-index https://pypi.org/simple --python 3.13
uv sync --frozen --extra uk --extra dev --python 3.13
python scripts/release_lock.py
python scripts/bundle.py generate --include-tros
PE_UPDATE_SNAPSHOTS=1 python -m pytest tests/test_household_calculator_snapshot.py -q
python scripts/bundle.py check
python scripts/bundle.py check --include-tros --strict-tros
python scripts/check_uk_uc_floor.py --dataset microcosm_uk_2024_25 --year 2025 --output uc_floor.json

uk_qualification.rewrite_certified_constants rewrote the certified constants in tests/test_models.py, tests/test_release_manifests.py and tests/test_uk_regions.py. The local-area id was added to its replacements.

Evidence, run on 12a6a8cb

9aa9e7bb changes only the changelog fragment.

  • The UC floor passed on eeb6093e (check_uk_uc_floor.py, Great Britain, 2025, within 10%, policyengine-uk 2.174.1). The receipt holds weighted national totals only:

  • Bundle checks: both bundle.py check runs pass, the second with --include-tros --strict-tros. Its one warning is the US core note that main already carries.

  • Lock and lint:

    • release_lock.py passes;
    • ruff format --check and ruff check pass with CI's ruff (0.17.4).
  • Local tests:

    • the three certified-constant files: 124 passed;
    • the household snapshots on 2.174.1: 11 passed;
    • 24 bundle, certification, TRO, receipt and region files: 2,342 passed, 3 skipped.

    The full suite runs in CI.

Disclosure

Aggregates only: the shares of target rows within 10%, weighted national totals over many records, synthetic households, and published DWP and OBR figures.

🤖 Generated with Claude Code

juaristi22 and others added 3 commits November 8, 2026 13:09
The national moves from a6299504 to
microcosm-uk-2024-25-national-20261107T020434Z-eeb6093e, built from
PolicyEngine/microcosm main at dc00d158f (the merge of
PolicyEngine/microcosm#1535) on policyengine-uk 2.174.1, and the local area
from c9df4b86 to microcosm-uk-2024-25-dense-20261107T173210Z-38605444, built
on the national's spine and reused at 03c31df56, its gate-only sign-off.
Both certify on their own build (built_with_model_package); the core stays
3.33.3 with core_binding bundle_pin.

The UK pin moves from 2.151.0 to 2.174.1 in pyproject.toml, the bundle and
uv.lock, where nothing else moves. certify-data, the release lock, the TROs
and both bundle checks are rerun. The certified constants in the tests follow
uk_qualification.rewrite_certified_constants plus the local-area id, and one
changelog fragment describes the pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PE_UPDATE_SNAPSHOTS=1. The four UK households gain the GBP 100 Household
Energy Payment (policyengine-uk 2.170.0). The couple with two children also
gains GBP 870 of funded childcare, and the two households on Universal Credit
GBP 150 of Warm Home Discount in HBAI income. The UK model surface counts
more parameters and variables; the US snapshots don't change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On #731 (policyengine-uk 2.165.1, 4 Nov) the Test jobs took 105 minutes on
3.11, 100 on 3.13 and 86 on 3.12 under a 150-minute limit. Main's 105 (#737)
would cancel them, and 2.174.1 adds parameters and variables again.

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

Copy link
Copy Markdown
Contributor

Review of 12a6a8c

I checked every pinned identifier against Hugging Face, the pin across files, the format against #720 and #731, and where both cuts were built on microcosm. In a fresh clone on policyengine-uk 2.174.1, test_release_manifests, test_uk_regions and test_regional_input_evidence passed (134), as did the UK snapshot tests and the UK release tests in test_models. Both bundle.py check runs and release_lock.py passed as well.

Should

  1. The local-area cut was built from two microcosm commits that no PR carries (src/policyengine/data/bundle/manifest.json:127-129). The cut's build_manifest.json on Hugging Face records git_commit 03c31df56. That commit and its parent edd051ecc sit only on uk-event-pair-20261107, which has no PR and is 2 ahead of and 2 behind microcosm main. The body names both, but no PR has reviewed them, and they aren't small. edd051ecc removes Carmarthenshire's band I cell from local_target_references.json (53 lines). 03c31df56 signs 5 national and 6 local target-fit failures and retires 13 entries, across target_fit_reviewed_exclusions.json and local_target_fit_reviewed_exclusions.json. On Certify the Microcosm UK pair from microcosm#1491 on policyengine-uk 2.165.1 (national 0639b9c7, local area 83802786) #731 the equivalent sign-off (5293966d4) was merged into Sign off the local cuts' target-fit rows (dbacb023, 83802786), and the company car base microcosm#1491 before certification. Failure case: once this merges, constituency and local-authority results rest on a deferral and sign-offs that no microcosm PR has reviewed, and the build commit stays reachable only while that branch exists. The next local cut from main would also lose the Carmarthenshire deferral. Suggested fix: open a microcosm PR for the branch, or merge the two commits into main, before this leaves draft, and link it in the body.

  2. The changelog fragment names only the national cut and leaves out the model change (changelog.d/certify-uk-microcosm-uk-2024-25-national-20261107T020434Z-eeb6093e.changed.md:1). It is the generated sentence. It doesn't name the local-area cut 38605444, or say that the UK pin moves from 2.151.0 to 2.174.1 and brings the Autumn Budget 2026 measures into UK baselines. Failure case: the release notes would say nothing about UK results changing with the model. The released 2.151.0 entry (CHANGELOG.md:64) and Certify the Microcosm UK pair from microcosm#1491 on policyengine-uk 2.165.1 (national 0639b9c7, local area 83802786) #731's fragment cover both cuts and the pin move. Suggested fix: use Certify the Microcosm UK pair from microcosm#1491 on policyengine-uk 2.165.1 (national 0639b9c7, local area 83802786) #731's wording, updated to this pair.

Nit

  1. Certify the Microcosm UK pair from microcosm#1491 on policyengine-uk 2.165.1 (national 0639b9c7, local area 83802786) #731 is still open, though this PR supersedes it. Closing it when this leaves draft would stop anyone merging the 2.165.1 pair by mistake.

Checked and fine

CI at 12a6a8c: all 14 checks pass. Test (3.12) took 1h52m, so the old 105-minute limit would have cancelled it, and the 150-minute limit is needed.

Verdict: the identifiers and pins are right. Get the local cut's two microcosm commits onto a reviewed PR before this leaves draft.

🤖 Generated with Claude Code

Vahid's review of 12a6a8c (Should 2): the generated sentence named only
the national cut. The fragment now follows #731's wording for this pair:
both cuts and their microcosm commits, and the policyengine-uk pin moving
from 2.151.0 to 2.174.1, which brings the Autumn Budget 2026 measures
from 2.170.0 into UK current law.

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

Copy link
Copy Markdown
Contributor Author

Thanks, Vahid.

  1. Opened Defer Carmarthenshire's band I council tax cell and sign dense build 1's gate-only failures (local cut 38605444) microcosm#1549 for uk-event-pair-20261107 (edd051ecc and 03c31df56). It merges cleanly into main, and the body here now links it. This stays in draft until it merges.
  2. Fixed in 9aa9e7bb. The fragment now follows Certify the Microcosm UK pair from microcosm#1491 on policyengine-uk 2.165.1 (national 0639b9c7, local area 83802786) #731's wording for this pair: both cuts and their microcosm commits, and the pin moving from 2.151.0 to 2.174.1, with the Autumn Budget 2026 measures that policyengine-uk 2.170.0 brought into current law.
  3. Certify the Microcosm UK pair from microcosm#1491 on policyengine-uk 2.165.1 (national 0639b9c7, local area 83802786) #731 gets closed when this leaves draft.

@juaristi22
juaristi22 marked this pull request as ready for review November 9, 2026 11:04
@juaristi22
juaristi22 merged commit 06fc228 into main Nov 9, 2026
16 checks passed
juaristi22 added a commit that referenced this pull request Nov 9, 2026
The national moves from eeb6093e to
microcosm-uk-2024-25-national-20261103T154302Z-0639b9c7, built from
PolicyEngine/microcosm#1491 at dd99a1dcd on policyengine-uk 2.165.1, and the
local area from 38605444 to microcosm-uk-2024-25-dense-20261104T093024Z-83802786,
built from the same commit and spine with its gate-only sign-off (5293966d4).
Both certify on their own build (built_with_model_package); the core stays
3.33.3 with core_binding bundle_pin.

This redoes the pair's certification on main after #744: the UK pin moves
from 2.174.1 back to 2.165.1 in pyproject.toml, the bundle and uv.lock, where
nothing else moves. certify-data, the release lock, the TROs and both bundle
checks are rerun. The certified constants in the tests follow
uk_qualification.rewrite_certified_constants plus the local-area id. They
match the earlier head of this branch (a0f2221), and so does the manifest
apart from the bundle version. One changelog fragment describes the pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 added a commit that referenced this pull request Nov 10, 2026
The national moves from eeb6093e to
microcosm-uk-2024-25-national-20261103T154302Z-0639b9c7, built from
PolicyEngine/microcosm#1491 at dd99a1dcd on policyengine-uk 2.165.1, and the
local area from 38605444 to microcosm-uk-2024-25-dense-20261104T093024Z-83802786,
built from the same commit and spine with its gate-only sign-off (5293966d4).
Both certify on their own build (built_with_model_package); the core stays
3.33.3 with core_binding bundle_pin.

This redoes the pair's certification on main after #744: the UK pin moves
from 2.174.1 back to 2.165.1 in pyproject.toml, the bundle and uv.lock, where
nothing else moves. certify-data, the release lock, the TROs and both bundle
checks are rerun. The certified constants in the tests follow
uk_qualification.rewrite_certified_constants plus the local-area id. They
match the earlier head of this branch (a0f2221), and so does the manifest
apart from the bundle version. One changelog fragment describes the pair.

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.

2 participants