Indiana and West Virginia federal pension deductions read an input that never reaches federal AGI

Open
#9,551 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Inspect the definitions and dependency graph for taxable_federal_pension_income, taxable_public_pension_income, and taxable_pension_income, then trace in_civil_service_annuity_deduction and wv_public_pension_subtraction_person. Add one regression case per state using only federal pension income; done means it reaches adjusted gross income and both deductions produce the expected results without duplicate input.

Written by the indexing model from the issue text.

Description

taxable_federal_pension_income is read by two state formulas but feeds no income aggregate. A federal retiree entered the usual way, through taxable_public_pension_income, gets neither deduction. A caller who sets only taxable_federal_pension_income gets a West Virginia subtraction against income that is not in federal AGI.

taxable_pension_income adds taxable_public_pension_income and taxable_private_pension_income. taxable_federal_pension_income has no adds and only two readers:

  • in_civil_service_annuity_deduction (added by #9512): min_(taxable_federal_pension_income, taxable_public_pension_income), then the cap.
  • wv_public_pension_subtraction_person: min_(taxable_federal_pension_income, max_amount).

Reproduction

main at 25380edf72, single filer aged 70, tax year 2025, 30,000 of pension income entered three ways.

Input State adjusted_gross_income Deduction State income tax
taxable_public_pension_income only IN 30,000 in_civil_service_annuity_deduction 0 825.00
taxable_federal_pension_income only IN 0 0 -100.00
both IN 30,000 16,000 345.00
taxable_public_pension_income only WV 30,000 wv_public_pension_subtraction_person 0 518.00
taxable_federal_pension_income only WV 0 2,000 0.00
both WV 30,000 2,000 518.00

So the Indiana deduction from #9512 fires only when the caller enters the same dollars twice, and West Virginia's behaves the same way. #9511 covered Indiana but not West Virginia, and it is closed.

Possible fix

Fix the input graph once for both states: make taxable_federal_pension_income a component of taxable_public_pension_income (or of taxable_pension_income), so a federal pension entered on its own reaches federal AGI and both state formulas. Then add one case per state for a retiree who enters only the federal pension.

Found while reviewing #9512. Related: #9545.

Dominant language
Python
Stars
163
Forks
213
Avg merge
2d 20h
Merged PRs (30d)
97

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/policyengine-us

All issues in PolicyEngine/policyengine-us

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.