Fix federal disability gates disconnected from their legal definitions - #9345
Fix federal disability gates disconnected from their legal definitions#9345hua7450 wants to merge 6 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9345 +/- ##
============================================
- Coverage 100.00% 42.20% -57.80%
============================================
Files 1 10 +9
Lines 37 218 +181
Branches 2 0 -2
============================================
+ Hits 37 92 +55
- Misses 0 126 +126
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6621f87 to
54f61be
Compare
Program Review — PR #9345 (reconnect federal disability gates to legal definitions)Scope
All four sub-reviews (regulatory, references, code patterns, test coverage) independently confirm the PR's core thesis is sound and that every disability variable is a REUSED existing variable — no reinvented/duplicate variables, no hard-coded policy magnitudes, all changes monotonic OR-ins that preserve pre-existing paths (except the intentional, documented SGA-screen drop in the SSI student exclusion). Critical (Must Fix)None. (The references reviewer initially flagged the SSI student-exclusion citation as critical. On merge it is reclassified SHOULD ADDRESS: Should Address
Suggestions
Validation Summary
Branch Status⚠ PR branch is 24 commits behind main. Consider rebasing before merging. Review was scoped to the PR's actual changes — staleness did not affect findings. Review Severity: APPROVENo CRITICAL findings survive the merge. The PR is regulatorily sound, reuses all disability variables (no reinvention), is well-tested on its core paths, and passes CI. Remaining items are traceability/precision improvements to references, one idiom-alignment note, and edge-test completeness — all non-blocking. 🤖 /review-program |
DTrim99
left a comment
There was a problem hiding this comment.
No critical issues — the disability-gate reconnections are regulatorily sound (7 CFR 271.2/273.24, 42 USC 1396p(f), 20 CFR 416.1112) and all disability variables are reused, not reinvented. Requesting changes for 6 should-address follow-ups: three are citation-precision (SSI student-exclusion §1614 precondition; the 273.24(c)(2)(i) vs 273.7(b)(1)(ii) pin-cite; add the new authorities to the reference attributes rather than inline comments), one code-idiom (add(...) > 0 in is_usda_disabled), and two test-leg gaps (SSI-receipt leg into the SNAP gates; HUD 0-boundary + Medicaid home-equity negative controls). Full findings above. 🤖 /review-program
Aligns six federal disability gates with the definitions their statutes actually reference (part of the #9330 disconnected-disability-inputs audit): - SNAP disabled_programs (7 CFR 271.2): qualify by SSI receipt (receives_ssi | ssi) instead of the is_ssi_disabled criteria flag, which has no receipt test and drops blind SSI recipients. - SNAP ABAWD, work registration, general work requirements, and student rules (7 CFR 273.7(b)(1)(ii), 273.24(c)(2)): disability benefit receipt (is_usda_disabled) establishes unfitness for employment. - SSI student earned income exclusion (20 CFR 416.1112(c)(3)): gate on is_ssi_disabled rather than the generic is_disabled flag. - Medicaid work requirement and home equity family exception (42 U.S.C. 1396p(f)(2)): recognize the Section 1614 SSI definition. - HUD person with disabilities (42 U.S.C. 1437a(b)(3)(E)): recognize the SSA Section 223 path via is_ssi_disabled and SSDI receipt; drop the stray unit = USD on the boolean. Fixes #9329 Fixes #9331 Fixes #9332 Fixes #9333 Fixes #9334 Fixes #9337 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The gate now computes is_ssi_disabled, whose SGA parameter (gov.ssa.sga.non_blind) has no values before 1975-01-01, so the 1974-period cases crashed on an undefined parameter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Rewrite is_usda_disabled tests to exercise receives_ssi, an ssi input, modeled SSI receipt, blind and aged SSI recipients, and the negative case where the SSI disability test is met but no SSI is received. - Add one benefit-receipt case to each formula that gained an SSI or SSDI leg: SNAP ABAWD, work registration, general work requirements, student rule, Medicaid work requirement, Medicaid home equity family exception, HUD elderly/disabled family, and HUD dependent. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…h SSI receipt for SNAP - The student earned income exclusion now gates on meets_ssi_disability_criteria rather than is_ssi_disabled. The SGA screen is an initial-entitlement test, and section 1619(a) recipients keep SSI status above SGA; the exclusion also feeds MSP, Medicaid, and state supplement income methodologies that have no SGA test, so it must not vanish above the threshold. - is_usda_disabled reads monthly booleans with the ADD option so reported SSI receipt in any month qualifies for the year, matching how monthly amounts are annualized. SSI receipt reflects an SSA aged/blind/disabled determination that does not lapse month to month. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the month-summing special case for monthly booleans. Core's default resolution applies: monthly amounts are summed over the year and monthly booleans are read as stocks. This also removes the ADD-option path that crashed Microsimulation.calculate_add. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Cite 42 U.S.C. 1382c(a)(3) for the blind-or-disabled precondition of the SSI student exclusion; 20 CFR 416.1112(c)(3) sets only age and student. - Repoint the receipt-establishes-unfitness rule to 7 CFR 273.24(c)(2)(i), applied by analogy to the 273.7(b)(1)(ii) exemption, in the SNAP work registration, general work requirement, and student rules. - Add the new authorities to reference attributes (Medicaid work requirement, HUD dependent, HUD elderly/disabled family, SNAP student). - Use the add(...) > 0 idiom in is_usda_disabled and add its reference. - Note that SSDI receipt is a modeling proxy for the HUD section 223 test. - Spell out SNAP in the disabled_programs description. - Tests: SSI-receipt leg on the four SNAP gates, zero-SSDI negative controls on both HUD variables, a non-triggering home equity case, and a non-disabled above-SGA mirror for the student exclusion. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
32291b9 to
857d7c7
Compare
Summary
Part of the disconnected-disability-inputs audit (#9330). Fixes the six federal findings: gates whose statutes define disability by SSI/SSDI receipt or by cross-reference to the Social Security Act, but which read only the generic
is_disabledflag (or, inversely, an SSI-criteria flag where the law requires receipt).Fixes #9329
Fixes #9331
Fixes #9332
Fixes #9333
Fixes #9334
Fixes #9337
Changes
disabled_programs.yaml→is_usda_disabledis_ssi_disabled(criteria flag, no receipt test, drops blind SSI recipients) withreceives_ssi+ssi(reported or modeled receipt).is_usda_disabledstays an annual status, likeis_usda_elderly, using Core's default period resolution for the monthly inputs.is_usda_disabledinto each disability legis_disabled→meets_ssi_disability_criteria. The SGA screen inis_ssi_disabledis deliberately left out: it is an initial-entitlement test, section 1619(a) recipients keep SSI status above SGA, and the exclusion also feeds MSP, Medicaid, and state supplement income methodologies that have no SGA test.is_ssi_disabledto the resident-child disability legsis_ssi_disabledtoeligible_disabledis_ssi_disabledand SSDI receipt paths; drop strayunit = USDon the booleanAlso clarifies the
disabled_programsdescription andis_usda_disableddocumentation: per 271.2 item (2) any SSI receipt qualifies (including aged-category recipients, who are 65+ and always also qualify under the elderly test, so no consumer's outcome changes through the aged path).Not in this PR
Tests
is_usda_disabled.yamlrewritten to exercise the receipt list directly:receives_ssi, anssiinput, modeled SSI receipt, blind and aged SSI recipients, SSDI receipt, and the negative case whereis_ssi_disabledis true but income is too high for SSI (ssi: 0,is_usda_disabled: false). The student exclusion test gains a case where a student earning above SGA keeps the exclusion.receives_ssion ABAWD, work registration, and the student rule; anssiamount on general work requirements), zero-SSDI negative controls on both HUD variables, a home equity case where the resident child does not meet the SSI disability test, and a non-disabled above-SGA mirror for the student exclusion. The previous "SSI disabled" case only passed because a zero-income person becomes modeled-SSI-positive under default takeup.is_disabled: falseso the new path is what carries the result: SNAP ABAWD exemption, work registration exemption, general work requirements (with the noncompliance flag set), student rule, Medicaid work requirement, Medicaid home equity family exception, HUD elderly/disabled family, and HUD dependent.Review follow-ups (@DTrim99)
is_usda_disabled.is_usda_disabledusesadd(person, period, [program]) > 0per entry, as inis_ssi_recipient_for_medicaid. Results are unchanged in household and microsimulation runs.is_usda_disabled; the variable keeps Core's default period resolution.Impact channels
Checklist
make format)changelog.d/fix-disability-input-disconnects.fixed.md)🤖 Generated with Claude Code