Elect Kentucky combined-separate filing on tax after non-refundable credits - #9349
Open
DTrim99 wants to merge 2 commits into
Open
Elect Kentucky combined-separate filing on tax after non-refundable credits#9349DTrim99 wants to merge 2 commits into
DTrim99 wants to merge 2 commits into
Conversation
…redits Kentucky's combined-separate election (ky_files_separately) compared income tax BEFORE non-refundable credits, choosing combined-separate whenever it lowered pre-credit tax by any amount. But under combined-separate each spouse's personal tax credits offset only their own column's tax (Form 740 lines 16-18), so a credit can be wasted when a column's tax is too low to absorb it. A couple could elect combined-separate for a tiny pre-credit saving and then forfeit a larger credit -- e.g. an over-65 spouse with only retirement income loses the $40 age-65 personal credit because their column tax is $0. Elect on liability after non-refundable credits instead, matching Delaware (issue PolicyEngine#7931). Two path-specific variables compute Kentucky income tax after the four ordered non-refundable credits for the combined-separate and joint paths without reading ky_files_separately (avoiding a circular dependency), and the election picks the cheaper path. Combined-separate is also now gated to married couples. Verified on the issue household (KY joint 2022, head 65 with no earned income, spouse 61 with $31,429 wages, one dependent): the couple now files jointly and ky_income_tax is 1,392.95 (was 1,432.95), preserving the $40 credit and matching the TaxAct return. Full Kentucky baseline suite passes. Fixes PolicyEngine#9342. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ECQhxDkVchXm1RNVyqwnx
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9349 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 4 +3
Lines 35 60 +25
Branches 2 0 -2
=========================================
+ Hits 35 60 +25
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:
|
… hb13 test - Use a changelog.d fragment instead of changelog_entry.yaml (the fragment format CI requires). - Gate the combined-separate election on a married couple identified by EITHER a spouse in the tax unit OR a joint filing status. Test and microdata inputs represent a couple with different conventions (some set is_tax_unit_spouse with a separate filing status, others set filing_status JOINT without a spouse flag), so accept either. This keeps the two "files separately" baseline integration tests electing combined-separate while excluding single filers. - The KY HB 13 "chooses separate filing" reform test supplies income directly as Kentucky taxable income, leaving modelled gross income at $0, which gives a spurious 100% family-size credit rate that zeroes both filing paths. Set ky_family_size_tax_credit_rate to 0 for that high-income couple so the after-credit election reflects the intended scenario. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ECQhxDkVchXm1RNVyqwnx
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.
Summary
Kentucky's combined-separate election (
ky_files_separately) compared income tax before non-refundable credits, electing combined-separate whenever it lowered pre-credit tax by any amount. But under combined-separate each spouse's personal tax credits offset only their own column's tax (Form 740 lines 16–18), so a credit is wasted when a column's tax is too low to absorb it. A couple could elect combined-separate for a tiny pre-credit saving and then forfeit a larger credit.Concrete case (taxsim #1149): a couple where the 65-year-old spouse has only retirement income and the other spouse has wages. Combined-separate saves ~$0.18 of pre-credit tax but strands the over-65 spouse's $40 age-65 personal credit against their $0 column tax. PE elected combined-separate and reported $1,433; the TaxAct return files jointly and applies the $40, landing at $1,393.
Change
Elect on liability after non-refundable credits, mirroring Delaware (#7931):
ky_income_tax_before_refundable_credits_if_separateand…_if_joint— compute Kentucky tax after the four ordered non-refundable credits (personal, family size, tuition, dependent care) for each path, without readingky_files_separately(avoiding a circular dependency). A shared helper (ky_combined_separate.py) applies the Form 740 credit ordering.ky_files_separatelynow picks the cheaper post-credit path and is gated to married couples (combined-separate, filing status 3, is only available to them).ky_income_tax_before_refundable_creditscomputes as before.Testing
ky_income_tax= 1,392.95 (was 1,432.95), preserving the $40 credit and matching TaxAct. Added as a regression test.ky_files_separatelyunit test for the post-credit, spouse-gated logic.Found via PolicyEngine-TAXSIM discrepancy #1149, reported by @feenberg.
Fixes #9342.
🤖 Generated with Claude Code