Cap DE non-refundable credits per spouse on separate/combined returns#8726
Open
DTrim99 wants to merge 2 commits into
Open
Cap DE non-refundable credits per spouse on separate/combined returns#8726DTrim99 wants to merge 2 commits into
DTrim99 wants to merge 2 commits into
Conversation
On a Delaware separate/combined return (Filing Status 4), each spouse's non-refundable credits are limited to that spouse's own tax before credits (Form PIT-RES Line 32 cannot exceed Line 26 per column). PolicyEngine previously capped the pooled credits against the combined tax-unit liability, letting one spouse's surplus personal credit offset the other spouse's tax. Each spouse now applies their own column-tied credits (personal + aged personal) against their own tax; allocable credits (dependents' personal credits, child/dependent care credit, non-refundable EITC) are placed in the column with remaining capacity, as a tax-minimizing filer would. Updates the taxsimid 2682 integration test: its prior expected value came from TAXSIM-35, which pools the credits (the behavior this fixes). Surfaced via PolicyEngine/policyengine-taxsim#1007. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8726 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 2 -1
Lines 47 41 -6
=========================================
- Hits 47 41 -6
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 #8710. Draft for review — flagging one TAXSIM-validated test change below.
What
On a Delaware separate/combined return (Filing Status 4,
de_files_separately = True), each spouse's non-refundable credits are limited to that spouse's own tax before credits (Form PIT-RES Line 32 ≤ Line 26, per column). PolicyEngine previously capped the pooled credits against the combined tax-unit liability, so one spouse's surplus personal credit could offset the other spouse's tax.Approach
de_non_refundable_credits_indvholds each spouse's column-tied credits (own personal credit + own aged personal credit), which cannot move between columns.de_non_refundable_credits, when filing separately:Σ min(own_i, tax_i);Results
This updates the existing
taxsimid 2682integration test:de_income_tax$2,429.20 → $2,643.15. That prior value came from TAXSIM-35, which pools the credits against combined tax — exactly the behavior this PR fixes. In that household the head has only $6.05 of tax, so $213.95 of their own personal+aged credit is unusable; TAXSIM (and old PE) wrongly let it offset the spouse's tax. The new value is the correct per-column result, and is verified to still be lower than filing jointly ($2,705.30), so the couple's separate-filing choice remains valid. I don't have a filled DE form for this synthetic TAXSIM case, so this expected value is derived from the per-column logic confirmed by the #1007 form — please scrutinize.Tests
Known limitation
Allocable credits are placed entirely in the single highest-capacity column. If allocable credits exceed that column's capacity, the remainder is not spilled to the other column (a rare edge case). Noted for reviewer.
Context
Reported by Daniel Feenberg (NBER TAXSIM) in PolicyEngine/policyengine-taxsim#1007.
🤖 Generated with Claude Code