Repository navigation
Make rules for a filer claimed elsewhere independent of which spouse is labelled head - #10024
Merged
Merged
Conversation
The federal standard deduction and 17 state formulas read only whether the tax-unit head is claimed elsewhere, so a joint return where one spouse can be claimed was taxed differently depending on which spouse was labelled head. Each formula now applies its jurisdiction's rule for that case (either spouse, single filers only, per spouse, or only when every filer is claimed), using two new label-independent helpers. Adds swap-pair YAML cases and a Hypothesis property test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… barred The New Mexico, Maine and Hawaii renters gates counted filers who are not claimed elsewhere, so a tax unit with neither a head nor a spouse (252 in the default dataset) looked like one whose every filer was claimed. A new helper, every_filer_is_dependent_elsewhere, requires a claimed filer and no unclaimed one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ss EITC - Hawaii's dependent standard deduction uses earned income net of the deductible part of self-employment tax, as the N-11 worksheet does. - New Mexico's medical care credit needs a filer who is both 65 or older and not a dependent when a filer is a dependent elsewhere (NMSA 7-2-18.13). - The federal EITC without a qualifying child requires that no filer can be claimed as a dependent (IRC 32(c)(1)(A)(ii)(III), Publication 596), so Missouri's working family credit no longer reaches such a couple. - Hawaii's food/excise credit keeps minor children receiving public support (HRS 235-55.85(c)) on a joint return where one spouse can be claimed. - Comments label the readings the law does not settle, and the property test covers the EITC and the food/excise exemption amount. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 9, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… meaning - The federal and Oregon dependent worksheets use earned income net of the deductible part of self-employment tax, as Hawaii's now does. - Hawaii's food/excise minor-child count excludes children who can be claimed by another taxpayer and the filers themselves (Form N-311 line 3). - claimed_as_dependent_on_another_return documents what it stands for: a §151 deduction for the person is allowable to another taxpayer, so a person whose would-be claimer files only for a refund is not one (Publications 501 and 596); rules on actually being claimed read it too. - Hawaii's renters comment labels the mixed joint reading as an inference; the Hawaii dependent threshold cites HRS 235-2.4(a)(3) on its page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
Draft
MaxGhenis
added a commit
that referenced
this pull request
Oct 10, 2026
#10024 now separates three facts: is claimed, can be claimed, and the would-be claimant's filing exception. - IRC 152(b)(1) gates (child tax credit, credit for other dependents, under-13 care child and its expenses, dependents in exemptions_count, ARPA dependents, Ohio dependents, the Hawaii and Wisconsin reforms) read head_or_spouse_is_dependent_elsewhere_without_filing_exception, so a filer within the Publication 501 exception keeps their dependents. - Own exemptions, recovery rebates and the tuition deduction read claimability. - Education credits and student loan interest keep reading the claimed input. - Tests: the filing exception and a filer who can be claimed but is not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 10, 2026
Dependent rules (child care credit child, certain-dependents deduction) and the childless EITC read the claimable-and-not-within-the-filing-exception helper; the "not a dependent of another individual" rules read claimability. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 11, 2026
#10024 now separates claimability (`claimable_as_dependent_on_another_return`) from an actual claim (`claimed_as_dependent_on_another_return`) and adds the claimant filing exception. Each rule now reads the fact its law names: - IRC 152(b)(1) "no dependents" rules (Iowa dependent credit, Kansas dependents and food sales tax credit child, Louisiana dependent exemption, Maryland dependents, aged dependents and CTC, and the childless pro forma EITC) read `head_or_spouse_is_dependent_elsewhere_without_filing_exception`, as the federal formulas do. - Rules whose text says "claimed" read the claim: Iowa's low-income exemption and tax reduction ("not claimed as a dependent on another person's Iowa return") and Kansas's 2021-2023 zero exemptions ("If you are claimed as a dependent"). - Maryland's filing status 6 ("Any person who can be claimed") keeps reading claimability for the own exemption and the poverty line credit. Maryland now counts its own exemptions in `md_personal_exemptions_count` instead of reading federal `exemptions_count`, so a federal-only reform of that count no longer changes Maryland's exemptions (review r1 finding 1). The changelog names the aged dependent AGI limit (r1 finding 2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 11, 2026
#10024 now separates claimability (claimable_as_dependent_on_another_return, read by head_or_spouse_is_dependent_elsewhere) from an actual claim (claimed_as_dependent_on_another_return), and the federal branch applies the Dependent Taxpayer Test (IRC 152(b)(1)) through head_or_spouse_is_dependent_elsewhere_without_filing_exception. So: - Dependent counts (RI rebate, SC exemption and under-six deduction, UT dependents, birth-year dependent, at-home parent child and contributed reform, VT dependent exemptions and CTC, WI homestead $500 deduction) use the Dependent Taxpayer Test helper, keeping dependents when the would-be claimant meets the filing exception. - Wisconsin's $250 exemption reads claimability: a filer who can be claimed is not "allowed the $700 exemption" even when no one claims them. - Vermont's renter credit bars a claimant actually claimed (6066(c)(2)). - Wisconsin's care subtraction and credit read cdcc_qualifying_childcare_expenses, so a claimable filer's childcare for a nonqualifying child drops out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 11, 2026
…role-less units - is_aca_tax_family_member reads claimable_as_dependent_on_another_return (#10024's split input: 36B(c)(1)(D) and 1.36B-1(d)(2) turn on being claimable, and Form 1040 line 12a, which Form 8962 line 1 keys on, has no refund-only carve-out). The return keeps its dependents when the would-be claimant meets the refund-only filing exception (Pub 501, Dependent Taxpayer Test), a return with no applicable taxpayer has no family, and a tax unit with neither a head nor a spouse uses each member's own claimability (a lone claimable minor no longer gets the credit). - aca_magi leaves out the tax-exempt interest and Social Security of the return's dependents who are outside the tax family (26 CFR 1.36B-1(e)(1)). - used_aca_ptc is capped at the coverage family's share of the selected plan premium (new aca_ptc_coverage_family_premium; 26 CFR 1.36B-3(d)(1)(i), (h)(1)), not the whole policy's premium. - marketplace_csr_eligible applies 45 CFR 155.305(g)(3): the model prices one policy per tax unit, and a policy that also covers an enrollee without credit eligibility gets no cost-sharing reductions. - aca_fpg documents that it sizes the family for the tax year; the NJHPS exclusion is labelled an interpretation; one reference per source in is_aca_coverage_family_member. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 11, 2026
The repeal reform's personal-exemption overrides counted every head and spouse, so a filer whom another taxpayer can claim kept a personal exemption under the reform that the baseline denies once #10024 and the claimable-filer PRs apply IRC 151(d)(2). Delaware, Hawaii, Nebraska, Rhode Island, West Virginia and Wisconsin now count head_spouse_count_not_dependent_elsewhere (West Virginia keeps its $500 exemption for a return on which no filer has one), Virginia's per-person exemption and Hawaii's aged exemption skip a claimable filer, and Vermont's count no longer depends on which spouse is labelled head. Michigan's baseline computes a claimable filer's return outside mi_personal_exemptions and, when the would-be claimant meets the filing exception, allows that return's dependents. The reform now overrides mi_exemptions as well, so those dependent exemptions are repealed too. California, Kansas, Maryland, Ohio and Oklahoma follow their baselines in the claimable-filer PRs that changed them. Georgia, Indiana, Iowa, Kansas from 2024, Kentucky and Massachusetts let a claimable filer keep the exemption, so their overrides are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 4 tasks
MaxGhenis
added a commit
that referenced
this pull request
Oct 12, 2026
…deduction When a spouse can be claimed, the Standard Deduction Worksheet for Dependents limits the joint standard deduction, which PR #10024 adopts. The case now isolates the per-spouse unearned income test under either deduction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve the symmetric NM medical credit age and claimability rule alongside main's federal premium exclusion and NM computed-expense restoration. Retain every original case and add a computed-expense swap pair.
MaxGhenis
added a commit
that referenced
this pull request
Oct 14, 2026
…ed as dependents (#10135) * Apply the unearned income filing test only to filers who can be claimed as dependents The federal filing requirement tested every tax unit's unearned income against $500 plus the additional standard deduction. Under 26 U.S.C. 6012(a)(1)(C)(i)(I) and (f)(2)(D) that test applies only to an individual described in section 63(c)(5), and the amount is the section 63(c)(5)(A) amount for the year ($1,350 in 2025), not the unindexed $500. - Apply the test to the head, and on a joint return each spouse, who can be claimed as a dependent on another return. - Read the amount from gov.irs.deductions.standard.dependent.amount and add that person's own additional standard deduction for age or blindness. - Count gross income from every source except wages and self-employment income, so a self-employment loss or a tax unit dependent's wages no longer change the filer's unearned income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add invariant tests and boundary cases for the dependent filing requirement - Hypothesis properties: split invariance for filers nobody can claim, monotonicity in income, claimability never removing the requirement, and tax unit dependents' income never mattering. - A boundary grid checked against Publication 501 (2025), Table 2, computed directly from its published amounts, and against medicaid_person_is_required_to_file, the other Table 2 implementation. - Keep the YAML cases a dollar away from the two thresholds where the statute and the IRS charts differ at the exact dollar, and say in the formula that the joint return test follows Table 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the joint return attribution case valid under the limited joint deduction When a spouse can be claimed, the Standard Deduction Worksheet for Dependents limits the joint standard deduction, which PR #10024 adopts. The case now isolates the per-spouse unearned income test under either deduction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the 2026 dependent cases off the exact-dollar boundary Section 6012(a)(1)(A) excuses a filer only when gross income is less than the basic standard deduction, while Chart B says more than; the 2026 instructions are not yet out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address review round 1: earned sources parameter, open points kept out of tests - Move the earned income sources of the unearned income test into gov.irs.income.filing_requirement.dependent.earned_income_sources, citing the IRS dependent worksheet, and count Schedule F farm income as earned. A test checks that every listed source is a gross income source. - Stop pinning decision d1395: drop the 2025 case of a claimed spouse aged 65 at exactly $2,950 and the case of a claimable filer filing separately, limit the joint grid to claimed spouses under 65 and not blind, and compare with medicaid_person_is_required_to_file only in 2025. - Start every Hypothesis batch with a unit that must file and one that need not, and assert each property has rows to check. - Drop the duplicate section 6012 reference entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address review round 2: keep separate filers out of the claimability invariant, test farm income - Property 7 (claimability never removes a requirement) now leaves out separate filers as well as blind ones: Table 2 and the statute differ for a claimable married dependent filing separately (decision d1395). - Add a 2025 joint case where a claimed spouse's $2,000 of farm profit is earned income; dropping farm income from the earned sources fails it. - Correct the docstring's claim about what the anchor units guarantee. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 14, 2026
* Apply the unearned income filing test only to filers who can be claimed as dependents The federal filing requirement tested every tax unit's unearned income against $500 plus the additional standard deduction. Under 26 U.S.C. 6012(a)(1)(C)(i)(I) and (f)(2)(D) that test applies only to an individual described in section 63(c)(5), and the amount is the section 63(c)(5)(A) amount for the year ($1,350 in 2025), not the unindexed $500. - Apply the test to the head, and on a joint return each spouse, who can be claimed as a dependent on another return. - Read the amount from gov.irs.deductions.standard.dependent.amount and add that person's own additional standard deduction for age or blindness. - Count gross income from every source except wages and self-employment income, so a self-employment loss or a tax unit dependent's wages no longer change the filer's unearned income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add invariant tests and boundary cases for the dependent filing requirement - Hypothesis properties: split invariance for filers nobody can claim, monotonicity in income, claimability never removing the requirement, and tax unit dependents' income never mattering. - A boundary grid checked against Publication 501 (2025), Table 2, computed directly from its published amounts, and against medicaid_person_is_required_to_file, the other Table 2 implementation. - Keep the YAML cases a dollar away from the two thresholds where the statute and the IRS charts differ at the exact dollar, and say in the formula that the joint return test follows Table 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the joint return attribution case valid under the limited joint deduction When a spouse can be claimed, the Standard Deduction Worksheet for Dependents limits the joint standard deduction, which PR #10024 adopts. The case now isolates the per-spouse unearned income test under either deduction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the 2026 dependent cases off the exact-dollar boundary Section 6012(a)(1)(A) excuses a filer only when gross income is less than the basic standard deduction, while Chart B says more than; the 2026 instructions are not yet out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address review round 1: earned sources parameter, open points kept out of tests - Move the earned income sources of the unearned income test into gov.irs.income.filing_requirement.dependent.earned_income_sources, citing the IRS dependent worksheet, and count Schedule F farm income as earned. A test checks that every listed source is a gross income source. - Stop pinning decision d1395: drop the 2025 case of a claimed spouse aged 65 at exactly $2,950 and the case of a claimable filer filing separately, limit the joint grid to claimed spouses under 65 and not blind, and compare with medicaid_person_is_required_to_file only in 2025. - Start every Hypothesis batch with a unit that must file and one that need not, and assert each property has rows to check. - Drop the duplicate section 6012 reference entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Apply the 6012(a)(1) filing requirement from 2026 Section 6012(f) covers only taxable years 2018 through 2025, and Pub. L. 119-21 does not amend section 6012, so section 6012(a)(1) governs from 2026. For a tax unit nobody can claim as a dependent, a return is required when gross income is at least the basic standard deduction plus one additional standard deduction for each spouse aged 65 or older. Blindness does not raise the threshold. A new boolean parameter switches between the two rules by year. Tax units whose head or spouse can be claimed keep the standard deduction test (decision d1395). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add property tests for the 6012(a)(1) and 6012(f) filing thresholds A boundary grid over every filing status and combination of age 65 and blindness checks the model against both rules computed from the published 2025 and 2026 amounts. Hypothesis properties check blindness, age, the parameter switch, and that claimable units keep their 2026 result. The dependent invariants' claimability property now skips the 2026 threshold dollar, where 6012(a)(1)(A) requires a return and the claimable-filer test does not (d1395); a pinned test shows the case. The 2025 YAML cases cite decision d1403. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Count the WFTCA bonus in the 2026 threshold; test without a second system The WFTCA contributed reform's bonus guaranteed deduction is, in its own parameter's words, an increase to the basic standard deduction, so it is part of the 6012(a)(1) threshold (it is zero unless the reform is on). Two contrib cases pin it. The property tests no longer build a reformed tax-benefit system, which held a second parameter tree (about 0.7 GB) in the CI core group, already at 13.3 GB. Claimable units are now checked against the standard deduction and unearned income tests directly, and 6012(a)(1) against a 6012(f) reference with the 2026 amounts. Two fixed anchor units keep every example non-vacuous. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Hold tax-unit roles fixed in the property tests; document the $0 guard Review round 1 found that the age property could fail for a reason unrelated to age: with roles left to age order, raising both spouses to 65 can make a younger claimable spouse the head, which limits the joint standard deduction. Every test unit now supplies its roles, and the reviewer's counterexample is a fixed anchor. Without the roles the property fails on that anchor; with them it passes. The positive gross income guard for a separate filer keeps the model's existing behaviour. The formula now says why, citing the National Taxpayer Advocate's account of the zero exemption amount and the IRS's $5 relief; the reading is queued with decision d1403. The section 6012 references are consolidated into one entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
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.
Summary
On a joint return, which spouse is listed first is a convention of the form. But the federal standard deduction and 16 state formulas read only
head_is_dependent_elsewhere(is the person labelled head claimed as a dependent on another return?), so a couple where one spouse can be claimed was taxed differently depending on the label. The review of #9981 gave the case: married adults aged 20 earning $8,000 each in 2025, only one of them claimable by a parent (a joint return filed only to recover withholding can meet the federal exception, IRS Publication 501).(main and branch values from
Simulationruns of that household; log:~/reviews/us-hub/head-dep-elsewhere-swap/logs/smoke-{main,branch}-2025.txt.)Each formula applies its jurisdiction's rule independently of the arbitrary head/spouse labels. The stable helper family now means general claimability:
head_is_dependent_elsewhere,spouse_is_dependent_elsewhere,head_or_spouse_is_dependent_elsewhere,head_spouse_count_not_dependent_elsewhere, andevery_filer_is_dependent_elsewhere. The last helper is false for a unit with neither filer. The earlier main 09d7d9d dataset/model had 252 such units; every unit had a head in the later 0d93495 dataset/model run described below. Michigan'sdependent_on_other_returnamount remains per individual.Input contract.
claimed_as_dependent_on_another_returnretains main's public meaning: an actual or expected actual claim in another tax unit. New Person inputclaimable_as_dependent_on_another_returnrepresents an allowable section 151 dependency deduction in another tax unit, claimed or not. Its formula defaults to the existing input, preserving callers that provide only that input. New Person inputdependent_claimant_filing_exceptionis true when the would-be claimant is not required to file and either files no return or files solely for a refund of withholding or estimated payments; a return claiming EITC or other refundable credits is outside it. Claimability remains true in those cases. The Person helperis_dependent_elsewhere_without_filing_exceptionand TaxUnit helperhead_or_spouse_is_dependent_elsewhere_without_filing_exceptionexpose claimable-and-not-excepted. EITC Rule 12 and rules applying the Dependent Taxpayer Test consume these helpers. The same 26-year-old with $2,000 wages can therefore be EITC-eligible while retaining the $2,450 limited basic standard deduction, and the exception restores lawful own-dependent exemptions. General claimability rules never consume the exception. Sources: Pub 596 p.18, Pub 501 pp.11 and 24, and for the no-return case of the Dependent Taxpayer Test the 2025 Instructions for Form 1040 ("Who Qualifies as Your Dependent": check "No" when the person who could claim you is not required to file and either isn't filing or files only to claim a refund). The line 12a instruction on the same page has no such carve-out for the dependent standard deduction.Confirmed state readings. Max answered yes in d1191 on 2026-10-10, confirming this PR's defaults for NY, MI, VA, NM, ME, HI, and Oregon. The source table distinguishes explicit form/statutory rules from the confirmed mixed-return interpretations.
The rule per provision, and the source
basic_standard_deduction(federal)ny_standard_deductionmi_exemptionsor_standard_deductionva_low_income_tax_credit_eligiblemo_wftc_eligiblenm_2021_income_rebate,nm_additional_2021_income_rebate,nm_supplemental_2021_income_rebate,nm_deduction_for_certain_dependents_eligible,nm_medical_expense_credit,nm_cdcc_eligiblenm_medical_expense_creditage testeitc_demographic_eligible(federal, childless branch)me_sales_tax_fairness_credit_eligiblehi_deductionshi_act_115_rebate,hi_food_excise_credit(+hi_food_excise_exemption_amount), renters credit eligibility and amountUnchanged because they already read both spouses: Arizona aged exemption, Illinois personal exemption, Minnesota renters and homestead credits, Utah homeowner/renter relief, Vermont personal exemptions.
These changes reach beyond joint returns, because the jurisdiction's own rule requires them:
hi_deductionsalready computed a version of that amount (as the floor for itemizing) but always used the full amount as its standard-deduction candidate, before comparing it with allowable itemization.An independent GPT-6.1 Sol research pass reached the same rule for every formula (
~/reviews/us-hub/head-dep-elsewhere-swap/research/sol-research.md); the rule table with sources isdecisions.mdin the same folder.Invariants
head_or_spouse_is_dependent_elsewhere == head_is_dependent_elsewhere | spouse_is_dependent_elsewhere; for a couple,every_filer_is_dependent_elsewhere == head_is_dependent_elsewhere & spouse_is_dependent_elsewhere;head_spouse_count_not_dependent_elsewhereplus the claimable filers equals the number of filers.Tests
ny_standard_deduction.yaml, and tests for the ordinary and exception-aware helpers. Two variables have no swap pair in their own file:hi_food_excise_exemption_amountandhi_food_excise_credit_minor_child_countare covered through the food credit's YAML and the property test. Legacy cases that supplied an aggregated dependency helper now supply the Person fact; the new claimability input defaults to that fact. Arizona and the actual-claim reform fixtures also now supply actual Person claims, retaining their existing expected outputs. The MI case for a married dependent now has two claimed spouses ($3,000, unchanged). Results: at 436805e the 57 targeted files (every changed YAML file, all federal EITC tests, and every test that sets a claimed-elsewhere input) pass, 506 cases (logs/yaml-branch-5.log); at 1f0cd1b, 42 of the then 210 cases failed on main, including at least one labelling of every new pair (logs/yaml-main-1.log).policyengine_us/tests/core/test_dependent_elsewhere_head_spouse_swap_invariance.pydirectly checks the swap/helper invariants plus fallback equivalence and exception isolation: Hypothesis batches of married couples (0-2 dependents) in HI, ME, MI, MO, NM, NY, OR, VA and CA for 2021-2026 with neither, either or both spouses claimed; a seeded population with the review case, a child case and an older renter couple every year; and the review case in every state for 2026. At 436805e all 8 tests pass on this branch and all 8 fail on main 0d93495 (logslogs/property-branch-5.log,logs/property-main-5.log). On main the failures include NY, MI and ME state income tax and federal income tax, for example "state_income_tax in 2025 changes when the head and spouse labels are exchanged: … MI claimed=(True, False) 2107.06 -> 1741.57".ff479aa74a882a9a91053d651973ddf59b238511in run 37926760594 (rest-python-core-resources.txt); the other Rest groups peak at up to 13,844,632 KiB (14.177 GB, policy) on the 16 GB runner. How much of this file's 5 GB the core process already holds is not measured; the whole group was not rerun locally.tests/code_health/, 165 cases) pass at 436805e (logs/code-health-5.log).claimed_as_dependent_on_another_returnat its default. A patch extending it with claimed spouses (adults drawclaimed_as_dependent_on_another_return; the review case runs in every state in 2026) is at~/reviews/us-hub/head-dep-elsewhere-swap/ssw-test-claimed-spouse.patch, for whichever of the two PRs lands second. On Make state income taxes independent of which spouse is labelled head #9981 alone (d464128) with the patch, all 8 of its tests fail (for example "state_income_tax in 2021 changes when the head and spouse labels are exchanged: MO 2678.56 -> 3417.57, … OK 2234.05 -> 2869.05": Missouri, Oklahoma and Iowa inherit the federal standard deduction); on Make state income taxes independent of which spouse is labelled head #9981 merged with this branch (41fb4a5) all 8 pass (logslogs/ssw-ext-ssw-alone-ext.log,logs/ssw-ext-ssw-hde-merge-3.log).Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
f4539bc050against this PR's head2ddb85235b, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.standard_deductioneitceitc_eligiblehi_food_excise_creditmi_exemptionsny_standard_deductionor_standard_deductionva_income_taxnm_income_taxme_income_taxhi_income_taxmi_income_taxny_income_taxor_income_taxstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsNo record changes in either year in any output listed, as at the earlier heads
2d2db2ce84andc7f969f872. The historical run below found that the dataset setsclaimed_as_dependent_on_another_returnfor nobody, so the dependency gates this PR changes don't activate on it.Comparison files are in
fixes/10024-impact/on the hub host.Microsimulation impact
A real microsimulation, main (0d93495) against this branch (436805e, which merges that main), on the default dataset
populace_us_2024.h5@populace-us-2024-spm-20260909, run throughlockrun.shfor 2025 and 2026 (arrays in~/reviews/pe-us-merge-backlog-2026-10-02/impact/out/hde-{b5,p5}.*, comparison in~/reviews/us-hub/head-dep-elsewhere-swap/impact-{2025,2026}.json):eitc, state income tax before and after refundable credits ($549B, $578B), household net income, andbasic_standard_deduction,ny_standard_deduction,mi_exemptions,or_standard_deduction,va_low_income_tax_credit_eligible,mo_wftc_eligible,nm_deduction_for_certain_dependents_eligible,nm_medical_expense_credit,nm_cdcc_eligible,me_sales_tax_fairness_credit_eligible,hi_deductions,hi_food_excise_exemption_amount,hi_food_excise_credit,hi_food_excise_credit_minor_child_count, and the Hawaii renters credit and its eligibility. Not measured: the three New Mexico 2021 rebates and Hawaii's Act 115 refund, which exist only for 2021;eitc_demographic_eligibleis checked througheitc.claimed_as_dependent_on_another_returnfor nobody (0 persons; 0 tax units with a claimed head or spouse), so the dependency gates did not activate. The intentional minor-filer correction is independent of this flag; no round-4 microsimulation was run.every_filer_is_dependent_elsewherefixed it (no change at 8da8312 against 09d7d9d). On main 0d93495 every tax unit has a head.Overlaps
Follow-ups (not in this PR)
Rules for a claimed filer that the model never applies or applies only in part (the EITC with a qualifying child when a filer is the qualifying child of another taxpayer, IRC 32(c)(1)(B); dependents on a joint return with a claimable spouse per Publication 501; Oregon's personal exemption credit, ORS 316.085(1)(b); Maine and Hawaii personal exemptions; New York household and NYC credits gated on item C; New Mexico LICTR household members and child income tax credit; Virginia's dependent standard deduction), and
nm_medical_expense_creditcounting a dependent's age 65+ when nobody is claimed, are being handled in a separate stack of PRs (branchesclaimable-filer-*), which builds on this one.Round 4: contract, consumer audit, and Hawaii ordinary counts
Restored the actual/expected-claim contract, introduced claimability with the old-input formula fallback, and modeled the nonrequired-claimant refund-only/no-return exception separately. EITC and the Michigan/Hawaii Dependent Taxpayer Test counts now use the exception-aware helpers; all deduction limits remain general claimability. Hawaii N-311 ordinary counts now exclude every externally claimable person. Two independent joint filers plus a publicly supported child claimable elsewhere at AGI $4,000 produce 2 × $110 = $220 in 2022, and 2 × $220 = $440 in 2025, rather than $330/$660; 2022 N-311 lines 2–3, 7–10, 2025 N-311 lines 2–3, 7–9. d1191 confirms the state defaults listed above.
The following audit covers every direct or helper consumer found by searching variables, parameters, reforms and tests. A = actual/expected claim; C = general claimability; X = claimable and not within the claimant filing exception. No parameter consumes the Boolean input;
dependent_elsewherein NY's standard-deduction parameter is an amount.medicaid_is_tax_dependent,medicaid_household_size,medicaid_household_income,medicaid_uses_missing_claimant_fallbackca_medicaid_household_pregnanciessavers_credit_eligible_personbasic_standard_deductioneitc_demographic_eligibleny_standard_deductionny_cdcc(2026 decoupled gate)mi_exemptionspersonal replacementmi_exemptionsown dependent exemptionsmi_home_heating_credit_eligible_rateor_standard_deductionva_low_income_tax_credit_eligiblemo_wftc_eligiblenm_2021_income_rebate,nm_additional_2021_income_rebate,nm_supplemental_2021_income_rebatenm_deduction_for_certain_dependents_eligible,nm_cdcc_eligiblenm_medical_expense_creditme_sales_tax_fairness_credit_eligibleme_affordability_paymenthi_deductionshi_act_115_rebatehi_food_excise_credit,hi_food_excise_exemption_amount,hi_food_excise_credit_minor_child_counthi_tax_credit_for_low_income_household_renters_eligible,hi_tax_credit_for_low_income_household_rentersaz_aged_exemption_eligible_personil_personal_exemption_eligibility_statusmn_renters_credit_eligiblemn_renters_credit_household_agimn_homestead_credit_refund_eligible,mn_homestead_credit_refund_household_incomeoh_personal_exemptions_eligible_person, same variable inrepeal_state_dependent_exemptionsreformut_homeowner_renter_relief_pre_one_claimant_eligiblevt_personal_exemptions, same variable inrepeal_state_dependent_exemptionsandvt_dependent_exemption_reformwatca_alternative_tax_eligiblereformct_hb5114_eligiblereformThe WATCA and CT HB5114 reforms have preexisting authority gaps: the cited WATCA bill cross-references IRC 63(c)(6), and the cited CT bill does not state the modeled dependency gate. This round preserves their documented actual-claim behavior and discloses those gaps. The existing NY CDCC 2026 head-only gate consumes C; its broader filer restriction belongs to the separate stack. No
tax_unit_dependent_elsewherevariable or utility exists at the starting head.The supplied law hints also identify preexisting missing gates; none consumes the old input/helper at this head, so there is no existing dependency read to repoint. Adding them here would change legacy outputs beyond this PR. Their correct facts are documented for the stacked follow-ups:
student_loan_interest_ald_eligibleny_college_tuition_credit_eligible,ny_allowable_college_tuition_expensesny_inflation_refund_creditrrc_cares,rrc_caa,rrc_arpa,rrc_adult_count_with_valid_ssntuition_and_fees_deduction_eligibleThe hub must update issue contracts, rather than file new issues: #1614 MI C/X and restored-own-dependent/no-return fixtures; #1620 HI C/X and independent-filer externally claimable child $220/$440 fixtures; #1621 EITC separate exception plus both refund-only/no-return $2,450 controls; #1616 VA's C contract and separate actual input description; #1400 unchanged deduction-limit exception control. #1613/#1615/#1617/#1618/#1619 need input-binding/head-reference refresh without changing ordinary fixture amounts. Confirmed d1191 interpretations must be reflected. All ten linked issues are open and labelled
pe-parity, soqueuedis accurate.The existing Hawaii renters externally claimable child exclusion remains for the stacked state work: two independent filers plus that child still count three ($150 at $50), while Schedule X line 8(c) counts two ($100). This round fixes the analogous food/excise ordinary-count defect in P1-2. Stacked changes to
exemptions_countmust avoid double subtraction in Hawaii formulas that currently remove externally claimable persons from its raw tax-unit-size count.Current-head merge-main validation at
2ddb85235b173ecfbe0d8f469e2adfa3e82981f8: 34 YAML files, 374 cases, plus 28 Python tests in 3 files passed. Coverage is every test file changed by this PR relative to the merged main parent, includingtest_medical_expense_premium_conservation.py, the NM medical credit YAML and the head/spouse swap properties. Every file ran directly in its own fresh sequential foreground process with OMP/OpenBLAS/MKL/VECLIB/NUMEXPR thread caps of 4 and OMP_WAIT_POLICY=PASSIVE.make format(format and lint) andgit diff --checkpassed. Current main merged without conflicts.The #10055 conservation fixture supplied only
head_is_dependent_elsewherewhile person claims remained false, so #10024's person-derived spouse-independent gate saw an independent 65-year-old and awarded $2,800. The fixture now sets the head's Person claim, allowing claimability and both aggregate helpers to derive consistently, and retains every conservation assertion and oracle amount; fixed examples reproduce the CI case in both properties, and a two-household NM YAML checks credits[2_800, 0].Main #10055 removes federally deducted self-employed premiums from computed Schedule A medical expenses, but deliberately restores the applied exclusion for NM's gross-cost credit. This merge retains that behavior together with #10024's symmetric same-filer age/claimability gate and MFS half credit. All 17 existing NM credit cases retain their numerical outputs; two new mirrored interaction cases bring that file to 19. Their arithmetic is
6,000 + 22,000 - 1,000 = 27,000federally, then27,000 + 1,000 = 28,000for NM; the independent 70-year-old spouse qualifies for2,800 / 1 = 2,800in either role. The supplied-subtotal control remains27,999 + 0 < 28,000, yielding zero.axiom: us/statutes/26/63/c/5 TheAxiomFoundation/rulespec-us#1400 queued | us/statutes/26/32 [IRC 32(c)(1)(A)(ii)(III)] TheAxiomFoundation/rulespec-us#1621 queued | us-ny/statutes/TAX/614 TheAxiomFoundation/rulespec-us#1613 queued | MCL 206.30(2)/(4) TheAxiomFoundation/rulespec-us#1614 queued | us-or/policies/income_tax/resident_core_liability_pipeline [ORS 316.695(8)] TheAxiomFoundation/rulespec-us#1615 queued | us-va/statutes/58.1/58/1-339/8 TheAxiomFoundation/rulespec-us#1616 queued | RSMo 143.177 + MO-1040 filing status TheAxiomFoundation/rulespec-us#1617 queued | NMSA 7-2-7.5 n/a: expired one-off, no module | NMSA 7-2-7.6 n/a: expired one-off, no module | NMSA 7-2-7.7 n/a: expired one-off, no module | NMSA 7-2-39 TheAxiomFoundation/rulespec-us#1618 queued | NMSA 7-2-18.13 TheAxiomFoundation/rulespec-us#1618 queued | NMSA 7-2-18.1 TheAxiomFoundation/rulespec-us#1618 queued | us-me/statutes/36/5213-A TheAxiomFoundation/rulespec-us#1619 queued | us-hi/policies/income_tax/resident_core_liability_pipeline [HRS 235-2.4(a)(3)] TheAxiomFoundation/rulespec-us#1620 queued | Act 115 SLH 2022 n/a: expired 2021-only refund, no module | us-hi/statutes/235-55/85 TheAxiomFoundation/rulespec-us#1620 queued | us-hi/statutes/235-55/7 TheAxiomFoundation/rulespec-us#1620 queued | us-hi/statutes/235-54 TheAxiomFoundation/rulespec-us#1620 queued
No existing rulespec-us module gets the mixed joint case right (assessment against origin/main 207486d8b5:
~/reviews/us-hub/head-dep-elsewhere-swap/axiom/axiom-parity.md). The ten items marked queued are filed, openpe-parityissues: #1400 and #1613–#1621, dispatched by the hub on 2026-10-09 under d1144. Signed encoder runs remain subject to their production-signing gate. This round files no issues; the hub will update affected issue contracts.🤖 Generated with Claude Code
Historical round 4 expanded property cost (local macOS arm64, direct interpreter): 232.17s pytest, 345.18s wall including setup, 5.850 GB peak RSS. Historical head
436805e3e0measured 90.56s pytest, 136.93s wall and 4.984 GB peak RSS. These local runs have different machine load; this is not a Linux CI group measurement. The Rest/core routing and runner budget are unchanged.Merge-main single-file validation: all 37 files at 2ddb852