PolicyEngine / PolicyEngine/policyengine-us

Key receipt checks on calculated benefits: cleanup plan after the reported-input decision

Open
#8,979 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

## Background

Per team decision (see #8950, #8956, #8959, #8946 and closed PRs #8951, #8957, #8960, #8963), PolicyEngine US does not carry a parallel reported-input layer for benefit receipt. API partners who need "as-reported" behavior override the canonical variables (`ssi`, `tanf`, `snap`) directly and send separate requests per scenario.

**Convention going forward:**
- Categorical eligibility / receipt checks key on the **calculated benefit**: `tanf > 0`, `ssi > 0`, `snap > 0`.
- `is_ssi_eligible`-style variables are used only where the legal text is genuinely eligibility-based (e.g., "eligible for or receiving", "would be eligible except for income").
- Enrollment-flag inputs (`is_tanf_enrolled`, `receives_snap`) are reserved for cases where reading the calculated benefit would create a circular reference.

This issue tracks bringing the whole repo in line with that convention.

## Phase 1 — receipt-check corrections (PR #8976, in review)

- [ ] TX CEAP categorical eligibility → `tanf > 0` / `snap > 0` / `ssi > 0` per 42 USC 8624(b)(2)(A)
- [ ] Medicaid community engagement TANF pass-through → `tanf > 0`
- [ ] SNAP work-registration TANF exemption (7 CFR 273.7(b)(1)(iii)) → `tanf > 0`
- [ ] OK sales tax relief credit TANF exclusion → `tanf > 0`

Audited, correct as-is: WA Birth to Three ECEAP (RCW 43.216.578 qualifies families "eligible for or … receiving" basic food, so `is_snap_eligible | snap > 0` matches the statute).

## Phase 2 — audit the `is_ssi_eligible` family (~20 files)

Each needs its state manual checked: "receiving a federal SSI payment" → `ssi > 0`; genuinely broader aged/blind/disabled coverage → keep `is_ssi_eligible` with the citation documented.

- [ ] State SSPs/OSS: AK, AL, CT, DC OSSP, DE, FL (incl. couple rate), HI (incl. couple rate), KY (incl. claim type), LA, MA (max supplement), ME, MI, NE (couple rate)
- [ ] IL AABD non-financial eligibility; IL SMIB categorical eligibility
- [ ] MA EAEDC (disabled head/spouse; elderly present)

## Phase 3 — remove the #8732 reported-SSI mechanism

Deferred by team decision ("eventually, not now"). When green-lit:

- [ ] **Precondition**: verify via the household API analytics that no partner sends `use_reported_ssi` (it appears only in an authored edge-case fixture, not in real-traffic signature fixtures)
- [ ] Delete `applicable_ssi` and `use_reported_ssi`; **keep `ssi_reported`** (survey-data variable: loads the CPS `SSI_VAL` column, feeds the PA property tax/rent rebate)
- [ ] Revert 5 consumers to `ssi`: `meets_snap_categorical_eligibility` (all-members check), `ks_tanf_is_assistance_unit_member` (→ `ssi > 0`), and the IL AABD / NE Child Care Subsidy / TX CEAP unearned income lists
- [ ] Convert or delete toggle tests in: IL AABD integration, TX CEAP countable income, SNAP categorical eligibility, `applicable_ssi.yaml`
- [ ] Remove the `ssi_use_reported_passthrough` partner fixture case (partner-test review gate applies)
- [ ] **Decision point**: switch the PA property tax/rent rebate from `ssi_reported` to calculated `ssi` (API households currently count $0 SSI in that income definition unless the survey variable is supplied), or keep the survey read as a documented microsimulation-fidelity exception

## Out of scope (correct as-is — do not "fix")

Cycle-protected flag reads stay: childcare programs reading `is_tanf_enrolled` (the `tanf → childcare expenses → child_care_subsidies` cycle), MD CCS reading `receives_snap`, state TANF recipient-vs-applicant internals, and `dc_snap_temporary_local_benefit` reading `is_snap_eligible` (it is summed into `snap` itself).

Contributor guide

Open the contributing guide

Research direction

Start with the receipt-check corrections in PR #8976, then review the listed state SSP/OSS and eligibility rules against their state manuals and citations. Track each decision in the relevant variable definitions and tests named in the issue. Done means the calculated-benefit convention is applied where appropriate, valid eligibility-based and cycle-protected cases remain unchanged, and the deferred reported-SSI phase is not started without the stated API check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.