PolicyEngine / PolicyEngine/policyengine-us

13 TANF-linkage formulas should read cycle-safe computed state enrollment, not the reported is_tanf_enrolled input

Open
#9,205 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
162
Forks
212
Avg merge
3d 3h
Merged PRs (30d)
97

Description

The populace#591 consumer classification (adjudication: https://github.com/PolicyEngine/populace/issues/591#issuecomment-5160668979) read all 65 consumers of the reported-enrollment input `is_tanf_enrolled` against their statutory references. 52 correctly key on administrative participation status (categorical eligibility/exemptions, applicant-vs-recipient tests) where a reported input is the right model. **13 consumers key on a legal concept that computed state-program enrollment can safely supply** — for these, reading the frozen reported input makes reforms fail to propagate where they lawfully should.

Proposed fix: cycle-safe state enrollment helpers, conceptually:

```python
if parameters(period).gov.hhs.tanf.abolish_tanf:
return False
return (
spm_unit("", period) > 0
) & spm_unit("takes_up_tanf_if_eligible", period.this_year)
```

(person formulas via `person.spm_unit(...)`; generic annual `tanf` is NOT a safe substitute — it sums every state program and re-enters the nationwide TANF/child-care/Medicaid graph).

The 13 substitution sites: IA CCA (`ia_cca_income_exception.py:20` → computed `ia_fip` enrollment), ID ICCP (`id_iccp_copay_per_child.py:79` → person-projected `id_tafi`), IN CCDF (`in_ccdf_parent_in_eligible_activity.py:28` → person-projected `in_tanf`), LA CCAP (provisional — also requires unmodeled STEP participation; see caveats), MI CCAP (`mi_ccap_income_waived.py:29` → computed `mi_fip`), MS CCPP ×2 (`ms_ccpp_copay_waived.py:22`, `ms_ccpp_categorically_eligible.py:17` → computed `ms_tanf`), ND CCAP ×2 (`nd_ccap_copay.py:35`, `nd_ccap_parent_in_eligible_activity.py:31` → computed/person-projected `nd_tanf`), OK STC (`ok_stc.py:70` → tax-unit aggregation of computed `ok_tanf`), PA CCW (`pa_ccw_eligible.py:19` → negated computed `pa_tanf`), SC CCAP (`sc_ccap_copay.py:34` → computed `sc_tanf`), TX CEAP (`tx_ceap_eligible.py:36` → computed `tx_tanf`).

Full per-consumer receipts with statutory citations in the adjudication link. Related metadata gaps found in the same sweep (worth fixing alongside): `ca_tanf_financial_eligible`, both CO countable-income consumers, and the NC gross-unearned consumer lack reference metadata; KS activity metadata cites KEESM 2810 while the formula comment cites 2820; the KY income consumer omits its categorical-path citation.

Contributor guide

Open the contributing guide

Research direction

Start with the 13 substitution sites listed in the issue and read the linked populace adjudication for the statutory receipts. Trace each consumer's current is_tanf_enrolled use and the named state-program variable, including the LA CCAP STEP caveat. Done means the affected formulas use cycle-safe computed or person-projected state enrollment without substituting generic annual tanf, while preserving the documented exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.