Repository navigation
Give each country its own policyengine-core pin (#1086) - #1143
Merged
Merged
Conversation
Max's ruling on #1086 (option 2): nothing imports both engines and CI installs one country extra per job, so each country carries its own core pin. microcosm-build[us], microcosm-data[us] and microcosm-frame[policyengine], the extras that install policyengine-us, pin policyengine-core==3.32.5, the core the certified US default was built with. The workspace declares each of them in conflict with each extra that installs policyengine-uk, so uv locks the two sides in separate forks and refuses any install that asks for both. The lock moves no engine version: all 128 packages keep their versions, and APPROVED_UV_LOCK_SHA256 is re-pinned for the new lock. A lock-level test reads uv.lock through `uv export --frozen`: every US install path resolves policyengine-core 3.32.5, policyengine-us 2.2.1 and spm-calculator 1.0.0, and every US and UK combination is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Automated review pass (Claude Code, high effort) — round 1 at
|
Contributor
|
CI is green on |
21 of 52 tasks
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.
Closes #1086. This implements Max's ruling there (option 2): each country carries its own policyengine-core pin. The PR changes no engine version. The policyengine-uk bump follows in #1121, which rebases onto this PR once it merges.
Changes
policyengine-core==3.32.5, the core the certified US default was built with. They aremicrocosm-build[us],microcosm-data[us]andmicrocosm-frame[policyengine].[tool.uv] conflictsdeclares each of those in conflict with each extra that installs policyengine-uk:microcosm-build[uk],microcosm-data[uk]andmicrocosm-frame[uk], nine pairs in all. uv locks the two sides in separate forks and refuses any install that asks for both.uv.lockkeeps its version: policyengine-core 3.32.5, policyengine-uk 2.100.0, policyengine-us 2.2.1 and spm-calculator 1.0.0. The lock gains the conflict table and per-extra markers.APPROVED_UV_LOCK_SHA256is re-pinned for the new lock.test_engine_core_pins.py(14 tests) reads the committed lock throughuv export --frozen, which is uv's own reading of what an install gets. Every US install path resolves core 3.32.5, policyengine-us 2.2.1 and spm-calculator 1.0.0, and every US and UK combination is refused.For developers
uv sync --extra us --extra ukanduv sync --all-extrasare refused. CI already installs one country per job.Testing
🤖 Generated with Claude Code