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 5 +4
Lines 24 105 +81
Branches 0 1 +1
=========================================
+ Hits 24 105 +81
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.
Read nm_premium_assistance_fpl_ratio in the amount formula and both eligibility gates, and require a finite ratio so a zero guideline pays nothing. Restore the fixtures' inputs to main's values, describe the two income bands in the parameter comment, and add end-to-end scenarios at 400% FPL, just above it, the gross-up boundaries and a zero guideline. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… cutoffs Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cutoff fixes and household tests are complete. Full impact and Axiom parity are pending.
The November 18 merge retained both sets of joint-return tests. The later merge at b0f95d2 brought in main through 50756f2 without conflicts. The branch also passed a separate conflict-free merge check with main at 8e81d66.
nm_premium_assistance_fpl_ratiocontrols the comparisons. Derived comparisons use ACA MAGI and the sameaca_fpgguideline as the federal credit.tax_unit_fpgfor the prior year now pinaca_fpgfor the coverage year. No expected value changed.aca_fpguses the associated section 36B tax family. The claimable-spouse cases exercise the difference between the tax family and the whole tax unit. Treat income exactly at 400% FPL as premium tax credit eligible #10312 has landed. Scenario 15 derives federal and state eligibility at exactly 400% and pays $913.96. Sources: 45 CFR 155.300(a), PDF p. 2; 45 CFR 155.305(f).fpl_limitcites the final PY2027 MAP base formula on p. 5. The selected-plan cap, take-up defaults, Puente, and the tribal schedule remain follow-ups.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.0The old whole-percentage calculation could exclude an otherwise eligible household just above 400% from both components. It could also apply the PY2026 gross-up just above 200%. Enrolled HB 2 gives the below-400% and federal-criteria-except-income clauses on pp. 4–5. The HCA manuals include exactly 400% in the base band, and MIH Addendum 1 starts MIH above 400%.
The single-filer table records a historical comparison using the 2025 one-person guideline of $15,650:
aca_magi_fractionFix
Each cutoff checks finiteness and compares the same ratio. The base income test includes 400%, and the MIH income test starts above 400%. Each component also applies its own filing and coverage conditions. The 10% benchmark gross-up includes 200% in PY2026 and requires income below 200% in PY2027. Target-contribution interpolation uses
aca_magi_fraction.Invariants
Derived comparisons use a float64 quotient. Below $131,072, the model recovers a cent-denominated MAGI when the nearest cent casts back to the stored float32 value. At $131,072 and above, adjacent cents can share a stored value, and the comparison uses stored MAGI. A subcent input that shares a stored value with a cent input is also indistinguishable. The YAML tests cover exact and adjacent-cent inputs, supplied ratios, and the program’s interior bands.
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.test_claimable_filer_ptc_invariants.py. Two mutations failed the new cases for supplied inputs and exact-cent cutoffs.Impact
Pending: full-file microsimulation, 2026 and 2027.
Coordination
#10041 established
aca_fpgas the denominator foraca_magi_fraction. #10312 landed and includes exactly 400% in the federal income test. This PR is part of the audit tracked in #10329.axiom: needed
🤖 Generated with Claude Code