Repository navigation
Conversation
IRC 2(a)(1)(B) determines the surviving spouse's son or daughter's dependency "without regard to subsections (b)(1), (b)(2), and (d)(1)(B)" of section 152. surviving_spouse_eligible counted tax_unit_child_dependents, which sums is_child_dependent and so applied the 152(d)(1)(B) qualifying relative gross income test. An adult child with gross income at or above the exemption amount ($5,200 in 2025) therefore left the parent filing single. The formula now counts any tax unit dependent who is the head's child. 2(a)(1)(B)(i) requires a son, stepson, daughter or stepdaughter. Where the household has parent ids, the child is a dependent whose parent_1_id or parent_2_id names the head (natural, adoptive or step). Without parent ids, it is any dependent not marked as a parent or grandparent of the filer or as unrelated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of bd9545e found that switching to parent ids for a whole household removed surviving spouse status from a real child whose own ids were unknown, whenever the head or a housemate had any parent id. A parent id of 0 is unknown, so it cannot show that the filer is not the parent. Each dependent is now judged on its own ids: a dependent is the head's child when an id names the head, and is not when two different parents are named and neither is the head, when an id names another household member, or when the head's own ids name the dependent as the head's parent or grandparent. Otherwise the relationship flags decide, as before. Adds YAML regressions for each case the review reproduced, a sibling and a two-generation ancestor case, and widens the property grid to ten relationship setups. Fixes the grid's has_dependent field, which counted the four units without a dependent as having one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 5661605 found two remaining defects: - Naming another parent was treated as proof that the head is not a parent. A widower's daughter who named only her co-resident mother, and a stepchild naming both biological parents, lost the status. A parent id of 0 is unknown and two ids cannot list every step parent, so neither settles the relationship. - Ancestor links stopped at tax unit boundaries, so a grandmother linked through a mother filing separately still qualified the head. A dependent is still the head's child when an id names the head. The ids now rule a dependent out only when they show another relationship: the head's parent or grandparent, a sibling (a shared parent id), a grandchild (the dependent's parent names the head) or a niece or nephew (the dependent's parent shares a parent id with the head). Parents are resolved among both household and tax unit members, and shared ids identify siblings even when the parent lives elsewhere. Adds YAML for both review cases, an absent-parent sibling and a nephew, and widens the property grid to thirteen relationship setups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Waive the gross income test for confirmed children and stepchildren. Retain the ordinary dependency test for unknown relationships, exclude identified foster children, require a shared household, and account for couples filing separate returns. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recognize an otherwise qualifying child who files jointly. Require household membership for the ordinary head-of-household route, preserve the dependent-parent exception, and recognize cohabiting spouses who file separately. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Draft. The 2025 and 2026 default-dataset impact remains pending. Household tests use synthetic inputs.
The bug
surviving_spouse_eligiblerequiredtax_unit_child_dependents > 0. That sumsis_child_dependent, which accepts a qualifying child, a permanently disabled dependent, oris_qualifying_relative_dependent. That last path applies the IRC 152(d)(1)(B) gross income test (dependent_gross_income < gov.irs.income.exemption.amount, $5,200 in 2025). So an adult child with gross income of $5,200 or more left a widowed parent filing as single.The same rule also let any low-income dependent qualify the filer, including a parent, a grandparent or an unrelated household member.
The law
Pub. L. 108-311 §207(1) added the three §152 exceptions to 26 U.S.C. 2(a)(1)(B)(i). Section 208 applies the amendment to tax years beginning after December 31, 2004. The proposed Treasury preamble (REG-137604-07, I.R.B. 2017-7) reads clause (ii) consistently with clause (i). The 2025 Form 1040 instructions, page 15 apply those waivers.
The fix
A widowed tax-unit head qualifies through a confirmed co-resident child or stepchild who meets the remaining dependency conditions.
CHILDorOTHERvalue ofsurviving_spouse_dependent_relationshiptakes precedence.surviving_spouse_joint_return_child_id. The input confirms the relationship and remaining dependency conditions.SEPARATE.tax_unit_child_dependentsandis_child_dependentare unchanged. Vermont's EITC, New York's exemptions and Pell still read them.Limitations.
Before and after
The confirmed adult child with $12,000 of synthetic wages qualifies the widow despite the $5,200 threshold and yields a $31,500 basic deduction. The separate $7,800 taxable disability-benefit case also qualifies. The deceased-parent-only, stepchild, and co-resident-mother examples supply
CHILD. A $0-income grandmother has one ordinary child-dependent count in the widow's unit and cannot qualify her for surviving-spouse status.A supported adult son filing jointly can qualify the widow, a child living elsewhere all year gives
SINGLEin the test household, and cohabiting remarried spouses filing separate returns both receiveSEPARATE.surviving_spouse_eligible.yaml,filing_status.yamlandhead_of_household_eligible.yamlcontain 31, 23, and 16 passing cases, respectively.Invariants
test_surviving_spouse_eligible_properties.pybuilds a grid of 1,876 focal tax units, 2,308 total tax units, and 5,118 people. It uses ages 10, 31, and 88, and incomes of $0, $3,000, $5,199, $5,200, $12,000, and $50,000. The relationship setups distinguishCHILD,OTHER, andUNKNOWN.The six tests check eligibility, income invariance for confirmed children, exclusion of known other relationships, required conditions within the in-unit grid, filing-status agreement, and the differential from ordinary child-dependent counts. The cross-return route has a separate YAML case.
Why Python. The relationship examples are YAML cases. This test adds invariants that named YAML cases cannot state: income invariance across grouped units, a reference rule, and a differential against
tax_unit_child_dependents, all over a mixed, vectorized population.Cost. The six property tests passed in 36 seconds of Linux runner wall time.
Interaction with #10185 and #9932
#10185 counts taxable employment disability benefits in gross income. It and #9932 have merged, and both squash commits are ancestors of this branch. The $7,800 synthetic taxable disability-benefit case verifies that the benefits enter gross income and a confirmed child still qualifies. A trial merge with main at
8e81d6637fhad no conflicts.Impact
Pending: default-dataset effects for 2025 and 2026, main vs this head.
Tests run
On Linux, 744 cases in 42 selected YAML files passed at
b978042d29and again on a trial merge with main at8e81d6637f. Six property tests and 251 source-conflict guard checks passed. Ruff formatting and lint checks passed for the changed Python files. Tests ran one file per process with a 900-second timeout.axiom: TheAxiomFoundation/rulespec-us#1814 queued (26 USC 2(a); the module
us/statutes/26/2/a.yamlis deferred withrules: []and blocked on TheAxiomFoundation/rulespec-us#1399)🤖 Generated with Claude Code