Skip to content

Bump bundled US manifest to policyengine-us 1.653.3#284

Merged
MaxGhenis merged 3 commits into
mainfrom
bump-us-pins-1.653
Apr 18, 2026
Merged

Bump bundled US manifest to policyengine-us 1.653.3#284
MaxGhenis merged 3 commits into
mainfrom
bump-us-pins-1.653

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • Bumps the certified US bundle from policyengine-us==1.647.0 to 1.653.3 (latest PyPI version that imports cleanly against policyengine-core>=3.25.0)
  • Keeps the US data package at policyengine-us-data==1.73.0 (latest tagged revision on Hugging Face); certification moves from exact_build_model_version to matching_data_build_fingerprint, with built_with_model_version recording the 1.647.0 that produced the data
  • Bumps bundle_id and policyengine_version on both us.json and uk.json to 3.5.0 to match the current package version

Why

Unblocks downstream projects that want the latest policyengine-us through the certified bundle path. policybench in particular is migrating from direct policyengine_us imports to policyengine.py and needs a recent model pin.

Versions 1.637 – 1.645 fail parameter validation at class-creation time against current policyengine-core, so even though the HF data release manifest names 1.637.0 as its build-time model, we cannot pin it in a working bundle. 1.650.0 is the earliest that imports; 1.653.3 is latest.

Test plan

  • pytest tests/test_release_manifests.py tests/test_trace_tro.py tests/test_us_regions.py tests/test_models.py tests/test_results.py tests/test_manifest_version_mismatch.py — 127 passed locally
  • ruff check . + ruff format --check . — clean
  • CI on this PR goes green

Known limitations

  • matching_data_build_fingerprint is declared without an actual fingerprint value because policyengine-us does not yet expose data_build_fingerprint at runtime. The runtime fallback in certify_data_release_compatibility accepts the bundled certification when the HF manifest is unreachable (the current 1.73.0 path) so this is not a regression; it's documented as future work.
  • UK model stays at 2.88.0 (not 2.88.5). UK data is in a private repo; without token-authenticated fingerprint verification, there's no reason to bump the UK model alone.

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits April 18, 2026 12:01
Brings the certified US bundle up from 1.647.0 to 1.653.3 (latest on
PyPI that imports cleanly against the current policyengine-core>=3.25.0
pin — 1.637-1.645 all fail parameter validation at class-creation).

The underlying dataset stays at policyengine-us-data 1.73.0 (the latest
US data release tagged on Hugging Face; 1.83.x exists only on main
branch as of 2026-04-18 and has no corresponding rev). Certification
basis moves from `exact_build_model_version` to
`matching_data_build_fingerprint`, with `built_with_model_version`
recording the 1.647.0 that actually produced 1.73.0.

Also bumps `bundle_id` and `policyengine_version` on both us.json and
uk.json to 3.5.0 so the bundled manifests match the current package
version.

Unblocks downstream projects (e.g., policybench) that want to use
`policyengine.py` with the latest model version through the certified
bundle path rather than falling back to `policyengine_us` imports.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the hand-rolled == equality check in _specifier_matches with
packaging.specifiers.SpecifierSet. A data release manifest can now
declare compatibility with a range of model versions (e.g.
>=1.637.0,<2.0.0) instead of a single pin; certify_data_release_compatibility
accepts any runtime version that satisfies the specifier.

Adds packaging>=23.0 as a direct dependency (already transitively
installed via pandas).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MaxGhenis added a commit to PolicyEngine/policyengine-us-data that referenced this pull request Apr 18, 2026
`build_release_manifest` now takes `additional_compatible_specifiers`:
a list of PEP 440 specifier strings that extend the
`compatible_model_packages` list beyond the single `==<build_version>`
entry it emits by default.

Motivation: when the `data_build_fingerprint` is stable across a range
of `policyengine-us` versions, the data package can declare
compatibility without forcing downstream consumers (policyengine.py,
policybench) to rebuild the dataset for every model patch release.
Without this, the published release manifest lists only the exact
build-time model version, which in practice is sometimes a broken pin
(1.637.0 fails parameter validation against current policyengine-core).

The policyengine.py side that consumes these specifiers was extended
in PolicyEngine/policyengine.py#284 to handle full PEP 440 specifiers
via packaging.specifiers.SpecifierSet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit 2f2f608 into main Apr 18, 2026
11 checks passed
@MaxGhenis MaxGhenis deleted the bump-us-pins-1.653 branch April 18, 2026 16:27
MaxGhenis added a commit to PolicyEngine/policyengine-us-data that referenced this pull request May 5, 2026
)

`build_release_manifest` now takes `additional_compatible_specifiers`:
a list of PEP 440 specifier strings that extend the
`compatible_model_packages` list beyond the single `==<build_version>`
entry it emits by default.

Motivation: when the `data_build_fingerprint` is stable across a range
of `policyengine-us` versions, the data package can declare
compatibility without forcing downstream consumers (policyengine.py,
policybench) to rebuild the dataset for every model patch release.
Without this, the published release manifest lists only the exact
build-time model version, which in practice is sometimes a broken pin
(1.637.0 fails parameter validation against current policyengine-core).

The policyengine.py side that consumes these specifiers was extended
in PolicyEngine/policyengine.py#284 to handle full PEP 440 specifiers
via packaging.specifiers.SpecifierSet.

Co-authored-by: Claude Opus 4.7 (1M context) <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.

1 participant