Decompose SPM MOOP premiums#8178
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8178 +/- ##
============================================
+ Coverage 86.04% 100.00% +13.95%
============================================
Files 3 32 +29
Lines 43 500 +457
Branches 2 2
============================================
+ Hits 37 500 +463
+ Misses 6 0 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Read-only review pass before patching: The failing
I did not see a hardcoded-value, parameter metadata, or period-handling issue in the small formula diff itself. The focused fix is to isolate those existing non-Marketplace tests by explicitly setting Marketplace net premium/take-up to zero where the fixture is testing CHIP/cliff behavior, while leaving the new Marketplace SPM MOOP coverage intact. Patching this now in a fresh detached worktree under |
|
This doublecounts marketplace premiums in MOOP and doesn't connect it to other MOOP use cases like SNAP and IMD. Fixing |
…rketplace-spm-moop-review # Conflicts: # pyproject.toml
MaxGhenis
left a comment
There was a problem hiding this comment.
Reviewed MOOP decomposition and companion data sequencing; approving pending CI.
Summary
adds=for the SPM aggregates.other_health_insurance_premiumsplus modeled Marketplace net, CHIP, Medicaid, and Medicare Part B premiums.medicare_part_b_premium, removes the genericmedical_out_of_pocket_expensesaggregate, and keeps statutory medical-expense wrappers separate from the SPM definition.medical_expense_health_insurance_premiumsfor SNAP/itemized/HUD/Medicaid-style medical expense definitions, while leavinghealth_insurance_premiumsas a direct input used by pre-tax contribution and state-specific direct-premium logic.other_health_insurance_premiumsthe medical MOOP uprating path.1.673.0, which Derive other health insurance premiums policyengine-us-data#844 uses as its minimum clean MOOP dependency.Addresses #8095 and part of #8168.
Definitions
snap_allowable_medical_expensesis the SNAP medical-cost definition and adds allowable health insurance premiums plus other allowable medical costs before the excess-medical deduction threshold is applied.itemized_medical_expensesis the tax medical-cost definition and adds allowable health insurance premiums plus other medical expenses before the AGI floor inmedical_expense_deduction.Notes
This should be reviewed alongside PolicyEngine/policyengine-us-data#844, which derives
other_health_insurance_premiumsfrom reported non-Medicare premiums net of baseline modeled Marketplace, CHIP, and Medicaid premiums. Medicare Part B is modeled directly rather than carried through a reported-premium input.Tests
uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/credits/property_tax/mo_property_tax_credit.yaml policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/deductions/mo_pension_and_ss_or_ssd_deduction/integration_tests/mo_pension_and_ss_or_ssd.yaml policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/income_tax/integration.yaml -c policyengine_usuv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/household/expense/health/medical_expense_health_insurance_premiums.yaml policyengine_us/tests/policy/baseline/gov/hud/hud_adjusted_income.yaml policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/credits/nm_medical_expense_credit.yaml policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/exemptions/nm_medical_expense_exemption.yaml policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/categories/medically_needy/is_medically_needy_for_medicaid.yaml policyengine_us/tests/policy/baseline/household/cliff_gap.yaml policyengine_us/tests/policy/baseline/gov/usda/snap/income/deductions/snap_excess_medical_expense_deduction.yaml policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/itemized_medical_expenses.yaml policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/medical_expense_deduction.yaml -c policyengine_usuv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/hhs/medicare/eligibility/medicare_part_b_premium.yaml policyengine_us/tests/policy/baseline/gov/hhs/medicare/costs/medicare_cost.yaml policyengine_us/tests/policy/baseline/household/income/spm_unit/spm_unit_medical_out_of_pocket_expenses.yaml policyengine_us/tests/policy/baseline/household/income/spm_unit/spm_unit_medical_out_of_pocket_expenses_medicare_part_b.yaml policyengine_us/tests/policy/baseline/household/income/spm_unit/spm_unit_spm_expenses_chip_premium.yaml policyengine_us/tests/policy/baseline/gov/usda/snap/income/deductions/snap_excess_medical_expense_deduction.yaml policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/itemized_medical_expenses.yaml policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/medical_expense_deduction.yaml -c policyengine_usbash -lc 'uv run coverage erase; FILES=$(gh pr diff 8178 --repo PolicyEngine/policyengine-us --name-only); SELECTIVE_TEST_MAX_TARGETS=25 SELECTIVE_TEST_MAX_FILES=250 uv run python policyengine_us/tests/run_selective_tests.py --coverage --files $FILES; uv run coverage report --fail-under=0 --skip-covered --skip-empty'uv run ruff format --check policyengine_us/variables/gov/states/mo/tax/income/subtractions/mo_qualified_health_insurance_premiums.py && uv run ruff check policyengine_us/variables/gov/states/mo/tax/income/subtractions/mo_qualified_health_insurance_premiums.pygit diff --check