Skip to content

Commit 9607204

Browse files
hua7450claude
andcommitted
Scope DC KCCATC to child-only expenses to prevent disabled-adult leak
dc_kccatc read the disability-broadened tax_unit_childcare_expenses, so a disabled adult dependent sharing an SPM unit with an under-4 child could inflate this strictly child-only credit (DC Code § 47-1806.15). Distribute the SPM childcare pool by each tax unit's share of children instead. DC's § 21-conforming credit (dc_cdcc, § 47-1806.04(c)) and the federal CDCC keep the broadened base. Convert the existing dc_kccatc tests to feed childcare_expenses through the SPM unit and add a multi-tax-unit regression case (one under-4 child plus a disabled adult dependent) that pins the child-only base. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 902f2f7 commit 9607204

4 files changed

Lines changed: 87 additions & 10 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix the Child and Dependent Care Credit (and its state mirrors) for households whose qualifying individual is a disabled adult: attribute childcare expenses to disabled dependents and spouses of any age, count a disabled spouse who is modeled as the tax unit head, and apply the IRC section 21(d)(2) deemed earned income for a student or incapacitated spouse.
1+
Fix the Child and Dependent Care Credit (and its state mirrors) for households whose qualifying individual is a disabled adult: attribute childcare expenses to disabled dependents and spouses of any age, count a disabled spouse who is modeled as the tax unit head, and apply the IRC section 21(d)(2) deemed earned income for a student or incapacitated spouse. Also scope the DC Keep Child Care Affordable Tax Credit to child-only care expenses, so a disabled adult dependent sharing a household with an eligible child does not inflate this under-4 child credit.

policyengine_us/tests/policy/baseline/gov/states/dc/tax/income/dc_kccatc.yaml

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
tax_units:
1818
tax_unit:
1919
members: [person1, person2, person3]
20-
tax_unit_childcare_expenses: 2_000
2120
spm_units:
2221
spm_unit:
2322
members: [person1, person2, person3]
23+
childcare_expenses: 2_000
2424
households:
2525
household:
2626
members: [person1, person2, person3]
@@ -47,10 +47,10 @@
4747
tax_units:
4848
tax_unit:
4949
members: [person1, person2, person3]
50-
tax_unit_childcare_expenses: 2_000
5150
spm_units:
5251
spm_unit:
5352
members: [person1, person2, person3]
53+
childcare_expenses: 2_000
5454
households:
5555
household:
5656
members: [person1, person2, person3]
@@ -77,10 +77,10 @@
7777
tax_units:
7878
tax_unit:
7979
members: [person1, person2, person3]
80-
tax_unit_childcare_expenses: 2_000
8180
spm_units:
8281
spm_unit:
8382
members: [person1, person2, person3]
83+
childcare_expenses: 2_000
8484
households:
8585
household:
8686
members: [person1, person2, person3]
@@ -107,10 +107,10 @@
107107
tax_units:
108108
tax_unit:
109109
members: [person1, person2, person3]
110-
tax_unit_childcare_expenses: 800
111110
spm_units:
112111
spm_unit:
113112
members: [person1, person2, person3]
113+
childcare_expenses: 800
114114
households:
115115
household:
116116
members: [person1, person2, person3]
@@ -136,14 +136,14 @@
136136
age: 3
137137
person4:
138138
is_tax_unit_dependent: true
139-
age: 1
139+
age: 1
140140
tax_units:
141141
tax_unit:
142142
members: [person1, person2, person3, person4]
143-
tax_unit_childcare_expenses: 1_600
144143
spm_units:
145144
spm_unit:
146145
members: [person1, person2, person3, person4]
146+
childcare_expenses: 1_600
147147
households:
148148
household:
149149
members: [person1, person2, person3, person4]
@@ -173,13 +173,72 @@
173173
tax_units:
174174
tax_unit:
175175
members: [person1, person2, person3, person4]
176-
tax_unit_childcare_expenses: 1_600
177176
spm_units:
178177
spm_unit:
179178
members: [person1, person2, person3, person4]
179+
childcare_expenses: 1_600
180180
households:
181181
household:
182182
members: [person1, person2, person3, person4]
183183
state_code: DC
184184
output:
185185
dc_kccatc: 800
186+
187+
# Regression test for the disabled-adult expense leak (review finding C1).
188+
# An SPM unit contains two tax units: tax_unit1 has an under-4 child AND a
189+
# disabled adult dependent; tax_unit2 has an under-4 child only. The $1,600 of
190+
# SPM childcare must be split between the two under-4 children ($800 each), so
191+
# each KCCATC is $800. The disabled adult is NOT a KCCATC-eligible child and
192+
# must not pull extra expense share into tax_unit1's child-only credit.
193+
# Before the fix (dc_kccatc read the disability-broadened
194+
# tax_unit_childcare_expenses), tax_unit1 leaked up to $1,020 and tax_unit2
195+
# dropped to $533.33; after the fix (child-scoped distribution) both are $800.
196+
- name: dc_kccatc regression - disabled adult does not inflate child-only credit
197+
absolute_error_margin: 0.01
198+
period: 2021
199+
input:
200+
people:
201+
person1:
202+
is_tax_unit_head: true
203+
age: 35
204+
employment_income: 40_000
205+
person2:
206+
is_tax_unit_dependent: true
207+
age: 3
208+
person3:
209+
is_tax_unit_dependent: true
210+
age: 25
211+
is_incapable_of_self_care: true
212+
person4:
213+
is_tax_unit_head: true
214+
age: 35
215+
employment_income: 40_000
216+
person5:
217+
is_tax_unit_dependent: true
218+
age: 3
219+
marital_units:
220+
marital_unit1:
221+
members: [person1]
222+
marital_unit2:
223+
members: [person2]
224+
marital_unit3:
225+
members: [person3]
226+
marital_unit4:
227+
members: [person4]
228+
marital_unit5:
229+
members: [person5]
230+
tax_units:
231+
tax_unit1:
232+
members: [person1, person2, person3]
233+
tax_unit2:
234+
members: [person4, person5]
235+
spm_units:
236+
spm_unit:
237+
members: [person1, person2, person3, person4, person5]
238+
childcare_expenses: 1_600
239+
households:
240+
household:
241+
members: [person1, person2, person3, person4, person5]
242+
state_code: DC
243+
output:
244+
dc_kccatc: [800, 800]

policyengine_us/variables/gov/states/dc/tax/income/credits/dc_kccatc.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,25 @@ def formula(tax_unit, period, parameters):
3131
cdcc_eligible_count = tax_unit.sum(cdcc_age_eligible)
3232
# calculate KCCATC amount
3333
max_kccatc = kccatc_eligible_count * p.kccatc.max_amount
34-
total_care_expenses = tax_unit("tax_unit_childcare_expenses", period)
34+
# The KCCATC is a child-only credit: DC Code § 47-1806.15 limits it to
35+
# dependents under age 4. Distribute the SPM unit's childcare expenses
36+
# by each tax unit's share of CHILDREN, rather than reading
37+
# tax_unit_childcare_expenses, which distributes by the broader
38+
# dependent-care recipient set (children plus disabled dependents and
39+
# spouses) used by the federal-conforming dc_cdcc. Using the child
40+
# share keeps disabled-adult dependent-care dollars out of this
41+
# child-only credit when a disabled adult shares an SPM unit with an
42+
# eligible child.
43+
spm_unit = tax_unit.spm_unit
44+
spm_unit_childcare = spm_unit("childcare_expenses", period)
45+
spm_unit_count_children = add(spm_unit, period, ["is_child"])
46+
tax_unit_count_children = add(tax_unit, period, ["is_child"])
47+
child_ratio = np.zeros_like(spm_unit_count_children)
48+
child_mask = spm_unit_count_children > 0
49+
child_ratio[child_mask] = (
50+
tax_unit_count_children[child_mask] / spm_unit_count_children[child_mask]
51+
)
52+
total_care_expenses = spm_unit_childcare * child_ratio
3553
ratio = np.zeros_like(cdcc_eligible_count)
3654
mask = cdcc_eligible_count > 0
3755
ratio[mask] = kccatc_eligible_count[mask] / cdcc_eligible_count[mask]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)