Repository navigation
Gate the DC EITC ITIN extension to 2023 and apply the IRC 152(c)(2) relationship test to EITC qualifying children - #9643
Merged
MaxGhenis merged 9 commits intoOct 7, 2026
Conversation
…elationship test to EITC qualifying children - Cite D.C. Law 24-167 section 7012 (D.C. Code 47-1806.04(f)(1)(D)) for the DC ITIN rule instead of D.C. Law 23-149, which has no EITC language. - Add gov.states.dc.tax.income.credits.eitc.itin_eligible (true from 2023-01-01). Before 2023 the DC with-child credit matches the federal credit allowed and the childless credit needs a Social Security number. - Add dc_eitc_has_qualifying_child so the router and both branches share one qualifying-child test. - Add is_eitc_qualifying_child (IRC 32(c)(3)(A) / 152(c)): age test or the 152(c)(3)(B) disability waiver, and not a parent or grandparent of the filer. Use it in the federal eitc_child_count and the CA, CO, DC, IL, MN and WA credits. - YAML cases for TY2021/2022/2023 ITIN households and disabled parent/grandparent dependents, plus Hypothesis invariant tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # pyproject.toml # uv.lock
Before 2023 a qualifying child without a Social Security number stays a qualifying child whether it has an ITIN or no number at all: D.C. Code 47-1806.04(f)(4) adopts the IRC 32 definition, IRC 32(c)(3)(D) only keeps the child out of the IRC 32(b) computation, and IRC 32(m) treats the two alike. dc_eitc_has_qualifying_child still required has_tin, so a TY2022 SSN filer aged 50 with $20,000 of wages got $0 with an ITIN child but $560 from the childless schedule once the child's TIN was removed. From 2023 the D-40 instructions (2023 and 2024 booklets p. 10, 2025 booklet p. 13) say: "If you and your spouse have SSNs or ITINs but your child(ren) do not, you need to claim the DC EITC for filers without a qualifying child." The 2021 and 2022 booklets have no such rule. A new parameter, qualifying_child_tin_required, is false before 2023 and true from 2023, and gates the TIN test in the router. The with-child branch's 2023+ eligibility now uses the router's predicate instead of child_count > 0. The two agree under current law; the change keeps the parameter coherent when it is switched off. Tests: five YAML cases (TY2021, TY2022 x3, TY2023) plus a counterfactual with the parameter off, and Hypothesis invariants 9 (routing follows qualifying-child status; no TIN equals ITIN before 2023) and 10 (removing a child's TIN never raises dc_eitc). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An independent review of the routing fix found three loose ends: - The p. 10 sentence the router cited is framed around joint filers. Line 27a (2023 and 2024 booklets p. 18, 2025 booklet p. 21) states the rule for every filing status: "Each qualifying child must have a valid social security number (SSN) or individual taxpayer identification number (ITIN) issued by the IRS. If you have no children who qualify, you must claim the DC EITC without qualifying children." The router and the parameter now cite it. - With qualifying_child_tin_required switched off, the with-child branch's 2023+ base skipped the childless age test that the federal credit, the pre-2023 base, applies. It now uses (child_count > 0) | eitc_demographic_eligible, which equals the old child_count > 0 for every unit the branch covers under current law. A new counterfactual case (head aged 22) fails on the previous commit (321.30) and passes here (0). - The TY2022 $6,000 no-TIN case now asserts the routing too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
Max's ruling d1008 (2026-10-06): before TY2023, a DC filer whose qualifying children have neither a Social Security number nor an ITIN gets the childless credit, as on main. - qualifying_child_tin_required is now true from 2015-01-01 (was false for 2015-2022). It cites D.C. Code 47-1806.04(f)(4), ARPA section 9622 and the 2021 D-40 booklet (pp. 3 and 12) and states both readings; setting it to false applies the statute-alone reading. - dc_eitc.yaml: the four TY2021-22 no-TIN cases expect main's values (560, 560, 459, 1,480.21); the two cases that held the other reading now switch the parameter off (321.30, 87.33). - Invariant 9 now compares a no-TIN child with the same filer alone; invariant 10 is checked from 2023, its earlier violation intended. New test_dc_eitc_without_tin_rule checks the switched-off reading. - Router comment and changelog fragment updated to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_dc_eitc_without_tin_rule built its tax-benefit system with qualifying_child_tin_required switched off through functools.cache, which kept a second full system resident for the rest of the pytest process. CI runs this file in the Rest "policy" group, which peaked at 12.4 GB RSS on the 16 GB runner at 92802f5 (run 37463810232). Build it in a module-scoped fixture instead, used read-only, and collect it when the module finishes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
to MaxGhenis/policyengine-us
that referenced
this pull request
Oct 7, 2026
…convention Review follow-ups: - The addback defaulted to foreign_earned_income_exclusion through `adds`, which passed a negative entry straight through. Every federal reader of that input floors it at zero (worksheet line 2c: "If zero or less, enter -0-"), so the default is now max(0, foreign_earned_income_exclusion). A YAML case covers a -5,000 entry. - The documentation now states that other income inputs must already exclude the line 43 amount, says the default equals line 43 when line 50 equals line 44 plus line 2b (not "only when" all are zero), keeps line 2b's "or exclusions", and cites the 2025 Form 1 instructions (line 3). - The property tests release the reformed system and cached results when the module ends, as PolicyEngine#9643 does, and the Hypothesis test is derandomized. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve Minnesota's updated EITC earned-income calculation alongside this branch's qualifying-child relationship rule. Keep both sides' MN regressions and align the disabled-parent fixture with eitc_earned_income.
Contributor
Author
|
US + core hub merge audit, us#9643 at
|
MaxGhenis
added a commit
that referenced
this pull request
Oct 9, 2026
* Add excluded foreign earned income to Massachusetts gross income M.G.L. c. 62 s. 2(a)(1)(C) lists "Earned income from foreign sources excluded under section nine hundred and eleven of the Code" among the items added to federal gross income. ma_gross_income subtracted the federal stacking amount instead, so a $10,000 exclusion left Massachusetts gross income $20,000 too low. The new TaxUnit input ma_foreign_earned_income_exclusion_addback is the section 911(a) amount actually excluded (Form 2555 line 43, before line 44 allocable deductions, without the line 50 housing deduction). It defaults to foreign_earned_income_exclusion, which is exact when Form 2555 lines 44 and 50 and Foreign Earned Income Tax Worksheet line 2b are zero; an entered amount, including zero, replaces the default. The restored wages reach Part B through its residual definition in s. 2(b)(2); Parts A and C are unchanged. Adds the hub spec's five YAML cases plus explicit-zero, non-MA and zero-floor controls, and property/differential tests against the old formula. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Check that the MA foreign earnings addition offsets losses before the floor The zero-floor property only checked that gross income is non-negative, zero at the floor and monotone in the addback. The formula before this change satisfies all three, so the test passed on main. It now also checks that where federal gross income less the Massachusetts exclusions is negative but the addback lifts it above zero, gross income equals their sum, which main gets wrong (it returns zero). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Floor the MA foreign earnings default at zero and document its input convention Review follow-ups: - The addback defaulted to foreign_earned_income_exclusion through `adds`, which passed a negative entry straight through. Every federal reader of that input floors it at zero (worksheet line 2c: "If zero or less, enter -0-"), so the default is now max(0, foreign_earned_income_exclusion). A YAML case covers a -5,000 entry. - The documentation now states that other income inputs must already exclude the line 43 amount, says the default equals line 43 when line 50 equals line 44 plus line 2b (not "only when" all are zero), keeps line 2b's "or exclusions", and cites the 2025 Form 1 instructions (line 3). - The property tests release the reformed system and cached results when the module ends, as #9643 does, and the Hypothesis test is derandomized. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use the specified Massachusetts foreign earnings fallback * Floor Massachusetts foreign earnings addback at zero * Add section 911 exclusion and deduction leaf inputs * Derive federal and Massachusetts section 911 amounts from leaves * test: cover ambiguous section 911 batches and zero stacking CTC * fix: reject ambiguous section 911 tax-unit input histories * fix: integrate Form 2555 leaves with MAGI and CTC eligibility * test: keep Form 2555 policy examples in variable YAML files * test: preserve main capital-loss allocation in section 911 coverage --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
axiom: TheAxiomFoundation/rulespec-us#1420 queued (D.C. Code § 47-1806.04(f)); TheAxiomFoundation/rulespec-us#1502 queued (26 USC 152(c)(2))
This PR fixes three pre-existing gaps that the independent review of #9549 found in the DC EITC. The third one also affects the federal EITC and five other state credits.
Ruling d1008 round, 2026-10-06
Max's ruling (d1008, 2026-10-06). For TY2021–22, a DC filer whose qualifying children have neither a Social Security number (SSN) nor an ITIN gets DC's childless credit, as on main. This head keeps main's routing for that filer in every year before 2023. The rest of the PR stands as reviewed: the 2023 ITIN gate, the Line 27a rule from 2023, the IRC 152(c)(2) relationship test and the 23-149 citation fix.
What changed (commits
f63d0ba086ande89c2b6f9c; heade89c2b6f9c):gov.states.dc.tax.income.credits.eitc.qualifying_child_tin_requiredis nowtruefrom 2015-01-01. The previous head had it false for 2015–2022 and true from 2023. A qualifying child now needs an SSN or ITIN in every year to put the unit on the with-child schedule.has_tinis true for them. Before 2023 they still route with-child and get the match on the federal credit allowed.itin_eligible).dc_eitc_has_qualifying_child, and its value in 2023 and later is unchanged.dc_eitc_has_qualifying_childcomments state both readings; see Methodology choices.dc_eitcas the same filer with no dependent. That compares two different households, so it no longer restates the formula (review P3-3). Invariant 10 ("removing a qualifying child's TIN never raisesdc_eitc") is now checked from 2023 only; before 2023 a violation is intended. A new property test,test_dc_eitc_without_tin_rule, switches the parameter off through a reform and checks the other reading (invariants 11–13 below). Before this round no Hypothesis test switched the parameter off (review P3-3).e89c2b6f9cbuilds that reformed system in a module-scoped fixture and releases it when the module ends, rather than caching it for the whole pytest process (see the CI cost note under Invariants).4c900b6d3d(92802f507c, clean, no PR file conflicted).The TY2021–22 households with a no-TIN child. Each is a DC head of household aged 50 with an SSN and one dependent with neither an SSN nor an ITIN.
92802f507c4c900b6d3dand this headChecked against main. The four cases above were also run on main
4c900b6d3d, in a detached checkout with only those cases added (thedc_eitc_has_qualifying_childoutput dropped, since main has no such variable). All four pass there, with the sameeitc, both branch values anddc_eitc. So for these households this head reproduces main. Main's router at4c900b6d3drequireshas_tinfor a DC qualifying child in every year.Tests before and after. All runs were local, in the foreground, one process at a time, each a single test file (the host test-run rule lets a single file run outside the shared heavy lock, which had about 25 waiters). Python 3.14.7 and policyengine-core 3.32.8, from
uv sync --locked --extra dev, as CI installs.92802f507c, with only this round'sdc_eitc.yamland invariants file copied in:dc_eitc.yaml: 4 failed, 21 passed. The four failures are exactly the four no-TIN TY2021–22 cases above, each ondc_eitc_has_qualifying_child(1 instead of 0). The four parameter-off cases pass, as expected, because they switch the parameter off themselves.test_eitc_qualifying_child_invariants.py: 1 failed, 2 passed.test_dc_eitc_invariantsfailed on invariant 9 in TY2021, because the no-TIN child kept its unit on the with-child schedule. Hypothesis minimized the draw to earnings 0, head aged 19, child aged 0.test_dc_eitc_without_tin_ruleandtest_relationship_dominates_disability_across_creditspassed. That is expected: the old head already applied reading A before 2023, and the relationship test did not change.dc_eitc.yaml25 passed and 0 failed atf63d0ba086.test_eitc_qualifying_child_invariants.pypassed 3 of 3 atf63d0ba086, and again withe89c2b6f9c's fixture change.e89c2b6f9cchanges only that test file.ruff format --check .(6,642 files) andruff check .pass. CI runs the full suite on this head.Impact. Not yet measured against the current merge base; the hub will run it. See Impact below.
Axiom. The rulespec-us#1420 comment with ruling 6 and companion cases T10–T13 was written before d1008 and encodes the other reading. This round posted a correction on that issue: rulespec-us#1420 (comment). It revises ruling 6 to the childless treatment in every year and gives the corrected values T10 560, T11 459 and T12 1,480.21; T13 (600) is unchanged. It also restates the properties: no number gives the same result as no dependent, and "removing a TIN never raises
dc_eitc" holds from TY2023. Theaxiom:line is unchanged: #1420 stays queued.Methodology choices
Where a DC filer whose qualifying children have neither an SSN nor an ITIN claims, before TY2023. No DC source settles TY2015–2022, and the two readings below give different credits. From TY2023 the D-40 Line 27a instructions settle it ("Each qualifying child must have a valid social security number (SSN) or individual taxpayer identification number (ITIN) issued by the IRS. If you have no children who qualify, you must claim the DC EITC without qualifying children."), so later years involve no choice.
ca69e109deand92802f507cdid this before 2023.What the model does. Max ruled for reading B (d1008, 2026-10-06).
qualifying_child_tin_requiredis true from 2015-01-01, so in every yeardc_eitc_has_qualifying_childcounts a qualifying child only if it has an SSN or ITIN, and a filer whose children have neither takes the (f)(1)(C) childless schedule. This keeps main's behaviour for TY2015–2022.How to turn it off. Set
gov.states.dc.tax.income.credits.eitc.qualifying_child_tin_requiredtofalse, in a reform or as a YAML test input.dc_eitc_has_qualifying_childthen follows qualifying-child status alone, so a child with neither number keeps the unit on the with-child schedule. Before 2023 that pays the match on the federal credit allowed (reading A). From 2023 it pays the match on the (f)(1)(D)(ii) amount computed without that child, which departs from Line 27a. In that case the with-child branch applies the childless age test when no child is in the count, as the federal credit does. Four YAML cases (TY2021, TY2022 and two TY2023 cases) and the Hypothesis testtest_dc_eitc_without_tin_rulecover the switched-off path.An intended consequence. Under reading B, before 2023, giving a qualifying child no number instead of an ITIN can raise
dc_eitc, because DC's childless schedule can pay more than the with-child match on the self-only federal credit. In TY2022 at $6,000 of wages, an ITIN child gives 70% × 459 = 321.30 and a child with no number gives the childless 459. Invariant 10 is therefore checked only from 2023.Review round, 2026-10-06 (earlier fix round)
The gate review of
06f7d19db9found one problem.dc_eitc_has_qualifying_childrequiredhas_tinwhen it chose between the with-child and childless schedules. For TY2022, a 50-year-old SSN filer with $20,000 of wages got $0 with an ITIN child, and $560 from the (f)(1)(C) childless schedule once the child had no TIN.That round (head
ca69e109de) made the routing depend on the tax year through the new parameterqualifying_child_tin_required, false before 2023 and true from 2023. Before 2023 that applied reading A above. Ruling d1008 replaced that pre-2023 routing (see the round above). What remains from that round:(child_count > 0) | eitc_demographic_eligible. For every unit this branch covers with the parameter on, the value is the same as the oldchild_count > 0. It differs only with the parameter switched off: a unit with no child in the count must then meet the childless age rules, as the federal credit requires.50464ee65b, thenb812bd46a0);pyproject.tomlanduv.lockmatch main.Sources by year. Where a qualifying child with neither an SSN nor an ITIN routes:
The reviewer's household:
06f7d19db9ca69e109deand92802f507cImpact
Real microsimulations for 2025 and 2026 on the default dataset,
hf://datasets/policyengine/populace-us/populace_us_2024.h5@populace-us-2024-spm-20260909. Base: this PR's merge base, maindd9cb3f683(re-run after the main merge). Branch: this head,7422391a46. Each side ran in its own process from a detached checkout, one run at a time under the hub's shared heavy lock, and each run's recordedmodulepath confirms it imported its own checkout. Outputs were compared record by record withcompare.py.Nothing changes. All variables present on both sides are bit-identical in both years, both before and after the main merge (the re-run also covers
mn_child_and_working_families_credits, which the merge touched). No person, tax unit or household differs. The variables:dc_eitc,dc_income_taxand both DC branches;eitc,eitc_child_count, and the CA, CO, IL, MN and WA credits;income_tax,state_income_taxandhousehold_net_income;This is expected. With ruling d1008,
qualifying_child_tin_requiredistruein every year, so the default reproduces main's routing. The dataset also has no one without a TIN (has_tinis false for 0 of 166,321 people) and no parent, grandparent or permanently disabled flags set. The PR's changes only bite in household calculations that supply those inputs, which the YAML cases cover. DC invariants 4 and 5 hold on the branch arrays.Evidence:
~/reviews/us-hub/fixes/9643-evidence/finish3/impact/summary.txt.1. Wrong citation for the DC ITIN rule
The DC EITC variables and one test cited D.C. Law 23-149 for the ITIN rule. That law is the Fiscal Year 2021 Budget Support Act of 2020, and it has no EITC, § 47-1806.04 or ITIN language. The rule is D.C. Code § 47-1806.04(f)(1)(D). It was added by D.C. Law 24-167 § 7012, the Earned Income Tax Credit Expansion Amendment Act of 2022, and it applies to taxable years beginning after December 31, 2022. The section's history note lists "D.C. Law 24-167, § 7012" and never mentions 23-149. Every
23-149citation underpolicyengine_us/is replaced; the only remaining mention is the historicalCHANGELOG.mdentry.2. ITIN eligibility now starts in 2023
The router and both DC branches accepted ITIN filers and ITIN children in every year. A new parameter,
gov.states.dc.tax.income.credits.eitc.itin_eligible, is false before 2023 and true from 2023-01-01.eitcitself. That credit leaves out a qualifying child without a Social Security number (IRC 32(c)(3)(D)) and denies an ITIN filer (IRC 32(c)(1)(E)). From 2023 the base is the existing federal-like amount, computed as if an ITIN met IRC 32(m).filer_meets_eitc_identification_requirements).qualifying_child_tin_required; see Methodology choices).The example household is a DC head of household aged 50 with $20,000 of wages and a 30-year-old dependent. The dependent is permanently and totally disabled and has an ITIN.
eitcdc_eitcon main (53c82c6c52)dc_eitchereThe issue reported a 2021 value of 0. The statute gives 87.33, because under ARPA § 9622 the filer is allowed the self-only federal credit in 2021. In 2022 the same credit phases out to 0 at this income, which is why that year's value is 0.
All nine companion cases (T1–T9) in rulespec-us#1420 match this branch. The two that differed on main were T8 (2022, $20,000: now 0) and T9 (2022, $6,000: now 70% × 459 = 321.30). The no-TIN cases T10–T13 are covered under Axiom in the d1008 round above.
3. Disabled parents and grandparents are not EITC qualifying children
The EITC qualifying child is the IRC 152(c) qualifying child (IRC 32(c)(3)(A)). The 152(c)(3)(B) disability rule treats only the age test of 152(c)(3)(A) as met. It does not waive the 152(c)(2) relationship test, which admits only the taxpayer's children, siblings and their descendants. A parent or grandparent can be a qualifying relative under 152(d)(2)(C), but not a qualifying child.
Nine variables counted every permanently and totally disabled dependent as a qualifying child. The new person variable
is_eitc_qualifying_childis(is_qualifying_child_dependent | disabled dependent) & ~(is_parent_of_filer_or_spouse | is_grandparent_of_filer_or_spouse). It replaces that pattern in:eitc_child_count;dc_eitc_has_qualifying_child, which the router and both branches now share;ca_is_qualifying_child_for_caleitc,co_eitc,il_eitcandmn_child_and_working_families_credits;wa_working_families_tax_creditandwa_working_families_tax_credit_maximum_qualifying_income.The IRC 32(c)(3)(D) identification requirement stays in each credit, since the states differ on ITINs. The research for this PR checked each state's law. CA RTC 17052, C.R.S. 39-22-123.5, 35 ILCS 5/212, Minn. Stat. 290.0671 subd. 1a, RCW 82.08.0206(2)(f) and D.C. Code 47-1806.04(f)(4) all take the IRC 32 qualifying child, changing only ITIN, residency and age rules. So the relationship test applies in every one.
Example: TY2023 head of household aged 50, with a dependent parent aged 75 who is permanently and totally disabled.
eitc, wages $6,000dc_eitc, wages $20,000dc_eitc, wages $20,000, parent has an ITINA disabled adult child still takes the with-child schedule, so the 152(c)(3)(B) waiver is unchanged.
Only parents and grandparents are excluded. PolicyEngine does not record other relatives outside 152(c)(2), such as aunts, uncles, in-laws or unrelated household members.
is_related_to_head_or_spouseis not used, because an eligible foster child (IRC 152(f)(1)(C)) counts as a child even though it can be unrelated.Invariants
These hold for every input the Hypothesis strategies draw (wages and interest), except where marked as an intended violation. One known exception sits outside that domain: farm income. A TY2023 DC filer aged 50 with an SSN, $6,000 of farm-only income and an SSN child gets $0, while removing the child's TIN gives about $426.57, which violates invariant 10. The cause is a farm-income defect in the shared earned-income helper that predates this PR; it is one of the follow-ups below. They are checked by the Hypothesis tests in
tests/policy/baseline/gov/irs/credits/earned_income/test_eitc_qualifying_child_invariants.py:dc_eitc_has_qualifying_childtrue, and it never counts ineitc_child_count.eitc,dc_eitc,ca_eitc,co_eitc,il_eitc,mn_child_and_working_families_creditsorwa_working_families_tax_credit. It is checked in each of DC, CA, CO, IL, MN, WA and TX.dc_eitc == where(dc_eitc_has_qualifying_child, with, without) == max(with, without).dc_eitc_with_qualifying_child == match × eitcwhenever the unit has a qualifying child. This is a differential check against the federal variable.dc_eitc == 0, and swapping a qualifying child's SSN for an ITIN never raisesdc_eitc.dc_eitcunchanged.dc_eitcas the same filer with no dependent.dc_eitc. Before 2023 it can, as intended (see Methodology choices).With
qualifying_child_tin_requiredswitched off (reading A):dc_eitcas one with an ITIN, since IRC 32(m) treats the two alike.dc_eitc.Each Hypothesis example draws earnings, interest, the filer's age and the child's age. It builds one vectorized simulation that holds every combination of dependent kind, dependent ID, filer ID and state, and checks TY2021, 2022, 2023 and 2025. CI runs 8 derandomized examples for each property. The switched-off test builds its reformed tax-benefit system once per session and reuses it read-only. CI cost. The file runs in CI's Rest
policypytest group. At92802f507c(run 37463810232) that group took 6:20 and peaked at 12.4 GB RSS on the 16 GB runner, and this file's two tests then took 7.7 s and 1.0 s. The new test adds one reformed tax-benefit system. It is built in a module-scoped fixture, used read-only, and collected when the module ends, so it does not stay resident for the rest of that group. The first version,f63d0ba086, cached it for the whole process. Local macOS measurements only, on a host at load 40–70 where file-system calls were starved, so not comparable to Linux CI: building the reformed system took 293 s,test_dc_eitc_without_tin_rule155 s andtest_dc_eitc_invariants7.4 s, and the file peaked at 1.64 GB RSS (a bare model import peaked at 0.81 GB). The group's CI time and peak at this head will show in the Rest job'srest-test-timingsartifact.Mutation check. In the first round the tests were run against main's formulas, using shims that reproduce main's logic for the two new variables. Both property tests then failed: invariant 1 on the disabled-parent row, and invariant 6 (with invariant 1 disabled) on TY2021, minimized to earnings of $1. In the d1008 round, invariant 9 and the four no-TIN TY2021–22 YAML cases fail on
92802f507c's routing and pass here (see the round above).Tests
dc_eitc.yaml(25 cases):qualifying_child_tin_requiredswitched off: TY2021, TY2022, and TY2023 with heads aged 50 and 22;is_tax_unit_spouse: false.is_eitc_qualifying_child.yaml(new), andeitc_child_count.yamlcases 6–8.test_eitc_qualifying_child_invariants.py, with invariants 1–13 above.ca69e109de: 904 passed acrossirs/credits/earned_income, all ofstates/dc, andstates/{ca,co,il,mn,wa}/tax/income/credits.Not in this PR
These gaps were found along the way. None has an issue yet; the hub's fix report lists them for filing.
eitc, so a federal fix would carry over to DC. Until then, a TY2015–2020 DC filer whose only child has an ITIN gets 40% of the federal childless credit; the law gives 0. (A child with neither number sends the filer to DC's childless schedule under ruling d1008.)ca_eitccounts children with the SSN-gatedeitc_child_count, but RTC 17052(p) has accepted ITIN qualifying children since 2020.calculate_eitc_like_amountintools/state_eitc_helpers.pyphases in onfiler_adjusted_earnings, which is built fromearned_income: wages, self-employment and SSTB self-employment income. The federaleitc_earned_incomealso countsfarm_operations_incomeandpartnership_self_employment_net_earnings. The review of the first fix round found it. The bug predates this PR, and four variable files call these helpers.The third follow-up in the earliest version of this body was that adult dependents defaulted to spouse. That is addressed by #9630, now merged into this branch:
head_or_spouse_candidatesdrops adults input as tax-unit dependents whenever the unit has another adult.🤖 Generated with Claude Code