Skip to content

Audit state credit income definitions against the law (CI run, do not merge) - #10812

Open
DTrim99 wants to merge 3 commits into
mainfrom
state-credit-income-audit
Open

DTrim99 wants to merge 3 commits into
mainfrom
state-credit-income-audit

Conversation

@DTrim99

@DTrim99 DTrim99 commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Do not merge

This PR exists so CI runs the audit's 140 test cases. Each case asserts the value the law gives, so it is expected to fail on main. A red run here is the result, not a defect in the PR. No model code changes.

What this is

An audit of how 39 state credits and property tax relief programs define income, compared with each program's statute, regulation and form. It covers the programs that set their own income definition rather than reusing AGI.

Result Rows
Confirmed gaps 175 (146 leave income out, 27 count too much, 2 use the wrong year)
Two readings of the law 56
Covered by open PRs 40
No input can represent it 50
By design (year of eligibility) 3
Unverified 5
Match 347

The "covered by open PRs" count was taken on November 11, before #10769 merged.

Files

  • audit/state_credit_income/AUDIT.md: verdict, ranked gaps, patterns, the laws with two readings, and what to measure.
  • audit/state_credit_income/audit.csv: 676 rows, one per state, credit and income category, each with a quote, page and citation.
  • audit/state_credit_income/details/: the six batch write-ups.
  • audit/state_credit_income/tests/: 32 YAML files, 140 cases. Each file's first line names the test file its cases belong in.
  • policyengine_us/tests/policy/baseline/.../*_audit.yaml: copies of those 32 files, placed next to the files they belong in so CI runs them.

Limits

  • No case had been run before this PR; the expected values are hand-computed from the law.
  • Seven law quotes and six code claims were re-checked and held. The other rows have not been checked a second time.
  • Some statutes were read from mirror sites, and Denver's ordinance could not be opened.
  • The code was read at 06c0dcbc54; main has moved since.

Next

Read the CI results case by case, then open one issue per confirmed failure, ranked by measured impact.

🤖 Generated with Claude Code

DTrim99 and others added 3 commits November 11, 2026 10:36
Adds audit/state_credit_income/: AUDIT.md (verdict, ranked gaps, patterns,
laws with two readings, gaps open PRs cover, what to measure), audit.csv
(676 rows, one per state, credit and income category, with the quoted
passage, page and citation), the per-batch write-ups and 140 YAML cases
written to fail on main, one or more per confirmed gap.

No model code changes. No test has been run: the cases are hand-computed
from the law and the code as read at 06c0dcb.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
PolicyEngine assigns rebates and property tax relief to the year of
eligibility, so testing the same year's income is the convention. New
Jersey's Stay NJ, Tennessee's elderly relief and D.C.'s senior relief
move from timing gaps to by-design (175 confirmed gaps, down from 178).
Ohio's homestead exemption is reframed: its formula reads the prior
year's income against the convention. AUDIT.md also lists the Utah and
Indiana formulas that read an earlier year.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Copies the 32 audit test files (140 cases) from
audit/state_credit_income/tests/ into the baseline test tree as
*_audit.yaml, next to the test files their first lines name. Each case
asserts the value the law gives, so it fails until its gap is fixed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@DTrim99
DTrim99 marked this pull request as draft November 12, 2026 21:36
@DTrim99
DTrim99 marked this pull request as ready for review November 12, 2026 21:36
This was referenced Nov 19, 2026
DTrim99 added a commit that referenced this pull request Nov 20, 2026
#11172)

The Homestead Credit Refund now adds the amounts Minn. Stat. 290A.03,
subd. 3(a)(2) counts beyond federal AGI: SSI, Minnesota Supplemental Aid,
General Assistance, MFIP, workers' compensation, tax-exempt interest,
nontaxable retirement account distributions, alimony not in AGI and the
HSA deduction. Its retirement base amount follows the federal IRA
deductible amount for the claimant and spouse (subd. 3(d)(2)), so it is
$7,500 per filer from 2026 instead of a frozen $7,000.

The renter's credit counts only the claimant's and spouse's AGI
(290.0693, subd. 1(g) and 7), not the AGI of other adults in the SPM unit.

Moves the Minnesota cases from the #10812 audit into the real test files.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 20, 2026
The total income for the homestead exemption read Ohio modified AGI for the
prior year. With only one year of inputs, as in household runs and
microsimulation, that read returned 0, so the income limit never applied.
R.C. 323.151(C) uses the year before application; PolicyEngine books the
relief to that income year, so the exemption now reads the same year's
Ohio modified AGI.

Moves the one-year-of-inputs case from the #10812 audit, adds cases at and
one dollar above the 2026 income limit, and restates the two-year total
income cases for the same-year read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 20, 2026
Rhode Island household income for the property tax relief credit now sums
every tax unit in the household (R.I. Gen. Laws 44-33-3(6)) and adds back
the business, rental, pass-through and capital losses and section 911
amounts that federal AGI subtracts (44-33-3(7); RI-1040H line 31). It also
counts veterans' benefits, gross retirement account distributions, general
assistance, SSI and the state supplement, and tax-exempt disability
benefits, and counts pre-2019 alimony once instead of twice.

Moves the nine Rhode Island cases from the state credit income audit
(#10812) into the variable's test file, adds edge cases, and keeps six
eligibility cases at zero household income by giving their claimants no
SSI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450 pushed a commit that referenced this pull request Nov 20, 2026
* Read the same year's income for the Ohio homestead exemption

The total income for the homestead exemption read Ohio modified AGI for the
prior year. With only one year of inputs, as in household runs and
microsimulation, that read returned 0, so the income limit never applied.
R.C. 323.151(C) uses the year before application; PolicyEngine books the
relief to that income year, so the exemption now reads the same year's
Ohio modified AGI.

Moves the one-year-of-inputs case from the #10812 audit, adds cases at and
one dollar above the 2026 income limit, and restates the two-year total
income cases for the same-year read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: describe the Ohio homestead income test as a same-year proxy

- Reword the oh_homestead_exemption_total_income documentation and formula
  comment: R.C. 323.151(C) uses the year before application, and the model
  defaults to the current year's Ohio modified AGI as a proxy, which an
  explicit input overrides (same pattern as or_tax_before_credits_in_prior_year).
- Rename total income test Cases 1 and 2 as the proxy default; inputs and
  expected values are unchanged.
- Limit the changelog fragment to single-year runs and use the proxy framing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: David Trimmer <178813244+DTrim99@users.noreply.github.com>
hua7450 pushed a commit that referenced this pull request Nov 20, 2026
* Count all Rhode Island property tax relief household income

Rhode Island household income for the property tax relief credit now sums
every tax unit in the household (R.I. Gen. Laws 44-33-3(6)) and adds back
the business, rental, pass-through and capital losses and section 911
amounts that federal AGI subtracts (44-33-3(7); RI-1040H line 31). It also
counts veterans' benefits, gross retirement account distributions, general
assistance, SSI and the state supplement, and tax-exempt disability
benefits, and counts pre-2019 alimony once instead of twice.

Moves the nine Rhode Island cases from the state credit income audit
(#10812) into the variable's test file, adds edge cases, and keeps six
eligibility cases at zero household income by giving their claimants no
SSI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test the Rhode Island alimony branch for a reform that takes alimony out of gross income

Covers the fallback in ri_property_tax_nontaxable_alimony when federal gross
income doesn't list taxable_alimony_income, which codecov flagged as the
one uncovered patch line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: pick the RI property tax credit rate by household size

Select the one-person vs two-or-more rate column with household_size
(44-33-9(1), RI-1040H line 1f) instead of tax_unit_size, update the
flat-input credit tests to set household_size, add a split-filer case,
and restore main's inputs for the SSI/SSP eligibility case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: David Trimmer <178813244+DTrim99@users.noreply.github.com>
DTrim99 added a commit that referenced this pull request Nov 20, 2026
Michigan total household resources, used by the homestead property tax
credit and the home heating credit, now count taxable IRA, 401(k), 403(b),
SEP and Keogh distributions, taxable Roth conversions, military retired pay
and survivor annuities, other survivor benefits, forgiven debt and employer
dependent care benefits (2025 MI-1040 book, pages 26 and 32). Line 31 now
subtracts medical_expense_health_insurance_premiums, so premiums in the
decomposed inputs and the Medicare Part B premium the enrollee pays come off.

Moves the Michigan cases from the state credit income audit (#10812) into
the household resources tests and adds edge cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 20, 2026
Arizona's property tax credit now counts tax-exempt IRA, 401(k), 403(b)
and SEP distributions (ARS 43-1072(H)(6)(g), Form 140PTC line E). West
Virginia's homestead excess property tax credit counts tax-exempt
disability insurance as loss of earnings insurance (W. Va. Code
11-21-23(d)(1)(C)). Nebraska's child care refundable credit uses federal
AGI plus the section 911, 931 and 933 exclusions (Neb. Rev. Stat.
77-7202(8), DOR worksheet line 2). Virginia's low-income credit adds
dependents' own AGI to family VAGI (Va. Code 58.1-339.8(A)). North
Dakota's renter's refund no longer lets a net capital loss reduce
income, following the renter's refund application (SFN 24777).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 20, 2026
32 V.S.A. 6061(18) defines renter credit income as federal AGI increased by
the business, rental, farm and capital losses AGI deducted (A) and the listed
above-the-line deductions (D). Neither was added back. The 75% Social Security
term now reads only the claimant's and spouse's nontaxable benefits, as
6066(b)(1) and Form RCC-146 line 11 do, not a dependent's.

Moves the four Vermont renter credit cases from the #10812 audit into the
variable's test file and records the line 13 netting question as a
source-conflict candidate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 20, 2026
…come

MCA 15-30-2337(9)(a) counts federal AGI plus all nontaxable income. Gross
household income now also counts alimony outside federal AGI, savings bond
interest excluded under IRC 135, income excluded under IRC 911 (Form 2555
line 45, on the head) and tax-exempt 401(k), 403(b) and SEP distributions,
which count in full as Roth IRA distributions already did. Moves the four
Montana cases from the #10812 audit into the real tests and adds edge cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 20, 2026
Homeowner's/renter's relief nontaxable income (Utah Code 59-2a-101(20)(a))
now counts only alimony that federal AGI leaves out, and adds SSI,
nontaxable disability insurance benefits ("loss of time" insurance) and
the capital loss carryover claimed in the year. The Utah child tax credit
phases out on modified adjusted gross income under 59-10-1047(1)(d):
total income plus the claimant's and spouse's tax-exempt interest, with
no Utah subtractions or state tax refund taken out. The contrib reform
uses the same income.

Moves the Utah audit cases from #10812 into the real test files, adds
cases for each rule, and enters no SSI in the existing cases that assumed
none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 21, 2026
* Fix five state credit income definitions from the #10812 audit

Arizona's property tax credit now counts tax-exempt IRA, 401(k), 403(b)
and SEP distributions (ARS 43-1072(H)(6)(g), Form 140PTC line E). West
Virginia's homestead excess property tax credit counts tax-exempt
disability insurance as loss of earnings insurance (W. Va. Code
11-21-23(d)(1)(C)). Nebraska's child care refundable credit uses federal
AGI plus the section 911, 931 and 933 exclusions (Neb. Rev. Stat.
77-7202(8), DOR worksheet line 2). Virginia's low-income credit adds
dependents' own AGI to family VAGI (Va. Code 58.1-339.8(A)). North
Dakota's renter's refund no longer lets a net capital loss reduce
income, following the renter's refund application (SFN 24777).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Link the North Dakota capital loss candidate to its PR

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: give the WV disability case its total disability benefits

The WV gross household income disability case set only
tax_exempt_disability_benefits. Add the matching disability_benefits
input so the case describes a recipient-paid plan whose benefits are
fully tax-exempt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: David Trimmer <178813244+DTrim99@users.noreply.github.com>
DTrim99 added a commit that referenced this pull request Nov 21, 2026
…ehold resources (#11183)

* Count missing income sources in Michigan household resources

Michigan total household resources, used by the homestead property tax
credit and the home heating credit, now count taxable IRA, 401(k), 403(b),
SEP and Keogh distributions, taxable Roth conversions, military retired pay
and survivor annuities, other survivor benefits, forgiven debt and employer
dependent care benefits (2025 MI-1040 book, pages 26 and 32). Line 31 now
subtracts medical_expense_health_insurance_premiums, so premiums in the
decomposed inputs and the Medicare Part B premium the enrollee pays come off.

Moves the Michigan cases from the state credit income audit (#10812) into
the household resources tests and adds edge cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: one reference entry per source in Michigan household resources

Merge the duplicate MI-1040 Book and MI-1040CR-7 Book reference entries
into one entry per source document, with page ranges in the titles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: David Trimmer <178813244+DTrim99@users.noreply.github.com>
DTrim99 added a commit that referenced this pull request Nov 21, 2026
…come

MCA 15-30-2337(9)(a) counts federal AGI plus all nontaxable income. Gross
household income now also counts alimony outside federal AGI, savings bond
interest excluded under IRC 135, income excluded under IRC 911 (Form 2555
line 45, on the head) and tax-exempt 401(k), 403(b) and SEP distributions,
which count in full as Roth IRA distributions already did. Moves the four
Montana cases from the #10812 audit into the real tests and adds edge cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 21, 2026
32 V.S.A. 6061(18) defines renter credit income as federal AGI increased by
the business, rental, farm and capital losses AGI deducted (A) and the listed
above-the-line deductions (D). Neither was added back. The 75% Social Security
term now reads only the claimant's and spouse's nontaxable benefits, as
6066(b)(1) and Form RCC-146 line 11 do, not a dependent's.

Moves the four Vermont renter credit cases from the #10812 audit into the
variable's test file and records the line 13 netting question as a
source-conflict candidate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 21, 2026
Homeowner's/renter's relief nontaxable income (Utah Code 59-2a-101(20)(a))
now counts only alimony that federal AGI leaves out, and adds SSI,
nontaxable disability insurance benefits ("loss of time" insurance) and
the capital loss carryover claimed in the year. The Utah child tax credit
phases out on modified adjusted gross income under 59-10-1047(1)(d):
total income plus the claimant's and spouse's tax-exempt interest, with
no Utah subtractions or state tax refund taken out. The contrib reform
uses the same income.

Moves the Utah audit cases from #10812 into the real test files, adds
cases for each rule, and enters no SSI in the existing cases that assumed
none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99 added a commit that referenced this pull request Nov 23, 2026
…meowner/renter credit (#11180)

* Count more nontaxable income in Montana's elderly credit household income

MCA 15-30-2337(9)(a) counts federal AGI plus all nontaxable income. Gross
household income now also counts alimony outside federal AGI, savings bond
interest excluded under IRC 135, income excluded under IRC 911 (Form 2555
line 45, on the head) and tax-exempt 401(k), 403(b) and SEP distributions,
which count in full as Roth IRA distributions already did. Moves the four
Montana cases from the #10812 audit into the real tests and adds edge cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: track Roth employer-plan basis and register the Montana IRA basis conflict

Document in gross_income_sources.yaml that no input holds basis, so Roth
401(k), 403(b) and SEP distributions count in full, as Roth IRA distributions
do (issue #11198). Register the Montana IRA basis conflict in
source_conflicts/candidates.yaml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: mark the Montana IRA basis entry open and capture its sources

Mark the Montana elderly homeowner/renter credit IRA basis entry in
source_conflicts/candidates.yaml as open, and add local captures of
ARM 42.4.301 (2024) and the Form 2 instructions (2024 p. 47, 2025 p. 45)
that the entry cites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: David Trimmer <178813244+DTrim99@users.noreply.github.com>
DTrim99 added a commit that referenced this pull request Nov 23, 2026
32 V.S.A. 6061(18) defines renter credit income as federal AGI increased by
the business, rental, farm and capital losses AGI deducted (A) and the listed
above-the-line deductions (D). Neither was added back. The 75% Social Security
term now reads only the claimant's and spouse's nontaxable benefits, as
6066(b)(1) and Form RCC-146 line 11 do, not a dependent's.

Moves the four Vermont renter credit cases from the #10812 audit into the
variable's test file and records the line 13 netting question as a
source-conflict candidate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450 pushed a commit that referenced this pull request Nov 23, 2026
…out income (#11182)

* Fix Utah relief household income and the Utah CTC phase-out income

Homeowner's/renter's relief nontaxable income (Utah Code 59-2a-101(20)(a))
now counts only alimony that federal AGI leaves out, and adds SSI,
nontaxable disability insurance benefits ("loss of time" insurance) and
the capital loss carryover claimed in the year. The Utah child tax credit
phases out on modified adjusted gross income under 59-10-1047(1)(d):
total income plus the claimant's and spouse's tax-exempt interest, with
no Utah subtractions or state tax refund taken out. The contrib reform
uses the same income.

Moves the Utah audit cases from #10812 into the real test files, adds
cases for each rule, and enters no SSI in the existing cases that assumed
none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test the Utah relief fallbacks for reforms that change federal gross income

Covers the alimony fallback when gross income doesn't list
taxable_alimony_income, and the carryover's zero when gross income doesn't
list capital_gains, which codecov flagged as uncovered patch lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test the Utah carryover without capital gain distributions in gross income

Covers the false side of the non_sch_d_capital_gains check in
ut_homeowner_renter_relief_loss_carryforward, the remaining partial line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: register the Utah bond interest reading and keep main's inputs in the SSI cases

Record the Utah relief income bond-interest interpretation in
source_conflicts/candidates.yaml and restore main's household inputs in
the SSI test cases for the Utah homeowner/renter relief and the
state property tax refund tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: test the Utah bond interest reading and clarify the liability limit

Add a Utah CTC test case for the TC-40A code 57 bond interest reading,
state in the source-conflict candidate that both readings give the same
credit after the nonrefundable liability limit, and note in the
homeowner/renter relief test that SSI reads the head's own income.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: David Trimmer <178813244+DTrim99@users.noreply.github.com>
hua7450 pushed a commit that referenced this pull request Nov 23, 2026
…#11178)

* Add back losses and listed deductions in Vermont renter credit income

32 V.S.A. 6061(18) defines renter credit income as federal AGI increased by
the business, rental, farm and capital losses AGI deducted (A) and the listed
above-the-line deductions (D). Neither was added back. The 75% Social Security
term now reads only the claimant's and spouse's nontaxable benefits, as
6066(b)(1) and Form RCC-146 line 11 do, not a dependent's.

Moves the four Vermont renter credit cases from the #10812 audit into the
variable's test file and records the line 13 netting question as a
source-conflict candidate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Link the Vermont loss add-back candidate to its PR

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: add back capital losses allowed against gains in Vermont renter credit income

Add capital_losses_allowed_against_gains to the vt_renter_credit_income
add-backs next to limited_capital_loss, so both capital loss parts that
federal AGI deducts are restored. Update test Case 6 to assert both
capital terms, and update the renter-credit-loss-add-back-netting
source-conflict candidate note and example to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix issues from review: add back capital losses netted inside one filer's gains in Vermont renter credit income

Vermont renter credit household income now adds back capital losses that
were netted against the same person's capital gains, including the
prior-year long-term loss carryover absorbed by that person's gain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test the Vermont capital loss add-back when capital gains leave gross income

Adds Case 17 to cover the reform guard in vt_renter_credit_capital_loss_add_back that returns 0 when capital_gains is not a gross income source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: David Trimmer <178813244+DTrim99@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant