Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
efac95f
Add Oregon LIHEAP regular heating assistance (#9743)
hua7450 Oct 9, 2026
4e54d42
Update PolicyEngine US
hua7450 Oct 9, 2026
54bdfc4
Count capital gains once in Arizona property tax credit income (#9762)
MaxGhenis Oct 9, 2026
00968de
Update PolicyEngine US
MaxGhenis Oct 9, 2026
fb9fa56
Exclude unspecified estate and trust income from QBI (#10027)
MaxGhenis Oct 9, 2026
ded9c7c
Update PolicyEngine US
MaxGhenis Oct 9, 2026
b672ff7
Name Ziming Hua as the approver for partner test edits (#10035)
MaxGhenis Oct 9, 2026
d53a466
Update PolicyEngine US
hua7450 Oct 9, 2026
ff333f3
Add New Jersey employee unemployment and workforce contributions (#10…
MaxGhenis Oct 9, 2026
3747e5f
Update PolicyEngine US
MaxGhenis Oct 9, 2026
5138995
Fix California itemized deduction conformity (#10034)
MaxGhenis Oct 10, 2026
58fbe62
Update PolicyEngine US
MaxGhenis Oct 10, 2026
1b52ca3
Fix IRA deduction phase-outs and compensation limits (#10032)
MaxGhenis Oct 10, 2026
e92f4c6
Update PolicyEngine US
MaxGhenis Oct 10, 2026
487cf70
Fix Wisconsin retirement election reporting and capital gain distribu…
MaxGhenis Oct 10, 2026
c6633c6
Count only the claimant and spouse in Michigan household resources (M…
MaxGhenis Oct 10, 2026
fe0c3a6
Update PolicyEngine US
MaxGhenis Oct 10, 2026
b007fb6
Apply Rhode Island's rules for a filer who can be claimed as a dependent
MaxGhenis Oct 10, 2026
cfb4eb0
Apply South Carolina's rules for a filer who can be claimed as a depe…
MaxGhenis Oct 10, 2026
932ce9e
Apply Utah's rules for a filer who can be claimed as a dependent
MaxGhenis Oct 10, 2026
e7fd1e7
Apply Vermont's rules for a filer who can be claimed as a dependent
MaxGhenis Oct 10, 2026
fb81f9d
Apply West Virginia's rules for a filer who can be claimed as a depen…
MaxGhenis Oct 10, 2026
21d37ba
Apply Wisconsin's rules for a filer who can be claimed as a dependent
MaxGhenis Oct 10, 2026
74a7b9e
Add claimable-filer invariants for RI, SC, UT, VT, WV and WI
MaxGhenis Oct 10, 2026
3c39849
Pay Utah's at-home parent credit once per qualifying child per return
MaxGhenis Oct 10, 2026
52fa346
Phase out Vermont's child tax credit per child
MaxGhenis Oct 10, 2026
d7bea36
Name the nobody-claimed YAML cases as controls
MaxGhenis Oct 10, 2026
52faacf
Quote YAML case names that contain a colon
MaxGhenis Oct 10, 2026
6e4ece4
Count no dependents on a claimable filer's return in the Utah depende…
MaxGhenis Oct 10, 2026
ae66354
Exclude pretax payroll deductions from EITC and ACTC earnings (#10030)
MaxGhenis Oct 10, 2026
75cdd80
Update PolicyEngine US
MaxGhenis Oct 10, 2026
41220ad
Regenerate the stale EITC docs charts and check every stored point ag…
MaxGhenis Oct 10, 2026
0590757
Update PolicyEngine US
MaxGhenis Oct 10, 2026
761aa83
Fix subsample policy-binding test for core 3.33.1 (#10069)
MaxGhenis Oct 10, 2026
12ea587
Update PolicyEngine US
MaxGhenis Oct 10, 2026
51487d5
Floor Montana's joint-return medical and standard deductions on the r…
MaxGhenis Oct 10, 2026
0984c83
Guard against person variables that add group variables (every member…
MaxGhenis Oct 10, 2026
a495210
Update PolicyEngine US
MaxGhenis Oct 10, 2026
1ea2725
Test that Schedule A medical expenses exclude pre-tax payroll premium…
MaxGhenis Oct 11, 2026
6d33239
Update PolicyEngine US
MaxGhenis Oct 11, 2026
c1606b8
Fix Idaho health insurance premium subtraction (#10023)
MaxGhenis Oct 11, 2026
94fca35
Update PolicyEngine US
MaxGhenis Oct 11, 2026
f6583b8
Deem SSI resources from ineligible spouses and parents (20 CFR 416.12…
MaxGhenis Oct 11, 2026
4b3dfb1
Update PolicyEngine US
MaxGhenis Oct 11, 2026
df91e50
Exclude other Schedule M subtractions from West Virginia's senior mod…
MaxGhenis Oct 11, 2026
7bd7795
Update PolicyEngine US
MaxGhenis Oct 11, 2026
24e008d
Strengthen QBID net capital gain regression and parity coverage (#10077)
MaxGhenis Oct 11, 2026
da9c59c
Update PolicyEngine US
MaxGhenis Oct 11, 2026
6c62c7f
Count refundable credits received in Montana's elderly homeowner/rent…
MaxGhenis Oct 11, 2026
076835b
Update PolicyEngine US
MaxGhenis Oct 11, 2026
4207621
Exclude SNAP from California CARE and FERA countable income (#10065)
MaxGhenis Oct 11, 2026
6f42077
Update PolicyEngine US
MaxGhenis Oct 11, 2026
a844fc1
Date the NY Drive Clean rebate change July 1, 2021 and reject impossi…
MaxGhenis Oct 11, 2026
fdd7062
Update PolicyEngine US
MaxGhenis Oct 11, 2026
c95bf7c
Count only a person's own withholding in the Illinois AABD expense ex…
MaxGhenis Oct 11, 2026
7e6bdb3
Update PolicyEngine US
MaxGhenis Oct 11, 2026
35f3c1f
Uprate ESI premium inputs by CMS ESI premium per enrollee (#10083)
MaxGhenis Oct 11, 2026
8b059f8
Update PolicyEngine US
MaxGhenis Oct 11, 2026
f86c343
Apply New York's pre-TCJA 10% medical expense floor (IT-196 line 3) (…
MaxGhenis Oct 11, 2026
f403afe
Update PolicyEngine US
MaxGhenis Oct 11, 2026
5df19bb
Allow non-disaster casualty and theft losses in California and Minnes…
MaxGhenis Oct 11, 2026
7dc0756
Update PolicyEngine US
MaxGhenis Oct 11, 2026
1ff76bd
Merge remote-tracking branch 'upstream/claimable-filer-federal' into …
MaxGhenis Oct 11, 2026
f2dac92
Add estate and trust income to state-built gross income lists (#10060)
MaxGhenis Oct 11, 2026
bb6c547
Align the six states' gates with the settled claimed/claimable inputs
MaxGhenis Oct 11, 2026
5709bd9
Move the four ungated fixes to #10104 and test the claimed/claimable …
MaxGhenis Oct 11, 2026
a35cdc6
Merge remote-tracking branch 'upstream/main' into claimable-filer-ri-…
MaxGhenis Oct 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 6 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ Follow the repository guidance in `CLAUDE.md` for commands, style, changelog ent

Follow [Test design and CI cost](CLAUDE.md#test-design-and-ci-cost) before adding or expanding tests. Use variable-named YAML tests for policy calculations; reserve Python tests for behavior YAML cannot exercise. Preserve Core/data compatibility and isolation coverage, avoid repeated full-model construction, and do not add CI runners or parallel heavy processes without explicit authorization. Document the purpose and measured cost of new simulation-heavy Python tests in the PR.

## Partner API Contract Tests
## Partner API contract tests

Files under `policyengine_us/tests/policy/baseline/partners/**` are API partner contract tests.

Do not rewrite these expected outputs merely to match changed model behavior or make CI pass. If a model change causes one of these tests to fail, treat that as a possible partner-facing API change.

Subagents must not edit partner test files. If a subagent finds that an edit is needed, it must stop and report back; the top-level agent runs the three-question gate with the user before any edit is made.
Ziming Hua (@hua7450) approves every edit to these files (Max Ghenis, 2026-10-09). Subagents and agent teammates must not edit partner test files. If a subagent or agent teammate finds that an edit is needed, it must stop and report back; the top-level agent takes the three-question gate to Ziming before any edit is made.

Before changing expected outputs in this folder:

- Flag the partner-facing risk to the user.
- Use the `AskUserQuestion` tool to ask these three questions in a single call (per CLAUDE.md):
- Put these three questions to Ziming on the PR that causes the change (per CLAUDE.md): request his review with `gh pr edit <number> --add-reviewer hua7450`, and post a comment that names each changed case, its old and new expected values, and the model change and law behind it. If Ziming is the person you are working with, show him the changed cases and ask him directly with the `AskUserQuestion` tool instead; record his answer in a PR comment, which counts as his approval of those edits.
1. Are you sure you want to edit this test file?
2. Have you notified a team member about this change?
3. Have you notified the API partner about this change?
- Do not edit partner test files until Ziming has answered yes to all three questions, and do not merge a PR that changes them until he has approved a head that contains the edits.
- Identify the model change that caused the partner output change.
- Preserve the failing behavior as evidence unless the change is intentional.
- Explain the partner-facing impact to the user.
- Explain the partner-facing impact to Ziming and the user.

Changing these tests without explicit user confirmation is unsafe, even if CI passes afterward.
Changing these tests without Ziming's explicit approval is unsafe, even if CI passes afterward.
182 changes: 182 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,185 @@
## [2.38.23] - 2026-10-11

### Fixed

- Allow non-disaster personal casualty and theft losses in California and Minnesota itemized deductions (and Minnesota alternative minimum taxable income), which do not follow the federal limit to declared disasters (Cal. Rev. & Tax. Code 17204(b); Minn. Stat. 290.0122, subd. 8): add `ca_casualty_loss_deduction` and `mn_casualty_loss_deduction`, each the loss less $100 and 10% of federal adjusted gross income, in place of the federal deduction.


## [2.38.22] - 2026-10-11

### Fixed

- New York itemized deductions now allow medical and dental expenses only above 10% of federal AGI, the pre-TCJA 26 U.S.C. 213(a) floor that NY Tax Law § 615(a) keeps and Form IT-196 line 3 applies, through a new ny_medical_expense_deduction used by ny_itemized_deductions_max and the Line 40 limitation. They previously used the federal 7.5% floor, which overstated the deduction by up to 2.5% of federal AGI.


## [2.38.21] - 2026-10-11

### Changed

- Uprate employer-sponsored insurance premiums and pre-tax health insurance premiums by CMS's employer-sponsored insurance premium per enrollee (NHE projections Table 17, 2025-2034 release, extended at its 2033-2034 growth rate), replacing CBO employment income per capita and CMS out-of-pocket spending per capita.


## [2.38.20] - 2026-10-11

### Fixed

- Count only a person's own Illinois withholding as an Illinois AABD employment expense, instead of giving every tax unit member the whole unit's withholding (89 Ill. Adm. Code 113.125(a)). This also corrects HBWD countable income and premiums and HBIS countable income.


## [2.38.19] - 2026-10-11

### Fixed

- New York Drive Clean rebate amounts and the MSRP cap for the flat rebate now change on July 1, 2021, for vehicles purchased after June 30, 2021, replacing the impossible date 2021-06-31 and a June 30 date one day early; a test now rejects any parameter date that is not a calendar day, other than the 0000-01-01 sentinel.


## [2.38.18] - 2026-10-11

### Fixed

- Exclude SNAP benefits from California CARE and FERA countable income in all modeled years.


## [2.38.17] - 2026-10-11

### Fixed

- Montana elderly homeowner/renter credit household income includes dependents' own allowable non-loss adjustments to federal gross income.
- Count household members' income in the Montana elderly homeowner/renter credit: a tax unit dependent's gross income, and the income of household members who file their own returns.
- Count federal refundable credits, the elderly homeowner/renter credit received during the year, and actual property tax rebate receipts (including in 2023) in Montana's elderly homeowner/renter credit gross household income; date the Montana property tax rebate ($400 for tax year 2024, none after).
- Preserve zero Montana federal income tax deduction allocation when neither filer has positive federal adjusted gross income.
- Montana's federal income tax deduction for spouses filing separately on the same form now attributes federal tax to the spouse who earned the income and caps each spouse at 5,000; the child and dependent care expense deduction phases out on the couple's combined Montana AGI and is halved only for spouses filing separately on the same form; and the elderly homeowner/renter credit counts income without regard to losses.


## [2.38.16] - 2026-10-11

### Changed

- Strengthen qualified business income deduction income-limit coverage for net short-term losses, capital gain distributions, and comparison with the former adjusted-capital-gain cap. Cite Treasury's explicit treatment of elected investment income under Section 199A.


## [2.38.15] - 2026-10-11

### Fixed

- Correct West Virginia's senior citizen or disability modification to exclude each person's own Schedule M income subtractions and 529 contribution deduction before applying the $8,000 cap.


## [2.38.14] - 2026-10-11

### Fixed

- Deem SSI resources from co-resident spouses and parents. A spouse is the other member of a two-person marital unit, or the other head or spouse of one's tax unit within a shared marital unit; when a simulation has a single marital unit (as when marital units are omitted), a tax dependent is never the spouse of the person claiming them, so a simulation holding only a married couple in which one spouse is the other's tax dependent does not treat them as married. The same test decides whether a child is married. Parents are named by optional parent links, or else found by a tax-unit proxy over is_parent that cannot tell a grandparent from a parent (as in microsimulation data without parent links), and each parent's spouse counts wherever they file. The excess over the reformable allowance is deemed to each child and divided equally among the children who share those parents and are not already ineligible on citizenship or on countable income (including income deemed from parents), with redistribution. A spouse's resources count against the couple limit whenever the claim is not already joint, with ineligible-spouse exclusions for a spouse who could not be eligible (not aged, blind or disabled, or failing the citizenship condition); some applicants with a low-resource spouse newly pass while others fail. These eligibility changes also affect SSI-linked state benefits and Medicaid pathways.


## [2.38.13] - 2026-10-11

### Fixed

- Fix Idaho's subtraction for health insurance premiums paid by the tax unit's head and spouse, including modeled Medicare premiums for enrolled filers, exclude premiums already deducted or excluded from income, and coordinate the subtraction, deduction election, and derived Idaho itemized deductions using claimant-paid medical expenses while preserving supplied actual medical and itemized deductions.


## [2.38.12] - 2026-10-11

### Changed

- Add tests confirming that Schedule A medical expenses exclude health insurance premiums paid through pre-tax payroll deductions.


## [2.38.11] - 2026-10-10

### Changed

- Add a code-health test that fails when a person-level variable's adds or subtracts list names a tax unit, SPM unit or other group variable, which gives every member the whole group amount. It records seven known bug pairs in five variables and exempts only the 11 reviewed positive receipt edges in three boolean flags. New group sources and subtraction edges on those flags fail the guard. Regression and property tests cover exact registry membership, stale entries, parameter histories, and Core projection.

### Fixed

- Floor Montana's 2021-2023 medical expense deduction and standard deduction on a joint return's own Montana AGI (Form 2, page 1, line 14), so one spouse's loss offsets the other's income, instead of on the sum of each spouse's AGI floored at zero. From 2024, take the federal medical expense deduction (7.5% of federal AGI), because Form 2 line 2 uses federal itemized deductions; the Montana floor had fallen to zero from 2024, so the full medical expense was deducted.


## [2.38.10] - 2026-10-10

### Fixed

- Fix the subsampling policy-binding test to support policyengine-core 3.33.1's recorded-input rebuild contract while retaining compatibility with earlier core versions.


## [2.38.9] - 2026-10-10

### Fixed

- Regenerated the stale EITC documentation charts, whose two-adult childless curves still used the 2021 joint phase-out bonus, and added a check that every stored chart point matches the EITC parameters.


## [2.38.8] - 2026-10-10

### Fixed

- Excluded qualifying pre-tax payroll deductions from earned income used by the federal EITC, refundable CTC, and federal-style state credits; retain California-taxable payroll HSA contributions in CalEITC earnings and preserve the AMT kiddie-tax gross earnings cap. Use California taxable wages for the YCTC zero-earned-income wage ceiling.


## [2.38.7] - 2026-10-10

### Changed

- Recognize the intended Michigan dependent-retirement SSI interaction in state tax invariants and add a regression for the resulting heating credit increase.

### Fixed

- Michigan household resources count only the claimant's and spouse's own income, capital gains and Schedule 1 adjustments (MCL 206.508(3)), keeping the Social Security, SSI, railroad retirement, child support and public assistance received for dependents (MI-1040CR lines 21, 22 and 27) and premiums paid for the family (line 31). The filer's Form 1040 line 7a amount, read by Michigan and by federal net investment income, now keeps a net capital gains amount supplied for the tax unit, less only the dependents' own gains and losses.
- Use the filers' shared Schedule D lines for Form 1040 capital gains, preserving supplied aggregate inputs without letting dependents' large gains introduce rounding errors.
- Correct Wisconsin retirement exclusion election reporting, prevent overlapping retirement subtractions, and include directly reported capital gain distributions in the capital gain subtraction.


## [2.38.6] - 2026-10-10

### Fixed

- Fix traditional IRA deductions by applying employer-plan phase-outs using each person's own coverage, inferred from positive 401(k), 403(b), or self-employed pension contributions unless explicitly overridden. Defined-benefit coverage requires an explicit input. Limit deductions and combined IRA contributions to compensation with the joint spousal rule, and keep dependent contributions off the filers' return. Add IRS phase-out ranges for 2015–2026 and the 2026 IRA and catch-up dollar limits.


## [2.38.5] - 2026-10-10

### Fixed

- Correct California itemized deductions to retain its charitable contribution limits without the federal charitable floor, allow miscellaneous expenses above 2% of federal AGI, and add back the California miscellaneous deduction for alternative minimum tax. Preserve signed California taxable income before AMT add-backs so deductions exceeding income do not inflate alternative minimum taxable income.


## [2.38.4] - 2026-10-09

### Fixed

- Include New Jersey employee unemployment insurance and workforce development contributions in employee payroll tax, using annual employee wage bases through 2027.


## [2.38.3] - 2026-10-09

### Changed

- Name Ziming Hua as the approver for partner API contract test edits in the agent instructions.


## [2.38.2] - 2026-10-09

### Fixed

- Exclude estate and trust income from qualified business income unless its qualification is explicitly supplied.


## [2.38.1] - 2026-10-09

### Fixed

- Arizona property tax credit household income counts capital gains and qualified dividends once, includes dependents' income and losses, and limits each member's net capital loss (including capital gain distributions) to $1,500 instead of federal AGI's $3,000 per-return limit. Household income can be negative, with zero used only for the credit schedules. Short-term capital inputs must exclude prior-year carryovers.


## [2.38.0] - 2026-10-09

### Added

- Add Oregon LIHEAP regular heating assistance for program years 2025 to 2027.


## [2.37.2] - 2026-10-09

### Fixed
Expand Down
8 changes: 5 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,14 @@ changelog.d/medicaid-ce-exclusions.md
- Files under `policyengine_us/tests/policy/baseline/partners/**` are API partner contract tests
- Do not rewrite these expected outputs merely to match changed model behavior or make CI pass
- If a model change causes partner tests to fail, treat that as a possible partner-facing API change
- Before editing files in this folder, flag the partner-facing risk to the user and use the `AskUserQuestion` tool to ask these three questions in a single call:
- Ziming Hua (@hua7450) approves every edit to files in this folder (Max Ghenis, 2026-10-09). Before editing them, flag the partner-facing risk to the user and put these three questions to Ziming:
1. Are you sure you want to edit this test file?
2. Have you notified a team member about this change?
3. Have you notified the API partner about this change?
- Subagents and team members must not edit partner test files. If a subagent or team member finds that an edit is needed, it must stop and report back; the top-level agent runs the three-question gate with the user before any edit is made.
- Before changing expected outputs in this folder, identify the underlying model change and explain the partner impact to the user
- Ask on the PR that causes the change. Request his review (`gh pr edit <number> --add-reviewer hua7450`) and post a comment (`gh pr comment <number> --body-file <file>`) that names each changed case, its old and new expected values, and the model change and law behind it. If Ziming is the person you are working with, show him the changed cases and ask him directly with the `AskUserQuestion` tool instead; record his answer in a PR comment, which counts as his approval of those edits.
- Do not edit partner test files until Ziming has answered yes to all three questions, and do not merge a PR that changes them until he has approved a head that contains the edits.
- Subagents and agent teammates must not edit partner test files. If a subagent or agent teammate finds that an edit is needed, it must stop and report back; the top-level agent takes the three-question gate to Ziming before any edit is made.
- Before changing expected outputs in this folder, identify the underlying model change and explain the partner impact to Ziming and the user

- **ABSOLUTELY NEVER HARDCODE LOGIC JUST TO PASS SPECIFIC TEST CASES**
- NEVER add conditional logic that returns fixed values for specific input combinations
Expand Down
1 change: 1 addition & 0 deletions changelog.d/claimable-filer-ri-sc-ut-vt-wv-wi.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Apply the Rhode Island, South Carolina, Utah, Vermont, West Virginia and Wisconsin rules for a filer who can be claimed as a dependent: dependent exemptions, deductions and child credits on such a return, the Wisconsin dependent standard deduction and $250 exemption, the West Virginia exemptions and family credit, the Rhode Island and Vermont claimant tests for property tax relief and the renter credit, and Wisconsin's care subtraction and credit expenses.
1 change: 1 addition & 0 deletions changelog.d/state-gross-income-estate-income.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Count a beneficiary's estate and trust income in Alabama AGI, Iowa gross income (which Iowa's tax uses through tax year 2022), Mississippi AGI, New Jersey gross income, New Mexico modified gross income, and Oklahoma gross household income for the sales tax and property tax credits.
Loading
Loading