Skip to content

Count the earned income credits received, not this year's credits, in Oklahoma gross household income - #11694

Merged
DTrim99 merged 1 commit into
mainfrom
ok-gross-income-credits-received
Dec 4, 2026
Merged

DTrim99 merged 1 commit into
mainfrom
ok-gross-income-credits-received

Conversation

@DTrim99

@DTrim99 DTrim99 commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #10812 (state credit income audit).

What was wrong

ok_gross_income feeds 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's eitc and ok_eitc instead: 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:

  • 68 O.S. 5012 (sales tax) and 2904(3) (property tax) define gross household income as income "received by all persons occupying the same household ... and any other type of income received" (Title 68 compiled, PDF pages 1635 and 1373). 68 O.S. 5011(C) tests "the gross household income for such year", the calendar year of the claim (PDF page 1633).
  • Form 538-S Part 3 asks for income "received by ALL members of your household in the year 2025", and its definition says "Income that is exempt must be included in the year received" (packet PDF pages 50 and 52). Form 538-H Part 2 asks for income "received by ALL members of your household in 2025".

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 eitc and ok_eitc to 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 the eitc and ok_eitc they replace; the formula already sums every tax unit in the household.

  • gross_income_sources.yaml: the receipt inputs replace eitc (2021 list) and ok_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 the past-year/2025 copies: the current/ URLs now serve the 2026 forms, and current/511-Pkt.pdf has 38 pages, so #page=50 no longer resolved.

  • ok_gross_income.py, ok_stc.py and ok_ptc.py don'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:

  • Sales tax relief credit: households whose own credits pushed them over the $20,000 limit (no dependents, under 65, not disabled) or the $50,000 limit now qualify for $40 per exemption. Example: a married couple, both 40, with $19,500 of wages and no dependents. Their 2025 credits are $513.60 federal and $8.46 Oklahoma. The credit was $0 (income $20,022.06) and is now $80 (income $19,500).
  • Property tax credit: the credit rises by 1% of the removed credits, up to the $200 cap, and households pushed over the $12,000 limit regain it. Example: a totally disabled 50-year-old with $11,500 of wages and $500 of property tax. Their 2025 credits are $581.68 federal and $16.53 Oklahoma. The credit was $0 (income $12,098.21) and is now $200.
  • Line 9 when inputs are supplied: a user who records the credits received gets the form's line 9 in full, federal plus (from 2023) Oklahoma, counted once for every tax unit in the household.
  • Understatement: with no receipts recorded, the model now leaves out the prior year's credits that households did receive during the year, so it can overstate both credits for prior-year recipients. No microdata imputation exists yet (see Not in this PR).
  • TAXSIM: TAXSIM puts the current-year credit on line 9. Oklahoma comparisons for filers with an earned income credit now differ on line 9 unless the receipt inputs are set.

No microsimulation was run for this PR.

Tests

ok_gross_income.yaml (32 cases):

  • Moved from Audit state credit income definitions against the law (CI run, do not merge) #10812 (ok_gross_income_audit.yaml), with the "audit" and "main:" framing dropped and the arithmetic and citations kept:
  • Changed:
    • "OK gross income unit test 1" (2021): the input eitc: 800 becomes ok_gross_income_federal_eitc_received: 800. Expected 14,800 is unchanged.
    • "...combines the federal and Oklahoma earned income credits received": the 2025 return's own credits (3,400 and 170) are still asserted, and the household now records the same amounts as received from the 2024 return. Expected 13,570 is unchanged.
  • Added:
    • The Oklahoma credit received is left out in 2022 (10,000) and counted in 2023 (10,150).
    • Sales tax credit at exactly the $20,000 limit with $2,000 received (credit 40), and $1 over (20,001, credit 0).
    • Property tax credit at exactly the $12,000 limit with $600 received (credit 200), and $1 over (12,001, credit 0).
    • The two "Who is affected" examples (sales tax credit 80, property tax credit 200), with this year's eitc and ok_eitc asserted so the removed amounts are visible.
    • A receipt on one return counts for every return in the household: [48,500, 48,500].
  • tests/core/test_state_estate_income_invariants.py: drops the eitc and ok_eitc zeros 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:

Case Main Branch
EIC received in the year, not this year's credit 13,022.27 10,000
TANF (pins removed) 7,801.63 7,400
Veterans' disability compensation (pins removed) 22,671.27 22,000
Scholarships (pins removed) 14,671.27 14,000
Gambling winnings (pins removed) 13,477.73 13,000
Foreign earned income (pins removed) 20,022.27 20,000
Disability benefits (pins removed) 16,237.43 16,000
Estate loss (pins removed) 18,084.43 18,000
Couple, sales tax credit 20,022.06 (credit 0) 19,500 (credit 80)
Disabled filer, property tax credit 12,098.21 (credit 0) 11,500 (credit 200)
2021 unit test, the 2022 and 2023 cases, the four limit cases, the combined-credits case, the household-receipt case error (input variable doesn't exist on main) pass

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.
  • The Oklahoma tax test folder: 242 passed.
  • The other Oklahoma folders (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.
  • pytest: 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.py and test_no_group_variables_in_person_adds.py: 415 passed. core/test_state_estate_income_invariants.py and core/test_claimable_filer_nj_pa_invariants.py: 6 passed.
  • No partner test reads ok_gross_income, ok_stc, ok_ptc or the new inputs.
  • ruff format and ruff check: clean.

Overlapping open PRs

#10722 (railroad benefits) adds three entries after social_security in both lists of gross_income_sources.yaml and cases to ok_gross_income.yaml. This PR changes other lines in that file (the eitc and ok_eitc entries, 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

  • Microdata: no imputation of the earned income credits received during the year (in effect, the prior year's credits), which would fill the two inputs. Montana's receipt inputs have the same gap.
  • Other refundable credits: the forms name only the earned income credit on line 9. The model still counts no other refundable credit received during the year, such as a federal additional child tax credit refund, the 2020-2021 Economic Impact Payments or advance child tax credit, or a prior year's Oklahoma sales tax or property tax credit refund, before or after this PR. Whether 68 O.S. 5012's "income of every type" reaches them is open.
  • The other Oklahoma gaps Count everyone in the household, and the missing sources, in Oklahoma gross household income #11171 listed under "Not in this PR" (other nontaxable W-2 income, strike and survivor benefits, guaranteed income, Pell grants and paid leave, Roth basis, the two-readings rows, railroad retirement in Count railroad benefits in state tax worksheets, income tests and limits as each state's law does #10722).

axiom: TheAxiomFoundation/rulespec-us#2934 queued

🤖 Generated with Claude Code

…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

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8999568) to head (190b852).
⚠️ Report is 453 commits behind head on main.

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     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DTrim99
DTrim99 marked this pull request as ready for review December 3, 2026 15:10
@DTrim99

DTrim99 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

@PavelMakarchuk, could you review this one? There's one convention question I'd like your read on.

This PR counts the earned income credit received during the year on line 9 of Oklahoma's sales tax relief and property tax credit forms, not the credit on the year's own return. I went this way because Oklahoma says "received" explicitly at every level:

  • Statute: 68 O.S. 5012 (sales tax relief) and 2904(3) (property tax credit) define gross household income as income "received by all persons occupying the same household".
  • Regulation: OAC 710:50-15-96(c) also says income "received".
  • Forms: line 9 of Forms 538-S and 538-H asks for the "Earned Income Credit (EIC) received in 2025". The 538-S definition adds that "Income that is exempt must be included in the year received".

That departs from our usual convention. We normally count a credit in the year it is computed, as TAXSIM does, and #11171 kept Oklahoma on that convention. Montana's elderly homeowner/renter credit has the same "received" wording, and #10331 and #10653 moved it to receipts. This PR does the same for Oklahoma, with two receipt inputs that default to 0: one for the federal EITC and one for the Oklahoma EITC (from 2023, the first year Oklahoma's refundable credits were received).

Effect: with the inputs at 0, Oklahoma gross household income falls by the year's own credits for every EITC household, so the sales tax relief and property tax credits can only rise or stay the same. Oklahoma comparisons with TAXSIM will differ on line 9 unless the receipt inputs are set.

Question: given our usual current-year convention, do you agree that Oklahoma's explicit "received" wording should govern here? If you'd rather keep the current-year convention, I'll close this and leave #11171's behavior in place.

@PavelMakarchuk PavelMakarchuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review at 190b852

This PR changes line 9 of Oklahoma gross household income (Forms 538-S and 538-H) from the earned income credits on the year's own return (eitc, ok_eitc) to the credits received during the year. Two new tax-unit inputs hold these amounts: ok_gross_income_federal_eitc_received and ok_gross_income_state_eitc_received. Both default to 0. The Oklahoma input enters the sources list in 2023, because the first refundable Oklahoma credits (tax year 2022) were paid in 2023. The PR also removes the eitc and ok_eitc pins that earlier tests used to isolate other lines.

Verdict: APPROVE

On the convention question: I agree that the "received" wording governs here. The statute, the regulation and both forms say "received", and the Montana elderly homeowner/renter credit already uses the same receipt approach. The current-year credit was a modelling convention, not a reading of any Oklahoma source.

CRITICAL

None.

SHOULD ADDRESS

None.

SUGGESTION

  1. The default of 0 understates line 9 for steady filers. ok_gross_income_federal_eitc_received.py and ok_gross_income_state_eitc_received.py have no formula. A filer who gets a similar credit every year now shows $0 on line 9, so the model can overstate both credits for that filer. Example: the 2025 couple in the new sales tax test, with $19,500 of wages, gets $80. If they received a similar credit in 2025 from their 2024 return, the form gives $0. The PR states this gap clearly, and Montana has the same gap. A later option is a formula that uses the prior-year credit (eitc at period.last_year) as the default, with the input as an override. That costs a prior-year federal and Oklahoma tax computation in microsimulation, so it is a follow-up, not a fix for this PR.
  2. The variable references still point at the current/ forms. ok_gross_income.py lines 20, 24 and 28 use forms/individuals/current/..., and the comments call them the 2025 forms. These URLs now serve the 2026 forms. The PR moved the same links in gross_income_sources.yaml to the past-year/2025 copies. Do the same in ok_gross_income.py, in this PR or in a follow-up.

What I checked

  • Sources:
    • 68 O.S. 2904(3) (Title 68 PDF page 1373) and 68 O.S. 5012 (page 1635): "income of every type, regardless of the source, received by all persons occupying the same household". 68 O.S. 5011(C) tests "the gross household income for such year". The citations and page numbers are correct.
    • 2025 Form 511 packet, Form 538-S Part 3: income "received by ALL members of your household in the year 2025", line 9 "Earned Income Credit (EIC) received in 2025 (if applicable, combine federal and Oklahoma amounts)", and "Income that is exempt must be included in the year received" (pages 50 to 52).
    • 2025 Form 538-H line 9: "Earned Income Credit (EIC) received in 2025" (page 1).
    • 2022 Form 511 packet, "What's new" (page 3): the Oklahoma EIC "was made refundable". This supports the 2023 start date for the Oklahoma input.
  • Code: the two inputs are float, TaxUnit, YEAR, defined_for = StateCode.OK, with no formula. ok_gross_income already sums every tax unit in the household, so a receipt on one return counts once for all units. The only readers of ok_gross_income are ok_stc and ok_ptc. Nothing else reads the new inputs. The change has no vectorization risk.
  • Partner tests: the PR does not edit any file under tests/policy/baseline/partners/.
  • Related work: #11171 (merged) set the current-year convention. #10722 (open, railroad benefits) also edits gross_income_sources.yaml and ok_gross_income.yaml. The second PR to merge must keep the other PR's entries in the 2023 list.
  • Tests at 190b852 (policyengine-core 3.38.0):
    • ok_gross_income.yaml: 32 passed.
    • The full Oklahoma baseline folder (gov/states/ok): 611 passed.
    • pytest core/test_state_estate_income_invariants.py, code_health/test_parameter_yaml_keys.py, test_no_concatenated_reference_urls.py and test_known_dead_reference_urls.py: 124 passed.

@DTrim99
DTrim99 merged commit 79f83e9 into main Dec 4, 2026
37 checks passed
@DTrim99
DTrim99 deleted the ok-gross-income-credits-received branch December 4, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants