PolicyEngine / PolicyEngine/microcosm
Bump PolicyEngine-US from 1.764.6 (generated-variable audit, take-up totality, WIC take-up migration) — prerequisite for #745
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 94
Description
uv.lock has pinned policyengine-us 1.764.6 since #357 (July). #745 (work_experience_inputs, with engine variables in PolicyEngine/policyengine-us#9311) needs the lock to move to a release containing those variables, and a dry run against a 1.817.0-based branch shows the bump fails closed in four places, so it deserves its own reviewed PR:
- Generated-variable audit —
packages/microcosm-frame/src/microcosm/frame/adapters/policyengine_us.pypins_GENERATED_SOURCE_VERSION = "1.764.6"and digests of seven pe-us generator files. Five are unchanged at 1.817.0;reforms/reforms.pyandsystem.pychanged. Re-derive_GENERATED_VARIABLE_GROUPS(110 generated variables today) against the exact new version, refresh the digests, and re-pintest_policyengine_us_metadata_index.py(5,770 definitions / 863 input leaves / 4,907 formula-owned at 1.764.6). - Take-up contract totality —
spec_engine/engine_abi.pyrequiresus/spec/take_up.yamlto cover every engine take-up flag. New since 1.764.6:takes_up_ca_premium_subsidy_if_eligible(consumed byassigned_ca_premium_subsidy),takes_up_co_premium_assistance_if_eligible(assigned_co_premium_assistance),takes_up_nm_premium_assistance_if_eligible(assigned_nm_premium_assistance),takes_up_wic_if_eligible(wic). The three state premium programs look like the CHIP/BHPownership: engine+engine_default/rate_unsourcedprecedent (no behavior change) unless someone sources a rate. - WIC take-up migration — pe-us replaced
would_claim_wicwithtakes_up_wic_if_eligible(Person, MONTH,default_value = True;wicis nowdefined_for = "takes_up_wic_if_eligible", andwould_claim_wicno longer exists at upstream main). Microcosm'swic_claimstage emitswould_claim_wicas a required release column, so the stage output, release coverage manifest, stacked-spine battery metric, transfer target, and the take-up contract entry (wic) all need the rename — and the seeded rate becomes the engine's WIC gate, which is a calibration-facing decision. - Bundle + ABI lock regeneration —
tools/generate_us_bundle_from_constants.pyregeneratesus/spec/*.yamlandengine_abi.lock.jsonfrom engine metadata (test_us_spec_bundle.pyenforces--check); it currently also fails on the metadata index for any unknown engine variable.
Suggested order: merge policyengine-us#9311 → bump PR (this issue) → rebase #745, regenerate the bundle, un-draft.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/microcosm-frame/src/microcosm/frame/adapters/policyengine_us.py, tools/generate_us_bundle_from_constants.py, and the metadata and ABI tests, then inspect the 1.817.0-based dry run. Regenerate the bundle and locks, update generated-variable digests and metadata, complete the take-up contract and WIC rename, and confirm test_us_spec_bundle.py --check and the affected tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, build-system, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100