CDCC coupling accuracy: SC § 21(e)(4), ID/GA reform gating, KY/ME/VT static conformity#8933
Draft
MaxGhenis wants to merge 2 commits into
Draft
CDCC coupling accuracy: SC § 21(e)(4), ID/GA reform gating, KY/ME/VT static conformity#8933MaxGhenis wants to merge 2 commits into
MaxGhenis wants to merge 2 commits into
Conversation
…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>
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 testruns 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_potentialpreviously applied a blanketfiling_status != SEPARATEexclusion, denying the exception. It now readscdcc_filing_status_eligible(the shared § 21(e)(2)/(e)(4) gate, on main since #8704, and the same gate the federalcdcc_potentialuses). 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 realSimulationstructural-reform path (user reform settingin_effecttrue only from 2028,start_instant=2026):ga_refundable_ctcid_non_refundable_creditsga_refundable_ctchad no per-period gate. The factory installs the reform for the whole simulation wheneverin_effectis true in any of the next five years, so an installed-but-inactive reform paid the refund every year. Addedwhere(p.refundable.in_effect, refundable_credit, 0), mirroring the Idaho refundable pattern.modify_parametersrevivedid_ctcin the ordered nonrefundable list from a hardcoded2026-01-01regardless of activation date. It now revives from the earliest instant eitherin_effecttoggle is true (floored at the 2026 baseline-drop date).Tests: added
test_id_ga_ctc_reform_activation.py— YAMLinputcannot express a dated parameter, so this drives a multi-yearSimulationwithin_effecttrue 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 SEPARATEagi_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§ion=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 at2026-01-01:phase_out.max0.35→0.50,phase_out.min0.20→0.35, and a newamended_structuresecond 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):
cdccpre_obbba_cdccfor ≥2026cdccpre_obbba_cdccfor ≥2026capped_cdccpre_obbba_capped_cdccfor ≥2026Reproduction (KY, low-income joint, 2 children, $6,000 childcare):
ky_cdcc_potentialwas $356 in 2026 (live OBBBA rate) vs $240 in 2025; now $240 in 2026 (pre-OBBBA rate held). Implemented via new federal variablespre_obbba_cdcc_potential/pre_obbba_cdcc/pre_obbba_capped_cdccthat recompute the § 21 credit on the pre-OBBBA rate schedule (only the rate is frozen atparameters("2025-01-01"); the § 21(b)–(e) expense base and § 26 cap are OBBBA-invariant and reused live). Tests: federalpre_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)
cdcc_potential/cdccar_federal_cdcc(pinned to 2013 IRC, #8885)cdcc_potential(2026 redesign, #8924)cdcc/cdcc_potentialcdcc/cdcc_potentialGA and WV are static-current states whose CDCC multiplies the federal credit; both moved their conformity date on/after the OBBBA window for TY2026 (GA via 2026 HB 1199 → Jan 1, 2026; WV via 2026 SB 400 → Dec 31, 2025), so both adopt OBBBA § 21 and the live read is correct — not pinned. (Georgia and West Virginia conformity dates confirmed against 2026 session legislation.)
Out-of-lane / noted, not fixed here
wi_childcare_expense_credit_potentialusescdcc_ratedirectly, so it also embeds the 2026 rate; WI conforms statically at Dec 31, 2022. This branch is already flagged in Verify state CDCC coupling to federal IRC § 21 filing-status and deemed-income changes (follow-up to #8704) #8826's own verification comment for a filing-status bug (WI/NY/HI § 21(e)(2)/(4) gating) that is explicitly out of this lane; the rate drift should be fixed together with that gating change. Noted for the WI/NY/HI follow-up.§ 129 dependent-care-assistance base (re: PR #8931, not yet merged) — RESEARCHED, fix pending rebase
PR #8931 (open, mergeable) makes federal
cdcc_limit = max(0, max×count − dependent_care_assistance_exclusion)per IRC § 21(c) / Form 2441 Part III, flowing intocdcc_relevant_expenses. States readingcdcc_relevant_expenses(incl. SC) inherit the § 129 reduction automatically. But CA, ID, VA independently recompute the raw $/count limit and do NOT subtract § 129:ca_cdcc_relevant_expenses,id_cdcc_limit,va_child_dependent_care_deduction_cdcc_limitall computep.max × countwithout the exclusion.This fix depends on
dependent_care_assistance_exclusion, which does not exist until #8931 merges, so it is not encoded here (referencing a non-existent variable would break the branch). Recorded for the rebase: once #8931 is on main, subtractdependent_care_assistance_exclusionfrom the CA/ID/VA independent limits (flooring at zero). 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