Allocate taxable UC by recipient, not all to head#8498
Open
PavelMakarchuk wants to merge 2 commits into
Open
Conversation
`taxable_unemployment_compensation` was assigning the entire tax unit's taxable UI to the head of household and zero to the spouse. The original shortcut preserved the federal AGI sum but broke per-person AGI used by state combined-return logic (KY, AR, DE, IA, MS, MT, WV, MI), inflating or zeroing one spouse's apparent income and shifting state std deductions to the wrong person. Mirror the existing `taxable_social_security` pattern: allocate the tax unit's taxable UC across persons in proportion to each person's `unemployment_compensation`. The federal sum is preserved (shares sum to 1); per-person AGI now reflects the actual recipient. Closes #8494. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8498 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 1 -1
Lines 57 13 -44
Branches 1 0 -1
=========================================
- Hits 57 13 -44
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Cover the drift surfaces that the variable-level fix corrects: - adjusted_gross_income_person: per-person federal AGI reflects actual UC recipient (spouse-only UC + both-spouses UC scenarios) - ky_agi: per-person KY AGI no longer inflates head with spouse's UC Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Closes #8494.
Summary
taxable_unemployment_compensation(Person, YEAR) was assigning the tax unit's entire taxable UI to the head and zero to the spouse viawhere(is_tax_unit_head, tax_unit_taxable_uc, 0). The original shortcut preserved the federal tax-unit AGI sum but broke per-person AGI used by state combined-return optimization (KY, AR, DE, IA, MS, MT, WV, MI). Inflating or zeroing one spouse's apparent AGI shifted state std deductions to the wrong person and produced incorrect state liability.Fix
Mirror the existing
taxable_social_securitypattern (taxable_social_security.py:11-29): allocatetax_unit_taxable_unemployment_compensationacross persons in proportion to each person'sunemployment_compensation. The federal sum is preserved (shares sum to 1); per-person AGI now reflects the actual recipient.Tests
taxable_unemployment_compensation.yamlwith 3 cases (spouse-only UC, proportional split, zero UC).Open question
Running the issue's repro (KY 2025 joint, head $1.13 UC, spouse $10K wages + $19,124 UC) produces
ky_income_tax = $994after the fix, vs. the issue's expected~$524(TaxAct). The variable-level fix is correct (per-person UC matches reality), but the KY-side discrepancy needs separate investigation — possibly a different KY combined-return optimization issue, family-size credit, or TaxAct's own handling of the std deduction split. Flagging for KY-specific follow-up before closing the original taxsim issue.Test plan
🤖 Generated with Claude Code