Skip to content

Fix unsubsidized Marketplace net premiums#8163

Merged
MaxGhenis merged 2 commits intomainfrom
codex/marketplace-net-premium-unsubsidized
Apr 27, 2026
Merged

Fix unsubsidized Marketplace net premiums#8163
MaxGhenis merged 2 commits intomainfrom
codex/marketplace-net-premium-unsubsidized

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • Use pays_aca_premium rather than PTC eligibility for gross SLCSP age-curve and NY/VT family-tier premiums.
  • Gate selected_marketplace_plan_premium_proxy on ACA premium payment/takeup instead of aca_ptc > 0, so high-income unsubsidized Marketplace households keep a gross selected-plan premium and net premium.
  • Include marketplace_net_premium in household_health_costs when health benefits are included in net income.

Notes

This intentionally does not add Marketplace premiums to SPM MOOP yet; that path needs imputed-premium residual work to avoid broad baseline double counting. This is the household-net-income side of #8095 plus the unsubsidized gross-premium fix.

Tests

  • uv run ruff format --check policyengine_us/variables/gov/aca/slspc/slcsp_age_curve_amount_person.py policyengine_us/variables/gov/aca/slspc/slcsp_family_tier_category.py policyengine_us/variables/gov/aca/ptc/selected_marketplace_plan_premium_proxy.py
  • uv run ruff check policyengine_us/variables/gov/aca/slspc/slcsp_age_curve_amount_person.py policyengine_us/variables/gov/aca/slspc/slcsp_family_tier_category.py policyengine_us/variables/gov/aca/ptc/selected_marketplace_plan_premium_proxy.py
  • uv run python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/gov/aca --batches 1
  • uv run python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/household/income/household/household_health_costs.yaml --batches 1
  • uv run python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/household/household_health_benefits.yaml --batches 1
  • uv run python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/household/household_net_income_including_health_benefits.yaml --batches 1

I also tried uv run python policyengine_us/tests/test_batched.py policyengine_us/tests/policy/baseline/household --batches 1; it stayed CPU-bound for about 9 minutes without test output, so I stopped it and used the narrower household tests above.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (20705b0) to head (629248e).
⚠️ Report is 37 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #8163       +/-   ##
============================================
+ Coverage   85.36%   100.00%   +14.63%     
============================================
  Files           3         3               
  Lines          41        60       +19     
  Branches        2         0        -2     
============================================
+ Hits           35        60       +25     
+ Misses          6         0        -6     
Flag Coverage Δ
unittests 100.00% <100.00%> (+14.63%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@MaxGhenis MaxGhenis enabled auto-merge (squash) April 27, 2026 05:12
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