Skip to content

Fix CDCC returning $0 for disabled adult dependents (with section 21(d)(2) deemed income)#8704

Draft
hua7450 wants to merge 4 commits into
PolicyEngine:mainfrom
hua7450:cdcc-disabled-dependent-expenses
Draft

Fix CDCC returning $0 for disabled adult dependents (with section 21(d)(2) deemed income)#8704
hua7450 wants to merge 4 commits into
PolicyEngine:mainfrom
hua7450:cdcc-disabled-dependent-expenses

Conversation

@hua7450

@hua7450 hua7450 commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the Child and Dependent Care Credit (CDCC) for households whose qualifying individual is a disabled adult — which previously returned $0. Extends the original expense-gate fix with a correct IRC § 21 qualifying-individual definition, handling of a disabled spouse the model assigns as head, and the § 21(d)(2) deemed-earned-income floor.

The bug

CDCC eligibility and the dollar limit already counted a disabled non-head dependent/spouse of any age, but expense attribution was gated on is_child (age < 18). A disabled qualifying individual aged 18+ was therefore allocated $0 of expenses → $0 federal credit and $0 state CDCCs (e.g. ks_cdcc). Separately, a lone disabled adult could still net $0 because the model infers them as a "spouse" with $0 actual earnings while the § 21(d)(2) deemed-income floor was not modeled.

Changes

1. Qualifying individual — is_cdcc_eligible (IRC § 21(b)(1))

  • Child-by-age prong now requires dependency: is_dependent & (age < 13).
  • Disability prong: disabled & (is_dependent | (head_or_spouse & has_spouse)) — a disabled dependent of any age, or a disabled member of a married couple (so a disabled spouse the model assigns as head is still counted).

2. Expense attribution — is_dependent_care_recipient + plumbing (IRC § 21(b)(2))

  • New person-level is_dependent_care_recipient = is_child | (disabled & (dependent | member-of-couple)), used as the distribution key in pre_subsidy_childcare_expenses; tax_unit_childcare_expenses distributes by is_cdcc_eligible.

3. Deemed earned income — min_head_spouse_earned (IRC § 21(d)(2))

  • A spouse who is a full-time student or incapable of self-care is deemed to earn $250/mo (one qualifying individual) or $500/mo (two or more), applied to only one spouse. Adds the deemed_earned_income parameter ($3,000 / $6,000 annual) and the cdcc_income_floor_eligible variable.

Reproduction (TY 2024, disabled dependent, only the age changed)

Age 17 Age 18 (before) Age 18 (after)
cdcc $660 $0 $660
ks_cdcc $330 $0 $330

Statutory basis

  • IRC § 21(b)(1)(A)/(B)/(C) — qualifying individual (only the child prong has an age limit)
  • IRC § 21(b)(2) — employment-related expenses (care of any qualifying individual)
  • IRC § 21(c) — $3,000 / $6,000 dollar limits
  • IRC § 21(d)(1)–(2) — earned-income limitation and deemed income for a student/incapacitated spouse
  • K.S.A. 79-32,111c — Kansas CDCC (50% of federal, TY 2024+)

Modeling notes (approximations)

  • Deemed income and student/incapacitated status are applied annually, not per qualifying month.
  • The same-principal-place-of-abode (> ½ year) test for a disabled dependent/spouse is assumed met.
  • IRC § 21(b)(1)(A) references § 152(a)(1) (qualifying child); the model uses tax-unit dependency.

Tests

494 tests pass locally across the childcare-expense plumbing, federal CDCC (including new is_cdcc_eligible, min_head_spouse_earned, and cdcc_income_floor_eligible cases), ~30 state/local CDCC mirrors, SNAP deductions, and the partner CDCC edge-case test. CI runs the full suite (including the partner contract suite).

🤖 Generated with Claude Code

The Child and Dependent Care Credit counts a disabled non-head dependent or spouse of any age as a qualifying individual (is_cdcc_eligible) and raises the dollar limit accordingly, but childcare expenses were distributed only across is_child (under-18) members. A disabled qualifying individual aged 18+ was therefore allocated $0 of expenses, yielding a $0 federal credit and $0 state CDCCs (e.g. ks_cdcc). IRC § 21(b)(1)(B)/(C) imposes no age limit on the disabled-dependent/spouse prongs.

Adds is_dependent_care_recipient = is_child | (is_incapable_of_self_care & ~is_tax_unit_head) and uses it as the distribution key in both pre_subsidy_childcare_expenses and tax_unit_childcare_expenses.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8704   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         7    +4     
  Lines           47       109   +62     
=========================================
+ Hits            47       109   +62     
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.

hua7450 and others added 2 commits June 21, 2026 20:34
…andling

Refine is_cdcc_eligible so the child-by-age prong requires dependency and the disability prong counts a dependent or a member of a married couple, correctly treating a disabled spouse who is modeled as the tax unit head as a qualifying individual.

Rewrite min_head_spouse_earned to apply the IRC section 21(d)(2) deemed earned income ($3,000 for one qualifying individual, $6,000 for two or more) for a student or incapacitated spouse, applying it to only one spouse. Adds the deemed_earned_income parameter and cdcc_income_floor_eligible variable, and aligns is_dependent_care_recipient's disability prong.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hua7450 hua7450 changed the title Fix CDCC returning $0 for disabled adult dependents Fix CDCC returning $0 for disabled adult dependents (with section 21(d)(2) deemed income) Jun 22, 2026
…ouses

When both the head and spouse are students or incapable of self-care, only one spouse may be deemed to have the minimum earned income (Treas. Reg. 1.21-2(b)(4), Example 3). Deem whichever eligible spouse maximizes the lesser of the two earnings, leaving the other spouse's actual earnings, instead of returning the greater unfloored earnings (which overstated the cap when the two earnings straddled the floor).

Co-Authored-By: Claude Opus 4.8 (1M context) <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.

1 participant