Skip to content

Decide Washington Cascade Care Savings eligibility on the exact FPL ratio - #10314

Merged
DTrim99 merged 3 commits into
mainfrom
wa-cascade-care-savings-exact-fpl-ratio
Nov 19, 2026
Merged

DTrim99 merged 3 commits into
mainfrom
wa-cascade-care-savings-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)

Bug

wa_cascade_care_savings_eligible compared the truncated aca_magi_fraction (np.floor(100 * magi / fpg) / 100) with <= 2.5. Truncation maps every income from 250.00% to 250.99% of the poverty line to 2.50, so all of them passed. WAHBE's PY2026 Cascade Care Savings Policy, Section 4(1)(c) makes an individual an eligible enrollee who "Has income up to 250% of the Federal Poverty Level"; the PY2027 policy keeps the same words. RCW 43.71.110(4)(a)(ii) leaves the threshold to the appropriation or the exchange. No source prescribes truncating the percentage.

"Up to 250%" leaves exactly 250% open to either reading. The model already treats it as inclusive and this PR keeps that. Income above 250% is not "up to 250%" on any reading, so the truncation sliver is unambiguous.

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

Income Exact % of FPL aca_magi_fraction Eligible on main Eligible here
$39,125 250.000% 2.50 yes yes
$39,125.47 250.003% 2.50 yes no
$39,280.56 250.994% 2.50 yes no
$39,281.50 251.000% 2.51 no no

The end-to-end run (wages only, nothing supplied) gave the same results, since the federal credit continues to 400%.

Fix

Decide eligibility on the exact ratio max(aca_magi, 0) / aca_fpg, the pattern of #10305. Nothing else in Cascade Care Savings reads the fraction. The fpl_limit comment now says the limit applies to the exact ratio.

Invariants

For every input, with the program in effect and a Group 1, Group 2 or Group 3 member:

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

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

  • All cases in wa_cascade_care_savings_eligible.yaml, wa_cascade_care_savings.yaml and integration.yaml that supplied aca_magi_fraction now supply aca_magi against an aca_fpg of $10,000, so each still drives the gate (the gate no longer reads the fraction; nothing else in these files did). The derived fraction outputs are unchanged.
  • New income-derived cases with the real guideline: $39,124 (249.994%) and $39,125 (250%) eligible; $39,125.47 (250.003%) and $39,280.56 (250.994%) ineligible.
  • Modal run pa-10314-a on the updated branch: the Cascade Care Savings YAML folder, 82 passed.

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

  • Mutation check: main's gate fails exactly the two new above-limit cases.
  • 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 58 mismatches, all in the truncation sliver.

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

WAHBE's PY2026 and PY2027 Cascade Care Savings policies cover an enrollee
who "has income up to 250% of the Federal Poverty Level" (Section
4(1)(c)). The gate compared the truncated aca_magi_fraction with 2.5, so
every income from 250.00% to 250.99% passed. Test the exact ratio of
nonnegative ACA MAGI to the prior-year guideline instead. Exactly 250%
stays eligible, as before.

Tests that supplied aca_magi_fraction now supply aca_magi against a
prior-year guideline of $10,000, since the gate no longer reads the
fraction; 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:20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
250% can't round down onto the limit. Washington's policy defines the Federal
Poverty Level by 26 U.S.C. 36B(d)(3)(B). Pin aca_fpg in the test fixtures for
the coverage year.

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #10314   +/-   ##
=========================================
  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. The Washington rule checks out: the WAHBE PY2026 and PY2027 policies say "Has income up to 250% of the Federal Poverty Level", define income and the poverty level by section 36B, and say nothing about truncation, so max_(aca_magi, 0) / aca_fpg <= 2.5 is right. The fpl_limit.yaml edit only changes the comment. Approving, with one test fix before merge.

Before merge

Two household-level cases still drive the gate through aca_magi_fraction. household_health_benefits.yaml Case 18 (lines 381-401, "single age 40 at 140% FPL") and healthcare_benefit_value.yaml Case 17 (lines 299-334, two tax units) set only aca_magi_fraction: 1.4, which the gate no longer reads. With no aca_magi, both now pass at $0 of income, so Case 18's comment is false. Please replace the fraction with aca_magi: 14_000 and aca_fpg: 10_000 in each tax unit, as you did in the other 52 cases; the expected values don't change.

Also, the Microsimulation job (run 44371406793) was cancelled at this head; please rerun it.

Optional

  • References. fpl_limit.yaml lists the PY2026 policy twice (#page=11 and #page=10) and doesn't cite PY2027, though the limit now carries into 2027. One entry per policy: PY2026 with the href on #page=10 and a title ending "#page 10-11", and PY2027 with the href on #page=2 and a title ending "#page 2-3".
  • Zero guard (see below), and Cases 3c and 3d cover the same scenario.

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 1a1e6ad into main Nov 19, 2026
84 of 85 checks passed
@DTrim99
DTrim99 deleted the wa-cascade-care-savings-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