Skip to content

Backdate Kentucky K-TAP parameters#7497

Open
hua7450 wants to merge 12 commits intoPolicyEngine:mainfrom
hua7450:backdate-ky-ktap
Open

Backdate Kentucky K-TAP parameters#7497
hua7450 wants to merge 12 commits intoPolicyEngine:mainfrom
hua7450:backdate-ky-ktap

Conversation

@hua7450
Copy link
Collaborator

@hua7450 hua7450 commented Feb 26, 2026

Summary

Backdates Kentucky K-TAP (TANF) parameters to 1997 (program inception), adds a unified earned income disregard formula supporting both the pre-2023 AFDC-era "$30 + 1/3" and post-2023 "50%" disregards, and makes all deductions fully per-person per MS 2840.

Closes #7496

Changes

  • Parameters backdated: 11 files, 1997-07-01 entries added (frozen AFDC-era values)
  • Nov 2025 reduction: Payment maximums reduced ~35% (2025-11-01)
  • New parameters: earned_income_flat_disregard ($30 pre-2023), earned_income_flat_disregard_in_effect boolean toggle
  • EID formula: Unified formula — flat + rate * (earned - flat) — handles both eras via parameter toggle
  • Per-person deductions: All three deductions (work expense, dependent care, EID) applied per-person per MS 2840, then summed to unit. This matters for the pre-2023 $30+1/3 formula in two-earner households because the $30 flat makes it non-linear.
  • Dependent care allocation: New ky_ktap_dependent_care_disregard_person variable allocates unit-level dependent care to the primary earner per MS 2840 B.2.c
  • Dependent care fix: Added is_tax_unit_dependent filter so bracket lookup only applies to dependents
  • Reference fixes: Subsection citations corrected (5(3)(c)-(d) → 5(3)(e)), Nov 2025 news source added
  • Tests added: 93 new test cases (47 historical/boundary + 45 edge cases + 1 two-earner with dependent care)

Three Parameter Eras

Era Dates Payment Max (family of 3) EID Formula
ERA 1 (AFDC-era) 1997-07-01 – 2023-02-15 $262 $30 flat + 1/3 of remainder
ERA 2 (2023 reform) 2023-02-16 – 2025-10-31 $524 50% of earned income
ERA 3 (Nov 2025 cut) 2025-11-01 – present $341 50% (unchanged)

Regulatory Sources

Known Limitations

  • Pre-2023 EID time limits (4 months at $30+1/3, then 8 months at $30 only) not modeled (PolicyEngine is point-in-time)
  • Post-2023 EID 6-month limit not enforced (calendar month proxy used instead)
  • MS 2520 six-month 100% earned income exclusion for new employment not modeled (requires employment history tracking)
  • Part-time dependent care cap ($150/month) not separately modeled
  • Gross income limit uses formula (185% * SoN) rather than regulation's pre-computed table (max ~$1.65 rounding difference)

Test Plan

  • All 145 K-TAP tests pass
  • Microsimulation runs without errors (no entity broadcast bugs)
  • make format clean
  • Full CI suite (pending)

🤖 Generated with Claude Code

hua7450 and others added 2 commits February 26, 2026 12:17
Starting implementation of backdating Kentucky K-TAP (TANF) parameters
to program inception. Documentation and parallel development will follow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 1997-07-01 historical entries to all 10 parameter files (frozen AFDC-era values)
- Add Nov 2025 payment maximum reduction (~35% cut)
- Create earned_income_flat_disregard parameter for pre-2023 $30+1/3 formula
- Rewrite EID formula as unified expression (no branching, both eras via parameters)
- Add 92 new tests: 47 historical/boundary + 45 edge cases across all 3 eras
- Add dual references (current + superseded 921 KAR 2:016)
- Fix gross_income_limit_rate pre-2023 section citation (1(11) → 1(12))
- Clean up hardcoded comments in benefit and dependent care variables

Ref PolicyEngine#7496

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (55a0045) to head (59a12ea).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #7497      +/-   ##
===========================================
+ Coverage   97.82%   100.00%   +2.17%     
===========================================
  Files           3         5       +2     
  Lines          92        87       -5     
  Branches        2         1       -1     
===========================================
- Hits           90        87       -3     
+ Misses          1         0       -1     
+ Partials        1         0       -1     
Flag Coverage Δ
unittests 100.00% <100.00%> (+2.17%) ⬆️

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.

hua7450 and others added 4 commits February 26, 2026 13:14
…urce

- Fix earned_income_flat_disregard.yaml: subsection 5(3)(c)-(d) → 5(3)(e), add current ref
- Fix earned_income_disregard_rate.yaml: pre-2023 subsection 5(3)(c)-(d) → 5(3)(e)
- Add WKMS news source citation for Nov 2025 payment maximum values

Ref PolicyEngine#7496

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 parameters had identical values at both 1997-07-01 and 2023-03-01.
Per parameter patterns skill, only keep earliest date when value is unchanged:
- gross_income_limit_rate: 1.85 (single entry)
- rate: 0.55 (single entry)
- max_unit_size: 7 (single entry)
- child_support_disregard: 50 (single entry)

Ref PolicyEngine#7496

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create earned_income_flat_disregard_in_effect.yaml (true 1997, false 2023)
- Remove 2023-03-01: 0 sentinel from earned_income_flat_disregard.yaml
- Use if p.in_effect: branching in formula instead of relying on flat=0

The zero-sentinel anti-pattern (value=0 meaning "not in effect") violates
PolicyEngine conventions. An explicit boolean is clearer and self-documenting.

Ref PolicyEngine#7496

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hua7450 hua7450 marked this pull request as ready for review March 1, 2026 01:49
hua7450 and others added 6 commits March 1, 2026 00:29
- Convert earned income disregard rate to month-based bracket parameter
  (ND calendar month proxy pattern) for time-limited EID
- Restructure countable earned income formula: work expense, dependent
  care, and EID all applied per-person then summed to unit
- Allocate dependent care to primary earner per MS 2840 B.2.c
- Add dependent filter to dependent care disregard
- Update tests for month-varying disregard rates and per-person math

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…yment maximums

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Backdate Kentucky K-TAP parameters to program inception

1 participant