Skip to content

Fix federal disability gates disconnected from their legal definitions - #9345

Draft
hua7450 wants to merge 2 commits into
mainfrom
fix/disability-input-disconnects
Draft

Fix federal disability gates disconnected from their legal definitions#9345
hua7450 wants to merge 2 commits into
mainfrom
fix/disability-input-disconnects

Conversation

@hua7450

@hua7450 hua7450 commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

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_disabled flag (or, inversely, an SSI-criteria flag where the law requires receipt).

Fixes #9329
Fixes #9331
Fixes #9332
Fixes #9333
Fixes #9334
Fixes #9337

Changes

Issue Gate Legal basis Fix
#9332 disabled_programs.yamlis_usda_disabled 7 CFR 271.2 item (2): "Receives supplemental security income benefits … or disability or blindness payments" Replace is_ssi_disabled (criteria flag, no receipt test, drops blind SSI recipients) with receives_ssi + ssi (reported or modeled receipt)
#9331 SNAP ABAWD exemption, work registration, general work requirements, student rule 7 CFR 273.7(b)(1)(ii): receipt of temporary or permanent disability benefits establishes unfitness for employment; 7 CFR 273.24(c)(2) OR is_usda_disabled into each disability leg
#9333 SSI student earned income exclusion 20 CFR 416.1112(c)(3): applies to a blind or disabled claimant under SSA's own definition is_disabledis_ssi_disabled
#9334 Medicaid home equity family exception 42 U.S.C. 1396p(f)(2)(A)(ii)(II): child "blind or permanently and totally disabled as defined in section 1614" Add is_ssi_disabled to the resident-child disability legs
#9329 Medicaid work requirement (community engagement) HR1 §71119: exemption for individuals "blind or disabled (as such terms are defined in section 1614)" Add is_ssi_disabled to eligible_disabled
#9337 HUD elderly/disabled family + HUD dependent 42 U.S.C. 1437a(b)(3)(E): person with disabilities includes the SSA §223 (SSDI) definition Add is_ssi_disabled and SSDI receipt paths; drop stray unit = USD on the boolean

Also clarifies the disabled_programs description and is_usda_disabled documentation: 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

Impact channels

Checklist

  • Code formatted (make format)
  • Changelog fragment (changelog.d/fix-disability-input-disconnects.fixed.md)
  • CI passes

🤖 Generated with Claude Code

hua7450 and others added 2 commits August 24, 2026 23:32
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>
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.20%. Comparing base (a68c725) to head (6621f87).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
.../eligibility/medicaid_work_requirement_eligible.py 0.00% 2 Missing ⚠️
...ariables/gov/hud/is_hud_elderly_disabled_family.py 0.00% 1 Missing ⚠️
.../eligibility/student/is_snap_ineligible_student.py 0.00% 1 Missing ⚠️
...gibility/work_requirements/is_snap_abawd_exempt.py 0.00% 1 Missing ⚠️
...ements/is_snap_work_registration_exempt_non_age.py 0.00% 1 Missing ⚠️
...quirements/meets_snap_general_work_requirements.py 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
unittests 42.20% <30.00%> (-57.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hua7450
hua7450 marked this pull request as ready for review August 25, 2026 05:15
@hua7450
hua7450 marked this pull request as draft August 25, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment