Repository navigation
Count everyone in the household, and the missing sources, in Oklahoma gross household income - #11171
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11171 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 24 22 -2
Branches 0 2 +2
=========================================
- Hits 24 22 -2
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:
|
hua7450
left a comment
There was a problem hiding this comment.
Thanks, David. Counting every member of the household is right for both credits: 68 O.S. 5012 (sales tax relief) and 2904(3) (property tax relief) define gross household income in the same words, so the one shared variable serves both. Each return's income counts once per household, SPM-unit TANF is not double counted across returns, none of the nine added sources overlaps another, and there is no path from the newly read benefits back to the credits. Two fixes before I approve.
Before merge
- The Oklahoma EIC counts as income in 2021, when it was nonrefundable.
ok_eitcis added togross_income_sources.yaml, whose only date is 2021-01-01. The credit became refundable in 2022 (2022 packet, "What's new": "The Oklahoma Earned Income Credit (EIC) was made refundable"), and a nonrefundable credit lowers tax; it is not income received. Run at this head for 2021: a married couple with three children and wages of 48,000 getsok_gross_income50,076.31 andok_stc0; withoutok_eitcit is 49,983.18 and 200. Please keep the 2021-01-01 list withoutok_eitc, add a 2022-01-01 list with it, restore 14,800 in the 2021 test and drop itsok_eitcassertion. Form 538-S asks to "combine federal and Oklahoma amounts" only from 2024, so 2022 and 2023 rest on the statute; a comment should say so. +=in the formula.ok_gross_income.pyline 51 (unit_income += ...) is a line this PR rewrites. The repo rule is to write the addition out (unit_income = unit_income + ...).
Optional
- Two capital gain items. The statutes list "capital gains" and Form 538-S line 11 reads "gains from the sale or exchange of property (taxable & nontaxable)". Capital gain distributions (
non_sch_d_capital_gains) and Form 4797 gains (other_net_gain_gross_income) are in the federal list but not Oklahoma's, and the "Not in this PR" list does not name them. - Comments and references. The TANF comment is now inaccurate for the sales tax credit, the 538-H line 10 quote drops "housing assistance", and two packet URLs lack
#page. - Tests. Four
ok_stcandok_ptccases sit inok_gross_income.yaml, and no case combines a multi-member return with a second return.
Oklahoma's sales tax and property tax credits test gross household income, which 68 O.S. 5012 and 2904(3) and Forms 538-S and 538-H define as the income of everyone living in the household. The model summed one tax unit. Each tax unit in a household now gets the total over every tax unit there. The source list also adds dependent care benefits, retirement account distributions, TANF, veterans' and disability benefits, scholarships, gambling winnings, excluded foreign earned income and the Oklahoma EITC (Form 538-S line 9 combines it with the federal credit), keeping the current-year convention for the credits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Oklahoma earned income credit was nonrefundable in 2021 and became refundable in 2022, so it joins the gross income sources list from 2022-01-01. The 2021 test expects 14,800 again (wages + Social Security + federal EIC). The variable no longer mutates the accumulator in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7ad0c03 to
26cf088
Compare
|
Thanks, Ziming. Fixed in 26cf088, rebased on main. Fixed (your "Before merge" items)
Skipped (optional, not in this round): the two capital-gain items, the comment and reference fixes, and test placement. Verification: the Oklahoma income tax tests pass locally (222/222), as does |
hua7450
left a comment
There was a problem hiding this comment.
Thanks, David. Both fixes are in. ok_eitc joins the list from 2022, when the credit became refundable, and the 2021 test is back to 14,800 with the ok_eitc assertion dropped; the comment explains the 2022-2023 statutory basis. The += is written out. Comparing the PR's own diff before and after the rebase, those are the only changes. Approving.
Part of #10812 (state credit income audit).
What was wrong
ok_gross_incomefeeds Oklahoma's sales tax credit (ok_stc, Form 538-S) and property tax credit (ok_ptc, Form 538-H). It summed its sources over one tax unit and left out several kinds of income the law counts.What changes
Whose income. 68 O.S. 5012 (sales tax credit) and 68 O.S. 2904(3) (property tax credit) define gross household income as income "received by all persons occupying the same household" (Title 68 compiled, PDF pages 1373 and 1635). OAC 710:50-15-96(c) says the same. Form 538-S Part 3 asks for income "received by ALL members of your household", and line 13 for "income of others living in your household" (2025 Form 538-S, page 1 and page 2). Form 538-H Part 2 is the same (page 1).
The formula still computes each tax unit's own gross income from the source list. Each source is floored at zero per return, and capital gains are netted within the return first, as before. It then spreads each unit's amount evenly over that unit's members, sums the members of each household, and gives every tax unit in the household that total. The mapping goes through persons, so tax units that share a household each count every unit's income once. One member's loss doesn't offset another member's income, because each return's lines are gross positive amounts ("YOU MAY NOT ENTER NEGATIVE AMOUNTS").
Missing sources (added to
gross_income_sources.yaml, each with its citation):dependent_care_employer_benefitsemployment_income, because the definition excludes 401(k) and traditional IRA deferrals.retirement_distributionspension_incomeleaves out IRA, 401(k), 403(b), SEP and Keogh distributions.tanfok_stcalready checksis_tanf_enrolled), so this matters for the property tax credit.veterans_benefitsdisability_benefitseducational_assistancegambling_winningssection_911_excluded_incomeok_eitcEITC timing (line 9). Line 9 asks for the EIC "received in 2025", which is the prior year's credit. Per David's ruling, the model keeps PolicyEngine's current-year convention, which TAXSIM also uses: it counts the credits on the year's own return, now federal plus Oklahoma. The audit's "EITC received in the year" case stays as a regression test that expects the current-year value (13,000), and its comment states the convention.
The variable's label, documentation and references and the parameter's description, label and references are updated. The parameter now cites the statute, and its description covers both credits.
Who is affected
These are refundable credits, so the changes can only lower them or leave them unchanged:
Tests
Moved from #10812 (
ok_gross_income_audit.yaml) intook_gross_income.yaml, with the arithmetic and citations kept: household members (48,000 on both returns), dependent care benefits, IRA distributions, TANF, veterans' benefits, disability benefits, scholarships, gambling, the EITC case and foreign earned income. Cases that isolate one source now set both line 9 credits (eitcandok_eitc) to zero. Per the ruling, the EITC case now expects the current-year value, 13,000.Added:
Existing tests changed:
ok_gross_income.yaml, "OK gross income unit test 1" (2021): 14,800 becomes 14,814.62. The Oklahoma EIC is now counted. Under 2020 rules for a filer with no qualifying child: min(538, 12,000 x 7.65%) = 538, less 7.65% x (12,000 - 8,790) = 245.565, gives 292.435; 5% of that is 14.62175. The 2021 nonrefundable cap doesn't bind, because the tax of 72 on 4,650 of taxable income is higher.tests/core/test_state_estate_income_invariants.py: also setsok_eitcto zero, next to the federaleitcit already zeroed. The Oklahoma credit moves with an estate loss or with rental income (which counts toward the EITC investment income limit), so the estate and rental identities would no longer isolate line 11.Not in this PR
Other Oklahoma gaps from the audit, left for later:
pell_grant) and paid family leave benefits.Tested on Modal: run
w1-ok-b, 240/240 passed (the Oklahoma test folder, the partner tests, every other YAML file with an Oklahoma household, and 9 Python test files including the estate-income and claimable-filer invariants and the source-conflict guard).🤖 Generated with Claude Code