Skip to content

Retire legacy Marketplace coverage input#8693

Draft
daphnehanse11 wants to merge 2 commits into
PolicyEngine:mainfrom
daphnehanse11:codex/8674-health-benefit-accounting
Draft

Retire legacy Marketplace coverage input#8693
daphnehanse11 wants to merge 2 commits into
PolicyEngine:mainfrom
daphnehanse11:codex/8674-health-benefit-accounting

Conversation

@daphnehanse11

@daphnehanse11 daphnehanse11 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

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_ptc rather than the monthly premium_tax_credit wrapper.

API partner implications

This is intentionally API-surface-relevant:

  • has_marketplace_health_coverage is no longer an active input variable discovered from PE-US metadata.
  • The legacy variable remains calculable and now mirrors has_marketplace_health_coverage_at_interview.
  • Partners exporting PE-US input variables should stop surfacing has_marketplace_health_coverage.
  • Reported Marketplace coverage should use has_marketplace_health_coverage_at_interview.
  • Simulated ACA take-up should use takes_up_aca_if_eligible.
  • Annual health resource accounting should use healthcare_benefit_value / assigned_aca_ptc; premium_tax_credit remains a monthly wrapper.

Health accounting semantics

  • healthcare_benefit_value: annual canonical household resource value of health coverage.
  • household_health_benefits: annual health value included in household_benefits only when gov.simulation.include_health_benefits_in_net_income is enabled.
  • Program wrappers medicaid, chip, and monthly premium_tax_credit are 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_us
  • uv run pytest policyengine_us/tests/core/test_input_variable_definitions.py -q
  • uv run policyengine-core test policyengine_us/tests/policy/baseline/household/household_health_benefits.yaml -c policyengine_us
  • make format
  • git diff --check

CI follow-up

An initial CI changelog check failed because the fragment used the old changelog.d/fixed/8674.md path. This branch now uses changelog.d/8674.fixed.md, matching the current PR workflow.

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (47cb26b) to head (7c511ae).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8693   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           47        31   -16     
  Branches         0         1    +1     
=========================================
- Hits            47        31   -16     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Retire legacy Marketplace coverage input and canonicalize health benefit accounting

1 participant