Skip to content

CDCC coupling accuracy: SC § 21(e)(4), ID/GA reform gating, KY/ME/VT static conformity#8933

Merged
MaxGhenis merged 3 commits into
PolicyEngine:mainfrom
MaxGhenis:codex/cdcc-coupling-accuracy
Jul 7, 2026
Merged

CDCC coupling accuracy: SC § 21(e)(4), ID/GA reform gating, KY/ME/VT static conformity#8933
MaxGhenis merged 3 commits into
PolicyEngine:mainfrom
MaxGhenis:codex/cdcc-coupling-accuracy

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Accuracy-fix lane for CDCC coupling and reform gating. Four issues adjudicated. Every verdict is anchored to a primary source actually read (page/section anchored); nothing was changed without a contradicting statute or form. Local test counts are per-tree policyengine-core test runs in the worktree venv.

#8882 — SC CDCC: honor the IRC § 21(e)(4) separated-taxpayer exception — FIXED

Verdict: CORRECT (fixed). Fixes #8882.

S.C. Code § 12-6-3380 (verbatim, official SC Legislature): "The credit is computed as provided in Internal Revenue Code Section 21, except that the term 'applicable percentage' means seven percent and is not reduced, and only expenses that are directly attributable to items of South Carolina gross income qualify for the credit." The section has no filing-status language of its own — it imports § 21 wholesale, carrying both the § 21(e)(2) joint-return requirement and the § 21(e)(4) separated-taxpayer exception. SC conforms to the IRC as of Dec 31, 2024 (§ 12-6-40), well after § 21(e)(4) existed.

sc_cdcc_potential previously applied a blanket filing_status != SEPARATE exclusion, denying the exception. It now reads cdcc_filing_status_eligible (the shared § 21(e)(2)/(e)(4) gate, on main since #8704, and the same gate the federal cdcc_potential uses). An ordinary MFS filer stays ineligible (form-faithful, per the SC1040 instructions' blunt "cannot claim if MFS"); a separated MFS filer living apart while maintaining a home for a qualifying individual now qualifies, matching the federal treatment.

Verified end-to-end: separated MFS filer with a qualifying child and $3,000 expenses → sc_cdcc = $210 (7% × $3,000); ordinary MFS filer → $0.

Source: S.C. Code § 12-6-3380 and § 12-6-40 (https://www.scstatehouse.gov/code/t12c006.php).
Tests: added ordinary-MFS ($0) and separated-MFS ($210) cases to sc_cdcc.yaml (11 pass).

#8899 — ID/GA CTC contributed reforms leak into pre-activation years — FIXED

Verdict: CORRECT (fixed). Fixes #8899. Reproduced end-to-end via the real Simulation structural-reform path (user reform setting in_effect true only from 2028, start_instant=2026):

variable pre-fix @2026 (pre-activation) post-fix @2026 @2028 (activation)
ga_refundable_ctc 250 (leak) 0 250
id_non_refundable_credits 410 (leak) 0 410
  • GA: ga_refundable_ctc had no per-period gate. The factory installs the reform for the whole simulation whenever in_effect is true in any of the next five years, so an installed-but-inactive reform paid the refund every year. Added where(p.refundable.in_effect, refundable_credit, 0), mirroring the Idaho refundable pattern.
  • ID: the refundable payment was already period-gated, but modify_parameters revived id_ctc in the ordered nonrefundable list from a hardcoded 2026-01-01 regardless of activation date. It now revives from the earliest instant either in_effect toggle is true (floored at the 2026 baseline-drop date).

Tests: added test_id_ga_ctc_reform_activation.py — YAML input cannot express a dated parameter, so this drives a multi-year Simulation with in_effect true only from 2028 and asserts inertness at 2026 and activation at 2028 (2 pass). All 10 pre-existing ID/GA YAML tests still pass unchanged.

#8883 — MD CDCC separate-filer phase-out start — VERIFIED CORRECT (recommend close, no code change)

Verdict: WRONG (the model is right; the alleged $20,500 reflects superseded pre-2019 law). Recommend closing #8883.

Current Md. Tax-Gen § 10-716 (verbatim, MD General Assembly compiled statute): (a)(4) defines "'Taxpayer'" as "(i) an individual filing an income tax return; or (ii) a married couple filing a joint income tax return." Subsection (d) then has only two categories: (d)(1) "a taxpayer filing an individual return ... exceeds $30,000 ... reduced by 1% for each $2,000"; (d)(2) "a married couple filing a joint income tax return ... exceeds $50,000 ... 1% for each $3,000." There is no married-filing-separately clause. By the (a)(4) definition an MFS filer is an "individual filing an income tax return," so it falls in the $30,000 / $2,000-increment bucket — exactly what the model encodes for SEPARATE. The 2025 Form 502CR confirms it (single "Individual taxpayer" phase-out from $30,001; MFS grouped with single at the $112,100 cap). The model's SEPARATE agi_cap ($92,000 in 2019, matching (b)(1)) and phase-out are both correct.

The alleged $20,500 was real only through tax year 2018: pre-2019 law gave MFS filers half the individual thresholds ($20,500 full-credit ceiling, $25,000 cutoff). HB 810 (2019 session, effective TY2019) restructured the credit and folded MFS into the general "individuals" category. The model's values start at 2019-01-01, so $20,500 is superseded and does not apply. No change.

Sources: § 10-716 (https://mgaleg.maryland.gov/mgawebsite/Laws/StatuteText?article=gtg&section=10-716); 2025 Form 502CR (https://www.marylandcomptroller.gov/content/dam/mdcomp/tax/forms/2025/502cr.pdf); HB 810 (2019) Fiscal Note (https://mgaleg.maryland.gov/2019RS/fnotes/bil_0000/hb0810.pdf); Comptroller Tax Tip #50 (https://www.marylandcomptroller.gov/content/dam/mdcomp/tax/legal-publications/tips/personal/tip50.pdf).

#8826 — State CDCC coupling to federal § 21 (static-conformity drift audit) — AUDIT + PARTIAL FIX

Scope: enumerate every state variable consuming federal cdcc / capped_cdcc / cdcc_potential; classify each state's conformity (static fixed-date vs rolling); fix any that silently drifted where conformity is static. The federal § 21 change that matters is the 2026 OBBBA rate increase, which the model encodes at 2026-01-01: phase_out.max 0.35→0.50, phase_out.min 0.20→0.35, and a new amended_structure second phase-out (all labeled H.R.1 / OBBBA). Confirmed live in the model — so the drift is real: a state that (a) multiplies the federal § 21 credit amount (which embeds the rate) and (b) statically conforms to a pre-OBBBA IRC would silently adopt the 2026 increase.

Key distinction: only states multiplying the federal credit amount embed the rate. States that use only the § 21 expense base (cdcc_relevant_expenses) × their own rate (SC, CA, VA, ID) do NOT drift on the rate — for them the concern is the § 129 base (below), not the rate.

Fixed — static-pre-OBBBA states that multiply the federal credit

Verified verbatim against current statute text (credit-coupling AND conformity-date provisions):

State CDCC statute (coupling) Conformity statute → date Model read Fix
KY KRS 141.067: 20% of "the federal credit allowed under Section 21" KRS 141.010(21) → Dec 31, 2024 live cdcc now pre_obbba_cdcc for ≥2026
ME 36 M.R.S. § 5218: 25% of "the federal tax credit allowable for child and dependent care expenses" 36 M.R.S. § 111(1-A) → Dec 31, 2024 live cdcc now pre_obbba_cdcc for ≥2026
VT 32 V.S.A. § 5828c: 72% of "the federal child and dependent care credit allowed to the taxpayer" 32 V.S.A. § 5824 → Dec 31, 2024 live capped_cdcc now pre_obbba_capped_cdcc for ≥2026

Reproduction (KY, low-income joint, 2 children, $6,000 childcare): ky_cdcc_potential was $356 in 2026 (live OBBBA rate) vs $240 in 2025; now $240 in 2026 (pre-OBBBA rate held). Implemented via new federal variables pre_obbba_cdcc_potential / pre_obbba_cdcc / pre_obbba_capped_cdcc that recompute the § 21 credit on the pre-OBBBA rate schedule (only the rate is frozen at parameters("2025-01-01"); the § 21(b)–(e) expense base and § 26 cap are OBBBA-invariant and reused live). Tests: federal pre_obbba_cdcc.yaml (2025 == live, 2026 holds pre-OBBBA) + 2026 regression cases in KY/ME/VT (all pass; KY/ME/VT trees 1,402 pass).

Audited — NOT fixed (live read is correct)

State(s) Consumer var reads Conformity Adopts OBBBA § 21? Action
OH cdcc_potential/cdcc Static, but SB 9 (136th GA, eff. Mar 5, 2026) moved the date past OBBBA and was enacted to sweep in post-3/7/25 federal changes Yes none — live read correct (ORC § 5701.11 verbatim confirms)
AR ar_federal_cdcc (pinned to 2013 IRC, #8885) Static, Jan 2, 2013 No none — already pinned; verified, not duplicated
CO cdcc_potential (2026 redesign, #8924) Rolling Yes none — correct; not regressed
GA cdcc Static-current, moved to Jan 1, 2026 (2026 HB 1199 / Ch. 375, signed Mar 20, 2026, applicable TY2025+) Yes none — live read correct
WV cdcc Static, moved to Dec 31, 2025 (2026 SB 400) Yes none — live read correct
AZ cdcc (in the TY2026+ § 43-1022(34) subtraction) Static, moved to Jan 1, 2026 (2026 HB 4168 / Ch. 140, signed Jun 13, 2026, TY2026+); § 43-1022(34) uses "section 21" through that post-OBBBA conformity Yes none — live read correct (Ch. 140 § 12 verbatim confirms)
DC cdcc_potential Rolling (DC Code § 47-1801.04) Yes none — live read correct
IA, KS, DE, OK, RI, MD, NE, LA, NM cdcc/cdcc_potential Rolling (Tax Foundation FF864 Table 1 + statutes) Yes none
NJ, PA, MS cdcc/cdcc_potential Selective general conformity, but each CDCC statute ties to the current federal credit allowed/claimed Yes none

Note on the 2026 conformity sessions: GA, WV, AZ, and OH each looked like static-pre-OBBBA candidates on a stale date, but each enacted a 2026-session conformity bill moving its date on/after the OBBBA window — verified verbatim against the enacted chaptered text, not a conformity-table date. Assuming a stale date would have wrongly pinned four states; verifying the current statute confirmed the live read is correct for all four. Only KY/ME/VT retain a static Dec 31, 2024 date for TY2026 (no 2026 conformity-advancing bill), so only they are pinned.

Out-of-lane / noted, not fixed here

§ 129 dependent-care-assistance base (CA/ID/VA) — FIXED (rebased onto #8931)

#8931 (now merged) makes federal cdcc_limit = max(0, max×count − dependent_care_assistance_exclusion) per IRC § 21(c) / Form 2441 Part III, flowing into cdcc_relevant_expenses. States reading cdcc_relevant_expenses (incl. SC) inherit the § 129 reduction automatically. But CA, ID, VA independently recompute the qualified-expense dollar limit and did NOT subtract § 129, over-stating the state benefit for families with employer dependent-care benefits. Each state form starts from a base that IS net of § 129 (verified verbatim):

State Form basis (net of § 129) Fix
CA FTB 3506 Part IV lines 26–33 reduce the $3,000/$6,000 cap by excluded benefits, capping at federal Form 2441 line 31 ca_cdcc_relevant_expenses subtracts the exclusion from the dollar limit
ID Form 39R Line 6 worksheet line 4 subtracts "excluded benefits from Part III of Form 2441" from the operative cap id_household_and_dependent_care_expense_deduction subtracts it from max(id_cdcc_limit, $12,000 cap) — the reduction is applied there because Idaho's $12,000 cap dominates the federal per-count limit
VA deducts "the amount on which the federal credit is based" = Form 2441 line 31, already net (Va. Code § 58.1-322.03(3); Form 760 code 101) va_child_dependent_care_deduction_cdcc_limit subtracts the exclusion

Each subtracts dependent_care_assistance_exclusion (floored at zero). Verified with the $5,000-employer-benefits family (two children, $6,000 expenses, 2024): CA base $6,000→$1,000, VA deduction $6,000→$1,000; and for Idaho, where the $12,000 cap only binds at higher spend, a $10,000-expenses / $5,000-benefits family: deduction $10,000→$7,000. Tests added for each state (CA/ID/VA credit-and-deduction trees pass). Sources: FTB 3506 (2024) Part IV; ID Form 39R (2023) Line 6 worksheet; Va. Code § 58.1-322.03 + Form 760 (2023) code 101.


🤖 Generated with Claude Code

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.91525% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.26%. Comparing base (f9e58e7) to head (0d7c6d2).
⚠️ Report is 150 commits behind head on main.

Files with missing lines Patch % Lines
...s/vt/tax/income/credits/cdcc/vt_low_income_cdcc.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main    #8933      +/-   ##
===========================================
- Coverage   100.00%   96.26%   -3.74%     
===========================================
  Files            3        6       +3     
  Lines           55      134      +79     
  Branches         0        5       +5     
===========================================
+ Hits            55      129      +74     
- Misses           0        5       +5     
Flag Coverage Δ
unittests 96.26% <94.91%> (-3.74%) ⬇️

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.

MaxGhenis and others added 3 commits July 6, 2026 19:49
…ation leak

Three CDCC accuracy fixes:

SC (PolicyEngine#8882): honor the IRC section 21(e)(4) separated-taxpayer exception.
S.C. Code section 12-6-3380 computes the credit "as provided in Internal
Revenue Code Section 21," importing section 21 wholesale with no filing-status
language of its own, so it carries both the section 21(e)(2) joint-return rule
and the section 21(e)(4) exception. sc_cdcc_potential now uses
cdcc_filing_status_eligible instead of a blanket filing_status != SEPARATE
exclusion. Ordinary MFS filers remain ineligible; a separated filer who lives
apart while maintaining a home for a qualifying individual now qualifies.

ID/GA (PolicyEngine#8899): stop the contributed CTC reforms leaking into pre-activation
years under a delayed in_effect date.
- ga_refundable_ctc now gates on refundable.in_effect per period, mirroring the
  Idaho refundable pattern; previously it paid in every installed year.
- The Idaho reform's modify_parameters now revives id_ctc from the actual
  activation instant (earliest in_effect true date) instead of a hardcoded
  2026-01-01, floored at the 2026 baseline-drop date.

Added a Python activation test that drives a multi-year simulation with
in_effect set true only from 2028 and asserts both reforms are inert in the
pre-activation 2026 year (YAML input cannot express a dated parameter), plus SC
separated-taxpayer YAML tests.

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

The federal model encodes the OBBBA IRC section 21 rate increase (phase-out max
0.35 to 0.50, min 0.20 to 0.35, plus a new second phase-out) dated 2026-01-01.
States that compute their CDCC as a percentage of the federal section 21 credit
AND statically conform to a pre-2026 IRC must not adopt that increase until they
re-conform, but the model was reading the live (post-OBBBA) federal credit, so
these states silently over- or under-granted from 2026.

Kentucky (KRS 141.067 / 141.010(21)), Maine (36 M.R.S. 5218 / 111(1-A)), and
Vermont (32 V.S.A. 5828c / 5824) each couple their CDCC to the federal section
21 credit through a static IRC conformity fixed at December 31, 2024 (verified
verbatim against current statute text). They now read new pre_obbba_cdcc /
pre_obbba_capped_cdcc federal variables (the section 21 credit recomputed on the
pre-OBBBA rate schedule; the section 21(b)-(e) expense base and the section 26
cap are unchanged, so only the rate is frozen) for tax years from 2026.

Ohio was evaluated and deliberately NOT pinned: Senate Bill 9 (136th GA,
effective March 5, 2026) moved Ohio's conformity date past OBBBA, so Ohio DOES
adopt the federal change and the live read is correct.

Added federal pre_obbba_cdcc tests (2025 equals live, 2026 holds the pre-OBBBA
rate) and 2026 regression cases for KY/ME/VT.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR PolicyEngine#8931 made the federal cdcc_limit subtract the section 129 employer-provided
dependent care exclusion (IRC section 21(c) / Form 2441 Part III), flowing into
cdcc_relevant_expenses. States that read cdcc_relevant_expenses inherit it, but
California, Idaho, and Virginia independently recompute the qualified-expense
dollar limit and did not subtract section 129, over-stating the state benefit
for families with employer dependent-care benefits.

Each state form starts from a base that is net of section 129 (verified):
- CA FTB 3506 Part IV lines 26-33 reduce the $3,000/$6,000 cap by excluded
  benefits and cap at the already-net federal Form 2441 line 31.
- ID Form 39R Line 6 worksheet line 4 subtracts "excluded benefits from Part III
  of Form 2441" from the operative cap (applied against Idaho's $12,000 cap in
  id_household_and_dependent_care_expense_deduction, since that cap dominates the
  federal per-count limit).
- VA deducts "the amount on which the federal credit is based" (Va. Code
  58.1-322.03(3)) = Form 2441 line 31, already net.

Subtract dependent_care_assistance_exclusion (floored at zero) from each state's
independent limit. Added section 129 tests for each state, including the
cap-binding case for Idaho.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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