Retire legacy Marketplace coverage input#8693
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8693 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 55 31 -24
Branches 0 1 +1
=========================================
- Hits 55 31 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7c511ae to
2b81b22
Compare
MaxGhenis
left a comment
There was a problem hiding this comment.
Approving — a clean soft-retirement plus health-accounting canonicalization, well-guarded by tests (agent-assisted review; I verified the load-bearing parts).
Nothing in the model reads has_marketplace_health_coverage: it keeps its name, drops default_value = True, and now aliases has_marketplace_health_coverage_at_interview via a formula, so it stops being an input variable but stays calculable (set-inputs still override). The effective default flips True→False, but with zero formula readers that's inert. #8187 already pulled it out of the PTC path; this finishes the retirement.
The household_health_benefits parameter lands on the same 7-variable list as healthcare_benefit_value: medicaid→medicaid_cost and premium_tax_credit→assigned_aca_ptc are value-neutral, and the real delta — picking up co_omnisalud and or_healthier_oregon_cost — only applies when include_health_benefits_in_net_income is on (default off). No double-count: Healthier Oregon is gated on federally-barred-non-citizen status (disjoint from medicaid_cost) and OmniSalud enrollees have no federal APTC (disjoint from assigned_aca_ptc). Case 4 nails the double-count guard. fixed is the right fragment type.
Two non-blocking notes:
- The canonical list now lives in two hand-kept places (
healthcare_benefit_value.addsand the parameter). That's the drift #8674 wanted to kill — consider makinghousehold_health_benefitsgatehealthcare_benefit_valuedirectly unless you're intentionally keeping the set reform-modifiable via the parameter. - Downstream follow-up lives in populace: it still carries
has_marketplace_health_coverageincps_carried.pyand asserts on it intest_us_puf_support.py. Nothing breaks, but the export surface should switch to the_at_interviewvariable to finish the retirement there.
Fixes #8674
Summary
This PR retires the legacy Marketplace coverage input from the active input/export surface while preserving the variable name as a compatibility alias. It also canonicalizes household health benefit accounting on annual health-value variables, including
assigned_aca_ptcrather than the monthlypremium_tax_creditwrapper.API partner implications
This is intentionally API-surface-relevant:
has_marketplace_health_coverageis no longer an active input variable discovered from PE-US metadata.has_marketplace_health_coverage_at_interview.has_marketplace_health_coverage.has_marketplace_health_coverage_at_interview.takes_up_aca_if_eligible.healthcare_benefit_value/assigned_aca_ptc;premium_tax_creditremains a monthly wrapper.Health accounting semantics
healthcare_benefit_value: annual canonical household resource value of health coverage.household_health_benefits: annual health value included inhousehold_benefitsonly whengov.simulation.include_health_benefits_in_net_incomeis enabled.medicaid,chip, and monthlypremium_tax_creditare no longer listed in household health benefits to avoid double-counting or period mismatch.Tests
uv run policyengine-core test policyengine_us/tests/policy/baseline/household/household_health_benefits.yaml policyengine_us/tests/policy/baseline/household/healthcare_benefit_value.yaml policyengine_us/tests/policy/baseline/household/expense/health/has_marketplace_health_coverage.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/premium_tax_credit.yaml policyengine_us/tests/policy/baseline/gov/aca/eligibility/is_aca_ptc_eligible.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/aca_ptc.yaml -c policyengine_usuv run pytest policyengine_us/tests/core/test_input_variable_definitions.py -quv run policyengine-core test policyengine_us/tests/policy/baseline/household/household_health_benefits.yaml -c policyengine_usmake formatgit diff --checkCI follow-up
An initial CI changelog check failed because the fragment used the old
changelog.d/fixed/8674.mdpath. This branch now useschangelog.d/8674.fixed.md, matching the current PR workflow.