Fix Head of Household eligibility for qualifying relatives #7010
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.
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 studentis_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 disabledhead_of_household_eligible(simplified): Sinceis_child_dependentnow includes qualifying relatives, no separate check neededTechnical notes:
Test plan
is_qualifying_child_dependent(5 tests)is_qualifying_relative_dependent(7 tests)is_child_dependent(8 tests)dependent_gross_income(3 tests)head_of_household_eligible(6 tests)🤖 Generated with Claude Code