Skip to content

Decide Covered Connecticut eligibility on the exact FPL ratio - #10316

Merged
DTrim99 merged 3 commits into
mainfrom
ct-covered-connecticut-exact-fpl-ratio
Nov 19, 2026
Merged

DTrim99 merged 3 commits into
mainfrom
ct-covered-connecticut-exact-fpl-ratio

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Done: the fix, the YAML cases and the update onto current main. Pending: full impact run, Axiom parity line, GPT-6.1 Sol review.

Update onto current main (2026-11-18)

  • Merged upstream/main with no conflicts. Max's commit stays in the history.
  • The exact ratio 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, and divides in float64, following ca_premium_subsidy_eligible.
  • The sources support the guideline year but don't settle family size. C.G.S. § 19a-754c does not define the federal poverty level or household income, and CMS's Special Terms and Conditions leave income "as determined by the state". Access Health CT's plan year 2026 chart sets the limit at 175% of the 2025 guideline, and its program page lists $27,930 for one person for 2027 coverage, which is 175% of the 2026 guideline of $15,960. Neither says whether household size means the section 36B tax family. This PR uses aca_fpg because enrollees must qualify for the federal credit, so a return with a claimable spouse is an open question for a reviewer.
  • The 36 fixtures that pinned tax_unit_fpg for the prior year now pin aca_fpg: 10_000 for the coverage year. No expected value changed. The four joint-return cases 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 added stay on the same side of 175%.
  • New Cases 13 and 14 in ct_covered_connecticut_eligible.yaml: a joint return with a claimable spouse has a tax family of one, so it is measured against $15,650. $27,387.50 (175%) is eligible. $30,000 (191.7%) is ineligible, though it would pass at 141.8% against the two-person guideline of $21,150.
  • Ran on Modal (pa-10316-c, commit fe061e6), all passing: the three Covered Connecticut YAML files (49 cases), healthcare_benefit_value.yaml (22), household_health_benefits.yaml (19) and test_claimable_filer_ptc_invariants.py (14).
  • Mutation checks on Modal, not pushed. Restoring the tax_unit_fpg denominator (pa-10316-m1) fails amount Case 5, eligibility Cases 3, 10 and 14, and integration Scenario 5. Restoring main's truncated gate (pa-10316-m2) fails exactly eligibility Cases 10, 10c and 10d.

Bug

ct_covered_connecticut_eligible compared the truncated aca_magi_fraction (np.floor(100 * magi / fpg) / 100) with <= 1.75. Truncation maps every income from 175.00% to 175.99% of the poverty line to 1.75, so all of them passed. C.G.S. § 19a-754c(b)(1)(C)(iv) (from June Sp. Sess. P.A. 21-2, § 16) covers adults who "have household income up to one hundred seventy-five per cent of the federal poverty level", and DSS applies it to "household income up to an including 175% of the Federal Poverty Level". No source prescribes truncating the percentage.

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

Income Exact % of FPL aca_magi_fraction Eligible on main Eligible here
$27,387.50 175.000% 1.75 yes yes
$27,387.97 175.003% 1.75 yes no
$27,543.06 175.994% 1.75 yes no
$27,544.00 176.000% 1.76 no no

Fix

Decide eligibility on the exact ratio max(aca_magi, 0) / aca_fpg, the pattern of #10305. Nothing else in Covered Connecticut reads the fraction. The variable now also cites the codified statute and Access Health CT's plan year 2026 chart.

Invariants

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

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

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

Tests

  • Every case in the three Covered Connecticut YAML files that supplied aca_magi_fraction now supplies aca_magi against an aca_fpg of $10,000, so it still drives the gate. Case 10, which supplied 1.7501 (a value truncation never produces), now supplies $17,501 against $10,000 and exercises the fix.
  • New income-derived cases with the real guideline: $27,386.56 (174.994%) and $27,387.50 (175%) eligible; $27,387.97 (175.003%) and $27,543.06 (175.994%) ineligible.
  • Mutation check on Modal: main's gate fails exactly Cases 10, 10c and 10d.

Run before this update, on the earlier tax_unit_fpg denominator, and not repeated since:

  • Local differential sweep (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 76 mismatches, all in the truncation sliver.
  • Local run: the Connecticut DSS YAML folder, 245 passed.

Impact

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

Coordination

#10041 merged on 2026-11-13, and this gate's exact ratio now uses its aca_fpg denominator. Part of the aca_magi_fraction audit (table: #10329) begun with #10305; federal edge in #10312.

axiom: pending

🤖 Generated with Claude Code

C.G.S. 19a-754c(b)(1)(C)(iv) covers "household income up to one hundred
seventy-five per cent of the federal poverty level", which DSS applies
"up to an[d] including 175%". The gate compared the truncated
aca_magi_fraction with 1.75, so every income from 175.00% to 175.99%
passed. Test the exact ratio of nonnegative ACA MAGI to the prior-year
guideline instead.

Tests that supplied aca_magi_fraction now supply aca_magi against a
prior-year guideline of $10,000; new cases use the real 2025 guideline
at the edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 and others added 2 commits November 18, 2026 13:36
Divide the exact income ratio by aca_fpg, the poverty line the premium tax
credit has used since #10041, and divide in float64 so a ratio just above 175%
can't round down onto the limit. Pin aca_fpg in the test fixtures for the
coverage year, and add joint-return cases where a claimable spouse leaves a tax
family of one.

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #10316   +/-   ##
=========================================
  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. Covered Connecticut checks out: C.G.S. 19a-754c (b)(1)(A)(iii) and (C)(iv) set the limit at 175% FPL, DSS, Access Health CT and the CMS waiver terms make it inclusive ("up to and including 175%", "does not exceed 175 percent"), and the published dollar limits ($27,387.50 for one person in 2026) equal 1.75 times the prior-year guideline, which aca_fpg reproduces for every household size. Main already divided by aca_fpg, so the only change is dropping the truncation, and the new cases at 174.994%, exactly 175%, 175.003% and 175.994% are right. Approving.

Optional:

  • Reference. The Access Health CT chart at ct_covered_connecticut_eligible.py line 17 is a one-page PDF, so the #page=1 fragment can go.
  • Case placement. Cases 10a-10d sit between Case 10 and Case 11, directly under the "T2 [C2]: MFS" section header, which now introduces the wrong case. Moving the header back above Case 11, or moving the four cases to the end as Cases 15-18, would fix it.
  • Comment. The Case 15 comment in ct_covered_connecticut.yaml (lines 365-370) still says aca_magi_fraction is forced; the case now pins aca_magi: 13_800 against aca_fpg: 10_000.
  • 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.

@DTrim99
DTrim99 merged commit f33af4d into main Nov 19, 2026
84 of 85 checks passed
@DTrim99
DTrim99 deleted the ct-covered-connecticut-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