Skip to content

A separated dependent unpairs the couple under age-ordered tax-unit roles #9620

Open

Description

@MaxGhenis

Summary

Under age ordering, one separated member anywhere in a tax unit, even a dependent, stops anyone in the unit from being the spouse:

# policyengine_us/variables/household/demographic/tax_unit/is_tax_unit_spouse.py (age-ordering branch)
        is_separated = tax_unit.any(person("is_separated", period))
        adult = ~person("is_child", period)
        head = person("is_tax_unit_head", period)
        eligible = adult & ~head & ~is_separated

filing_status already restricts the same test to the head or spouse ("Separation can make the taxpayer file separately only when it applies to the tax unit head or spouse, not a dependent or other member"). The spouse rule does not.

Example (policyengine-us main c8aae08, TX, 2024)

A head aged 50 with $80,000 of wages, a spouse aged 48 with $40,000, and their 25-year-old dependent child:

Adult child is_tax_unit_spouse Filing status Income tax
not separated [False, True, False] JOINT $9,932
is_separated: true [False, False, False] HEAD_OF_HOUSEHOLD $14,441

On the certified Populace build this unpairs 45 couples under age ordering. #9617 bypasses the gate for units whose roles the dataset supplies, but household situations and datasets without supplied roles still hit it.

Fix

Gate on the separation status of the head and the candidate spouse only, not of every member. The head can be tested directly. For the candidate, exclude separated people from eligible rather than blocking the whole unit.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions