Repository navigation
Document per-country engine environments and test every workspace US install path (#1086) - #1169
Merged
Merged
Conversation
…1086) #1143 gave each country its own policyengine-core pin, so uv now refuses any install that asks for a US extra together with a UK extra. The agent guide's Commands section did not say so; it now does, and says to keep one UV_PROJECT_ENVIRONMENT per country. The lock-level pin test checked `--all-packages --extra us` and each per-package US extra. It now also checks `--all-packages --extra policyengine` (the path the first trial found drawing a newer core) and both US extras together. All resolve policyengine-core 3.32.5, policyengine-us 2.2.1 and spm-calculator 1.0.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review nit on #1169: `microcosm-frame[us]` installs no engine and does not conflict with the UK extras, so "a US extra (`us`, ...)" was ambiguous. Name `microcosm-build[us]`, `microcosm-data[us]` and `microcosm-frame[policyengine]` in the guide and the changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…split-d816 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1143, which carried out the ruling on #1086 (Max's decision d816, option 2: each country keeps its own policyengine-core pin). It fills two gaps left against that ruling. The PR changes no engine version, no lock and no generated file.
Changes
uv sync --all-packages --extra us --extra uk, or--all-packages --all-extras). Each country needs its ownUV_PROJECT_ENVIRONMENT. The guide asks to be updated whenever test commands change, and Give each country its own policyengine-core pin (#1086) #1143 didn't touch it._us_install_paths()checked--all-packages --extra usand each per-package US extra. It now also checks--all-packages --extra policyengineand--all-packages --extra policyengine --extra us. The first of these is the path the 2 October trial found drawing core 3.32.12. Both new paths resolve the certified trio. The test goes from 14 to 16 cases.changelog.d/1086-per-country-env-docs.changed.md.Install paths at head 328a558, main a224dc1 merged in (
uv sync --locked --dry-run, empty env)--all-packages --extra us--package microcosm-data --extra us--package microcosm-build --extra us--package microcosm-frame --extra policyengine--all-packages --extra policyengine--all-packages --extra us --extra policyengine--all-packages --extra us --extra axiom--package microcosm-frame --extra us,--all-packages--all-packages --extra uk,--package microcosm-{data,build,frame} --extra uk,--all-packages --extra uk --extra axiom--all-packages --extra us --extra uk,--all-packages --extra policyengine --extra uk,--package microcosm-frame --extra policyengine --extra uk,--package microcosm-data --extra us --extra uk,--all-packages --all-extrasuv lock --checkexits 0, andAPPROVED_UV_LOCK_SHA256equalsshasum -a 256 uv.lock(f65a01fb…). Since this PR doesn't touch the lock, in-progress resumable builder runs keep their identity.Microcosm's own loader functions (
_resolve_certified_release), compared with these resolutions:populace-us-2024-spm-20260915requires policyengine-us>=2.0.0,<2.3and core==3.32.5. Pass.populace-uk-2023-dd68c73-4aa4b14-20260619T023711Zrequires policyengine-uk==2.89.2and core==3.27.1. Fail, unchanged from before Give each country its own policyengine-core pin (#1086) #1143: main had already moved past both at 2.100.0. Its next certified UK build fixes this.Context: PolicyEngine/policyengine-uk#2021 (BRMA from region)
brmaa formula: I readpolicyengine_uk/variables/household/BRMA.pyin every wheel and found neitherdef formulanorREGION_DEFAULT_BRMA, both of which #2021's diff adds.frs_brmastoresbrmafor every household. On 2026-10-02,brmawas byte-identical per year with and without #2021: on the pinned eFRS (2024–2027, 2030, 2032) and on the certified candidate (2023–2026, 2028, 2030). See policyengine-uk 2.102.4+ needs policyengine-core 3.32.9+, which the certified US default refuses #1086.brma). The ruling kept the change to the lock, and past bumps (including UK: port the remaining uk-data fixes tracked in #1095, engine items included #1121) left the reference alone.brmajoins the formula-owned list only at a future re-pin.Invariants
test_every_us_install_path_resolves_the_certified_us_enginechecks 6 paths, up from 4.test_uv_refuses_every_us_and_uk_combination, and the declared and locked conflict sets are equal.brmaper-year byte identity (no engine change), generator determinism (no generator run), andbuild_uk_efrs_parity_reference.py --check(no re-pin).Docs that name both engines
--all-extrasand--extra us --extra ukappear on main only in root journals and experiment receipts that record past runs (PROGRESS_BUILDJ.md:27,PROGRESS.md:480,out.md:263,experiments/355-uk-dataset-size-receipts.md:633,756,experiments/amendment-20-keyed-draws-receipts.md:273). The guide treats root journals as history, so they stay as written. No live instruction needs changing.Testing
Re-run at head 328a558 (after merging main a224dc1; the PR's own hunks are unchanged):
test_engine_core_pins.py,test_ci_integration_job.pyandtest_ci_test_plan.py(engine-free env,uv sync --all-packages --locked): 56 passed.tools/ci_test_plan.py verify: ok.ruff check .: clean.ruff format --checkon the changed Python file: clean. (ruff format --check .flags about 50 untouched files already on main; CI's lint job runs onlyruff check ..)Review
Independent GPT-6.1 Sol review (subfleet): round 1 at e6aa357 approved with nits, and nit 1 (name the extras that install policyengine-us) is applied in 0797555. Round 2 approved 0797555. Round 3 approved the merge head 328a558 and confirmed that its PR diff equals the round-2 diff. It also checked the nine conflict pairs, the lock digest and the parity reference. Its sandbox couldn't run uv or reach PyPI, so the runtime rows above are from this host.
🤖 Generated with Claude Code