Skip to content

Restore Scotland population test with PolicyEngine 6.2.3 - #3877

Closed
anth-volk wants to merge 2 commits into
masterfrom
fix/restore-scotland-test-policyengine-6-2-3
Closed

anth-volk wants to merge 2 commits into
masterfrom
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 coverage, and upgrade API v1 from policyengine[models]==6.2.1 to the published 6.2.3 release. Both the project and generic Dockerfile require 6.2.3, and the regenerated lockfile contains the real PyPI artifacts for frozen Cloud Run installs. No other dependency versions change.

The temporary-removal PR #3875 has merged. This PR is rebased and targets master; the diff restores both Scotland test cases. Their contents match the versions before the temporary removal: the population request must return status == "ok" and a finite budgetary impact.

Upstream fix: PolicyEngine/policyengine.py#565 (issue PolicyEngine/policyengine.py#564), released in 6.2.3. Scotland, Wales, and Northern Ireland select the stored household region column. The release also includes 6.2.2's ACS-local default for US state and congressional-district simulations. Core 3.32.10, US 2.2.1, UK 2.102.3, and SPM calculator 1.0.0 remain unchanged.

Deployment dependency: merge and deploy PolicyEngine/policyengine-sim-api#733 (issue PolicyEngine/policyengine-sim-api#732) first, then verify that staging and production simulation workers advertise 6.2.3. API v1's worker-support check must continue blocking this upgrade until that deployment is complete. Publishing the package or upgrading API v1 alone does not change the deployed worker. The previous missing-PyPI-version failure is resolved; the added uv lock --check now passes and continues to require a current lockfile before checking worker support.

Validation with installed 6.2.3:

  • 266 focused live-request, bundle-update, deployment-script, constants, worker-SPM, and metadata tests passed on Python 3.12; the same set also passed on Python 3.14.
  • Configured mypy check passed for 97 source files.
  • Live test collection finds all 10 tests, including Scotland population and household coverage; no live deployment test was executed locally.
  • Lock consistency passed with both current uv and the Cloud Run image's uv 0.12.1. Repository formatting, changed-file Ruff checks, actionlint, migration checks, changelog validation, and whitespace checks passed. Regenerated migration artifacts have no changes.

After the worker upgrade is deployed, the restored population test must pass against the API staging candidate before promotion. No merge or deployment is performed by this PR update.

@anth-volk
anth-volk force-pushed the fix/restore-scotland-test-policyengine-6-2-3 branch from 0745c13 to ab9ff65 Compare October 9, 2026 14:20
@anth-volk anth-volk changed the title Restore Scotland population test with forthcoming PolicyEngine 6.2.3 Restore Scotland population test with PolicyEngine 6.2.3 Oct 9, 2026
@anth-volk
anth-volk changed the base branch from fix/temporarily-remove-scotland-live-test to master October 9, 2026 14:20
@anth-volk anth-volk closed this Oct 9, 2026

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.

Restore Scotland population live coverage with the fixed PolicyEngine bundle

1 participant