Skip to content

Decide NJ Health Plan Savings' 600% ceiling on the exact FPL ratio and follow DOBI's band edges - #10323

Open
MaxGhenis wants to merge 4 commits into
mainfrom
nj-njhps-exact-fpl-ratio
Open

MaxGhenis wants to merge 4 commits into
mainfrom
nj-njhps-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.

Review fixes (2026-11-18)

  • nj_njhps_eligible no longer repeats the income band. nj_njhps_member_eligible applies it, and the tax unit relies on having an eligible member.
  • Tax-unit eligibility Cases 11-17 supplied nj_njhps_member_eligible, which would now skip the band. They supply pays_aca_premium instead, so the member gate tests the income.
  • Amount Cases 7, 9, 11 and 13 now sit just below each band edge (149.99%, 199.99%, 249.99% and 399.99% of the poverty line, paying $240, $480, $600 and $1,200 a year), so every edge is pinned from both sides.
  • Modal run pa-10323-y at cbf7d994f3: the four NJHPS YAML files, healthcare_benefit_value.yaml, household_health_benefits.yaml and test_claimable_filer_ptc_invariants.py all pass.

Update onto current main (2026-11-18)

  • Merged upstream/main. Max's commit stays; nothing was rebased or force-pushed. Two files conflicted, nj_njhps.yaml and nj_njhps_member_eligible.yaml, because both sides added cases at the end. The merge keeps this PR's cases and main's joint-return cases.
  • Both eligibility gates 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 prior-year guideline for the section 36B tax family. The division runs in float64.
  • The 62 fixtures that pinned tax_unit_fpg for the prior year now pin aca_fpg for the coverage year.
  • Two expected values changed. main's joint-return cases in nj_njhps.yaml (the claimable spouse as head, and as spouse) go from $240 to $480. Their income, $23,475, is exactly 150% of the one-person guideline, and DOBI's table puts that in "At least 150% FPL but less than 200% FPL" at $40 a month.
  • healthcare_benefit_value.yaml Case 20 and household_health_benefits.yaml Case 19 supplied only aca_magi_fraction, which the gates no longer read. They now supply aca_magi and aca_fpg at the same ratios (140% and 300%). Their expected values are unchanged.
  • New cases cover a joint return with one claimable spouse, where the tax family of one is smaller than the tax unit of two:
    • Tax-unit eligibility Case 15: $93,900 is eligible (600% of $15,650).
    • Tax-unit eligibility Case 16: $93,900.47 is ineligible (600.003% of $15,650, though 444% of the whole unit's $21,150).
    • Tax-unit eligibility Case 17: $23,475 is eligible (150% of $15,650, though 111% of $21,150, below the floor).
    • Member eligibility Cases 17 and 18: the spouse who can't be claimed is a member at $93,900 and not at $93,900.47. The claimable spouse is never a member.
    • Amount Cases 33 and 34: $600 at $93,900 and $0 at $93,900.47.
  • The sources imply the guideline year. They leave the family-size point open.
    • Guideline year: no New Jersey source I found defines the poverty level, and DOBI's table says only "Federal Poverty Level Range". The published dollar limits match aca_fpg's one-year lag. DOBI's July 2026 release gives "$93,900 for an individual and $192,900 for a family of four", 600% of the 2025 guidelines. Get Covered NJ, during open enrollment for 2027, gives $95,760 and $198,000, 600% of the 2026 guidelines.
    • Family size: Get Covered NJ applies the limit to "Tax households" but doesn't define the term or say whether a filer who can be claimed on another return counts. Leaving that filer out, as aca_fpg does, is a modeling choice on that point. The joint-return cases above pin that choice, not a New Jersey rule.
  • The 138% floor stays, as the project lead ruled, though DOBI's table has no lower bound. Filing gates and 2027 parameter references are left for later changes.
  • The DOBI table is Section 2, item 7 of the filing requirements. Section 7 of that document covers stand-alone dental plans, so the reference title and comment in pmpm.yaml are corrected.
  • Modal run pa-10323-a: all 127 cases pass across the four NJHPS YAML files (86), 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 at 4fc97eec26, neither pushed:
    • Restoring the old denominator (pa-10323-b) fails 33 cases: integration Scenarios 2, 4 and 10; amount Cases 1, 2, 6-9, 16-18, 28-30 and 34 and main's two claimable-spouse cases; tax-unit eligibility Cases 1, 3, 5, 10, 16 and 17; member eligibility Cases 1, 5, 7, 10, 11 and 18 and main's two claimable-spouse cases; and healthcare_benefit_value.yaml Case 20.
    • Restoring main's truncated gates and band thresholds (pa-10323-c) fails 15 cases: integration Scenario 1; amount Cases 6, 8, 10, 12, 32 and 34 and main's two claimable-spouse cases; tax-unit eligibility Cases 12, 13 and 16; member eligibility Cases 14, 15 and 18.
  • A numpy-only check of the arithmetic, not committed, compared the float32 band lookup and the float64 gates with an exact-rational reading of DOBI's table at every cent within $3 of each edge, for family sizes 1-12 and the 2025 and 2026 guidelines: 86,544 incomes, 0 mismatches.
  • Not rerun: the differential sweep below.

Bug

DOBI's 2027 Rate Filing Requirements, Section 2, item 7 tell carriers to file "based on the subsidy amounts from plan year 2026 as shown in the table below", and the table's "Federal Poverty Level Range" column reads: "Less than 150% FPL" $20; "At least 150% FPL but less than 200% FPL" $40; "At least 200% FPL but less than 250% FPL" $50; "At least 250% FPL but less than 400% FPL" $100; four $50 rows from "At least 400% FPL" to "At least 550% FPL but less than or equal to 600% FPL"; "Above 600% FPL" $0. Two defects followed from comparing the truncated aca_magi_fraction:

  1. 600% ceiling. nj_njhps_member_eligible and nj_njhps_eligible compared the fraction with <= 6.0, and truncation maps 600.00%-600.99% to 6.00, so all of it passed. NJHPS does not require federal PTC eligibility (the federal credit ends at 400%), so this changed results end to end.
  2. Band edges. pmpm used thresholds 1.5001, 2.0001, 2.5001 and 4.0001 (upper-inclusive, from the 2021 Treasury addendum's "From 150% through 200%" wording, which assigns 150% to two bands). Income exactly at 150%, 200%, 250% or 400% took the lower band, and truncation stretched that to the whole point above each edge. DOBI's table puts all of those in the higher band.

No source prescribes truncating the percentage. The 138% floor (">=") is unaffected by truncation.

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

Income Exact % of FPL aca_magi_fraction Main Here
$23,475 150.000% 1.50 $20/mo $40/mo
$23,630.56 150.994% 1.50 $20/mo $40/mo
$93,900 600.000% 6.00 eligible, $50/mo eligible, $50/mo
$93,900.47 600.003% 6.00 eligible ineligible
$94,055.56 600.994% 6.00 eligible ineligible

Fix

  • Both eligibility gates read the exact ratio max(aca_magi, 0) / aca_fpg, divided in float64, the pattern of Decide CA Premium Subsidy eligibility on the exact FPL ratio and adopt the Final 2027 design #10305 as it stands on main.
  • pmpm thresholds become the bands' lower edges (1.5, 2, 2.5, 4), as DOBI tabulates them, and cite that table. The lookup keeps reading the truncated fraction, which is exact for lower-inclusive whole-percentage edges (floor(100r)/100 >= L holds exactly when r >= L). The 1.3799 base band (a float32 workaround for the 138% floor) and the 6.0001 top band are unchanged; the gate excludes everything above 600%.

Invariants

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

  1. Eligibility = schedule. With a premium-paying, non-MFS member and the program in effect, eligible if and only if 1.38 <= r <= 6.
  2. Bands = DOBI. For eligible units the per-member amount is $20 for r < 1.5, $40 for 1.5 <= r < 2, $50 for 2 <= r < 2.5, $100 for 2.5 <= r < 4, $50 for 4 <= r <= 6.
  3. Where results move. Eligibility can only be lost, and only for r in (6.00, 6.01). The per-member amount changes only for r in [1.50, 1.51) (+$20), [2.00, 2.01) (+$10), [2.50, 2.51) (+$50) and [4.00, 4.01) (−$50), before the cap at the post-APTC premium.

No Hypothesis test is added: the YAML cases hit each edge exactly and the slivers above them with the real guideline, and the existing cases cover each band's interior. The repo's test-design rules keep such cases in YAML.

Tests

  • Every case in the four NJHPS YAML files that supplied aca_magi_fraction now supplies aca_magi against an aca_fpg of $10,000, so it still drives the gates and bands.
  • nj_njhps.yaml Cases 6, 8, 10, 12 and 26 and integration.yaml Scenarios 1 and 8 asserted the lower band at exactly 150%, 200%, 250% and 400%. They now follow DOBI: 150% $240 → $480 a year, 200% $480 → $600, 250% $600 → $1,200, 400% $1,200 → $600 (Cases 26 and Scenario 8 are capped at the $500 residual either way; only their comments change). New Case 32: $23,630.56 (150.994%) gets $40.
  • Member and tax-unit eligibility: $93,900 (600%) and $21,597 (138%) eligible; $93,900.47 (600.003%) and $94,055.56 (600.994%) ineligible.
  • 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 both eligibility gates with an exact-rational reading of the source on the float32 values the model receives. 0 mismatches here; on main the same draws give 35 (tax unit) and 42 (member) mismatches, all in the truncation sliver.
  • Local run before the move to aca_fpg: the NJHPS YAML folder, 73 passed. Current results are in the update section above.

Impact

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

Coordination

axiom: pending

🤖 Generated with Claude Code

… bands

DOBI's 2027 Rate Filing Requirements tabulate the plan year 2026 New
Jersey Health Plan Savings amounts by "Federal Poverty Level Range":
"Less than 150% FPL", "At least 150% FPL but less than 200% FPL", ...,
"At least 550% FPL but less than or equal to 600% FPL", "Above 600% FPL".

- The eligibility gates compared the truncated aca_magi_fraction with 6.0,
  so every income from 600.00% to 600.99% passed. Test the exact ratio of
  nonnegative ACA MAGI to the prior-year guideline instead.
- The per-member schedule used upper-inclusive "x.0001" thresholds from
  the 2021 Treasury addendum's "from X% through Y%" wording, so income at
  exactly 150%, 200%, 250% or 400% (and, with truncation, up to 0.99
  points above) took the lower band. Its thresholds are now the bands'
  lower edges, as DOBI's table has them; the truncated fraction is exact
  for lower-inclusive whole-percentage edges.

Tests that supplied aca_magi_fraction now supply aca_magi against a
prior-year guideline of $10,000; the exactly-at-edge band cases follow
DOBI; new cases use the real 2025 guideline at 138%, 150.994% and 600%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 and others added 2 commits November 18, 2026 14:58
Keep this PR's cases and main's joint-return cases in nj_njhps.yaml and
nj_njhps_member_eligible.yaml, where both sides added cases at the end.

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

Divide ACA MAGI by aca_fpg, the prior-year guideline for the section 36B
tax family that the federal credit has used since #10041, instead of the
whole tax unit's guideline. Divide in float64 so a ratio just above the
ceiling can't round down onto it. DOBI's and Get Covered NJ's dollar limits
imply the guideline year. Get Covered NJ's "tax households" isn't defined,
so the comment calls leaving out a filer who can be claimed elsewhere a
modeling choice. Pin the test fixtures to aca_fpg, add joint returns with a
claimable spouse, and move main's two such cases at exactly 150% FPL to
DOBI's $40 band. The household pipeline cases now supply income, because
the gates no longer read a supplied aca_magi_fraction. Cite DOBI's table as
Section 2, item 7 of the filing requirements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99
DTrim99 marked this pull request as ready for review November 18, 2026 20:34
@DTrim99
DTrim99 requested a review from hua7450 November 18, 2026 20:34
@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 (cbf7d99).
⚠️ Report is 199 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #10323   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         2    +1     
  Lines           24        33    +9     
=========================================
+ Hits            24        33    +9     
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 band edges check out against DOBI's plan year 2026 table in the 2027 Rate Filing Requirements (Section 2, item 7): each row reads "At least X% but less than Y%", so the new thresholds (1.5, 2, 2.5, 4) with the default lookup put an exact edge in the higher band, and "less than or equal to 600% FPL" pays $50 while "Above 600% FPL" pays $0, which the inclusive <= 6 matches. The amounts ($20 / $40 / $50 / $100 / $50 / $0) and the merged $50 band are right, no New Jersey source truncates the percentage, and DOBI's and Get Covered NJ's dollar limits ($93,900 and $95,760 for one person) match aca_fpg's one-year lag. Both NJ household-level cases were converted, and the changed expected values recompute by hand. One small fix before I approve.

Before merge

The ratio and income check are repeated in both NJ gates. nj_njhps_eligible.py (lines 43-48) and nj_njhps_member_eligible.py (lines 64-68, 85-87) both compute max_(aca_magi, 0).astype(np.float64) / aca_fpg and compare it with fpl_floor and fpl_limit. The tax-unit check adds nothing, since every member gate already applies the same tax-unit ratio, so nj_njhps_eligible could rely on has_eligible_member alone. That keeps one copy that can't drift from the other.

Optional

  • Tests. Under the new lower-inclusive bands, Cases 7, 9, 11 and 13 in nj_njhps.yaml (151%, 201%, 251%, 401%) land in the same band as the exact-edge Cases 6, 8, 10 and 12. Turning them into just-below-edge cases (for example aca_magi: 14_999 against aca_fpg: 10_000, expecting $20) would pin each edge from both sides without adding cases.
  • Zero guard (see below).

Series-wide (follow-up, not for this PR). The exact ratio max_(aca_magi, 0) / aca_fpg is now computed inline in each PR of this series, plus two California copies on main, and only 10312 guards a zero poverty line (territories, where aca_fpg is 0; the formula runs before the state mask, so a mixed simulation emits NumPy warnings, though outputs are unaffected). One guarded tax-unit variable for the untruncated ratio, read by every gate, would be a good follow-up PR once these merge.

nj_njhps_eligible repeated the exact-ratio band that nj_njhps_member_eligible
already applies, so it now relies on having an eligible member. The tax-unit
eligibility cases supply pays_aca_premium so the member gate tests the band.
Cases 7, 9, 11 and 13 now sit just below each band edge, pinning every edge
from both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99
DTrim99 requested a review from hua7450 November 18, 2026 22:09

@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. cbf7d99 fixes both points: nj_njhps_eligible now returns in_effect & has_eligible_member, so the 138-600% band is applied once in the member gate, and Cases 7, 9, 11 and 13 now sit just below each edge ($14,999, $19,999, $24,999, $39,999 → $240, $480, $600, $1,200). Replacing the forced nj_njhps_member_eligible inputs with pays_aca_premium: true holds up: the cases that used to force false still get false from the income band or the tax-family rule, and every expected value checks out. CI is green. Approving.

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