Skip to content

Decide Vermont Premium Assistance eligibility on the exact FPL ratio - #10313

Merged
DTrim99 merged 3 commits into
mainfrom
vt-premium-assistance-exact-fpl-ratio
Nov 19, 2026
Merged

DTrim99 merged 3 commits into
mainfrom
vt-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 with no conflicts. Max's commit stays; nothing was rebased or force-pushed.
  • The gate now divides 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.
  • Fixtures that pinned tax_unit_fpg for the prior year now pin aca_fpg for the coverage year. No expected value changed.
  • New eligibility Cases 15 and 16 cover a joint return with one claimable spouse. The ceiling follows the one-person tax family: $46,950 is eligible, and $50,000 is not (319% of $15,650, though 236% of the whole unit's $21,150).
  • Modal run pa-10313-a: all 86 cases pass across the three Vermont YAML files (45), 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: restoring the old denominator (pa-10313-b) fails eligibility Cases 4, 10 and 16. Restoring main's truncated gate (pa-10313-c) fails Scenario 2b and eligibility Cases 10, 12 and 13.
  • Not rerun: the differential sweep below, and the $47,106.50 row of the table below. The table's other four rows are covered by eligibility Cases 11 to 13 and Scenario 2b.

Bug

vt_premium_assistance_eligible compared the truncated aca_magi_fraction (np.floor(100 * magi / fpg) / 100) with <= 3.0. Truncation maps every income from 300.00% to 300.99% of the poverty line to 3.00, so all of them passed. 33 V.S.A. § 1812(a)(1) covers "an individual or family eligible for federal premium tax credits under 26 U.S.C. § 36B with income less than or equal to 300 percent of federal poverty level". No source I found prescribes truncating the percentage for this test. (A research pass reported the same inclusive wording in HBEE Part 7 § 56.03; the agency PDFs now return 404, so that quote is not relied on here.)

Executed on main (645fcd3; the file is unchanged at 740e1eb), single filer in Vermont, 2026, 2025 one-person guideline $15,650, is_aca_ptc_eligible supplied:

Income Exact % of FPL aca_magi_fraction Eligible on main Eligible here
$46,950 300.000% 3.00 yes yes
$46,950.47 300.003% 3.00 yes no
$47,000 300.319% 3.00 yes no
$47,105.56 300.994% 3.00 yes no
$47,106.50 301.000% 3.01 no no

The federal credit ends at 400%, so these households are federally eligible and the Vermont gate alone decided them.

Fix

Decide eligibility on the exact ratio max(aca_magi, 0) / aca_fpg, divided in float64, the pattern of #10305 as it stands on main. vt_premium_assistance and its required-contribution lookup still use aca_magi_fraction; only the eligibility edge moves.

Invariants

For every input, with the program in effect and an APTC-eligible member:

  1. Band = statute. Eligible if and only if r <= 3, r = max(MAGI, 0) / aca_fpg.
  2. Only the sliver changes. Relative to main, eligibility can only be lost, and only for r in (3.00, 3.01). Deduced: floor(100r)/100 <= 3 holds exactly when r < 3.01.

No Hypothesis test is added: the gate is one comparison on a ratio, and the YAML cases below hit the limit itself, 0.003 and 0.994 points above it, and 300.32% end to end. The repo's test-design rules keep such cases in YAML.

Tests

  • vt_premium_assistance_eligible.yaml: cases that supplied aca_magi_fraction now set aca_magi and an aca_fpg of $10,000 (the gate no longer reads the fraction). Case 10, which supplied 3.0001, a value truncation can never produce, now supplies $30,001 against $10,000 and exercises the fix. New income-derived cases with the real guideline: $46,949 (299.994%) and $46,950 (300%) eligible, $46,950.47 (300.003%) and $47,105.56 (300.994%) ineligible.
  • integration.yaml Scenario 2 expected a $47,000 single filer (300.32%) to stay eligible; its comment said "47_000 sits just above it but the model still rounds aca_magi_fraction to 3.00, so the inclusive ceiling holds". It now uses $46,950 (exactly 300%; VPA $704.25), and Scenario 2b keeps $47,000 as an ineligible case (VPA $0, federal APTC unchanged at $10,906.80).
  • integration.yaml Scenario 8 and vt_premium_assistance.yaml Case 13 supplied a 3.00 fraction with $100,000 of MAGI for three people, which is 375% of the $26,650 guideline. They now use $79,950, exactly 300% (VPA $1,199.25).
  • Mutation check: main's gate fails exactly Scenario 2b and eligibility Cases 10, 12 and 13.
  • 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 eligibility gate with an exact-rational reading of the source on the float32 values the model receives. 0 mismatches here; on main the same draws give 63 mismatches, all in the truncation sliver.
  • Local run before the move to aca_fpg: the three premium-assistance YAML files, 39 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 this gate's exact ratio now uses the same denominator. Part of the aca_magi_fraction audit (table: #10329) begun with #10305; federal edge in #10312.

axiom: pending

🤖 Generated with Claude Code

33 V.S.A. 1812(a)(1) covers income "less than or equal to 300 percent of
federal poverty level". The gate compared the truncated aca_magi_fraction
with 3.0, so every income from 300.00% to 300.99% passed. Test the exact
ratio of nonnegative ACA MAGI to the prior-year guideline instead.

Integration Scenario 2 expected a $47,000 single filer (300.32%) to stay
eligible because the fraction truncates to 3.00; it now tests exactly
300% ($46,950), and Scenario 2b keeps $47,000 as an ineligible case. Two
three-person cases supplied a 3.00 fraction with $100,000 of MAGI (375%
of $26,650); they now use $79,950.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 and others added 2 commits November 18, 2026 13:17
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
limit can't round down onto it. Pin the test fixtures to aca_fpg and add
a joint return with a claimable spouse, whose ceiling follows the
one-person tax family.

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #10313   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           24        18    -6     
=========================================
- Hits            24        18    -6     
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. This matches Vermont's rule: 33 V.S.A. § 1812(a)(1) covers income "less than or equal to 300 percent of federal poverty level", HBEE Part 7 § 60.07(a) defines the percentage as household income over the FPL with no truncation, and Vermont Health Connect's 2026 table lists the limit as $46,950 for one person, which only the exact ratio reproduces. I recomputed the changed expected values and they match. The changed main inputs are justified (the old Scenario 2 result encoded the bug, and the $47,000 input is kept as Scenario 2b). Approving.

Optional:

  • Changelog range. "from 300.003% to 300.994%" are the test values; the change affects every income above 300% and below 301% (even $46,950.01).
  • References. The state rule PDFs downloaded fine today, so the variable could cite HBEE Part 2 § 12.06(c) and Part 7 §§ 56.03, 60.01 and 60.07 alongside the statute.
  • Zero guard. The division by aca_fpg at vt_premium_assistance_eligible.py:44 has no guard (see below).
  • Tests. Cases 12 and 13 cover the same scenario, and person_a/person_b could be person1/person2 like the rest of the file.

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.

@DTrim99
DTrim99 merged commit 99ff25a into main Nov 19, 2026
47 checks passed
@DTrim99
DTrim99 deleted the vt-premium-assistance-exact-fpl-ratio branch November 19, 2026 03:58
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