Repository navigation
Conversation
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>
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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
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:
|
hua7450
left a comment
There was a problem hiding this comment.
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
- The ratio is computed three times in one program.
nm_premium_assistance.py(lines 54-57),nm_premium_assistance_eligible.py(48-52) andnm_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 TaxUnitnm_premium_assistance_fpl_ratio) read by all three keeps them from drifting. Same request as 10321 and 10323. - Four cases changed main's income where pinning
aca_fpgwould have kept it. Your own rule in this PR is to pinaca_fpgwhen the arithmetic assumed another guideline; these four had clean guidelines:nm_premium_assistance.yamlCase 16: main's $60,150 is exactly 4.01 × $15,000, and its pair Case 15 pinsaca_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.yamlScenario 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. Supplyingnm_premium_assistance_target_contribution_percentageinstead 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.pycould 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.
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)
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 andmain's four joint-return cases.nm_premium_assistance_mih_eligible.yaml: this PR's Cases 11-13 andmain's three joint-return cases.aca_fpg, the poverty lineaca_magi_fractionand 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.tax_unit_fpgfor the prior year now pinaca_fpgfor the coverage year. No expected value changed.aca_fpgis a modeling choice on both points.aca_fpgreads, but the New Mexico rule doesn't cite it.aca_fpguses 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.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 supplyis_aca_ptc_eligibleto 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).pa-10328-d: all 155 cases pass across the five New Mexico Premium Assistance YAML files (114),healthcare_benefit_value.yaml(22) andhousehold_health_benefits.yaml(19), and all 14 tests intest_claimable_filer_ptc_invariants.pypass.pa-10328-e) fails 9 cases: amount Cases 37 and 38; eligibility Case 18; MIH Cases 1, 3, 6 and 15; andmain's two MIH joint-return cases with a tax family of one.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.fpl_limitreference, Puente Health and the tribal schedule are left for later changes.Bug
New Mexico Premium Assistance compared the truncated
aca_magi_fraction(np.floor(100 * magi / fpg) / 100) with three income edges:<= 4.0> 4.0<= 2.0So 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:aca_magi_fractionFix
All three edges read the exact ratio
max(aca_magi, 0) / aca_fpg, divided in float64, the pattern of #10305 as it stands onmain. The target-contribution schedule still interpolates onaca_magi_fraction; only the eligibility and gross-up edges move.benchmark_gross_up.boundary_inclusivekeeps PY2026 inclusive at exactly 200% and PY2027 strict. Thefpl_limitcomment says both components compare the exact ratio.Invariants
For every input,
r = max(MAGI, 0) / aca_fpg:r <= 4, MIHr > 4). A premium-paying, non-MFS filer that is federally income-eligible atr <= 4is base-eligible, and every such filer withr > 4is MIH-eligible, so no income above 100% falls between them.r <= 2(PY2026) orr < 2(PY2027).rin (4.00, 4.01). The PY2026 gross-up is lost forrin (2.00, 2.01). Base eligibility is lost forrin (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
aca_magi_fractionwithoutaca_maginow suppliesaca_magiagainst anaca_fpgof $10,000.8_000 - 0.085 * 62_700).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.aca_fpgis pinned to that guideline and every expected value stands (Cases 4, 5, 6, 8, 10, 15, 19, 20; Scenarios 1, 4, 9, 10).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; onmainthe same draws give 81 (base) and 83 / 93 (MIH, 2026 / 2027) mismatches, all in the truncation sliver.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 toaca_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 theaca_magi_fractionaudit (table: #10329) begun with #10305.axiom: pending
🤖 Generated with Claude Code