Add person_receives_aca and assigned ACA PTC variables#7808
Add person_receives_aca and assigned ACA PTC variables#7808MaxGhenis merged 5 commits intoPolicyEngine:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7808 +/- ##
===========================================
- Coverage 100.00% 91.89% -8.11%
===========================================
Files 12 7 -5
Lines 174 74 -100
Branches 0 2 +2
===========================================
- Hits 174 68 -106
- Misses 0 6 +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:
|
Review: Downstream breakage from removing takeup gate on
|
| File | Usage | Impact if aca_ptc becomes pre-takeup |
|---|---|---|
spm_unit_benefits.py |
BENEFITS.append("aca_ptc") |
Non-taken-up PTC counted as benefits |
healthcare_benefit_value.py |
Lists aca_ptc |
Overstates healthcare benefit value |
premium_tax_credit.py |
adds = ["aca_ptc"] |
Flows into federal tax computation |
income_tax_excluding_ptc.py |
subtracts = ["aca_ptc"] |
Understates tax excluding PTC |
These would cause household_net_income, spm_unit_benefits, and federal tax calculations to be wrong for anyone who doesn't take up ACA.
Fix
These 4 references should switch from aca_ptc to assigned_aca_ptc:
# spm_unit_benefits.py
BENEFITS.append("assigned_aca_ptc") # was "aca_ptc"
# healthcare_benefit_value.py
"assigned_aca_ptc", # was "aca_ptc"
# premium_tax_credit.py
adds = ["assigned_aca_ptc"] # was ["aca_ptc"]
# income_tax_excluding_ptc.py
subtracts = ["assigned_aca_ptc"] # was ["aca_ptc"]CI failure
The Full Suite - Baseline (excl States) failure is a pre-existing hourly_wage data array mismatch in the microsim test — not caused by this PR.
Other notes
- The new variables and tests look clean
person_receives_acalogic is correct (person eligible AND tax unit takes up)- Test case 5 (takeup counts even when assigned PTC is $0) is a good edge case
- The
aca_ptctest confirming it's available even without takeup correctly validates the new semantics
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Question on benefit accounting
Closes #7806
Summary
person_receives_acaas a person-level ACA receipt flagaca_ptcas the pre-takeup ACA premium tax credit amount and addassigned_aca_ptcfor the amount actually assigned after take-upTesting
make formatuv run policyengine-core test policyengine_us/tests/policy/baseline/gov/aca/ptc/aca_ptc.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/assigned_aca_ptc.yaml policyengine_us/tests/policy/baseline/gov/aca/person_receives_aca.yaml -c policyengine_us