Repository navigation
Leave dependents' unemployment compensation off California, Rhode Island and Wisconsin filer returns - #10187
Leave dependents' unemployment compensation off California, Rhode Island and Wisconsin filer returns#10187MaxGhenis wants to merge 7 commits into
Conversation
…eturns Federal AGI leaves out a tax unit dependent's income (irs_gross_income masks dependents), but California's AGI subtractions, Rhode Island's AGI additions and Wisconsin's unemployment compensation subtraction summed person-level unemployment compensation over every tax unit member, so a dependent's compensation moved the filers' state AGI. Sum only the head and spouse with tax_unit_non_dep_add. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d WI returns CA Schedule CA column B, RI's 2020 IRC 85(c) add-back and WI's Schedule SB unemployment worksheet all start from the filers' own federal return. The new cases fail on main (7 of 12) and pass with the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CA: 2024 Schedule CA (540) column A takes the filers' federal amounts; the 540 booklet gives a dependent their own filing requirement (pages 4, 13). RI: RIGL 44-30-12(b)(6) and the 2020 Schedule M line 2g and instructions. WI: Wis. Stat. 71.05(6)(b)8., the 2024 Schedule SB worksheet line 1, and the 2024 Form 1 dependent filing requirement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…RI and WI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#10187 fixes the same three state lines (ca_agi_subtractions, ri_additions, wi_unemployment_compensation_subtraction) more broadly and has its own review, impact run and Axiom issues. Restore them to main here and drop tax_unit_tax_exempt_unemployment_compensation, which only Rhode Island used. #10175 should land after #10187, so the dependent routing never meets the old pooled state lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gelog - ca_agi_subtractions: tax-unit-level items such as us_govt_interest are added as they are (#9894 makes that one filer-only). - WI Schedule SB worksheet is on file page 3 in 2021 and page 2 in 2022; the RI reference is the individual 2022 Schedule M, not the RI-1041's. - The changelog also names California's state tax refund subtraction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hand-off to the US + core hubHead: Review. The Codex review lanes were held until 06:00Z and the Claude lanes were closed, so per the fallback rule an independent in-session Opus 5.5 reviewer reviewed this PR in three rounds: APPROVE at Passed locally:
The new cases fail on CI. On Impact. The hub pair at Order. This PR depends on nothing. #10175 depends on it: its owner dropped #10175's duplicate CA/RI/WI edits (head Merge. The PR needs an approving review (REVIEW_REQUIRED), so land it on the gates with Axiom. TheAxiomFoundation/rulespec-us#1729, #1730 and #1731 are queued. Follow-ups proposed as sessions or chips:
The companion WI homestead PR is #10191, which I'm still finishing. |
What was wrong
Federal AGI leaves out a tax unit dependent's income:
irs_gross_incomemultiplies every source by~is_tax_unit_dependent, because the dependent reports that income on their own return. Three state lines still summed person-level unemployment compensation over every tax unit member. A dependent's compensation therefore moved the filers' state AGI, though the filers' federal AGI never included it.Engine output on
main(with #10175 merged locally so the federal side is right). The filers are the same in each pair; only the dependent child's unemployment compensation (UC) changes.mainca_agi_subtractionsca_agica_income_taxri_additionsri_income_taxwi_unemployment_compensation_subtractionwi_agiIn the WI case, the leak also changed
wi_property_tax_creditfor an elderly couple (TY2024: 119.02 → 0).What changes
Each line now sums only the head's and spouse's amounts with
tax_unit_non_dep_add, asri_subtractionsandpa_total_taxable_incomealready do. Tax-unit-level list items (us_govt_interest,investment_in_529_plan,ri_section_179_expense_add_back) are added as before.ca_agi_subtractions: the whole Schedule CA list, which has taxable Social Security, UC, U.S. obligation interest and state tax refunds. A dependent's person-leveltaxable_social_securityis already zero (it is allocated to the head and spouse), so only UC and refunds move.ri_additions: now a formula instead ofadds.wi_unemployment_compensation_subtraction: worksheet line 1. Summing non-dependents' person-leveltaxable_unemployment_compensationequals the UC in federal AGI both onmainand after Fix the 2020 unemployment compensation exclusion: cutoff test, per-spouse cap, dependents #10175, so this does not depend on merge order.Legal basis
I read these sources in this session.
California. The 2024 Schedule CA (540) instructions, "Column A – Federal Amounts", say to "Enter … the same amounts entered on your federal Form 1040 … and federal Schedule 1." Section B line 7 reads: "California excludes unemployment compensation from taxable income. Enter on line 7, column B the amount of unemployment compensation shown in column A." The same text appears in the 2021–2025 instructions. A dependent has their own California filing requirement and standard deduction worksheet (2024 Form 540 booklet, file pages 4 and 13). FTB 3803, California's counterpart to Form 8814, moves only a child's interest and dividends.
Rhode Island. RIGL 44-30-12:
The 2020 Schedule M line 2g says "Unemployment compensation received but not included in federal adjusted gross income" (file page 2). The 2020 RI-1040 instructions say "Enter the amount of unemployment compensation excluded from your Federal taxable income" (file page 9). Page 1 of the same instructions covers who must file.
Wisconsin. Wis. Stat. 71.05(6)(b)8. subtracts the "amount included in federal adjusted gross income for the current year". Line 1 of the 2021–2025 Schedule SB worksheet reads "Fill in unemployment compensation from line 7 of federal Schedule 1 (Form 1040)" (2024, file page 2). A dependent has their own filing requirement (2024 Form 1 instructions, file page 3).
Invariants
ca_agi_subtractions,ri_additionsandwi_unemployment_compensation_subtractionunchanged, and so their CA, RI and WI AGI.main.policyengine_us/tests/core/test_dependent_unemployment_compensation_state_invariants.pychecks all three on a seeded random population: 40 tax units, each placed in CA, RI and WI; TY2020 and TY2024; single or joint; zero to two dependents with UC. In 2020 each person's taxable UC is an input, so the test does not depend on how the federal exclusion is computed (#10175). It fails onmain's formulas.Cost, measured locally on macOS: 6 tests in 2.9 s, 40 s wall including the model import, 1.36 GB peak. Each year needs two small simulations. It runs in the existing
tests/corePython group; no CI job was added.How it was checked
All-state household sweep, TY2020–2026. Five filer profiles each have a 17-year-old dependent:
Three pairs:
The sweep compares
household_state_income_tax,household_state_benefitsand every state property tax credit, with and without the child's income. It ran onmainplus Fix the 2020 unemployment compensation exclusion: cutoff test, per-spouse cap, dependents #10175, then plus Leave dependents' capital income out of state lines on the filers' return #9894/Leave dependents' own items out of DC, Delaware and Ohio subtractions #9939, then plus this PR. A drill-down listed every state variable that moved. Script, drill-down and results:~/reviews/dependent-uc-state-lines-2026-10-12/.After this PR, no CA, RI or WI tax line moves with a dependent's UC. Four kinds of mover remain, none of them this pattern on the return:
Tests. The new cases come from the forms. 7 of the 12 cases in the three files fail on
mainand pass here. The related CA and RI integration files andsalt_refund_integration.yamlpass, and so doestest_ca_educator_expense_addition_properties.py(5 passed).Not in this PR (follow-ups filed)
Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
de3815f4ccagainst this PR's head7cff12835d, for 2024 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.ca_agi_subtractionsca_agica_income_taxri_additionsri_agiri_income_taxwi_unemployment_compensation_subtractionwi_agiwi_income_taxstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsCommits after
7cff12835dchange only reference metadata, comments, tests and the changelog, so the formulas run here are the ones at the PR head. RI does not move: its add-back applies only to compensation excluded under IRC 85(c), which existed only in 2020. WI does not move: the subtraction is unchanged for every Wisconsin record in both years.Comparison files are in
fixes/10187-impact/on the hub host.Review
The Codex review lanes were held until 06:00Z and the Claude lanes were closed, so per the fallback rule an independent in-session Opus 5.5 reviewer reviewed
042b072820.Round 1: APPROVE. The reviewer re-fetched every source and file page, recomputed each case, confirmed that 7 of the 12 cases fail on
main, ran the related CA, RI and WI files, and probed vectorization across mixed tax units. Follow-ups:496f635cb0:eead67ed0f: the invariants test above.1bf37f4dc3drops their duplicate CA/RI/WI edits, so there are no conflicts; they checked that merging this PR onto it is clean and that all cases pass. After this merges, Fix the 2020 unemployment compensation exclusion: cutoff test, per-spouse cap, dependents #10175 will add two 2020 cases to these files for its dependent-own-return exclusion, and it lists this PR as a dependency.Round 2: APPROVE at
496f635cb0. Reverting each state's formula alone fails that state's cases, and the 2020 input trick is valid. The CI cost (about +0.33 GB and 6 s in the Restcoregroup, which peaks at 8.14 GB) is acceptable. Nits fixed in24653845bb: California dependents' refunds are now in the invariants test, and a comment has moved. Round 3: APPROVE at24653845bb. The reviewer also checked that a formula which drops dependents' UC but still subtracts their refunds fails the test.208a87f7a9then only reflows a docstring line the reviewer flagged.axiom: TheAxiomFoundation/rulespec-us#1729 queued (CA R&TC 17083 for line 7, plus an addendum for the Schedule CA line 1 state refund subtraction; blocked on a corpus pin bump) | TheAxiomFoundation/rulespec-us#1730 queued (RIGL 44-30-12(b)(6); the TY2026 module has no taxpayer-or-spouse restriction and no test exercising it) | TheAxiomFoundation/rulespec-us#1731 queued (Wis. Stat. 71.05(6)(b)8.; not encoded)
🤖 Generated with Claude Code