Apply IA pension exclusion married cap as a combined limit - #9156
Open
DTrim99 wants to merge 1 commit into
Open
Conversation
The 2021 IA Expanded Instructions (p. 27) allow "a married couple ... a combined exclusion of up to $12,000", limited to each eligible spouse's own pension with no per-spouse sub-cap. The person-level formula applied the $12,000 filing-status cap to each spouse separately, excluding up to $24,000 per couple. Cap the tax-unit total and prorate it across eligible spouses by pension share. Fixes PolicyEngine#9155 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9156 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 17 1 -16
Lines 279 20 -259
==========================================
- Hits 279 20 -259
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 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.
Fixes #9155
Surfaced by PolicyEngine/policyengine-taxsim#1110 (IA 2021, married separate-on-combined, ages 58/57, $44,174 of pensions split evenly between spouses).
Changes
The 2021 IA Expanded Instructions (p. 27, the variable's own reference) make the married pension-exclusion cap a combined limit: "a married couple is allowed a combined exclusion of up to $12,000" (Example 2), limited to each eligible (55+/disabled) spouse's own pension, with no per-spouse $6,000 sub-cap.
ia_pension_exclusionpreviously appliedmin(pension, maximum_amount[filing_status])per person, letting each eligible spouse exclude up to $12,000 — $24,000 per couple. The formula now caps the tax-unit total of eligible pension at the filing-status maximum and prorates it across eligible spouses by pension share.Inert for 2023+ (the cap is
.inf). No parameter changes.Validation
Against the #1110 record (IA 1040: exclusion 6,000 + 6,000, net income 151,511, tax before credits 7,154 + 596 = 7,750, tax after exemption credits 7,670):
New tests: the #1110 both-spouses-over-cap case ([6,000, 6,000]), Example 2 from the instructions (single eligible spouse excludes the full $8,000), and uneven proration ([9,000, 3,000] on 30k/10k). All 10 tests in the file pass locally, including the 7 pre-existing ones.
🤖 Generated with Claude Code