Skip to content

Apply KY personal credits per column under combined-separate election (#9010)#9017

Open
PavelMakarchuk wants to merge 1 commit into
mainfrom
ky-personal-credits-per-column-9010
Open

Apply KY personal credits per column under combined-separate election (#9010)#9017
PavelMakarchuk wants to merge 1 commit into
mainfrom
ky-personal-credits-per-column-9010

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Collaborator

Fixes #9010.

Problem

For married couples electing filing status 2 (married filing separately on a combined return), PolicyEngine pooled the Schedule ITC Section B personal credits ($40 aged / $40 blind / $20 National Guard) at the tax-unit level and capped them against unit-level tax. Form 740 computes lines 16–18 per column: each spouse's own credit offsets only that spouse's own tax, with a per-column zero floor (line 18: "If line 17 is larger than line 16, enter zero"). PolicyEngine therefore let a low-income elderly spouse's credit offset the other spouse's tax.

On the taxsim #1076 record, TaxAct and TAXSIM-35 both report KY income tax $1,353.50–$1,354; PolicyEngine reported $1,313.50 — the 66-year-old spouse's $40 over-65 credit was pooled into the head's column instead of dying in her near-zero column.

Fix

ky_personal_tax_credits_potential now caps each person's ky_personal_tax_credits_indiv at their own ky_income_tax_before_non_refundable_credits_indiv before summing, under the separate election. Same class as the DE Filing Status 4 fix (#8978).

Scope note (follow-up)

The issue also notes a secondary item: ky_files_separately elects on pre-credit column tax, whereas Form 740's election should compare post-credit column liabilities (line 26). It does not flip this record, and implementing it naively creates a circular dependency (ky_files_separately → post-credit tax → personal credits → ky_files_separately), so it's left as a documented follow-up rather than folded into this fix.

Tests

  • Unit: added a per-column floor case (person1 credit $40 capped at $20 column tax; person2 credit $100 capped at $0 → total $20). Updated the existing "separate" case to supply per-column tax so its $140 result still holds.
  • Integration: added the taxsim Add TANF to school meals categorical eligibility #1076 case → ky_files_separately: true, ky_income_tax $1,353.50 (matches TaxAct and TAXSIM-35).
  • Full KY income tax suite (149 tests) passes.

🤖 Generated with Claude Code

…#9010)

Under filing status 2 (married filing separately on a combined return),
ky_personal_tax_credits_potential pooled each spouse's Schedule ITC
Section B personal credits at the tax-unit level and capped against
unit-level tax, letting a low-income spouse's credit offset the other
spouse's tax. Form 740 lines 16-18 compute the credit per column with a
per-column zero floor. Now caps each person's ky_personal_tax_credits_indiv
at their own ky_income_tax_before_non_refundable_credits_indiv before summing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ff39625) to head (f5e2077).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9017   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           18        17    -1     
=========================================
- Hits            18        17    -1     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PavelMakarchuk PavelMakarchuk marked this pull request as ready for review July 13, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply Kentucky personal tax credits per column under the combined-separate election (Form 740 lines 17–18)

1 participant