Skip to content

Decide NM Premium Assistance's income edges on the exact FPL ratio - #10328

Open
MaxGhenis wants to merge 3 commits into
mainfrom
nm-premium-assistance-exact-fpl-ratio
Open

MaxGhenis wants to merge 3 commits into
mainfrom
nm-premium-assistance-exact-fpl-ratio

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Still pending: full impact run, Axiom parity line, GPT-6.1 Sol review. Done: the fix and YAML cases, on current main.

Update onto current main (2026-11-18)

  • Merged upstream/main. Max's commit stays; nothing was rebased or force-pushed. Two test files conflicted because both sides added cases at the end. The merge keeps both sets:
    • nm_premium_assistance.yaml: this PR's Cases 32-36 and main's four joint-return cases.
    • nm_premium_assistance_mih_eligible.yaml: this PR's Cases 11-13 and main's three joint-return cases.
  • The base ceiling, the Middle Income Household floor and the PY2026 and PY2027 gross-up edge now divide by aca_fpg, the poverty line aca_magi_fraction and the federal credit have used since Keep a filer who can be claimed as a dependent out of the premium tax credit family, and apply each state premium program's rule #10041. The division runs in float64.
  • The 37 fixtures that pinned tax_unit_fpg for the prior year now pin aca_fpg for the coverage year. No expected value changed.
  • New cases cover a joint return with one claimable spouse, where the tax family of one is smaller than the tax unit of two:
    • Eligibility Case 17: $62,600 is base-eligible (400% of $15,650).
    • Eligibility Case 18: $62,600.47 is base-ineligible (400.003% of $15,650, though 296% of the whole unit's $21,150).
    • MIH Case 14: $62,600 is not above 400%.
    • MIH Case 15: $62,600.47 is MIH-eligible, and the amount is $678.96.
    • Amount Case 37: $31,300.47 gets no PY2026 gross-up (200.003% of $15,650, though 148% of $21,150).
    • Amount Case 38: $31,920 gets no PY2027 gross-up (200% of $15,960, though 148% of $21,640).
  • The sources leave the guideline year and family size open, so aca_fpg is a modeling choice on both points.
    • Guideline year: 8.401.2.7(G) NMAC defines the FPL as "the federal poverty level issued annually by the U.S. department of health and human services for the applicable coverage year for the health insurance exchange". HCA's proposed amendment repeats that text. It names no publication year, and the New Mexico sources reviewed print no dollar guideline. The Exchange rule, 45 CFR 155.300(a), uses the guideline most recently published on the first day of open enrollment, which is the prior-year guideline aca_fpg reads, but the New Mexico rule doesn't cite it.
    • Family size: 8.401.2 NMAC, the PY2026 and PY2027 MAP manuals and Addendum 1 don't define family or household size. 8.401.2.8(C)(1)(b) NMAC requires the federal credit's criteria, apart from income for the Middle Income Household component, so aca_fpg uses the section 36B tax family. Eligibility Cases 17 and 18, MIH Cases 14 and 15 and amount Cases 37 and 38 pin that choice, not a New Mexico rule.
  • Dependency on Treat income exactly at 400% FPL as premium tax credit eligible #10312. On current main, income exactly at 400% of the poverty line is federally ineligible, so a derived New Mexico household there gets neither component. Eligibility Cases 14 and 17 supply is_aca_ptc_eligible to test the state ceiling on its own, and should derive it end to end once Treat income exactly at 400% FPL as premium tax credit eligible #10312 lands. This PR doesn't need Treat income exactly at 400% FPL as premium tax credit eligible #10312 to pass, and the merge order doesn't affect the tests: a trial merge of Treat income exactly at 400% FPL as premium tax credit eligible #10312's head (f3543f2) with this branch, not pushed, passed the same test files (pa-10328-g).
  • Modal run pa-10328-d: all 155 cases pass across the five New Mexico Premium Assistance YAML files (114), healthcare_benefit_value.yaml (22) and household_health_benefits.yaml (19), and all 14 tests in test_claimable_filer_ptc_invariants.py pass.
  • Mutation checks on Modal, neither pushed:
    • Restoring the old denominator (pa-10328-e) fails 9 cases: amount Cases 37 and 38; eligibility Case 18; MIH Cases 1, 3, 6 and 15; and main's two MIH joint-return cases with a tax family of one.
    • Restoring main's truncated gates and gross-up edge (pa-10328-f) fails 11 cases: amount Cases 18, 24, 33, 34 and 37; eligibility Cases 15, 16 and 18; MIH Cases 12, 13 and 15.
  • The gross-up payment cap, take-up defaults, the fpl_limit reference, Puente Health and the tribal schedule are left for later changes.
  • Not rerun: the differential sweep below.

Bug

New Mexico Premium Assistance compared the truncated aca_magi_fraction (np.floor(100 * magi / fpg) / 100) with three income edges:

Edge Source Comparison on main Defect
Base program ceiling PY2026 MAP manual, p.6: "consumers with household income over 400% of the FPL do not qualify" <= 4.0 admits 400.00%-400.99% (the federal gate, which ends at 400%, hid it under current law)
Middle Income Household floor Addendum 1, Section I.A(3): "Have a household income above 400% of the FPL." > 4.0 excludes 400.00%-400.99%
PY2026 10% benchmark gross-up PY2026 MAP manual, p.5: "For eligible individuals up to 200% FPL"; the ungrossed formula covers "individuals between 200.01-400% FPL" <= 2.0 grosses up 200.00%-200.99%

So an income from 400.003% to 400.994% of the poverty line got neither component: federally ineligible (no base program) and not "above" 4.00 (no MIH). NMSA 1978 § 59A-23F-12(A)(2), as amended by HB 2 (2025 1st S.S.), qualifies residents who either have income "below four hundred percent" and qualify for APTC, or "meet all eligibility criteria for the advanced premium tax credit ... except for household income requirements", so the statute leaves the split at exactly 400% to HCA, whose manual keeps it in the base program. No source prescribes truncating the percentage; "200.01" labels the next range rather than setting a rounding rule. The PY2027 gross-up ("under 200%") is strict, so truncation already got it right.

Executed on main (645fcd3; these files are unchanged at 740e1eb), single filer in New Mexico, 2026, 2025 one-person guideline $15,650:

Income Exact % of FPL aca_magi_fraction Main Here
$31,300 200.000% 2.00 gross-up gross-up
$31,300.47 200.003% 2.00 gross-up none
$31,455.56 200.994% 2.00 gross-up none
$62,600 400.000% 4.00 base (gate alone), not MIH base, not MIH
$62,600.47 400.003% 4.00 neither (base gate alone: yes) MIH
$62,700 400.639% 4.00 $0, neither MIH, $2,670.50 on an $8,000 benchmark

Fix

All three edges read the exact ratio max(aca_magi, 0) / aca_fpg, divided in float64, the pattern of #10305 as it stands on main. The target-contribution schedule still interpolates on aca_magi_fraction; only the eligibility and gross-up edges move. benchmark_gross_up.boundary_inclusive keeps PY2026 inclusive at exactly 200% and PY2027 strict. The fpl_limit comment says both components compare the exact ratio.

Invariants

For every input, r = max(MAGI, 0) / aca_fpg:

  1. Partition. No tax unit is eligible for both the base program and MIH (base needs r <= 4, MIH r > 4). A premium-paying, non-MFS filer that is federally income-eligible at r <= 4 is base-eligible, and every such filer with r > 4 is MIH-eligible, so no income above 100% falls between them.
  2. Gross-up = manual. For base-eligible units the 10% gross-up applies exactly when r <= 2 (PY2026) or r < 2 (PY2027).
  3. Where results move. MIH eligibility is gained for r in (4.00, 4.01). The PY2026 gross-up is lost for r in (2.00, 2.01). Base eligibility is lost for r in (4.00, 4.01), which is federally ineligible under current law. Nothing else changes for consistent inputs.

No Hypothesis test is added: the YAML cases hit each edge exactly and 0.003 and 0.994 points above it with the real guideline, and the existing cases cover the bands' interiors. The repo's test-design rules keep such cases in YAML.

Tests

  • Every case in the NM YAML files that supplied aca_magi_fraction without aca_magi now supplies aca_magi against an aca_fpg of $10,000.
  • Case 24 expected $0 for a $62,700 filer, with the comment "MIH-ineligible (not > 4.0)" and "May move when Federal ACA PTC income gate zeroes the credit at [400%, 401%) FPL (truncation boundary vs Form 8962) #9264 lands". $62,700 is 400.64% of $15,650, above 400%: it now expects MIH eligibility and $2,670.50 (8_000 - 0.085 * 62_700).
  • About twenty cases supplied a fraction that disagreed with their own aca_magi, found by re-deriving each fraction from its MAGI (for example "400% FPL" with $60,000, which is 383% of $15,650). With the gate reading MAGI, each would have judged eligibility and the target percentage on different incomes.
    • Where the case's arithmetic assumed another guideline, mostly $15,000, aca_fpg is pinned to that guideline and every expected value stands (Cases 4, 5, 6, 8, 10, 15, 19, 20; Scenarios 1, 4, 9, 10).
    • Otherwise the income moves to the stated percentage of the real guideline and the expected amount is recomputed by hand: Case 3 $2,988 → $2,987.42; Case 16 $4,887.25 → $4,665.70; Case 17 and Scenario 11 $6,390 → $4,449.45 (a couple: 420% of $21,150 is $88,830); Case 22 $2,050 → $2,013.875; Case 23 $5,495 → $5,493.6875. Cases 9, 11, 13, 14 and 21 and Scenarios 8 and 14 keep their $0 or unchanged amounts.
  • Case 18 (negative MAGI, base band) keeps a supplied 3.00 fraction so its target percentage is nonzero and the clamp matters. Its exact ratio is 0, inside the PY2026 gross-up, so it expects $5,900 rather than $5,000. Case 29 (negative MAGI, MIH) now supplies MIH eligibility to reach the clamp.
  • New cases with the real guideline: base eligibility at $62,600 / $62,600.47 / $62,755.56; MIH eligibility at the same three incomes; the gross-up at $31,300 / $31,300.47 / $31,455.56 (PY2026) and $31,919 / $31,920 (PY2027, 2026 guideline $15,960).
  • Mutation checks: see the update section above.
  • Local differential sweep, run before the move to aca_fpg (a script, not committed, per the repo's test-design rules): 256 tax units per year, 60% with income in cents within $2 of an edge and the rest uniform, guidelines $10,000-$80,000 including $20 multiples, comparing the base and MIH gates (2026, and MIH 2027) with an exact-rational reading of the source on the float32 values the model receives. 0 mismatches here; on main the same draws give 81 (base) and 83 / 93 (MIH, 2026 / 2027) mismatches, all in the truncation sliver.
  • Local run before the move to aca_fpg: the NM Premium Assistance YAML folder, 101 passed. Current results are in the update section above.

Impact

Pending: full-file microsimulation via the US hub impact queue, 2026 and 2027.

Coordination

#10041, merged 11/13, moved aca_magi_fraction's denominator to aca_fpg, and these exact ratios now use the same denominator. #10312 makes exactly 400% federally eligible, which reaches the base program's inclusive ceiling. Part of the aca_magi_fraction audit (table: #10329) begun with #10305.

axiom: pending

🤖 Generated with Claude Code

New Mexico's base program excludes "consumers with household income over
400% of the FPL", Addendum 1 covers Middle Income Households with income
"above 400% of the FPL", and the PY2026 manual grosses up the benchmark
"up to 200% FPL" (the next range starts at "200.01"). All three compared
the truncated aca_magi_fraction, which maps 400.00%-400.99% to 4.00 and
200.00%-200.99% to 2.00. So incomes just above 400% were in neither
component (the federal gate ends the base program at 400%, and MIH needed
a fraction above 4.00), and the PY2026 gross-up reached 200.99%. Test the
exact ratio of nonnegative ACA MAGI to the prior-year guideline instead.

Case 24 expected $0 for a $62,700 filer (400.64%) because of the gap; it
now expects the $2,670.50 MIH amount. About twenty cases supplied a
fraction that disagreed with their own MAGI. Where the case's arithmetic
assumed another guideline (often $15,000), its prior-year tax_unit_fpg is
pinned to that guideline; otherwise the income and expected amount are
recomputed. Case 29 now supplies MIH eligibility to reach the negative-
income clamp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 and others added 2 commits November 18, 2026 15:37
Both sides appended cases at the end of nm_premium_assistance.yaml and
nm_premium_assistance_mih_eligible.yaml. Keep this branch's boundary cases
and main's joint-return cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…overty line

Divide the exact ratio by aca_fpg, in float64, in the base ceiling, the Middle
Income Household floor and the benchmark gross-up. Pin aca_fpg in the fixtures
that pinned the prior-year tax_unit_fpg, and add joint returns with a claimable
spouse, where the tax family is smaller than the tax unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99
DTrim99 marked this pull request as ready for review November 18, 2026 21:46
@DTrim99
DTrim99 requested a review from hua7450 November 18, 2026 21:46
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8999568) to head (70b0325).
⚠️ Report is 199 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #10328   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         3    +2     
  Lines           24        64   +40     
=========================================
+ Hits            24        64   +40     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, David. The New Mexico edges check out: the base program stays "at or below 400%" (PY2026 manual p. 6, "over 400% of the FPL do not qualify"; PY2027 manual p. 5, "≥ 200 and ≤ 400%"), Middle Income Households start "above 400% of the FPL" (Addendum 1 p. 2), and the 10% gross-up covers incomes up to 200% in PY2026 and under 200% in PY2027. With <= and > on the same exact ratio, every income lands in exactly one component, which closes the old 400.003%-400.99% gap. No New Mexico source truncates the percentage, and the guideline year follows 45 CFR 155.300(a) through 8.401.2.7(G) NMAC, which aca_fpg matches. Two fixes before I approve.

Before merge

  1. The ratio is computed three times in one program. nm_premium_assistance.py (lines 54-57), nm_premium_assistance_eligible.py (48-52) and nm_premium_assistance_mih_eligible.py (57-61) repeat the same three lines and comment, and the amount variable also needs the ratio for the gross-up. One NM ratio variable (for example a TaxUnit nm_premium_assistance_fpl_ratio) read by all three keeps them from drifting. Same request as 10321 and 10323.
  2. Four cases changed main's income where pinning aca_fpg would have kept it. Your own rule in this PR is to pin aca_fpg when the arithmetic assumed another guideline; these four had clean guidelines:
    • nm_premium_assistance.yaml Case 16: main's $60,150 is exactly 4.01 × $15,000, and its pair Case 15 pins aca_fpg: 15_000. Restoring $60,150 with that pin returns the expected value to 4,887.25 instead of 4,665.70.
    • Case 11: $39,000 = 2.5 × $15,600 (pin 15,600).
    • integration.yaml Scenario 8: $39,125 = 2.5 × $15,650 (pin 15,650).
    • Scenario 14: $31,300 = 2 × $15,650 (pin 15,650); as changed, it duplicates the new Case 36.

Also, this branch predates 10312's merge, under which income exactly at 400% is federally eligible; please merge main so CI runs with it.

Optional

  • Tests. Under the exact ratio, the 0.003- and 0.994-point cases above each edge are the same class (eligibility Cases 15/16, MIH 12/13, amount 33/34), and amount Case 32 repeats Case 2 and Scenario 13. Drop the 0.994 cases or note them as markers for the old truncation.
  • Case 18 now pairs aca_magi: -10_000 (ratio 0 for the gross-up and eligibility) with a supplied 3.00 fraction for the target percentage. Supplying nm_premium_assistance_target_contribution_percentage instead would keep the clamp test without two inconsistent incomes.
  • Guideline-year comment. 8.401.2.8(D)(1)(a) NMAC and both manuals take income "as outlined in 45 C.F.R. § 155.305(f)", which sits under 155.300(a)'s definition of the poverty line, so the comment in nm_premium_assistance_eligible.py could cite it rather than saying no New Mexico source ties the year.
  • Zero guard (see below).

Series-wide (follow-up, not for this PR). The exact ratio max_(aca_magi, 0) / aca_fpg is computed inline across this series (plus two California copies on main), and only 10312 guards a zero poverty line. One guarded tax-unit variable for the untruncated ratio, read by every gate, would be a good follow-up PR.

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.

3 participants