Repository navigation
Read SSI's medical treatment facility rate in Texas; retire the duplicate institutional parameters - #10283
Merged
Conversation
The personal needs allowance parameter started on 1999-09-01, so any Texas simulation for 1999 or earlier raised ParameterNotFoundError. H-1500 and the 2002 DHS handbook say the PNA was $30 before September 1999; date that value from July 1, 1988, when 42 USC 1396a(q)(2) set the $30 federal minimum, so the supplement is $0 until September 1999. The existing values match HHSC's own records for every period, including 2007-2011, where SSA's State Assistance Programs tables list a $60 state supplement but HHSC's handbook (H-6000, revisions 09-4 and 11-2) says $30. Add the dated sources, a test case for each period, and property tests that the supplement does not vary with a recipient's own income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Python invariants now cover only residents paid SSI (positive federal payment); the zero-payment boundary at $30 countable income is left to the eligibility tests, since the sources do not settle it. - The variable comment and Case 14 no longer say other income goes to the co-payment "instead"; they state H-6000's fixed amount and that no Texas source subtracts the recipient's income. - The dated-history checks move from Python to YAML monthly cases at each change (Cases 17-27); the Python file keeps only the generated-resident properties YAML cannot express, and says why. - The parameter comment and changelog call July 1988 the modeled backfill start and state the repaired range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The changelog now says tx_ssi_state_supplement returns $0 instead of raising for July 1988 through August 1999; household totals before 2015 still fail on other parameters (FIRST_MODELED_YEAR). - Remove test_tx_ssi_state_supplement_invariants.py: its properties hold by construction (the formula reads no income variable) and YAML Cases 14-16 pin them with SSI computed from real inputs. Add Case 28, a resident with both a pension and earnings, which the seeded grid covered. - Cite the Pub. L. 100-203 section 9119(d)(2) note for the July 1, 1988 date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cate gov.ssa.ssi.amount.institutional.individual held the same $30 reduced federal benefit (42 USC 1382(e)(1)(B)) as gov.ssa.ssi.amount.medical_facility, the parameter federal SSI reads, but only from July 1988. Texas's supplement and its eligibility test read the duplicate, so for 1988-06 federal SSI paid $25 while the Texas eligibility test raised ParameterNotFoundError. Point both Texas readers at medical_facility and remove the institutional node (its couple value, $60, had no reader; SSI pays the per-person rate to each spouse). medical_facility's citation moves from (e)(1)(A), the public institution bar, to (e)(1)(B), and notes the July 1988 increase. Values match for every month from 1988-07 through 2100-12, and the Texas outputs are unchanged across 126 probed months from 1988-07 to 2027-09. Adds 2011 and 1989 cases at the $30 standard's boundary. Raised by DTrim99 on #10148 (suggestion 4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 found that eligibility Cases 12-13 (1989) repeated Cases 6-7: both the old and new parameter are $30 then, so they pass before and after this PR. The one behaviour change is before July 1988, where the eligibility test now applies the $25 rate instead of raising ParameterNotFoundError. Move Cases 12-13 to 1987 ($300/year eligible, $312/year not). They fail on the parent commit (ParameterNotFoundError on the retired parameter), when the 1975-01-01 entry is dropped, and (Case 13) when that entry is set to $30. Also fix ssi_amount_if_eligible's comment: the medical treatment facility rate is 42 USC 1382(e)(1)(B); (e)(1)(A) is the public-institution bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ingle-source # Conflicts: # policyengine_us/tests/policy/baseline/gov/states/tx/hhsc/ssi_state_supplement/tx_ssi_state_supplement.yaml
MaxGhenis
marked this pull request as ready for review
October 26, 2026 22:00
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10283 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 2 -2
Lines 76 33 -43
Branches 2 0 -2
=========================================
- Hits 76 33 -43
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:
|
Contributor
Author
|
Merged at Gates at merge:
axiom: TheAxiomFoundation/rulespec-us#1816 queued. 🤖 Generated with Claude Code |
This was referenced Oct 27, 2026
Merged
4 of 5 tasks
MaxGhenis
added a commit
that referenced
this pull request
Oct 29, 2026
One textual conflict, in ssi_amount_if_eligible.py: main corrected the medical treatment facility citation from 42 USC 1382(e)(1)(A) to (e)(1)(B) (#10283), while this branch moved the living-arrangement adjustment into _ssi_living_arrangement_amount.py. Keep the branch's helper call and carry main's citation into the helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two parameters held the same federal reduced SSI benefit for residents of Medicaid medical treatment facilities, 42 USC 1382(e)(1)(B):
gov.ssa.ssi.amount.medical_facility1975-01-01: 25,1988-07-01: 30ssi_amount_if_eligiblegov.ssa.ssi.amount.institutional.individual1988-07-01: 30tx_ssi_state_supplement,tx_ssi_state_supplement_eligiblegov.ssa.ssi.amount.institutional.couple1988-07-01: 60So for 1988-06, federal
ssipaid $25 while Texas's eligibility test raisedParameterNotFoundError. DTrim99 raised this on #10148 (suggestion 4).This PR:
medical_facility, the parameter federal SSI reads.institutionalnode.institutional.couple($60) had no reader.ssi_amount_if_eligiblereturnsp.medical_facilityfor each person whose living arrangement isMEDICAL_TREATMENT_FACILITY, so a couple both in a facility already gets $30 each.medical_facility's statutory citation. It cited 42 USC 1382(e)(1)(A), which is the public-institution bar. The $30 rate is in (e)(1)(B)(i). The file also gets a comment dating the July 1988 increase: Pub. L. 100-203 §9119(a) substituted "$360 per year" for "$300 per year", and §9119(c) makes that effective July 1, 1988. 20 CFR 416.414(b)(1) agrees: "For months after June 1988 ... $30 per month". The#e_1_Banchor exists on the LII page. The comment inssi_amount_if_eligible.pythat cited (e)(1)(A) for the same rate now cites (e)(1)(B).Every reader
Searched with
git grepforamount.institutional,amount/institutional, quoted"institutional"and'institutional', across all tracked files: variables, parameters, tests, partner tests (tests/policy/baseline/partners/**),programs.yaml, reforms and docs. The only readers were the two Texas variables. GitHub code search, which covers default branches, finds no other reader in the PolicyEngine and TheAxiomFoundation orgs. Two axiom-corpus files list the old YAML paths as provenance:manifests/ssi-agent-queue.yaml(discovered_via) andsources/policyengine-us/ssi-references.json. They record where a source URL was found and do not read the parameter. After this PR,git grepfor those patterns returns nothing.No other state reads either parameter. KS, LA, DC, MI, GA and IN tests mention the "$30 institutional" rate, but they get it through federal
ssi, which already readmedical_facility.Values and behaviour
Parameters: for every month from 1988-07 through 2100-12 (1,350 months),
institutional.individual == medical_facilityandinstitutional.couple == 2 × medical_facility. I checked this on the tree before the change.Outputs, differential: I computed
ssi,tx_ssi_state_supplement_eligibleandtx_ssi_state_supplementbefore and after the change. The grid was 22 Texas residents:It covered 127 months: January, July and September of every year 1988-2027, plus each PNA change month and the month before it. From 1988-07 to 2027-09, all 8,316 values (126 months × 22 people × 3 variables) are identical. These include 810 nonzero supplements and 1,134 eligible person-months.
The only change is 1988-06 and earlier:
tx_ssi_state_supplement_eligiblenow applies the $25 rate in force then, where it used to raiseParameterNotFoundError. Examples: a $40 pension (countable $20) is eligible; a $49 pension (countable $29) is not.tx_ssi_state_supplementstill raises for an eligible resident, now on the Texas PNA, which starts July 1988 (Date the Texas SSI supplement's PNA history from primary sources #10148).Tests
Existing cases already pin the results the brief asked to show:
tx_ssi_state_supplement.yamlCase 27 (2024-01) and Cases 1, 14, 15 and 28;tx_ssi_state_supplement_eligible.yamlCases 6-7 andintegration.yamlScenarios 11-12.The new cases cover the eligibility test, the part of the code this PR repoints, in years where it had no boundary case:
tx_ssi_state_supplement.yamlCases 29-30 (2011), with SSI computed from real inputs:ssi$0, eligible, supplement $360 a year.ssi$0, not eligible, supplement $0.tx_ssi_state_supplement_eligible.yamlCases 12-13 (1987), the one behaviour this PR changes: before July 1988 the reduced rate was $25 a month, so countable income of $300 a year ($25 a month) is eligible and $312 ($26 a month) is not. On the previous head both cases raiseParameterNotFoundErroroninstitutional.individual, which starts 1988-07-01.These are annual cases. A monthly YAML case drops yearly inputs such as
ssi_countable_incomeandpension_income. I checked this: with period1988-07and inputssi_countable_income: 30, the case reads 0.Runs (local, macOS, Python 3.14):
policyengine-core teston the Texas supplement folder: 58 passed (54 before plus 4 new).gov/ssa/ssi, 33 files,test_batched.py --mode per-subdir --workers 1): all three batches pass.ssi: KS 20, LA 33, DC 14, MI 69, GA 32 and IN 78 cases. All pass.tests/core/test_ssi_state_supplement_couple_invariants.py,test_programs_registry.py,test_parameter_files.py,code_health/test_parameter_yaml_keys.py,code_health/test_reference_urls.py,code_health/test_known_dead_reference_urls.py,test_system_import.pyandpolicy/baseline/parameters/test_uprating_extensions.py: 822 passed, 10 skipped.ruff formatandruff check: clean.Mutations (Texas folder, in a scratch copy):
medical_facility's $30 to 1990-01-01 fails existing eligibility Case 17. (At the first head this also failed the then-1989 Case 12; review r1 moved Cases 12-13 to 1987.)medical_facility's1975-01-01: 25entry fails eligibility Cases 12-13 (ParameterNotFoundError).Invariants
gov.ssa.ssi.amount.medical_facility.max_, and this PR does not change it.No Python property test. Invariant 1 is structural, and a test of 2 would restate the formula, which the repo's test-design rules (and DTrim99 on #10148) rule out. The differential script was run outside the tree, and its method is above.
Merge order
This PR was stacked on #10148 (
tx-ssi-supplement-history), which edits the same Texas files and tests. #10148 merged on 2026-10-26 (90990a92a8), and this PR now targetsmain, withmainmerged in atae5c73247f. The one conflict was this PR's appended Cases 29-30 intx_ssi_state_supplement.yaml. Main's copy of that file is identical to #10148's head, so the resolution keeps this branch's side. The diff againstmainis these 9 files. On the merged tree,git grepfinds no reader ofamount.institutional, and the Texas folder passes (58).Reviews
2a8117fb74): approve, with one minor finding and one nit. The 1989 eligibility cases repeated Cases 6-7 and left the pre-1988 change untested, andssi_amount_if_eligible.pystill cited (e)(1)(A). Both are fixed in72792f7ff2.Axiom
axiom: TheAxiomFoundation/rulespec-us#1816 queued
us:statutes/42/1382/e/1#medical_facility_individual_annual_rate_cap($360 a year) is encoded-correct for 1988-07 onward, the months whose results this PR leaves unchanged.review_findingand the companion tests.🤖 Generated with Claude Code