Skip to content

Read SSI's medical treatment facility rate in Texas; retire the duplicate institutional parameters - #10283

Draft
MaxGhenis wants to merge 1 commit into
tx-ssi-supplement-historyfrom
ssi-institutional-single-source
Draft

MaxGhenis wants to merge 1 commit into
tx-ssi-supplement-historyfrom
ssi-institutional-single-source

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two parameters held the same federal reduced SSI benefit for residents of Medicaid medical treatment facilities, 42 USC 1382(e)(1)(B):

Parameter Values Read by
gov.ssa.ssi.amount.medical_facility 1975-01-01: 25, 1988-07-01: 30 federal ssi_amount_if_eligible
gov.ssa.ssi.amount.institutional.individual 1988-07-01: 30 tx_ssi_state_supplement, tx_ssi_state_supplement_eligible
gov.ssa.ssi.amount.institutional.couple 1988-07-01: 60 nothing

So for 1988-06, federal ssi paid $25 while Texas's eligibility test raised ParameterNotFoundError. DTrim99 raised this on #10148 (suggestion 4).

This PR:

  • Points both Texas readers at medical_facility, the parameter federal SSI reads.
  • Removes the whole institutional node. institutional.couple ($60) had no reader. ssi_amount_if_eligible returns p.medical_facility for each person whose living arrangement is MEDICAL_TREATMENT_FACILITY, so a couple both in a facility already gets $30 each.
  • Fixes 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_B anchor exists on the LII page.

Every reader

Searched with git grep for amount.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) and sources/policyengine-us/ssi-references.json. They record where a source URL was found and do not read the parameter. After this PR, git grep for 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 read medical_facility.

Values and behaviour

  • Parameters: for every month from 1988-07 through 2100-12 (1,350 months), institutional.individual == medical_facility and institutional.couple == 2 × medical_facility. I checked this on the tree before the change.

  • Outputs, differential: I computed ssi, tx_ssi_state_supplement_eligible and tx_ssi_state_supplement before and after the change. The grid was 22 Texas residents:

    • eight monthly pensions ($0, $20, $40, $49, $50, $51, $60, $100), each in and out of a facility;
    • three couples both in a facility.

    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_eligible now applies the $25 rate in force then, where it used to raise ParameterNotFoundError. Examples: a $40 pension (countable $20) is eligible; a $49 pension (countable $29) is not.
    • tx_ssi_state_supplement still 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).
    • Texas paid no supplement before September 1999, and whole-household simulations before 2015 already fail on other parameters.

Tests

Existing cases already pin the results the brief asked to show:

  • the $45 2024 supplement: tx_ssi_state_supplement.yaml Case 27 (2024-01) and Cases 1, 14, 15 and 28;
  • the $30 2011 supplement: Cases 12 and 16;
  • the 2024 boundary of the $30 standard: tx_ssi_state_supplement_eligible.yaml Cases 6-7 and integration.yaml Scenarios 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.yaml Cases 29-30 (2011), with SSI computed from real inputs:
    • A $50/month pension gives countable income of $30, ssi $0, eligible, supplement $360 a year.
    • A $51/month pension gives countable income of $31, ssi $0, not eligible, supplement $0.
    • So federal SSI and the eligibility test agree on the $30 standard at its edge.
  • tx_ssi_state_supplement_eligible.yaml Cases 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_income and pension_income. I checked this: with period 1988-07 and input ssi_countable_income: 30, the case reads 0.

Runs (local, macOS, Python 3.14):

  • policyengine-core test on the Texas supplement folder: 58 passed (54 before plus 4 new).
  • Federal SSI YAML (gov/ssa/ssi, 33 files, test_batched.py --mode per-subdir --workers 1): all three batches pass.
  • State SSP folders that use the federal facility rate through ssi: KS 20, LA 33, DC 14, MI 69, GA 32 and IN 78 cases. All pass.
  • Python: 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.py and policy/baseline/parameters/test_uprating_extensions.py: 822 passed, 10 skipped.
  • ruff format and ruff check: clean.
  • No partner test is touched.

Mutations (Texas folder, in a scratch copy):

  • The eligibility test reading the full individual rate fails new Cases 30 and 13, plus existing eligibility Case 7 and integration Scenario 12.
  • Moving medical_facility's $30 to 1990-01-01 fails new eligibility Case 12 and existing Case 17.

Invariants

  1. One source. At every instant, Texas's supplement, its eligibility test and federal SSI read the same reduced rate. This now holds by construction: all three read gov.ssa.ssi.amount.medical_facility.
  2. No change from July 1988. Texas outputs equal the previous head's for every probed month from 1988-07. The differential above checks this.
  3. Bounds unchanged. 0 ≤ supplement ≤ PNA − $30. That is the formula's 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 to main.

Axiom

axiom: TheAxiomFoundation/rulespec-us#1816 queued

  • From July 1988, rulespec-us is already right. 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.
  • Before July 1988, it is wrong. That module encodes $360 and $720 a year from 1974, but Pub. L. 100-203 §9119 shows $300 and $600 a year until June 1988. Those are the only months this PR changes, because Texas's eligibility test now uses the $25 rate.
  • Why queued. The pre-1988 text is not in the pinned corpus row, so the issue carries the verbatim law, the review_finding and the companion tests.

🤖 Generated with Claude Code

…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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant