Skip to content

Add New Mexico premium assistance (BeWell NM state subsidy) - #9232

Merged
hua7450 merged 6 commits into
mainfrom
nm-premium-assistance
Aug 11, 2026
Merged

Add New Mexico premium assistance (BeWell NM state subsidy)#9232
hua7450 merged 6 commits into
mainfrom
nm-premium-assistance

Conversation

@DTrim99

@DTrim99 DTrim99 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Implement New Mexico Premium Assistance (NMPA + MIH)

Summary

Implements the New Mexico Premium Assistance program (NMPA), the premium top-up component of New Mexico's Health Insurance Marketplace Affordability Program (MAP), funded by the Health Care Affordability Fund (HCAF) and administered by the NM Health Care Authority (HCA) via the BeWell Marketplace.

Two components, combined in a single output variable nm_premium_assistance:

  • Base NMPA (≤400% FPL): a sliding-scale state top-up to the federal Premium Tax Credit that caps the household's benchmark (SLCSP) premium contribution at 0%–8.5% of ACA MAGI, with a 10% benchmark gross-up for enrollees at or below 200% FPL.
  • MIH (>400% FPL): the Marketplace Affordability Program for Middle Income Households, which caps the SLCSP cost at a flat 8.5% of income for households above 400% FPL — New Mexico's state backstop for the expired enhanced federal credits.

The implementation covers plan years 2026–2027 (PY2026 authoritative values carried forward to PY2027), integrates into healthcare_benefit_value, and adds a programs.yaml registry entry. All 75 tests across 6 test files pass.

Closes #9219

Regulatory Authority

Source Role
PY2026 MAP Policy & Procedures Manual (HCA, May 8, 2025) Primary: eligibility, Table 1 sliding scale, calculation formulas, $0 floor
PY2026 MAP Addendum #1: Middle Income Households (HCA, Nov 18, 2025) Primary: MIH eligibility, 8.5% cap, effective dates, sunset clause (formula on p.3)
SB 317 (2021), Laws 2021 Ch. 136 Enabling statute: HCAF creation (Sec. 4(B), p.7); Sec. 5(A)(2) ties state income eligibility to APTC-eligible income (p.9)
LFC Program Evaluation 25-01: The Health Care Affordability Fund (June 25, 2025) Cross-check: PY2025 scale (Table 8) — identical to PY2026
OSI/Checkbook APTC analysis (Oct 22, 2025) Cross-check: side-by-side scale (Table 1, p.3), FPL year lag (p.3), rating areas (Table 2, p.4), >400% examples (p.11)

Page anchors are file pages of each PDF, verified against extracted text.

Eligibility

Base NMPA (≤400% FPL)nm_premium_assistance_eligible (Manual p.4):

  1. Eligible to purchase a QHP on the BeWell Marketplace, on-exchange only (proxied through pays_aca_premium inside is_aca_ptc_eligible).
  2. Qualifies for the federal Premium Tax Credit — any tax-unit member is_aca_ptc_eligible (Manual p.4; SB 317 Sec. 5(A)(2), p.9).
  3. Household income at or below 400% FPL (aca_magi_fraction <= 4.0); "consumers with household income over 400% of the FPL do not qualify" for base NMPA (Manual p.6).

MIH (>400% FPL)nm_mih_eligible (Addendum p.2):

  1. Eligible to purchase a QHP on the Marketplace.
  2. Meets all federal PTC eligibility criteria except the household-income requirement. Because is_aca_ptc_eligible embeds the ≤400% income test (which fails above 400% in 2026), the formula uses its non-income internals directly: pays_aca_premium and the married-filing-separately exclusion.
  3. Household income above 400% FPL (aca_magi_fraction > 4.0, sharing the same fpl_limit parameter so the band boundary is defined once).

Both variables use defined_for = StateCode.NM and are gated by their respective in_effect parameters.

Benefit Calculation

Target contribution schedule (Table 1, PY2026) — the household's expected benchmark-premium contribution as a share of ACA MAGI, linearly interpolated within brackets (Manual p.4p.5):

FPL band Target contribution
Up to 150% 0%
150–200% 0%
200–250% 0% → 2% (interpolated)
250–300% 2% → 5% (interpolated)
300–400% 5% → 8.5% (interpolated)
Over 400% Flat 8.5% (MIH, no interpolation)

Encoded as target_contribution_percentage/{threshold, initial, final}.yaml (thresholds [0, 1.5, 2.0, 2.5, 3.0, 4.0]), mirroring the federal gov/aca/required_contribution_percentage structure, with nm_premium_assistance_target_contribution_percentage performing the bracket interpolation over aca_magi_fraction.

Benchmark gross-up (≤200% FPL): for enrollees at or below 200% FPL, the NMPA benchmark is 110% of the SLCSP ("the benchmark plan used to calculate the New Mexico Premium Assistance amount will be 10% above the price of the second lowest cost Silver plan"; Manual p.5). The gross-up affects only the state calculation, never the federal APTC. This is not a no-op even though the target percentage is 0% below 200% FPL — it adds 10% of the SLCSP on top of the SLCSP − APTC residual, which is why the implementation uses the manual's direct-residual formulas rather than Maryland's contribution-gap form. Parameters: benchmark_gross_up/{rate, fpl_limit}.yaml (0.1, 2.0).

Formulas (annualized; the manual states them monthly, dividing annual income by 12; Manual p.5; Addendum p.3):

  • Under 200% FPL: NMPA = max(0, 1.1 × SLCSP − APTC − target% × ACA MAGI)
  • 200.01–400% FPL: NMPA = max(0, SLCSP − APTC − target% × ACA MAGI)
  • Over 400% FPL (MIH): NMPA = max(0, SLCSP − APTC − 8.5% × ACA MAGI) — the Addendum formula has no APTC term because federal APTC is $0 above 400% FPL in the 2026 baseline; subtracting aca_ptc anyway is a no-op in baseline and keeps the formula robust under reform scenarios. Rate parameter: mih/rate.yaml (0.085).

slcsp is a MONTH-period variable, annualized via add(tax_unit, period, ["slcsp"]). ACA MAGI is clamped at zero (max_(aca_magi, 0)) so negative income cannot inflate the top-up. The $0 floor applies in every band: the consumer's net premium cannot fall below $0 (Manual p.6). The manual's selected-plan premium cap is approximated by the SLCSP-based residual, since the selected plan is unknown in the model (the same simplification as Maryland Premium Assistance).

Requirements Coverage

20 of 30 extracted requirements are in scope; all 20 are implemented and tested (see Not Modeled for the rest).

REQ Description Parameter Variable Test
REQ-001 QHP-eligible on BeWell, on-exchange only is_aca_ptc_eligible / pays_aca_premium gates in both eligibility variables eligible.yaml C1, C4
REQ-002 Must qualify for federal PTC (any member) nm_premium_assistance_eligible (tax_unit.any) eligible.yaml C4, C8
REQ-003 Income ≤400% FPL for base NMPA fpl_limit.yaml (4.0) nm_premium_assistance_eligible eligible.yaml C2, C3, C10, C12
REQ-006 MIH: PTC criteria except income, >400% FPL fpl_limit.yaml, mih/in_effect.yaml nm_mih_eligible nm_mih_eligible.yaml (8 cases); amount C7, C9, C16, C17; integration S5, S6, S11
REQ-007 MIH sunset clause (federal cap not extended) mih/in_effect.yaml (clause documented) nm_mih_eligible MIH 2026 cases
REQ-009 Income = ACA MAGI (45 CFR 155.305(f)(i)) aca_magi in nm_premium_assistance all amount tests
REQ-010 Plan year uses prior calendar year FPL aca_magi_fraction (reused) all schedule/eligibility tests
REQ-011 Benchmark = SLCSP, annualized add(tax_unit, period, ["slcsp"]) all amount tests
REQ-012 Table 1 interpolated sliding scale target_contribution_percentage/{threshold,initial,final}.yaml nm_premium_assistance_target_contribution_percentage 18 schedule tests
REQ-013 SLCSP × 1.1 gross-up at ≤200% FPL benchmark_gross_up/{rate,fpl_limit}.yaml nm_premium_assistance amount C1–C3; integration S1, S2
REQ-014 Under-200% formula (1.1×SLCSP − APTC − pct×income) (REQ-013 params) nm_premium_assistance amount C1, C2, C12
REQ-015 200.01–400% formula (SLCSP − APTC − pct×income) nm_premium_assistance amount C3–C5; integration S3, S4
REQ-016 MIH formula (SLCSP − 8.5%×income) mih/rate.yaml (0.085) nm_premium_assistance amount C7, C8; integration S5, S6
REQ-017 $0 floor / premium cap max_(0, ...) in nm_premium_assistance amount C6, C8; integration S6
REQ-019 Base NMPA effective Jan 1, 2026 in_effect.yaml both eligibility variables eligible C6, C7, C11; amount C11, C19
REQ-020 MIH coverage PY2026 mih/in_effect.yaml nm_mih_eligible MIH 2026 cases
REQ-022 SB 317 Sec. 5(A)(2): income tied to APTC eligibility embedded in is_aca_ptc_eligible gate eligible C4
REQ-028 healthcare_benefit_value integration adds entry in healthcare_benefit_value healthcare_benefit_value.yaml Case 7
REQ-029 programs.yaml registry entry programs.yaml (id nm_premium_assistance, agency HCA, prefix gov.states.nm.hca.premium_assistance, verified_years 2026–2027)
REQ-030 Changelog fragment + formatting changelog.d/nm-premium-assistance.added.md ruff format verified

Test totals: 75 passing across 6 files (eligible 12, MIH eligible 8, target percentage 18, amount 19, integration 11, healthcare_benefit_value 7).

Not Modeled

Documented per the scope decision; excluded from the model:

  • REQ-004 — Metal-tier selection (any tier except Catastrophic): benefit is computed off the SLCSP benchmark, not the selected plan.
  • REQ-005 — ICHRA acceptance disqualifies from APTC/NMPA: no ICHRA input variable exists in the model.
  • REQ-008 — MIH enrollment window (Nov 1, 2025 – Jan 15, 2026; SEP after): enrollment mechanics are out of model scope.
  • REQ-018 — QSEHRA offset reducing NMPA to a $0 net premium: no QSEHRA input variable exists.
  • REQ-021 — Funding horizon (FY26 budget; press cites assistance through June 30, 2027): a mid-year end date cannot be represented in a YEAR-period program; handled via the in_effect window instead.
  • REQ-023 — Appropriation caps (~$68M base, $17.3M MIH): discretionary funding limits, not per-household rules.
  • REQ-024 — No consumer year-end reconciliation of NMPA: administrative payment mechanics, no simulation effect.
  • REQ-025 — Native American Premium Assistance (NAPA): requires tribal membership and issuer-level lowest-cost-plan data the model lacks.
  • REQ-026 — State Out-of-Pocket Assistance (SOPA): a cost-sharing (actuarial-value) program, not premium assistance.
  • REQ-027 — MAP Addendum Run black formatting on docs #2 "Puente" program: separate program, out of scope.

Historical Notes

  • PY2025 scale is identical to PY2026: LFC Program Evaluation 25-01 Table 8 (p.14) shows the same 0% / 0% / 0–2% / 2–5% / 5–8.5% schedule for PY2025 (2024 FPL). This PR does not backdate to 2025 (in_effect starts 2026-01-01); backdating would be a follow-up.
  • MIH enactment and conditional effective date: HB2 (2025 regular session, signed Oct 3, 2025) authorized assistance above 400% FPL, funded by a $17.3M HCAF appropriation through HB1 (Addendum p.2). The Addendum contains a conditional clause: it would not take effect if the federal government extended the 8.5% >400% premium cap before January 1, 2026. Congress did not extend the enhanced federal credits, so MIH is live for PY2026. mih/in_effect.yaml encodes this directly (true from 2026-01-01) with the clause documented in its description, rather than deriving it from federal parameters.
  • Carry-forward assumption: PY2026 authoritative values are carried through PY2027 (in_effect true 2026-01-01, false 2028-01-01), matching the Maryland Premium Assistance approach, pending official PY2027 parameters. The carry-forward is documented in the parameter descriptions.

Files Added

changelog.d/
└── nm-premium-assistance.added.md                                  (new)

policyengine_us/parameters/gov/states/nm/hca/premium_assistance/
├── in_effect.yaml                                                  (new)
├── fpl_limit.yaml                                                  (new)
├── benchmark_gross_up/
│   ├── fpl_limit.yaml                                              (new)
│   └── rate.yaml                                                   (new)
├── mih/
│   ├── in_effect.yaml                                              (new)
│   └── rate.yaml                                                   (new)
└── target_contribution_percentage/
    ├── threshold.yaml                                              (new)
    ├── initial.yaml                                                (new)
    └── final.yaml                                                  (new)

policyengine_us/variables/gov/states/nm/hca/premium_assistance/
├── nm_premium_assistance.py                                        (new)
├── nm_premium_assistance_eligible.py                               (new)
├── nm_mih_eligible.py                                              (new)
└── nm_premium_assistance_target_contribution_percentage.py         (new)

policyengine_us/tests/policy/baseline/gov/states/nm/hca/premium_assistance/
├── nm_premium_assistance.yaml                                      (new, 19 cases)
├── nm_premium_assistance_eligible.yaml                             (new, 12 cases)
├── nm_mih_eligible.yaml                                            (new, 8 cases)
├── nm_premium_assistance_target_contribution_percentage.yaml       (new, 18 cases)
└── integration.yaml                                                (new, 11 cases)

Modified:
├── policyengine_us/variables/household/healthcare_benefit_value.py (adds nm_premium_assistance)
├── policyengine_us/tests/policy/baseline/household/healthcare_benefit_value.yaml (NM Case 7)
└── policyengine_us/programs.yaml                                   (registry entry)

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9232   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         7    +2     
  Lines           63       108   +45     
  Branches         1         0    -1     
=========================================
+ Hits            63       108   +45     
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.

@DTrim99

DTrim99 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

Review fixes applied (/review-program/fix-pr)

Ran a full multi-agent review pass (regulatory, references, code patterns, test coverage, and PDF value audit against the PY2026 MAP Manual + Addendum + OSI analysis). 0 critical, 0 value mismatches — the base sliding scale, the <200% SLCSP×1.1 gross-up, the >400% MIH cap, the $0 floor, and every #page anchor verified against source. Applied all should-address items and suggestions:

Code / docs

  • .any()add(...) > 0 house idiom in nm_premium_assistance_eligible.py and nm_mih_eligible.py (behavior-identical member aggregation).
  • benchmark_gross_up/rate.yaml: reworded the description to an approved verb.
  • MIH - aca_ptc term (nm_premium_assistance.py): strengthened the comment documenting it is intentional and inert in the PY2026 baseline (federal APTC is $0 above 400% FPL, so it reproduces the Addendum formula exactly) and retained so the state subsidy nets any APTC a future reform restores above 400% FPL. The audit confirmed this is not a value defect.
  • Added an explanatory comment above the hand-rolled searchsorted within-bracket interpolation.
  • in_effect.yaml: documented that PY2027 carry-forward and the 2028 sunset are modeling assumptions (the MAP Manual covers PY2026 only).

Tests (81/81 NM cases passing)

  • 2028 sunset at the amount level (base band → 0, MIH band → 0), and nm_mih_eligible → false in 2028 (closing the in-effect window on both sides).
  • A MIH case with a non-zero injected aca_ptc exercising the - aca_ptc term (documents the reform-scenario behavior).
  • A mid-bracket interpolation case (275% FPL → 3.5% target).
  • A derived-from-raw-income integration scenario: aca_magi_fraction, aca_ptc, and is_aca_ptc_eligible all derive from raw employment_income, asserting a genuine $2,549.86 state top-up — so a future change to the federal ACA chain would be caught, not silently pass.

No parameter values or formula logic changed. CI green.

🤖 Generated with Claude Code

@DTrim99
DTrim99 marked this pull request as ready for review August 10, 2026 13:00
@DTrim99
DTrim99 requested a review from hua7450 August 10, 2026 13:00

@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.

Program Review

PR #9232 — New Mexico Premium Assistance (BeWell NM state subsidy: base NMPA + Middle Income Households)

Author: DTrim99. Year reviewed: 2026–2027. Scope: PR changes only (9 parameters, 4 variables, 5 NM test files + 1 household test case, healthcare_benefit_value.py, programs.yaml, changelog).

This is a strong implementation that visibly learned from the sibling reviews: the amount formula uses the correct direct-residual shape max_(0, benchmark − aca_ptc − target_pct × income) (confirmed against LFC Chart 5's worked example, not the capped-gap shape that broke earlier PRs when APTC = 0), the author self-reviewed and documented deliberate deviations, and reference quality is unusually high — every one of the ~20 #page= anchors across all four cited PDFs was individually verified correct, including the parameter titles that split Table 1 exactly at its real page break. All hand-computed test expectations (23 amount, 18 schedule, 12+9 gate, 12 integration cases) reproduced exactly. Three critical findings remain, led by a wiring omission that is the third occurrence of the same defect in this PR series.

Source Documents

Reviewed head SHA: 61957da
Mode: full

# Document Pages URL
1 PY2026 MAP Policy & Procedures Manual (HCA, May 8, 2025) 17 https://api.realfile.rtsclients.com/PublicFiles/6c91aefc960e463485b3474662fd7fd2/15a6c1dd-e12b-4ffb-95af-bb54262218f3/FINAL-PY26%20%20MAP%20Policy%20and%20Procedures%20Manual.pdf
2 PY2026 MAP Addendum #1: Middle Income Households (HCA, Nov 18, 2025) 3 https://api.realfile.rtsclients.com/PublicFiles/6c91aefc960e463485b3474662fd7fd2/50c9a4d0-d5c8-48aa-8b9a-5c43e8fa23bc/Addendum%201_MAP%20P&P%20Middle%20Income%20Household.pdf
3 SB 317 (2021), Laws 2021 ch. 136 18 https://www.nmlegis.gov/Sessions/21%20Regular/final/SB0317.pdf
4 LFC Program Evaluation 25-01 HCAF (June 25, 2025) 38 https://www.nmlegis.gov/handouts/LHHS%20062525%20Item%2011%20HCAF.pdf
5 OSI/Consumers' Checkbook APTC analysis (Oct 22, 2025) 13 https://www.osi.state.nm.us/wp-content/uploads/2025/10/Summary-of-Findings-APTC-Analysis-PY2025-2026-FINAL-2025-10-22.pdf

Discovered authorities (found during verification; should be added to the PR's citations):

Critical (Must Fix)

C1. nm_premium_assistance is not registered in parameters/gov/household/household_health_benefits.yaml.
The PR adds it to variables/household/healthcare_benefit_value.py:23 but not to the parameter list read by variables/household/income/household/household_health_benefits.py:20 — the only path into household_benefits/household_net_income when include_health_benefits_in_net_income is on. Siblings co_omnisalud and or_healthier_oregon_cost appear in both lists; the same omission was CRITICAL in VT #9245 and MD #9218 (third occurrence). Fix: add - nm_premium_assistance to the 2022-01-01 list (after co_omnisalud) plus a test exercising household_health_benefits with the flag on. [code C1; codepath-3 A CONFIRMED]

C2. Neither eligibility gate carries the federal filing requirement — non-filer units absorb the entire federal PTC as state benefit.
aca_ptc.py:25-28 gates on tax_unit_is_filer (IRC § 36B(a)), but is_aca_ptc_eligible does not, and neither nm_premium_assistance_eligible.py:28 nor nm_mih_eligible.py:30-35 adds it. Hand-traced: a non-filer at 250% FPL with $12,000 SLCSP gets $11,217.50 of NMPA vs $2,519.65 for an identical filer — the $8,697.85 delta is exactly the federal share, rebooked as state cost (worse below 150% FPL, where the state pays the full 1.1× benchmark). Legally supported gate: Manual p.4 item 2 "qualify for the federal Premium Tax Credit" (#page=4); Addendum p.2 "all eligibility criteria for the federal PTC except for household income" — filing is not an income requirement. Fix: add & tax_unit("tax_unit_is_filer", period) to both gates + one exposing test per gate. [regulatory F3; tests F4; codepath-2 CONFIRMED]

C3. PY2027 flips the benchmark gross-up boundary to strictly < 200% FPL; the repo codes <= for all years.
nm_premium_assistance.py:42-46 uses magi_frac <= p.benchmark_gross_up.fpl_limit (2.0). Correct for PY2026 ("up to 200%" prose + companion band starting 200.01), but the PY2027 manual p.5 states "under 200% (< 200%)" three times and its plain-SLCSP equation claims "≥ 200 and ≤ 400%". Because aca_magi_fraction floor-truncates, every unit with true income in [200%, 201%) lands exactly on 2.00 and receives, in 2027, a 10%-of-annual-SLCSP overstatement (target rate is 0 at that knot, so nothing offsets it). Fix: era-toggled inclusivity boolean flipping 2027-01-01 (not a 1.9999 threshold), and update benchmark_gross_up/fpl_limit.yaml's "at or below" description + add the PY2027 citation. [regulatory F2; mismatch-1 Claim 2 CONFIRMED MISMATCH at 600 DPI]

Should Address

A1. The selected-plan $0 cap (Manual p.6; PY2027 p.5) is unimplemented — the ≤200% FPL band overshoots by a guaranteed 10% of the benchmark, and the docstring understates this.
nm_premium_assistance.py:51 implements only a floor; the manual caps combined federal+state assistance at the selected plan's gross premium. At ≤200% FPL (target 0%, gross-up on) even a benchmark purchaser is over-credited by 0.1 × SLCSP; the 200–400% band overshoots for below-benchmark purchasers. PE has no plan-selection input, so the honest repairs are (a) cap the payable amount at slcsp − aca_ptc while keeping the grossed-up entitlement, or (b) rewrite the docstring to state a one-sided, non-negative bias of up to 10% of annual SLCSP — "approximated by the SLCSP-based residual" describes an approximation the ≤200% branch does not implement. Bias direction: modeled NMPA (and state cost) too high; never too low. [pdf-manual X1; mismatch-2 item 1 CONFIRMED; mismatch-1 Claim 3 confirms it spans PY2027]

A2. Internal scaffolding markers (REQ-001..REQ-020, SA1–SA4) remain throughout all five test files.
E.g. nm_premium_assistance.yaml:2,23,98,148,174,201,227,281,520,578; nm_mih_eligible.yaml:2,32,77,163,184; integration.yaml:172,341,364. Per the established convention (CT SSP lesson; same cleanup in #9245/#9218), strip the tokens and keep the surrounding prose. [code C2; tests F2; regulatory F7]

A3. Take-up asymmetry in healthcare_benefit_value (variables/household/healthcare_benefit_value.py:16-25).
The federal credit enters via assigned_aca_ptc (gated on takes_up_aca_if_eligible) while nm_premium_assistance enters ungated — yet the NM formula nets out the full aca_ptc entitlement, so a modeled non-taker gets $0 federal but ~$3,025 state (example at 250% FPL), an internally inconsistent state for someone not enrolled on BeWell. Inert at the default take-up value; materializes only in microsim where take-up is set false. Bias direction: overstates NM benefits/net income for non-taker units by the residual amount. Preferred fix: an assigned_nm_premium_assistance twin (receipt-vs-eligibility pattern); the co_omnisalud precedent is weaker than it looks (its population is PTC-ineligible, so the flag is vacuous there). [regulatory F4; codepath-3 B CONFIRMED]

A4. PY2027 is now a sourced year — update citations, comments, and the uniformity of disclosure.
The FINAL PY2027 manual (June 16, 2026) confirms every carried-forward value (Table 1 p.4 identical; gross-up 10% p.5; flat 8.5% at ≥400% merged into base) except the C3 boundary. Replace the "PY2027 … is a modeling carry-forward assumption, not a sourced value" comments in in_effect.yaml, mih/in_effect.yaml, mih/rate.yaml, target_contribution_percentage/*.yaml with PY2027-manual citations for the 2027 era; also add the disclosure/citation to the three files that currently lack any (fpl_limit.yaml, benchmark_gross_up/{rate,fpl_limit}.yaml). programs.yaml verified_years: "2026-2027" becomes defensible once C3 is era-split and A6/A7 are documented. [regulatory F1; references S1/S2; mismatch-1]

A5. Re-cite the MIH component's legal authority and fix the "sunset clause" mislabel.
mih/in_effect.yaml:3-8 calls the Addendum's condition precedent ("if the federal government extends … before January 1, 2026, this Addendum will not take effect") a sunset; it is not, and the Addendum prints no end date. The real authority chain, now verified: NMSA 1978 § 59A-23F-12(A)(2)(b) as amended by Laws 2025 (1st S.S.), ch. 1, § 2 (HB 2, permanent, no sunset) + 8.401.2 NMAC (permanent 5/5/2026) + HB 1 § 4(C) FY26 $17.3M + FY27 GAA $38.1M. Keep 2028-01-01: false as the no-PY2028-guidance-yet convention but say so; scope the PR body's SB 317 Regulatory Authority row to base NMPA and give MIH its own row (SB 317 Sec. 5(A)(2) as enacted did not authorize >400% payments). Also recast the - aca_ptc defense: the term matches codified 8.401.2.8(D)(1)(a) NMAC verbatim — cite that instead of inertness alone. [pdf-mih MM4-A; pdf-statute X-5a; mismatch-3 item 3; ext-1; ext-2]

A6. Puente Health is unmodeled, and in 2027 the model's own gates zero out the population it covers — document as Not-Modeled and qualify the coverage claim.
PY2027 manual pp. 2, 7–8: Puente (began 2026-01-01, <100% FPL; expands to ≤400% FPL for PY2027) backfills lawfully-present non-citizens who lose federal PTC under P.L. 119-21, pays through the NMPA machinery on Table 1, and PY2027 MAP eligibility item 2 (p. 4) admits Puente enrollees to NMPA by name. The repo already encodes the federal-side losses (below_fpl_immigration_exception_in_effect false 2026; ineligible_immigration_statuses 2027 restriction), so the model shows these New Mexicans losing everything while 8.401.2.11 NMAC actually backfills them. Bias direction: understates NM state benefits for this population — small slice in 2026, the whole ≤400% FPL lawfully-present-non-citizen marketplace population in 2027. Also note the §73101 (manual) vs §71301 (repo parameter) citation discrepancy when documenting. Implementation can be a follow-up issue; silence cannot. [regulatory F5; mismatch-1 Claim 4 CONFIRMED; codepath-4]

A7. Native American enhancements are unmodeled and undocumented.
Manual Table 2 (p.5) replaces Table 1 for tribal members (0% to 300% FPL; 1–8.5% at 300–400%, on the lowest-cost plan per issuer), and the Premium Buy-down (pp. 6–7) guarantees $0 premiums for Zero Cost Sharing Variant qualifiers; both continue in PY2027. NM's ~10%+ AI/AN population makes this non-trivial statewide. Minimum: a Not-Modeled entry in the PR description and variable docs; ideally a follow-up issue (the 1–8.5% scale fits the existing interpolation machinery if a tribal-membership variable exists). [regulatory F6; pdf-manual missing-1/2]

A8. PR-body citation corrections.
(a) "HCAF creation (Sec. 4(B), p.7)" is wrong on both halves — the fund is created by Sec. 4(A) on printed p.6; correct form: "created at Sec. 4(A) (#page=6); premium-reduction purpose at Sec. 4(B)(1) (#page=7)". (b) "PY2025 scale (Table 8)" — the table's printed title is "(2024)" with no plan year; say "LFC Table 8 (2024 vintage)" or cite the PY2025 HCAF P&P directly; same edit in the in_effect.yaml:7-8 comment (this label is load-bearing for any future backdating decision). (c) Do not cite OSI p.1's note for program dates — its "HB3" is a bill-number error and "through June 2026" is the FY26 appropriation window, not a sunset. [pdf-statute X-1/X-2; mismatch-3 items 1–2; ext-1]

A9. Deprecated documentation = class attribute on all four new variables.
nm_mih_eligible.py:15, nm_premium_assistance.py:17, nm_premium_assistance_eligible.py:13, nm_premium_assistance_target_contribution_percentage.py:15. New variables should use reference + inline comments (Kentucky SSP lesson; skill convention); move the substantive prose (e.g., the SLCSP-residual note — rewritten per A1) into inline comments. [code M1; references G2; regulatory S3]

A10. Add the derived boundary-pair tests at the 400% line.
The injected 4.00-boundary tests (nm_premium_assistance_eligible.yaml Case 3; nm_premium_assistance.yaml Cases 5/15) assert a state unreachable in the 2026 baseline (is_aca_ptc_eligible: true at truncated 4.00 cannot derive). Add the derived pair: NM single filer 2026, employment_income: 62_700 (→ 4.00 → all three benefits $0, documenting the upstream hole) and 62_800 (→ 4.01 → MIH-eligible). Without it, a future flip of either boundary operator is invisible to the suite. [tests F1; codepath-1]

Suggestions

S1. Trim the two "Do not remove" / "Do not simplify" meta-comments (nm_premium_assistance.py:43-51, nm_premium_assistance_target_contribution_percentage.py:32-38) to 1–3-line # NOTE:s stating the facts — the - aca_ptc term matches 8.401.2.8(D)(1)(a) NMAC (per A5); core scales cannot express within-band slopes. [code M2]

S2. Remove the unreachable defensive branches in the bracket interpolation (nm_premium_assistance_target_contribution_percentage.py:53-66): the clip guarantees bracket_idx + 1 is valid, so the bracket_start + 1 fallback and the bracket_width > 0 guard are dead code. [code m1]

S3. Drop trailing .0 on integer YAML values (fpl_limit.yaml, benchmark_gross_up/fpl_limit.yaml, threshold.yaml:7-10) per repo convention. [code m2]

S4. Consider renaming nm_mih_eligiblenm_premium_assistance_mih_eligible per the {state}_{program}_{component} convention (move the test file with it). [code m3]

S5. Percent-encode the raw & in the Addendum href (P%26P) in mih/in_effect.yaml, mih/rate.yaml, nm_mih_eligible.py, nm_premium_assistance.py in one pass. [references G1]

S6. Optional test coverage: a derived Medicaid-eligible exclusion case (no injected booleans), a $0-floor case driven purely by the gross-up (aca_ptc ≥ 1.1 × slcsp at ≤200% FPL), a negative-MAGI mirror on the MIH branch, one scenario deriving slcsp from the rating-area tables (assert > 0 rather than an exact dollar), and aligning the mutually inconsistent injected aca_magi/aca_magi_fraction pairs (amount Cases 1 and 7). [tests F3, F5–F8]

S7. Cite the stable HCA landing page (https://www.hca.nm.gov/health-insurance-marketplace-affordability-program/) alongside the GUID CDN URLs in at least one parameter, and add a one-line comment on fpl_limit.yaml noting its dual use (base ceiling via <=, MIH floor via >) so the p.6 citation is not read as MIH authority. [regulatory S4; mismatch-2 item 3]

Verified correct

  • Table 1 sliding scale corroborated across four sources: threshold [0, 1.5, 2.0, 2.5, 3.0, 4.0] / initial [0, 0, 0, .02, .05] / final [0, 0, .02, .05, .085] exactly match PY2026 Manual Table 1 (pp. 4–5), OSI Table 1 (p. 3), LFC Table 8 (600-DPI re-check, no digit differs), and PY2027 manual Table 1 (p. 4).
  • Within-band linear interpolation confirmed to the dollar: repo schedule predicts a $295.36 monthly delta between 315% and 385% FPL; OSI Table 5 prints $295 in both non-floored rating areas. MIH 8.5% independently implied at 8.52% by OSI Table 6 (Δ $330–331 vs predicted $330.21).
  • Formula shape is the correct direct residual (LFC Chart 5 worked example: NMPA is the residual after the full federal credit; consumer pays exactly 2.00% at 250% FPL), and annualization of the printed monthly equations is exact (×12 both sides, no double division; slcsp YEAR-injection semantics verified).
  • The MIH − aca_ptc term matches codified law: 8.401.2.8(D)(1)(a) NMAC prints "minus monthly federal premium tax credit" in the formula governing both base and MIH enrollees (and 8.401.2.11(D)(1)(a) removes it precisely for those who lost federal eligibility) — the repo matches the rule; only the Addendum's simplified restatement omits it.
  • The MIH 2026–2027 window is corroborated: permanent statute (HB 2 amendment, no sunset) + permanent rule (5/5/2026) + FY26 $17.3M and FY27 $38.1M appropriations + PY2027 Table 1's flat "≥ 400 | 8.5%".
  • 400% boundary handoff is value-continuous: base inclusive at 4.00, MIH strictly above; the interpolated target reaches 8.5% exactly at 4.00, equal to the MIH rate (tests pin both sides). select() conditions are mutually exclusive by construction.
  • MIH eligibility decomposition is faithful: pays_aca_premium + MFS exclusion reproduces every non-income component of is_aca_ptc_eligible (the only missed federal criterion — filing — was never inside it; that is C2).
  • All #page= anchors verified correct; all four reference URLs live (HTTP 200); api.realfile.rtsclients.com confirmed as HCA's own canonical file host. No hardcoded policy values; no orphan parameters; changelog correct; ruff clean; entity/period usage clean; boolean test margins compliant (0.01/0.0001, no margin ≥ 1).

Investigated and cleared

  • OSI "through June 2026" MIH sunset — cleared: it is the FY2026 appropriation window (HB 1 § 4(C)), not a program end date, and OSI's "HB3" is a bill-number error (the special session's bill is HB 2). [ext-1]
  • "The MIH − aca_ptc term deviates from the printed formula" — cleared on codified grounds: 8.401.2.8(D)(1)(a) NMAC prints the term. [ext-1; pdf-mih MM4-C]
  • "SB 317 does not authorize MIH" — correct as to the 2021 text, but moot: Laws 2025 (1st S.S.), ch. 1, § 2 (HB 2) amended NMSA 59A-23F-12(A)(2) to add prong (b). Documentation scoping remains (A5). [ext-2]
  • PY2026 Manual's three ">400% = no assistance" statements vs the MIH branch — false positive: the Addendum's own Background names the base manual as under-400% guidance and rests the extension on new authority; superseded scope, not contradiction. [mismatch-2 item 3]
  • SB 317's income-only eligibility vs the repo's full is_aca_ptc_eligible gate — resolved: Manual p.4 item 2 requires full PTC qualification; the manual controls, and the base/MIH two-gate split is textually correct on both sides. [mismatch-2 item 2]
  • Whether the $0 cap and non-EHB rules extend to MIH — resolved: the non-EHB rule is scoped to the (unmodeled) Native American Premium Buy-down; the $0 cap paragraph attaches to the base equations only. The MIH branch matches its printed source; A1 is a base-branch finding. [mismatch-2 item 4]
  • "Laws 2021 Ch. 136" designation — confirmed correct via the nmlegis bill history and HB 2's enacting clauses (it simply is not printed in the SB 317 PDF). [ext-2]
  • MIH condition precedent at 2026-01-01 — confirmed satisfied: Congress adjourned December 2025 without extending the enhanced PTC (expired Dec 31, 2025), so mih/in_effect: true at 2026-01-01 is correct. [regulatory V8]
  • Unreachable low Table 1 bands — mirrors reality (Medicaid expansion excludes those households from PTC/NMPA); correctly not flagged. [regulatory V13]

Pre-existing upstream issues

  • The [400%, 401%) FPL hole — CONFIRMED but inherited, not introduced. aca_magi_fraction truncation puts true incomes in [4.00, 4.01) at exactly 4.00, where gov/aca/ptc_income_eligibility.yaml's 4.00 bracket flips false from 2026 (inclusive lower bound), so those units get $0 federal PTC, $0 base NMPA, $0 MIH — despite §36B(c)(1)(A)'s "does not exceed 400 percent" implying exactly 400% stays eligible. The NM gate pair is a correct, gap-free partition; once upstream returns true at 4.00, the hole closes with zero NM changes. This is the third PR in the series affected — file the upstream issue against ptc_income_eligibility rather than patching state-side. A10's derived tests pin current behavior in the meantime. [codepath-1; pdf-mih MM4-D; tests F1]

PDF Audit Summary

Source Matches Mismatches confirmed Cleared / false positives Notes
PDF 1 — PY2026 Manual 15 1 (X1 selected-plan cap → A1) 1 (X2 >400% contradiction → superseded) Zero numeric parameter discrepancies; all anchors correct
PDF 2 — MIH Addendum 12 1 (MM4-A "sunset" label → A5) 2 (MM4-B end date → corroborated; MM4-C −aca_ptc → codified) MM4-D confirmed but upstream-blamed
PDF 3 — SB 317 8 (M-2 rescinded) 2 (X-2 Sec. 4(A)/p.6; X-5a scoping → A5/A8) 1 (X-3 chapter number → confirmed) X-4 OSI-vs-HCA framing folded into A5
PDF 4 — LFC 25-01 incl. above 1 (X-1 Table 8 vintage → A8) Table 8 values exact at 600 DPI
PDF 5 — OSI analysis 2 differential checks exact 1 (fp1 note → FY26 window) Tables 5/6 reliable; fp7–8 narrative internally inconsistent, do not cite
PY2027 Manual (discovered) 3 claims confirmed 1 (gross-up < boundary → C3) Makes PY2027 a sourced year (A4)

Validation Summary

Validator Result
Regulatory research (Phase 4) 0 critical, 7 should-address, 4 suggestions; 14 verified-correct items; discovered the PY2027 manual
Reference checker (Phase 4) 0 critical, 3 should-address, 3 suggestions; all 12 value/page pairs verified; all URLs HTTP 200
Code-pattern audit (Phase 4) 2 critical, 2 major, 3 minor; 14 verified-clean categories
Test coverage audit (Phase 4) 0 critical, 2 should-address, 6 suggestions; all 74 NM case expectations reproduced by hand
PDF audits (Phase 4, 3 agents) 36 matches, 11 raw mismatches → 4 survived verification (C3, A1, A5-label, A8-citations)
Verification (Phase 5, 9 agents) 3 mismatch verifiers, 4 codepath tracers, 2 external-authority verifiers; every disputed claim adjudicated

Branch Status

The branch is 40 commits behind main (4 ahead). Recommend a rebase onto current main before merge. Staleness did not affect any finding (the PR touches only new NM files plus two shared registration points, both re-verified against the snapshot). CI: 33/33 checks passing.

Review Severity

REQUEST_CHANGES — three confirmed criticals: the household_health_benefits.yaml registration alone forces it (silent net-income undercount under the health-benefits flag, third occurrence in this PR series); the non-filer gate inflates modeled state cost by the full federal PTC per affected unit; and the PY2027 gross-up boundary contradicts the now-published PY2027 manual in a claimed-verified year.

Next Steps

  1. Run the fix-pr workflow (/complete:fix-pr) against this report: C1–C3 first, then A1–A10 (A2's marker strip and A4/A5's citation updates are mechanical; A6/A7 are documentation-only in this PR).
  2. File the upstream issue for the ptc_income_eligibility 4.00 boundary (pre-existing; affects federal PTC as well as all three state top-up PRs).
  3. Rebase onto main; re-run CI; verify the new household_health_benefits test passes with the flag enabled.
  4. On the next annual cycle: extend in_effect/mih/in_effect when PY2028 guidance issues (8.401.2.8(A) NMAC requires annual secretary guidance; FY28 GAA is a 2027-session event).

@DTrim99

DTrim99 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

Review fixes applied (/fix-pr) — thanks @hua7450

Applied everything: all 3 criticals, all 10 should-address items, and all 7 suggestions. 90 NM tests pass; parameter values were untouched (they audited clean). Highlights:

Critical

  • C1 — second registration list. Registered the benefit in household_health_benefits.yaml (it was only in healthcare_benefit_value.py), so it reaches household_health_benefits/net income under the health-benefits flag. Added a flow-through test.
  • C2 — filer gate. Added & tax_unit_is_filer to both nm_premium_assistance_eligible and nm_premium_assistance_mih_eligible. Verified: a non-filer at ~250% FPL now gets $0 (was absorbing the full federal PTC as state cost); a filer gets the correct residual.
  • C3 — PY2027 gross-up boundary. Era-toggled the benchmark gross-up inclusivity via a new boundary_inclusive parameter (2026 <= 200%, 2027 < 200% per the FINAL PY2027 MAP manual) — not a 1.9999 hack. Verified at exactly 200% FPL: 2026 $550 (gross-up on) vs 2027 $500 (off), the difference being the withdrawn 10%.

Should-address

  • A1 — disclosed the unimplemented selected-plan $0 cap as a one-sided ≤10%-of-SLCSP high bias in the docstring (kept the correct direct-residual formula; chose disclosure over the cap option since capping would neutralize the gross-up — happy to switch if you prefer).
  • A3 — added the assigned_nm_premium_assistance take-up twin + takes_up_nm_premium_assistance_if_eligible flag (mirroring assigned_aca_ptc); both benefit lists now use the twin, so a modeled non-taker no longer receives state benefit with $0 federal. Verified: takeup=false → assigned $0.
  • A4/A5/A8 — cited the FINAL PY2027 MAP manual for the 2027 era; fixed the MIH "sunset" mislabel and re-cited its real authority (NMSA 59A-23F-12(A)(2)(b) via HB 2 + 8.401.2 NMAC + HB 1/GAA appropriations); corrected the SB 317 §4(A)/p.6 and LFC Table 8 (2024-vintage) citations; the − aca_ptc term now cites 8.401.2.8(D)(1)(a) NMAC verbatim.
  • A9/S1/S2/S4reference over deprecated documentation=; trimmed meta-comments; removed dead interpolation branches; renamed nm_mih_eligiblenm_premium_assistance_mih_eligible (variable + test). A2 — stripped all REQ/SA scaffolding markers. A10 — derived 400%-boundary pair.

Suggestions

S3 integer formatting, S5 &%26 in hrefs, S6 coverage (derived Medicaid-exclusion, gross-up $0-floor, negative-MAGI MIH mirror, derived-SLCSP rating-area), S7 HCA landing-page + fpl_limit dual-use note.

Not-modeled → follow-up issues

Rebased onto main; CI re-running.

@hua7450

hua7450 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

rebase and solve merge conflicts, then it should be good.

DTrim99 and others added 5 commits August 11, 2026 10:15
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Use add(...) > 0 instead of tax_unit.any(members(...)) in
  nm_premium_assistance_eligible.py and nm_mih_eligible.py (house idiom;
  behavior-identical)
- benchmark_gross_up/rate.yaml: approved-verb description
- nm_premium_assistance.py: strengthen the MIH -aca_ptc comment (intentional,
  inert in the PY2026 baseline where federal APTC is $0 above 400% FPL,
  retained for reform-robustness); comment the searchsorted interpolation
- in_effect.yaml: document the PY2027 carry-forward / 2028-sunset assumption
- Tests: 2028 amount-level sunset (base + MIH), 2028 nm_mih_eligible, a
  MIH case with non-zero APTC exercising the -aca_ptc term, a mid-bracket
  interpolation case, and a derived-from-raw-income integration scenario
  asserting a genuine $2,549.86 top-up (81/81 NM tests passing)

No parameter values or formula logic changed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Critical:
- C1: register the benefit in household_health_benefits.yaml (via the new
  assigned twin), not only healthcare_benefit_value.py — the second list feeds
  household_health_benefits/net income under the health-benefits flag.
- C2: add the federal filing requirement (tax_unit_is_filer) to BOTH eligibility
  gates; without it a non-filer absorbed the entire federal PTC as state cost.
- C3: era-toggle the benchmark gross-up FPL boundary (new boundary_inclusive
  param): PY2026 is <= 200% FPL, PY2027 is strictly < 200% per the FINAL PY2027
  MAP manual, so a unit truncating to exactly 2.00 no longer gets a phantom
  10%-of-SLCSP gross-up in 2027.

Should-address / suggestions:
- A1: disclose the unimplemented selected-plan $0 cap as a one-sided, non-
  negative bias of up to 10% of annual SLCSP at <=200% FPL (docstring; the
  formula shape is otherwise correct).
- A3: add the assigned_nm_premium_assistance take-up twin + takeup flag
  (mirroring assigned_aca_ptc); wire both benefit lists to the twin.
- A4/A5/A8: cite the FINAL PY2027 MAP manual for the 2027 era; fix the MIH
  "sunset" mislabel and re-cite its authority (NMSA 59A-23F-12(A)(2)(b) via HB 2,
  8.401.2 NMAC, HB 1 appropriations); correct the SB 317 Sec. 4(A)/p.6 and LFC
  Table 8 (2024-vintage) citations; -aca_ptc cites 8.401.2.8(D)(1)(a) NMAC.
- A9/S1/S2/S4: reference over documentation=; trim meta-comments; remove dead
  interpolation branches; rename nm_mih_eligible -> nm_premium_assistance_mih_
  eligible. A2: strip REQ/SA test markers. S3/S5/S7: formatting/URL/citation.
- A10: derived 400%-boundary pair; C1/C2/C3 exposing tests; take-up-false tests.

Unmodeled scope documented; Puente Health (#9265) and Native American
enhancements (#9266) filed as follow-ups. A8 (federal 400%/truncation boundary)
is the shared upstream issue #9264; no gov/aca change here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@DTrim99
DTrim99 force-pushed the nm-premium-assistance branch from 9f10ecc to 87520e0 Compare August 11, 2026 14:25
@DTrim99
DTrim99 requested a review from hua7450 August 11, 2026 15:48
# Conflicts:
#	policyengine_us/programs.yaml
#	policyengine_us/tests/policy/baseline/household/healthcare_benefit_value.yaml
#	policyengine_us/tests/policy/baseline/household/household_health_benefits.yaml
@hua7450
hua7450 merged commit 7f373c0 into main Aug 11, 2026
33 checks passed
@hua7450
hua7450 deleted the nm-premium-assistance branch August 11, 2026 20:43
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.

Model New Mexico Premium Assistance (full ARPA-schedule backfill incl. >400% FPL 8.5% cap)

2 participants