Skip to content

Conversation

@PavelMakarchuk
Copy link
Collaborator

Summary

Fixes #6994

This PR adds support for qualifying relatives in Head of Household filing status determination. Previously, only qualifying children (age-based) were considered, causing parents with 19+ year old non-student dependents to be incorrectly denied HOH status.

Changes:

  • is_qualifying_child_dependent (new): Pure age test - under 19, or under 24 if full-time student
  • is_qualifying_relative_dependent (new): Income test for those who fail age test but have gross income below the uprated personal exemption threshold (~$5,005 for 2024)
  • dependent_gross_income (new): Calculates gross income for dependents (mirrors irs_gross_income but for dependents only)
  • is_child_dependent (updated): Now combines all three pathways - qualifying child OR qualifying relative OR permanently disabled
  • head_of_household_eligible (simplified): Since is_child_dependent now includes qualifying relatives, no separate check needed

Technical notes:

  • The qualifying relative gross income limit uses the 2017 personal exemption ($4,050) with IRS uprating applied, continuing the pre-TCJA threshold
  • Permanently disabled individuals are exempt from the age test per IRC 152(c)(3)(B), so they qualify as child dependents (not qualifying relatives)

Test plan

  • Unit tests for is_qualifying_child_dependent (5 tests)
  • Unit tests for is_qualifying_relative_dependent (7 tests)
  • Unit tests for is_child_dependent (8 tests)
  • Unit tests for dependent_gross_income (3 tests)
  • Integration tests for head_of_household_eligible (6 tests)
  • All 169 demographic tests pass
  • CI passes

🤖 Generated with Claude Code

Add support for qualifying relatives in Head of Household filing status
determination. Previously, only qualifying children (age-based) were
considered, causing parents with 19+ year old non-student dependents to
be incorrectly denied HOH status.

Changes:
- Add is_qualifying_child_dependent (pure age test: under 19, or under 24 if student)
- Add is_qualifying_relative_dependent (income test using uprated personal exemption)
- Add dependent_gross_income to calculate gross income for dependents
- Update is_child_dependent to combine all three pathways (age, income, disability)
- Simplify head_of_household_eligible since is_child_dependent now includes relatives

The qualifying relative gross income limit uses the 2017 personal exemption
($4,050) with IRS uprating applied, continuing the pre-TCJA threshold.

Fixes #6994

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0ef8eeb) to head (c5623f7).
⚠️ Report is 51 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #7010      +/-   ##
===========================================
+ Coverage   91.89%   100.00%   +8.10%     
===========================================
  Files           5        13       +8     
  Lines         148       250     +102     
  Branches       14         3      -11     
===========================================
+ Hits          136       250     +114     
+ Misses         12         0      -12     
Flag Coverage Δ
unittests 100.00% <100.00%> (+8.10%) ⬆️

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.

@PavelMakarchuk PavelMakarchuk requested review from MaxGhenis and removed request for MaxGhenis December 19, 2025 00:48
@PavelMakarchuk PavelMakarchuk marked this pull request as ready for review December 19, 2025 14:40
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.

Head of Household should allow qualifying relatives (e.g., 19-year-old non-student dependents)

2 participants