Skip to content

Count 18-year-olds as Minnesota qualifying older children - #9922

Merged
PavelMakarchuk merged 5 commits into
mainfrom
mn-cwfc-older-child-age-18
Oct 13, 2026
Merged

PavelMakarchuk merged 5 commits into
mainfrom
mn-cwfc-older-child-age-18

Conversation

@PavelMakarchuk

@PavelMakarchuk PavelMakarchuk commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #9871.

Change

  • variables/gov/states/mn/tax/income/credits/mn_child_and_working_families_credits.py: a qualifying older child is now qualifying_child & (age >= age_threshold). The formula used age > 18 and also required full-time student or disability status. qualifying_child (is_qualifying_child_dependent or a disabled dependent) already applies the IRC 152(c)(3) age test: under 19, under 24 if a full-time student, any age if disabled. The extra student gate removed every 18-year-old who is not a student. The > removed every 18-year-old, students and disabled children included.
  • parameters/gov/states/mn/tax/income/credits/cwfc/wfc/additional/age_threshold.yaml: the value stays 18. The description and label now say "minimum age" ("has attained at least this age"). The statute reference now points to subd. 1a (it said subd. 1 (3)). The 2023 and 2024 Schedule M1DQC are added next to the 2025 one.

The parameter has no other users (grep finds only this formula).

Child (2025, head of household, $10,000 wages) main This PR
17 2,129.20 2,129.20
18, not a student 379.20 1,379.20
18, full-time student 379.20 1,379.20
18, disabled 379.20 1,379.20
19, not a student 379.20 379.20
19, full-time student 1,379.20 1,379.20
24, full-time student 379.20 379.20

Evidence

  • Minn. Stat. 290.0671, subd. 1a: "qualifying older child" means "a qualifying child, as defined in section 32(c) of the Internal Revenue Code, that attained at least the age of 18 in the taxable year."

  • 26 U.S.C. 152(c)(3)(A), which IRC 32(c)(3)(A) uses: the child "(i) has not attained the age of 19 as of the close of the calendar year in which the taxable year of the taxpayer begins, or (ii) is a student who has not attained the age of 24 as of the close of such calendar year"; 152(c)(3)(B) treats this test as met for a permanently and totally disabled individual. So an 18-year-old is a 32(c) qualifying child without the student test, and subd. 1a makes them a qualifying older child.

  • Schedule M1DQC, page 3, steps 4-8 (2023, 2024, 2025, the same text each year):

    • Step 4 "Were they under age 18 at the end of [year]?": yes → row 10 (child tax credit); no and disabled → row 11 (qualifying older child).
    • Step 6 "Were they over the age of 17?" → step 7.
    • Step 7 "Were they a full-time student?": yes → rows 8 and 11.
    • Step 8 "Were they under the age of 19 at the end of the year?": yes → row 11.

    The schedules use ages at the end of the year, not birth-year ranges. Every 18-year-old qualifying child reaches row 11 through step 4 (disabled), step 7 (student) or step 8 (under 19).

  • 2025 Schedule M1CWFC, line 5: "One qualifying older child, enter $1,000". Line 3-4: 4% of the first $9,480 of earned income. The phase-out starts at $31,950 for non-joint filers.

Not in this PR:

Merging with #9643: the two PRs conflict only in the comment block of mn_child_and_working_families_credits.py. The combined rule is is_eitc_qualifying_child & (age >= age_threshold); a trial merge passes all 22 tests of both PRs. After both merge, is_disabled_dependent is unused; the PR that merges second should delete it (ruff's F841 is ignored in this repo).

Tests

Six new 2025 cases in mn_child_and_working_families_credits.yaml, one head of household with $10,000 of wages and one dependent:

  • 18, full-time student: $379.20 (4% × $9,480) + $1,000 = $1,379.20 (main: $379.20).
  • 18, not a student: $1,379.20 (main: $379.20).
  • 17: $379.20 + $1,750 child tax credit = $2,129.20, no older-child amount.
  • 19, not a student: $379.20, no older-child amount.

The two 18-year-old cases fail on main and pass with the fix. All 477 Minnesota baseline tests, the 23 Minnesota contrib tests, and 82 other tests with Minnesota households (taxsim_state_eitc, taxsim_state_ctc, state_agi, salt_refund_integration, test_legacy_state_umbrellas.py) pass. ruff format and ruff check pass.

Overlap

#9643 changes qualifying_child in the same formula to is_eitc_qualifying_child. #9918, #9883 and #9889 add cases to the same test file. The changes do not depend on each other. The new tests use employment_income, not filer_adjusted_earnings, so they do not change when #9918 switches the earnings variable. The PR that merges second needs a small rebase.

🤖 Generated with Claude Code

Minn. Stat. 290.0671, subd. 1a defines a qualifying older child as an
IRC 32(c) qualifying child that attained at least age 18. The formula
used age > 18 and also required full-time student or disability status,
so an 18-year-old added nothing. IRC 152(c)(3) already makes every
child under 19 a qualifying child, and Schedule M1DQC (2023-2025) step 8
checks row 11 for a non-student under 19. Compare with >= and drop the
extra student gate, which is_qualifying_child_dependent already applies
from age 19.

Fixes #9871.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (d8da415).
⚠️ Report is 437 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9922   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         1    -3     
  Lines           76        33   -43     
  Branches         2         0    -2     
=========================================
- Hits            76        33   -43     
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.

…er child

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. Read all four files at 1d4fa22 plus is_qualifying_child_dependent, mn_wfc_eligible and the phase-out parameters, against Minn. Stat. 290.0671 subd. 1a ("qualifying older child" means a qualifying child, as defined in section 32(c) of the Internal Revenue Code, that attained at least the age of 18 in the taxable year), 290.0661 subd. 1, IRC 152(c)(3), and the 2023 to 2025 Schedules M1CWFC and M1DQC (page 3).

The new rule qualifying_child & (age >= age_threshold) is the statute's definition. The old rule required age > 18 and a student or disabled status, which dropped every 18-year-old and every 19-to-23-year-old student who was exactly 19. is_qualifying_child_dependent already carries the 152(c)(3) under-19 / under-24-student split and the disabled waiver, so ages 17, 18, 19 and 24 and disabled children all land where M1DQC steps 4 to 8 put them, and the under-18 CTC count stays disjoint from the 18-and-over count. Effective date 2023-01-01 matches 2023 Minn. Laws ch. 64 art. 1 (taxable years beginning after December 31, 2022).

The six new 2025 cases recompute by hand: 379.20 + 1,000 = 1,379.20 (three 18-year-olds), 379.20 + 1,750 = 2,129.20 (17), 379.20 (19 non-student), and 1,379.20 - 0.09 x (40,000 - 31,950) = 654.70 for the phase-out case (M1CWFC line 13 gives 9% because line 5 has an amount and line 8 does not).

Nits, not blocking:

  1. The test-file comment above the new block says "The next four cases ... $10,000 of wages"; six cases follow and the last uses $40,000.
  2. The pre-existing m1cwfc-24.pdf#page=2 reference points at the 2024 form's advance-payment page; the older-child instruction text is on page 3 of that file (the 2023 link's page 2 is right). Optional while the file is open.

The follow-ups already noted in the description (relationship test via PR 9643, the 65+ filer case in issue 9951) stand; nothing further from me.

main now takes the qualifying child from is_eitc_qualifying_child, which
applies the IRC 152(c)(3) age, student and disability tests, so this
branch's age >= 18 test needs no separate disabled-dependent term.
Combine the two comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PavelMakarchuk

Copy link
Copy Markdown
Collaborator Author

Merged main to clear a conflict in mn_child_and_working_families_credits.py. main now takes the qualifying child from is_eitc_qualifying_child, which applies the IRC 152(c)(3) age, student and disability tests. So this branch's age >= age_threshold test works with it unchanged, and the separate is_disabled_dependent term is no longer needed (removed). The two comments are combined (the age test plus main's note on the 152(c)(2) relationship test).

The Minnesota tests pass (502). Since this changes code after your approval, please take another look.

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-approving at 43cd905. Against main the PR is now only the older-child rule, is_eitc_qualifying_child & (age >= age_threshold); the parameter, changelog and the six-case test block are byte-identical to the head I approved. Main's is_eitc_qualifying_child is (is_qualifying_child_dependent | dependent & disabled) & ~(parent | grandparent of the filer), so dropping the branch's own is_disabled_dependent loses nothing (the 152(c)(3)(B) waiver is inside the federal variable) and the merge closes the follow-up from the first round: a disabled parent claimed as a dependent no longer counts as a qualifying older child. The age table still matches Minn. Stat. 290.0671 subd. 1a and M1DQC steps 1 to 8 at 17, 18 (student, non-student, disabled), 19, 24 and a disabled adult child, and the under-18 CTC count and the 18-and-over count still partition every qualifying child. All six 2025 cases recompute at the new head (1,379.20 x3, 2,129.20, 379.20, 654.70), and the pre-existing 19-year-old student, disabled 29-year-old and disabled-parent cases hold.

CI: 27 of 28 green; the red Baseline states-shard-4 is a 60-minute timeout on a shard (az, dc, hi, il, la, mi, mt, nh, ny, pa, va, wv) that this Minnesota-only change cannot touch, so a re-run rather than a code change.

The two nits from the first round are still open and still optional: the test-file comment says "The next four cases ... $10,000 of wages" above six cases, and the m1cwfc-24.pdf#page=2 reference points at the advance-payment page rather than page 3. The description also predates the merge (it still mentions the student test and lists four cases).

PavelMakarchuk and others added 2 commits October 11, 2026 14:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PavelMakarchuk
PavelMakarchuk merged commit 4e7a637 into main Oct 13, 2026
28 checks passed
@PavelMakarchuk
PavelMakarchuk deleted the mn-cwfc-older-child-age-18 branch October 13, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants