[codex] Add Illinois SB3567 child tax credit contrib reform#8205
[codex] Add Illinois SB3567 child tax credit contrib reform#8205DTrim99 wants to merge 3 commits intoPolicyEngine:mainfrom
Conversation
- Add 35 ILCS 5/244 statute citation to il_ctc reform reference - Clarify dependent-count comment: code uses tax_unit_child_dependents, not literal §152 count; flag for maintainer review - Inline single-use intermediates in il_ctc formula - Refine threshold comment to match bill phrasing - Name the bill and note opt-in mechanism in changelog - Add two-child phase-in test case - Add two-child phase-in boundary test (AGI = 17,880 = 7,152 / 0.40) Open question for maintainers: dependent-count interpretation. Issue PolicyEngine#8191 suggested either §152 dependent count or EITC qualifying-child count; the implementation currently uses tax_unit_child_dependents, which matches neither exactly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The bill amends 35 ILCS 5/244(a) but does not strike subsection (b), which makes the credit refundable. Prior assumption that the reform removes refundability does not match the underlying IL EITC behavior. - Drop the modify_parameters block that moved il_ctc to non_refundable - Update the changelog to remove the nonrefundability claim - Replace the nonrefundability test with a refundable-credit assertion (il_ctc flows to il_refundable_credits; il_income_tax goes negative when there is no liability) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0df077b to
2e082b2
Compare
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Program Review — PR #8205: Illinois SB3567 contrib reform
Source Documents
- Bill PDF: Illinois SB3567 (4 pages, amends 35 ILCS 5/244)
- Year: TY 2025+ (bill also covers TY 2024 with a different, flat 20% rate)
- CI Status: ALL GREEN
Critical (Must Fix)
-
Refundability claim is false. The PR description and
in_effect.yamldescription both state the reform "makes the credit nonrefundable" / "moves it from the refundable to the nonrefundable credit list." The diff does NOT modifygov.states.il.tax.income.credits.refundable—il_ctcremains refundable, which correctly matches Sec. 244(b) ("the excess shall be refunded to the taxpayer"). The test "SB3567 keeps the Illinois CTC refundable when EITC is zero" confirms this. The wrong claims must be corrected in the PR body and the parameter description. -
TY 2024 not properly modeled. Sec. 244(a) prescribes a flat 20% of Section 212 for TY 2024 with NO three-tier (AGI-based max-credit boost) structure; the three tiers apply only "for tax years beginning on or after January 1, 2025." The reform applies the
where(agi <= threshold, max_credit, actual_credit)tier logic wheneverin_effectis true, including 2024. No TY 2024 test exists. Fix: gate tier logic toperiod.start.year >= 2025, or document that the reform models only 2025+ and setin_effectaccordingly. Add a TY 2024 test demonstrating the chosen behavior. -
Hard-coded value
3in reform code.il_sb3567_reform.pyline 33 hard-codesmin_(tax_unit("tax_unit_child_dependents", period), 3). The cap-at-3 corresponds to the federal EITC plateau schedule and should not be a magic number; reuseeitc_child_count(which already encodes the cap via the federal scale) or parameterize it undergov.contrib.states.il.sb3567. -
Wrong child-count primitive. The reform uses
tax_unit_child_dependentsto index into the federal EITC max schedule. Federal EITC counts qualifying children viaeitc_child_count, which enforces TIN/identification rules and matches IRC §152 qualifying-child semantics.tax_unit_child_dependentsincludes dependent children that may not qualify for EITC and excludes some §152 qualifying children — feeding it intofederal_eitc.max.calc(...)can produce incorrect benefit amounts. Switch toeitc_child_count, and consider reusingeitc_maximumto avoid duplicating the federal schedule lookup.
Should Address
-
Self-contained sb3567 rate parameters. Reform reads
gov.states.il...ctc.rate(0.20/0.40) andeitc.match(0.20) from baseline IL params. SB3567-specific 0.40 / 0.20 / 0.20 should live undergov.contrib.states.il.sb3567so the reform is not silently affected by baseline IL rate changes. -
Non-standard activation pattern.
create_il_sb3567_reformuses afor _ in range(5)5-year forward-offset loop to detect the toggle. Sibling contrib reforms (pa_ctc_match,ct_sb100) callparameters(period).gov.contrib...in_effectdirectly. The 5-year window is undocumented and brittle — collapse to the standard pattern. -
Reference quality.
- Reform
.pyis missing IRC §152 citation, although Sec. 244(d) explicitly defines "qualifying child" by §152 (suggested:https://www.law.cornell.edu/uscode/text/26/152). in_effect.yamlcites the fragile ILGA HTML "BillStatus/FullText" URL with a transient query string. Switch to the durable PDF URLhttps://www.ilga.gov/documents/legislation/104/SB/PDF/10400SB3567lv.pdf#page=2.- Add 35 ILCS 5/244 statute reference to
in_effect.yaml(currently only in the .py file). - No
#page=anchors anywhere — Sec. 244 begins on page 2 of the 4-page PDF.
- Reform
-
Test gaps.
- No TY 2024 test (paired with item 2 above).
- No reform-OFF test (
in_effect: false) confirming baselineil_ctcis preserved. - No phase-in threshold +$1 boundary (verify
<=vs<flip frommax_credittoactual_credit). - No 4+ qualifying children test verifying the cap-at-3 behavior, and no equality assertion between 3-child and 4-child max_credit.
- No zero-dependents test — potential divide-by-zero on
federal_maximum / phase_in_ratewheneitc.max.calc(0)and the 0-child phase-in rate are both 0. - No IL-EITC-ineligible filer test (e.g., investment income too high) — phase-in branch returns
max_creditregardless of EITC eligibility, possibly a bug. - No plateau-end / phase-out-start boundary at the actual transition point.
- Refundability test only confirms zero-liability case; need a positive-liability case showing
il_ctcoffsets liability and refunds the remainder.
Suggestions
-
Tier (a)(3) not encoded as a distinct branch. Implementation collapses (a)(2) and (a)(3) into a single fall-through "AGI > threshold ⇒ 40% of actual Section 212." Mathematically equivalent at the plateau boundary but structurally absent from the bill's three-tier text. Add a comment noting the equivalence, or encode it as a third branch for fidelity.
-
Means-tested exclusion clause. Sec. 244(b) excludes the refund from SNAP/Medicaid/TANF income/resource tests unless federal law requires. Not modeled — cross-cutting concern, small caseload impact. Document as a known limitation.
-
0000-01-01start date inin_effect.yaml. Replace with a realistic effective date aligned to the bill (introduced 2/5/2026, "effective immediately upon becoming law" per Sec. 99) — e.g.,2024-01-01: falseor2026-01-01: falsefor clarity. Several existing contrib files use0000-01-01, so this is non-blocking. -
Optional reusable variable. Consider extracting
federal_eitc_phase_in_endrather than inliningfederal_maximum / phase_in_rate; OK hasok_federal_eitc_maximumas precedent. -
Test YAML statute link.
il_sb3567.yamlcites "35 ILCS 5/244(b)" in a comment without a URL — add the ILCS link inline so reviewers can verify.
Validation Summary
| Check | Result |
|---|---|
| Regulatory Accuracy | 3 issues (TY 2024, tier (a)(3), means-tested exclusion) |
| Reference Quality | 4 issues (missing §152, fragile HTML URL, missing statute, no #page) |
| Code Patterns | 4 issues (hard-coded 3, wrong child-count primitive, baseline-coupled rates, range(5) loop) |
| Test Coverage | 8 gaps (TY 2024, reform-OFF, boundaries, 4+ children, zero-dependents, IL-EITC-ineligible, plateau boundary, positive-liability refund) |
| PDF Bill Audit | 3 issues (refundability claim false, TY 2024 mishandled, IRC §152 vs tax_unit_child_dependents) |
| CI Status | All passing |
Review Severity: REQUEST_CHANGES
Rationale: Three correctness/regulatory issues block merge:
- PR description and parameter description make a false claim about refundability — misleading reviewers and downstream consumers.
- TY 2024 behavior diverges from the bill (tier logic active when bill prescribes flat 20%); no 2024 test catches this.
- The wrong child-count primitive (
tax_unit_child_dependentsinstead ofeitc_child_count) feeds the federal EITC max schedule and can produce incorrect benefit amounts for filers whose dependent set differs from their EITC qualifying-child set.
The 2025+ math and most tests check out, but these three items are correctness-grade and must be fixed before merge.
Next Steps
To auto-fix issues: /fix-pr 8205
Fixes #8191.
Summary
gov.contrib.states.il.sb3567.in_effectil_ctcso low-AGI filers receive 40% of the maximum Illinois EITC amount for their Section 152 dependent count, while higher-AGI filers remain on 40% of actual Illinois EITCil_ctcnonrefundable while the reform is active by moving it from the Illinois refundable credit list to the nonrefundable credit listModeling notes
tax_unit_child_dependents, capped at 3 to match the federal EITC amount scheduleTesting
uv run --python 3.11 python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/contrib/states/il/sb3567/il_sb3567.yaml -c policyengine_usuv run --python 3.11 python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/il/tax/income/credits/il_ctc.yaml -c policyengine_usmake format