Skip to content

Conversation

@DTrim99
Copy link
Collaborator

@DTrim99 DTrim99 commented Jan 5, 2026

Summary

Update Kentucky income tax model for tax year 2025. This includes:

  • Adding 2025 references (with page numbers) to all parameters
  • Updating values where changed
  • Adding 2025 integration tests

Fixes #7097

Status

  • Add 2025 references to parameters
  • Verify/update family size tax credit thresholds
  • Add 2025 integration tests
  • CI passing

Reference Documents


Generated with Claude Code

Co-Authored-By: Claude [email protected]

DTrim99 and others added 4 commits January 5, 2026 11:02
Starting implementation of Kentucky 2025 individual income tax updates.
Refs PolicyEngine#7097
- rate.yaml: Added 2025 Form 740 Instructions (page 2) reference
- standard.yaml: Added 2025 Form 740 Instructions (page 2) reference
- family_size/rate.yaml: Added 2025 Schedule ITC (page 2) reference
- family_size/family_size_cap.yaml: Added 2025 Schedule ITC (page 2) reference
- personal/amount/aged.yaml: Added 2025 Schedule ITC Section B (page 2) reference
- personal/amount/blind.yaml: Added 2025 Schedule ITC Section B (page 2) reference
- personal/amount/military.yaml: Added 2025 Schedule ITC Section B (page 2) reference
- tuition_tax/rate.yaml: Added 2025 Form 8863-K (page 1) reference
- dependent_care_service/match.yaml: Added 2025 Form 740 Instructions (page 9) reference
- pension_income/threshold.yaml: Added 2025 Schedule P (page 1) reference

Closes PolicyEngine#7097

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Tests verify the 2025 parameter values and calculation pipeline:
- Tax rate: 4%
- Standard deduction: $3,270
- Personal credits: Aged $40, Blind $40, Military $20
- Dependent care credit: 20% of federal
- Tuition tax credit: 25% of federal
- Pension income exclusion: $31,110 threshold
- Family Size Tax Credit: Based on FPG thresholds

Includes 29 test scenarios covering:
- Single and MFJ filing with standard deduction
- Family Size Tax Credit at various income levels (100%, 115%, 130%)
- Personal tax credits (aged, blind, military)
- Dependent care credit calculations
- Pension income exclusion (under/over threshold)
- Edge cases and 2024 vs 2025 comparison tests

Related to Issue PolicyEngine#7097

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.31%. Comparing base (d020ba8) to head (5a42db8).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##              main    #7098       +/-   ##
============================================
- Coverage   100.00%   73.31%   -26.69%     
============================================
  Files            9     3649     +3640     
  Lines          119    52526    +52407     
  Branches         0      263      +263     
============================================
+ Hits           119    38509    +38390     
- Misses           0    13993    +13993     
- Partials         0       24       +24     
Flag Coverage Δ
unittests 73.31% <ø> (-26.69%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

- Removed separate ky_2025_integration.yaml file
- Added key 2025 tests to integration.yaml:
  - Single filer standard deduction ($3,270)
  - MFJ filing status optimization
  - FSTC at 100% threshold
  - Aged personal credit ($40)
  - Pension exclusion ($31,110 cap)
  - Dependent care credit (20% of federal)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@DTrim99 DTrim99 marked this pull request as ready for review January 5, 2026 17:17
@DTrim99
Copy link
Collaborator Author

DTrim99 commented Jan 5, 2026

CI Status: All Checks Passing

All CI checks have completed successfully:

Check Status Duration
Check version PASS 23s
Lint PASS 45s
Quick Feedback (Selective Tests + Coverage) PASS 3m 13s
Full Suite - States (excl NY) & Python PASS 9m 41s
Full Suite - Structural (States) PASS 10m 15s
Full Suite - Structural (Other) PASS 16m 59s
Full Suite - Baseline (incl NY) & Reform PASS 18m 28s

This PR is now ready for review.


Generated with Claude Code

Copy link
Collaborator Author

@DTrim99 DTrim99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Code Review Summary

✅ Strengths

  • All CI checks passing - code is properly formatted and all tests pass
  • Good coverage of 2025 Kentucky tax parameters with comprehensive references
  • Follows PolicyEngine patterns correctly - no hard-coded values in formulas
  • Proper use of state-level parameter organization
  • Integration tests cover key scenarios: standard deduction, filing optimization, FSTC, aged credit, pension exclusion, and dependent care credit

🔍 Issues Found

Pre-Existing Issues (Not introduced by this PR - optional to fix)

  1. Incorrect label in pension_income/threshold.yaml (line 14)

    • Current: label: Kentucky income tax rate
    • Should be: label: Kentucky pension income exclusion threshold
    • This parameter defines the pension exclusion threshold, not the tax rate
  2. Incorrect unit in personal/amount/blind.yaml (line 5)

    • Current: unit: year
    • Should be: unit: currency-USD (this is a $40 dollar amount)
  3. Incorrect unit in personal/amount/military.yaml (line 5)

    • Current: unit: year
    • Should be: unit: currency-USD (this is a $20 dollar amount)
  4. Minor typo in test comments (lines 97, 167)

    • "perpon" should be "person" in the comment about older person being head

Reference Consistency Notes

Some existing references show "(2024)" titles pointing to "(2025)" URLs - this appears to be an existing pattern where the 2024 reference links to the updated 2025 form. This is fine but could be clarified in future cleanups.

📊 Validation Results

  • Domain Validation: ✅ No issues - proper federal/state separation, naming conventions followed
  • Reference Validation: ✅ All 2025 references added with appropriate Kentucky DOR sources
  • Implementation Validation: ✅ No hard-coded values, no incomplete implementations
  • Test Coverage: ✅ Good basic coverage (see suggestions below)

💡 Test Coverage Suggestions (Optional)

The current tests are solid. For even better coverage, consider adding:

  1. Age boundary tests: Age exactly 65 vs 64 for the aged credit
  2. FSTC boundaries: Income at 104% FPL (rate drops to 90%) and 133% FPL (rate drops to 0%)
  3. Pension at exact threshold: $31,110 pension (exact cap value)
  4. Family size cap: Family size 5+ to verify cap at 4 works
  5. Zero income case: Verifies all calculations handle edge of zero correctly

✨ Verification

I verified the 2025 Kentucky parameter values against official sources:

  • Standard deduction: $3,270 ✅ (KY DOR announcement)
  • Tax rate: 4% ✅ (unchanged from 2024, drops to 3.5% in 2026 per HB 1)
  • Personal credits: $40 aged/blind, $20 military ✅

📝 Recommendation

APPROVE - This is a well-structured update that correctly adds 2025 Kentucky income tax parameters. The pre-existing metadata issues are minor and don't affect functionality. All tests pass and the implementation follows PolicyEngine patterns correctly.


🤖 Generated with Claude Code

@DTrim99 DTrim99 requested a review from PavelMakarchuk January 5, 2026 18:07
@DTrim99 DTrim99 requested a review from hua7450 January 7, 2026 20:57
@hua7450
Copy link
Collaborator

hua7450 commented Jan 9, 2026

PR Review: Kentucky 2025 Individual Income Tax Model

✅ No Critical Issues

All parameter values verified against official sources:

  • Standard deduction ($3,270) ✓
  • Tax rate (4%) ✓
  • Aged/blind credits ($40 each) ✓
  • Military credit ($20) ✓
  • Pension exclusion ($31,110) ✓
  • Dependent care match (20%) ✓
  • Tuition credit rate (25%) ✓

All 6 new integration tests have correct calculations.


🟡 Pre-existing Issues (Nice to Fix in This PR)

These issues exist in the files being modified but were not introduced by this PR. Would be nice to address while you're in these files:

  1. Incorrect metadata in blind.yaml and military.yaml

    • unit: year should be unit: currency-USD (these are dollar amounts)
  2. Incorrect metadata in pension_income/threshold.yaml

    • Line 12: type: currency-USD should be unit: currency-USD
    • Line 13: Label says "Kentucky income tax rate" but should be "Kentucky pension income exclusion threshold"
  3. Invalid page anchors on HTML URLs

    • aged.yaml, blind.yaml, military.yaml have #page=4 on statute webpage URLs (not PDFs) - should remove the fragment

🟢 Suggestions (Optional)

  1. Typo on lines 97 and 167 of integration.yaml: "perpon" → "person"

  2. Missing edge case tests (optional expansion):

    • FSTC phase-out boundaries (104%, 108%, etc.)
    • Family size 5+ (capped at 4)
    • Multiple credits combined (aged + blind)

Validation Summary

Check Result
Regulatory Accuracy ✅ All values verified
Reference Quality ✅ 2025 refs correctly formatted
Code Patterns ✅ New code follows standards
Test Coverage ✅ Core scenarios covered
CI Status ✅ Passing

Verdict: APPROVE

This PR correctly implements Kentucky 2025 income tax parameter updates. All values match official Kentucky DOR sources.

🤖 Generated with Claude Code

@hua7450
Copy link
Collaborator

hua7450 commented Jan 9, 2026

Can you @DTrim99 also fix those minor issues? Like typo and label? Then it lgtm.

- Fix pension_income/threshold.yaml: change type: to unit: and correct label from "Kentucky income tax rate" to "Kentucky pension income exclusion threshold"
- Fix blind.yaml and military.yaml: change unit from "year" to "currency-USD" (these are dollar amounts)
- Remove invalid #page=4 anchors from HTML statute URLs in aged.yaml, blind.yaml, military.yaml
- Fix "perpon" typo to "person" in integration.yaml test comments

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@DTrim99
Copy link
Collaborator Author

DTrim99 commented Jan 9, 2026

Fixes Applied

Pre-Existing Issues Fixed

File Issue Fix
pension_income/threshold.yaml type: should be unit: Changed to unit: currency-USD
pension_income/threshold.yaml Label incorrectly said "Kentucky income tax rate" Changed to "Kentucky pension income exclusion threshold"
blind.yaml unit: year incorrect for dollar amount Changed to unit: currency-USD
military.yaml unit: year incorrect for dollar amount Changed to unit: currency-USD
aged.yaml, blind.yaml, military.yaml Invalid #page=4 anchor on HTML statute URLs Removed page anchors from non-PDF URLs
integration.yaml Typo "perpon" (lines 97, 167) Changed to "person"

Verification

  • All 127 Kentucky tax tests pass locally
  • Code formatted with make format

Ready for re-review.


Generated with Claude Code

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.

Update Kentucky 2025 Individual Income Tax Model

2 participants