Skip to content

Restore Scotland population test with forthcoming PolicyEngine 6.2.3 - #3877

Draft
anth-volk wants to merge 1 commit into
fix/temporarily-remove-scotland-live-testfrom
fix/restore-scotland-test-policyengine-6-2-3
Draft

anth-volk wants to merge 1 commit into
fix/temporarily-remove-scotland-live-testfrom
fix/restore-scotland-test-policyengine-6-2-3

Conversation

@anth-volk

@anth-volk anth-volk commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #3876

Restore the Scotland population live test and its local request-contract parametrization removed by #3875, and require policyengine[models]==6.2.3 in the API project and generic Dockerfile. Both restored test files match their pre-removal versions exactly; the Scotland request must return status == "ok" and a finite budgetary impact.

Stacked PR: the base is fix/temporarily-remove-scotland-live-test (#3875) so this diff visibly restores the test. Merge #3875 first, then retarget/rebase this PR onto master, preserving the restored tests if the removal was squash-merged. PR checks run for this branch arrangement.

Upstream fix: PolicyEngine/policyengine.py#565 (issue PolicyEngine/policyengine.py#564). Simulation-worker upgrade: PolicyEngine/policyengine-sim-api#733 (issue PolicyEngine/policyengine-sim-api#732). The worker must select Scotland, Wales, and Northern Ireland through the stored household region column; upgrading API v1 alone cannot change an already deployed worker.

Expected CI failure: 6.2.3 is not published yet. Add uv lock --check before the existing simulation-API support check so the PR fails immediately with there is no version of policyengine[models]==6.2.3, before it attempts to validate a worker or use the stale frozen environment. Keep this check after release so future bundle changes must have a current lockfile.

The genuine existing lockfile is deliberately unchanged until the release exists. Before merge: confirm the published version contains the upstream fix; run and commit uv lock --upgrade-package policyengine; finish the simulation-API upgrade, deployment, and qualification; then pass API dependency, worker-version, build, and test checks. If another release consumes 6.2.3 first, update both downstream PRs to the actual fixed version. Do not replace the package with a Git checkout, weaken assertions, or skip the restored test.

Validation now: 124 focused live-request, bundle-update, and deployment-script unit tests passed using the existing installed 6.2.1 dependencies, which does not validate 6.2.3. The live suite collects 10 tests including both Scotland population and household tests. Repository formatting, changed-file Ruff checks, changelog validation, and whitespace checks passed. uv lock --check reproduces the expected missing-release failure. The restored population test still requires a successful run against the deployed staging candidate before API promotion.

This branch had an error being deployed

1 failed deployment
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