Repository navigation
Conversation
…income Forms 538-S and 538-H line 9 count the earned income credit "received in" the year, and 68 O.S. 5012 and 2904(3) count income "received". The credits on the year's own return are paid the next year. Replace eitc and ok_eitc in the source list with two receipt inputs that default to zero, ok_gross_income_federal_eitc_received and ok_gross_income_state_eitc_received, as Montana's elderly homeowner/renter credit does. The Oklahoma input counts from 2023, the first year a refundable Oklahoma credit was received. Move the audit's receipt case from #10812, drop the line 9 pins from the other cases, and add boundary cases at the sales tax and property tax credit limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11694 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 2 +1
Lines 24 20 -4
=========================================
- Hits 24 20 -4
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 branch has not been deployed
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.
Part of #10812 (state credit income audit).
What was wrong
ok_gross_incomefeeds Oklahoma's sales tax relief credit (ok_stc, Form 538-S) and property tax credit (ok_ptc, Form 538-H). Line 9 of both forms counts the "Earned Income Credit (EIC) received in 2025", and from 2024 Form 538-S adds "(if applicable, combine federal and Oklahoma amounts)" (2025 Form 511 packet, Form 538-S, PDF page 51; 2025 Form 538-H, page 1). The model counted this year'seitcandok_eitcinstead: the credits on the year's own return, which are paid after the year ends.The law and the forms agree that line 9 is a receipt:
A 2025 credit is received in 2026, so it is 2026 income. #11171 kept the current-year convention (the one TAXSIM uses) and pinned the audit's receipt case at 13,000 under an earlier ruling. This PR switches to receipts, following Montana's elderly homeowner/renter credit (#10331 for federal credits received, with #10653 for Montana credits received), which made the same change for the same "received" wording.
The timing error also leaked into five cases that #11171 otherwise fixed (TANF, veterans' disability compensation, scholarships, gambling winnings and foreign earned income): the Oklahoma credit on the year's own return added $10.80 to $22.27 to each, so #11171 pinned
eitcandok_eitcto 0 in them.What changes
Two new inputs (tax unit, default 0), beside
ok_gross_income.py:ok_gross_income_federal_eitc_received: federal earned income credit received during the calendar year, such as the refund of the prior year's credit.ok_gross_income_state_eitc_received: Oklahoma earned income credit received during the calendar year.Fix Montana disability exclusion repeal, elderly credit receipt timing and occupancy tests #10331's federal input (
mt_elderly_homeowner_or_renter_credit_other_federal_refundable_credits) is scoped to Montana (defined_for = StateCode.MT) and covers every federal refundable credit, so it isn't reusable here. Oklahoma's line 9 names only the earned income credit, so both inputs hold only that credit. They are tax-unit inputs, like theeitcandok_eitcthey replace; the formula already sums every tax unit in the household.gross_income_sources.yaml: the receipt inputs replaceeitc(2021 list) andok_eitc. The Oklahoma input joins in 2023, not 2022. The Oklahoma credit was nonrefundable through tax year 2021 and refundable from 2022 (2022 Form 511 packet, What's new, page 3), so the first refundable credits were received in 2023. The comments cite the 538-S and 538-H lines and 68 O.S. The two 2025-form references now point at thepast-year/2025copies: thecurrent/URLs now serve the 2026 forms, andcurrent/511-Pkt.pdfhas 38 pages, so#page=50no longer resolved.ok_gross_income.py,ok_stc.pyandok_ptc.pydon't change.There is no source conflict: the statute, the regulation (OAC 710:50-15-96(c), "income ... received") and both forms all say "received". The earlier current-year reading was a modelling convention, not another source. This PR adds nothing to
source_conflicts/candidates.yaml.Who is affected
With the inputs at their default of 0, line 9 is 0 for every household, because the microdata carry no prior-year credits. Gross household income falls by the year's own federal and Oklahoma earned income credits in every Oklahoma household where a tax unit has one, and nothing rises. Both credits are refundable, so they can only rise or stay the same, and Oklahoma income tax net of refundable credits falls by the same amount:
No microsimulation was run for this PR.
Tests
ok_gross_income.yaml(32 cases):ok_gross_income_audit.yaml), with the "audit" and "main:" framing dropped and the arithmetic and citations kept:eitcorok_eitcpins. The pins are also gone from the other cases that set them only to isolate line 9 (household members, dependent care, IRA distributions, disability benefits, estate income and estate loss): 21 pin lines in all.eitc: 800becomesok_gross_income_federal_eitc_received: 800. Expected 14,800 is unchanged.eitcandok_eitcasserted so the removed amounts are visible.tests/core/test_state_estate_income_invariants.py: drops theeitcandok_eitczeros that Count everyone in the household, and the missing sources, in Oklahoma gross household income #11171 added to isolate Oklahoma's line 11, and updates its docstring. The invariants now hold without them.Main (
50af7fba69) vs this branch, the same test file:On main the file gives 19 failed and 13 passed; on this branch, 32 passed. The audit file from #10812 itself, run unchanged against this branch: 10 of 10 pass (on main, 4 of 10).
Run locally, one process at a time (policyengine-core 3.37.2, the version in main's
uv.lock):ok_gross_income.yaml: 32 passed.dhs,oesc),tax_unit_itemizes.yaml,state_income_tax_excludes_use_tax.yaml,household_state_income_tax.yaml, the Oklahoma contrib reform tests, and the one partner file with an Oklahoma household (partners/analytics_coverage/.../lifeline/federal.yaml, which reads none of the changed variables): 416 passed.code_health/test_source_conflicts.py,test_parameter_yaml_keys.py,test_reference_urls.py,test_no_concatenated_reference_urls.py,test_known_dead_reference_urls.pyandtest_no_group_variables_in_person_adds.py: 415 passed.core/test_state_estate_income_invariants.pyandcore/test_claimable_filer_nj_pa_invariants.py: 6 passed.ok_gross_income,ok_stc,ok_ptcor the new inputs.ruff formatandruff check: clean.Overlapping open PRs
#10722 (railroad benefits) adds three entries after
social_securityin both lists ofgross_income_sources.yamland cases took_gross_income.yaml. This PR changes other lines in that file (theeitcandok_eitcentries, their comments and the second list's date, 2022 to 2023), so whichever merges second should rebase and keep #10722's entries in the 2023 list. #10722 is already behind #11171 in both files.Not in this PR
axiom: TheAxiomFoundation/rulespec-us#2934 queued
🤖 Generated with Claude Code