Skip to content

Apply the IRC § 21(e)(2)/(4) filing-status rules to Wisconsin, New York, and Hawaii CDCC provisions#8855

Draft
hua7450 wants to merge 1 commit into
PolicyEngine:mainfrom
hua7450:fix-state-cdcc-filing-status
Draft

Apply the IRC § 21(e)(2)/(4) filing-status rules to Wisconsin, New York, and Hawaii CDCC provisions#8855
hua7450 wants to merge 1 commit into
PolicyEngine:mainfrom
hua7450:fix-state-cdcc-filing-status

Conversation

@hua7450

@hua7450 hua7450 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the three state CDCC bugs confirmed by the statute verification in #8826: Wisconsin, New York, and Hawaii pay their child and dependent care provisions to married-filing-separately filers whose statutes deny them, and Hawaii additionally over-applies its deemed earned income floor. All three are pre-existing gaps — these code paths bypass the federal variables that #8704 gated — surfaced by the post-#8704 state-coupling audit.

Addresses the WI, NY, and HI items in #8826.

Wisconsin — 2024+ credit and subtraction miss the § 21(e)(2)/(4) gate

Wis. Stat. § 71.07(9g)(c)4. and § 71.05(6)(b)43.e. each provide that a claimant "is subject to the special rules in 26 USC 21 (e)(2) and (4)". 2023 Act 101 replaced only the § 21(c) expense cap with Wisconsin's own $10,000 limit — the rest of § 21, including the joint-return requirement, is imported, and the 2024 Schedule WI-2441 instructions limit eligibility to single/HoH/MFJ filers.

The model's pre-2024 path multiplies the federal cdcc_potential and inherited the gate from #8704, but the 2024+ standalone branch of wi_childcare_expense_credit_potential and the wi_childcare_expense_subtraction compute from WI's own caps with the ungated cdcc_rate. Both now multiply by cdcc_filing_status_eligible. Also repairs the subtraction's reference metadata (two URLs were concatenated into one string) and adds the statute link.

New York — replica credit misses the filing-status gate

ny_cdcc rebuilds the federal credit from components (cdcc_relevant_expenses × ny_cdcc_rate × cdcc_rate) without the gate, so an MFS filer kept a NY credit that § 21(e)(2) denies. The IT-216 instructions require qualifying for the federal credit and state the married-filing-separately rule with the considered-unmarried exception (living apart the last six months, qualifying person in the home more than half the year, over half the cost of keeping up the home) — § 21(e)(2)/(4) exactly. ny_cdcc now multiplies by cdcc_filing_status_eligible; nyc_cdcc reads ny_cdcc and inherits the fix.

Hawaii — missing joint-return gate; deeming over-applied; wrong disability standard

HRS § 235-55.6:

  • (e)(2): "If the taxpayer is married at the close of the taxable year, the credit shall be allowed … only if the taxpayer and the taxpayer's spouse file a joint return", with the (e)(4) living-apart exception. hi_cdcc_eligible only checked count_cdcc_eligible > 0; it now also requires cdcc_filing_status_eligible (HI's qualifying-individual definition tracks federal § 21(b)(1)/(e)(5), so the federal gate is exact).
  • (d)(2): deems earned income only for "a spouse who is a student or a qualified individual described in subsection (b)(1)(C)" — spouse-only, on a married return. hi_cdcc_income_floor_eligible was person-level (is_disabled | is_full_time_student) with no marriage requirement, so a single disabled filer's $0 earnings were floored to $2,400, manufacturing a credit HRS gives as $0. It now mirrors the federal cdcc_income_floor_eligible: head/spouse, married, student or incapable of self-care.
  • Disability standard: HRS says "incapable of caring for oneself" — the variable now uses is_incapable_of_self_care (which HI's qualifying-individual count already used via the federal chain) instead of the broader is_disabled.

Confirmed correct and unchanged: HI's $2,400/$4,800 floor amounts ((d)(2)(A)/(B) $200/$400 monthly) and the two-incapacitated-spouses-count-as-one inheritance.

Reproductions (before → after)

Scenario Before After
WI 2024, MFS filer, one child, $2,000 expenses $400 $0
WI 2021 subtraction, MFS filer $2,000 $0
NY 2022, MFS filer, three children, $10,000 expenses $3,850 $0
HI 2022, MFS filer with qualifying individuals positive $0
HI single filer incapable of self-care, $200 earnings floored to $2,400 $200
Each state, separated filer maintaining a home for a qualifying child (§ 21(e)(4)) credit preserved

Tests

Out of scope (tracked in #8826)

The SC § 21(e)(4) decision item, the VA/ID/OR/MN/WI expense-base conformity gap, and the AR/VT/MD tangential flags.

🤖 Generated with Claude Code

…visions

Wisconsin: Wis. Stat. 71.07(9g)(c)4. and 71.05(6)(b)43.e. subject claimants
to the special rules in IRC 21(e)(2) and (4), but the 2024+ credit branch
(Act 101) and the subtraction bypassed the gated federal variables. Both now
multiply by cdcc_filing_status_eligible.

New York: Form IT-216 requires qualifying for the federal credit and applies
the 21(e)(2)/(4) rules, but ny_cdcc replicated the federal calculation
without the gate. NYC's credit inherits the fix via ny_cdcc.

Hawaii: HRS 235-55.6(e)(2) allows a married taxpayer the credit only on a
joint return (with the (e)(4) living-apart exception); hi_cdcc_eligible now
requires cdcc_filing_status_eligible. HRS 235-55.6(d)(2) deems earned income
only for a spouse who is a student or incapable of caring for oneself, so
hi_cdcc_income_floor_eligible now requires a married head or spouse and uses
is_incapable_of_self_care instead of is_disabled.

Adds MFS and separated-filer regression tests for WI, NY, HI, and PA
(the PA case restores the end-to-end MFS test deferred from PolicyEngine#8704).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8855   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         5    +2     
  Lines           55        82   +27     
  Branches         0         1    +1     
=========================================
+ Hits            55        82   +27     
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.

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.

1 participant