Repository navigation
Read SSI's medical treatment facility rate in Texas; retire the duplicate institutional parameters - #10283
Draft
MaxGhenis wants to merge 1 commit into
Draft
Read SSI's medical treatment facility rate in Texas; retire the duplicate institutional parameters#10283MaxGhenis wants to merge 1 commit into
MaxGhenis wants to merge 1 commit into
Conversation
…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>
This branch has not been deployed
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.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 (1989), the first full year of the $30 standard: countable income of $360 a year is eligible and $372 is not.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 new eligibility Case 12 and existing Case 17.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 is stacked on #10148 (
tx-ssi-supplement-history), which edits the same Texas files and tests. It should merge after #10148. When #10148 merges and its branch is deleted, GitHub retargets this PR tomain.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