Update UK release bundle to data 1.53.0#344
Conversation
|
@vahid-ahmadi requested your review here. The main thing to confirm is whether |
|
Blocked on PolicyEngine/policyengine-uk#1666 |
|
Update after merging/releasing the UK Marriage Allowance fix: policyengine-uk==2.88.14 is now on PyPI and fixes the raw child Marriage Allowance scenario, but it is not enough to safely update this PR.\n\nI tested bumping this branch locally from 2.88.6 to 2.88.14. Import fails before the snapshot test with:\n\nValueError: Runtime data build fingerprint does not match the bundled data certification.\n\nThat is the certification guard doing the right thing. The new UK package reports data_build_fingerprint sha256:dff5c5bb976ce254fa965ecfce6a0d84859fe1629a714ae28a79b3075522a0ae, while this PR bundle currently certifies data 1.53.0 with sha256:535d2fd64f9e2b2aa9991e5a5d65be25bdd126f18858682533789f5c7e467782.\n\nSo the next safe step is data-side: publish/finalize a UK 1.53.0 release manifest that explicitly certifies compatibility with policyengine-uk==2.88.14, or regenerate the UK data release with 2.88.14. PR PolicyEngine/policyengine-uk-data#397 is now merged, so the manifest finalization path has the strict bundle fields needed for that. I did not push the local 2.88.14 bump because doing so would require weakening or falsifying the bundled certification. |
…ild info When refresh_release_bundle fetched a data release manifest that lacked build.built_with_model_package, the previous logic popped built_with_model_version, built_with_model_git_sha, and data_build_fingerprint unconditionally, silently dropping certification info the bundle already had. Only rewrite those fields when the release manifest provides a replacement. Also documents the model-only-bump skip and the sha256 trust assumption, and adds a test covering the preserve-on-missing-build path. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Edited: my earlier code-side push ( Where
|
| Field | This PR | main |
|---|---|---|
policyengine-uk |
2.88.6 |
2.88.20 |
policyengine-uk-data |
1.53.0 |
1.55.10 |
policyengine-us |
1.687.0 |
1.700.0 |
policyengine_core |
>=3.25.0 |
==3.26.1 |
main's UK pair is well past the 2.88.14 cutoff that fixes policyengine-uk#1666 (children receiving Marriage Allowance / income tax), so @MaxGhenis's original blocker is now resolved at HEAD.
bundle.py direction has also landed on main separately
main has implemented the "use the data release manifest as the source of build provenance" idea on its own track (_fetch_data_release_manifest returning _DataReleaseManifestFetch with x-repo-commit header capture and a main-revision fallback for repos that don't tag every data version). The drift is 461 lines on bundle.py alone, and the two implementations are alternative designs of the same feature rather than something that can be mechanically merged.
Validation answer to your original ask
policyengine-uk==2.88.6 + policyengine-uk-data==1.53.0 is not the pair to ship — CI on this branch still fails test_uk_household_snapshot[uk_couple_two_kids] with the children-income-tax regression. But that's now moot: main is at 2.88.20 / 1.55.10, which is the right user-facing pair.
Status
- 🔁 My code contribution to this PR has been reverted (
0b4b7be) —main'sbundle.pyalready covers the same ground. - ❌ The pin bump in this PR is superseded by
main. ⚠️ Merge conflicts remain (pyproject.toml, uk.json, both.trace.tro.jsonldfiles,bundle.py, four test files,uv.lock); resolving them mechanically would produce a no-op since every conflict resolves to "takemain".
Happy to revisit if there's a unique idea here you still want to land — otherwise this PR is effectively a no-op vs. main.
🤖 Generated with Claude Code
…thout build info" This reverts commit 97c0bb4.
Fixes #343
Summary
This PR updates the bundled UK release contract to a TRO-compatible release pair:
policyengine-uk==2.88.6policyengine-uk-data==1.53.0It records the certified
enhanced_frs_2023_24artifact SHA and data build fingerprint in the UK manifest, updates the package pins and lockfile, refreshes tests, and adds the generated bundled TRACE TRO sidecars.It also fixes
refresh_release_bundleso future refreshes userelease_manifest.jsonfrom the target data release when available. That prevents stale certification metadata, includingbuilt_with_model_version, from being carried forward after data/model bumps.Current release-version behavior
The generated manifest/TRO files in this PR still show the current checked-in
policyengine.pyversion,4.3.1. That is an inconsistency in the current.pyrelease workflow, not the final published identity for this change: after this merges, theVersioningworkflow runs Towncrier, bumpspyproject.toml, syncspolicyengine_versionandbundle_idin the bundled manifests, regenerates the TRO sidecars, and commits those release artifacts before the package is published.The forthcoming
policyengine-bundlessystem should avoid this inconsistency by making the bundle version/digest the canonical certified artifact first. A.pyrelease would then point to an already-published bundle version/digest rather than generating provisional pre-release TROs that are later rewritten by.pyversioning.UK validation requested
@vahid-ahmadi please confirm whether this
policyengine-uk==2.88.6/policyengine-uk-data==1.53.0combination is valid and should be user-facing as the bundled UK runtime pair.Verification
uv run --extra dev pytest tests/test_bundle_refresh.pyuv run --extra dev pytest tests/test_release_manifests.py tests/test_trace_tro.pyruff format --check .ruff check .Notes
This is a stopgap update for the current
.pyrelease path. It does not replace the broader cross-repository bundle/orchestrator plan.