Repository navigation
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>
… 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>
A filer who can be claimed on another return is treated as having no dependents (IRC 152(b)(1); on a joint return either spouse counts) and has no personal exemption (IRC 151(d)(2)); one who is claimed gets no education credits (25A(g)(3)), student loan interest deduction (221(c)) or recovery rebate (6428(d)(2), 6428A(d)(2), 6428B(c)(2)). The model read none of these. Now the child tax credit and credit for other dependents, the under-13 child and dependent care qualifying person, exemptions_count and its RI, DE, OH, OR, WI, HI and NM readers, the recovery rebates, the education credits and the student loan interest deduction apply them symmetrically for joint returns. Georgia keeps its own counts; the HI, WI and Treasury exemption reforms follow the corrected count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…laimed as a dependent A return on which the filer (or, if joint, either spouse) can be claimed as a dependent has no IRC 152 dependents (IRC 152(b)(1)). Arizona's dependent credit, family credit count and income limit, and 2021 families rebate; Arkansas's dependent credit, generic disabled-dependent credit and low-income table; and California's dependent exemption credit now follow that. A claimable filer also loses California's personal, senior and blind credits (RTC 17054, Form 540 lines 7-9), the childless CalEITC and so the foster youth credit (RTC 17052, FTB 3514), and is not counted for Arizona's excise credit (A.R.S. 43-1072.01; Form 140 line 56). California's standard deduction follows its dependent worksheet (RTC 17073.5(c)(2)). California's renter credit excludes a claimable filer who lived in the claimer's home (RTC 17053.5(d)(2)), read from a new input, and its 2025 joint income limit is $107,988. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…joint Arizona rebate at three dependents Arkansas's and California's care credits and Arizona's 2026 care subtraction read the federal qualifying-person count, which the base branch fixes; YAML cases now pin the claimable-filer and disabled-child cases. The excise credit cites 43-1072.02, its operative section for 2021-2041. The 2021 families rebate counts at most three dependents on any return (Laws 2023, ch. 147, sec. 3(E)); ADOR's $1,500 joint maximum describes two 2021 families who married later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… dependent in the Arkansas cases California's senior and blind credits now subtract the claimable filers' own aged and blind credits from aged_blind_count, so cases that supply that count keep working. The Arkansas disabled-dependent cases used a dependent older than the filers, whom the model made the head; the dependent is now 15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edit and rebate Both formulas combined a tax-unit array with a person array, which only broadcasts when the simulation has one tax unit. The property test's vectorized population caught it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-dependent relationship fallback, farm income - The Arizona, Arkansas and California dependent credit reforms, the California entry of the state dependent exemption repeal and AB 2591 replaced the changed formulas with the old ones; they now apply the same rules (California through shared helpers in ca_exemptions and ca_standard_deduction), with default-parity cases. - Arizona's family and excise credits count the filers directly on a claimable return, so a tax_unit_size input cannot carry dependents in. - Arkansas's disabled-dependent credit decides an unknown relationship from the dependent's own parent ids, not the household's; the comment records that parent ids also name step-parents. - The California dependent worksheet reads the new dependent_standard_deduction_earned_income, which counts farm income (Schedule 1 line 6) like the federal worksheet. - The property test adds renters who lived with the claimer and disabled dependents with and without parent ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Child and dependent care: childcare expenses do not count on a return with a claimable filer unless a child under 13 still qualifies (IRC 21(b)(2)(A)(ii)). - Tuition and fees deduction: not allowed to a filer who can be claimed (IRC 222(c)(3)), so the education credit bar no longer makes such a filer eligible. - Recovery rebates: the Armed Forces exception waives the identification rule only, not the exclusion of a spouse who is another taxpayer's dependent. - Georgia: the contributed refundable credit and SB 520 reforms count the same children as ga_ctc_potential through a new ga_ctc_eligible_child. - Education credits and student loan interest read the claimed input directly, since IRC 25A(g)(3) and 221(c) turn on an actual claim. - One reference per source document; quote IRC 24(h)(4)(A) exactly. - Tests: mixed-recipient care, tuition deduction, military rebates, Georgia refund cap, and the swapped New Mexico rebate case; the property test now covers the state readers of the exemption count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/exemptions/personal/oh_personal_exemptions_eligible.yaml
#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>
#10024's food/excise credit, Act 115 rebate and renters credit took claimable filers off exemptions_count themselves. exemptions_count now leaves them out (and, outside the filing exception, the return's dependents), so those credits read it as it is; the filing-exception cases were one exemption short. The renters credit also leaves out a dependent who can be claimed by another taxpayer (Schedule X counts only people who cannot be), as the food/excise credit already did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Education credits: a dependent student is not eligible on a return whose filer can be claimed outside the filing exception (IRC 25A(f)(1)(A)(iii), 152(b)(1)); the filer's own eligibility still turns on an actual claim. - Recovery rebates: no credit when every filer is a dependent of another taxpayer (IRC 6428B(a)); the CARES and CAA child prerequisite is a spouse with a valid SSN, whether or not that spouse is an eligible individual. - Child and dependent care: cdcc_qualifying_childcare_expenses holds the expense rule, and the single-parent work requirement reform and California's expenses read it. - References: Georgia HB 136 page 3; one entry per recovery rebate statute; quote IRC 24(h)(4)(A) exactly in the test comment. - Tests: dependent students, the two rebate cases, the reform and California expenses, and the Hawaii, Wisconsin and Treasury reforms with a claimable filer under both labellings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Education credits: is_barred_from_education_credits_by_dependency holds the claimed-filer and dependent-student rules; both eligibility formulas and the reconciliation SSN reform's Lifetime Learning Credit read it, so the reform no longer turns a barred student's tuition into that credit. - Child and dependent care: childcare counts when any child under 18 is still a qualifying individual, so an incapacitated child aged 13 to 17 keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setting meets_eitc_identification_requirements on one person made it an input for every person, so the other spouse lost their SSN too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…claimable-filer-az-ar-ca
claimable-filer-federal (35a2cbc) split the input: the plain helpers mean claimability, `claimed_as_dependent_on_another_return` means actually claimed, and `..._without_filing_exception` applies IRC 152(b)(1) with the refund-only exception (Publication 501). So: - Dependent counts (AZ dependent and family credits and 2021 rebate, AR dependent and generic disabled-dependent credits and low-income tables, CA dependent exemption credits, the three dependent credit reforms) and the childless CalEITC read the filing-exception helper. - California's own personal, senior and blind credits and its standard deduction read claimability. - Arizona's excise credit counts only filers who are not actually claimed (A.R.S. 43-1072.01/.02: "not claimed"); California's renter exclusion reads the actual claim (RTC 17053.5(d)(2): "claimed"). - Arkansas's care credit reads cdcc_qualifying_childcare_expenses, so a claimable return without a qualifying child counts no childcare. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he property test's excise identity Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ild input for Arkansas, joint AB 2591 cases - dependent_standard_deduction_earned_income uses irs_employment_income (after elective deferrals, Form 1040 line 1z) plus self-employment and farm income, less the deductible part of self-employment tax. - ar_personal_credit_disabled_child_of_filer (new, overridable) carries the credit's birth-or-adoption child route, defaulting from parent ids (or true without ids); an input marks a stepchild. - Joint AB 2591 cases under both labellings, election off and on; 401(k) and stepchild cases; changelog matches the split inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 4 tasks
This was referenced Oct 19, 2026
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.
Summary
Arizona, Arkansas and California each have rules for a filer who can be claimed as a dependent on another return that the model never applied. A return on which the filer (or, if joint, either spouse) can be claimed has no dependents (IRC 152(b)(1); Publication 501: "you and your spouse can't claim any dependents on your joint return"), and these states also have their own rules for the claimable filer. This PR applies the ones the federal fixes do not already cover, each symmetric between head and spouse, and fixes two related errors found in the same formulas (final two rows).
Stacked on #10087 (
claimable-filer-federal, merged in at 35a2cbc) and #10024. The 2026-10-09 audit (Subfleet research,sweep_s1) was written before those changes; rows they already fix are listed below with the YAML cases that now pin them.Inputs. #10024 split the input. This PR reads, as the federal branch does:
head_or_spouse_is_dependent_elsewhere_without_filing_exceptionfor every "no dependents" rule (IRC 152(b)(1), and the childless CalEITC), so the would-be claimant's refund-only filing exception (Publication 501) restores the dependents;claimable_as_dependent_on_another_returnand its helpers) for a claimable filer's own credits and California's standard deduction;claimed_as_dependent_on_another_return) where the statute says "claimed": Arizona's excise credit and California's renter exclusion.az_dependent_tax_credit_potentialaz_family_tax_credit_potential,az_family_tax_credit_eligibleaz_increased_excise_tax_credit,..._eligibleaz_families_tax_rebate(2021 return)ar_personal_credit_dependentar_personal_credit_disabled_dependent(+ newar_personal_credit_disabled_child_of_filer)ar_low_income_tax_jointca_standard_deductionca_exemptionsca_eitc_eligible(and through itca_eitc,ca_foster_youth_tax_credit,ca_sf_wftc)ca_renter_credit(+ new inputlives_with_claiming_taxpayer)ar_federal_cdcccdcc_qualifying_childcare_expenses(new on the federal branch), so a claimable return with no qualifying child counts no childcare even when a disabled adult is a qualifying persondependent_standard_deduction_earned_income(new)earned_incomeleaves outaz_dependent_credit_reform,ar_dependent_credit_reform,ca_dependent_credit_reform,repeal_state_dependent_exemptions(California entry),ca_ab2591az_families_tax_rebatecap (related fix)ca_renter_creditincome limit (related fix)Audit rows already fixed by #10024 or the federal branch (not changed here)
az_dependent_care_expense_subtractionreadscdcc_relevant_expensesandcdcc). Pinned inaz_dependent_care_expense_subtraction.yaml(ordinary child barred, disabled child kept).ar_federal_cdccreadscount_cdcc_eligible). Pinned inar_cdcc_potential.yaml; its childcare expenses are changed here (table above).ca_cdccfromcdcc/ca_federal_capped_cdcc, oncount_cdcc_eligibleand, on the federal branch,cdcc_qualifying_childcare_expenses). Pinned inca_cdcc.yaml.az_agi,ca_agireadadjusted_gross_income).Verified by reading each formula on this branch. Rows the audit marked "verify only" or "no change" were checked: Arizona's standard deduction (43-1041) has no dependent limitation and
az_standard_deductiondoes not read the federal one; the Arizona aged exemption already excludes a person who is claimed (it reads the claim input, as Form 140 Box 8 does); Arkansas's own personal, aged, blind and deaf credits and California's young child tax credit (which needs a qualifying child, so the childless gate does not reach it) are unchanged.Readings for Max (queue via the US + core hub)
All nine items remain undecided for Max. This response changes no formula or default. Statutory readings and missing-data choices are distinguished below; the alternatives are not implemented.
lives_with_claiming_taxpayeris false when residence is unknown. For a 2025 single renter actually claimed elsewhere, with $2,000 AGI and $6,000 rent and all other conditions met, that gives $60; alternative true fallback gives $0. RTC 17053.5(d)(2), SB 1005 PDF p.88 requires both an actual claim and residence with the claimant for more than half the year. Claimability alone does not trigger this statutory exclusion. The choice is how to fill missing residence data, not which input the statute names.is_tax_unit_dependent: the disabled filer gets $0, the eligible disabled child $500.Not readings: California's AB 2591 reform applies the 63(c)(5) limit to whichever deduction is taken; review r2b reports that AB 2591 sec. 2 keeps 17073.5(c)(2) (bill text not fetched here: leginfo refuses automated requests). Settled by the input split: Arizona's excise credit and California's renter credit now read the actual claim, as their statutes say "claimed".
Not modeled (listed, not implemented)
From the audit (
sweep_s1), unmodeled provisions that turn on a filer being claimable or claimed:Other findings (not fixed here)
basic_standard_deduction(from Make rules for a filer claimed elsewhere independent of which spouse is labelled head #10024) computes the dependent worksheet's earned income fromtax_unit_earned_income, which leaves out farm income; it could read the newdependent_standard_deduction_earned_income. Not changed here (federal branch).az_families_tax_rebateis computed in every year (defined for Arizona), though only 2021's value is inaz_refundable_credits; outside 2021 it should be zero.Invariants
head_or_spouse_is_dependent_elsewhere_without_filing_exception): no Arizona dependent credit or 2021 rebate and no Arkansas dependent credit. When every filer is claimed (the claim input): no Arizona excise credit. A claimable but unclaimed filer still counts for the excise credit, and the filing exception restores dependents (both pinned in YAML).Tests
b39eb1b909079700f739774ff6ae3c8d7834e3e3: all 24 changed YAML files passed, 329 cases. Each file ran directly in its own foreground process with the required four-thread caps.policyengine_us/tests/core/test_claimable_filer_az_ar_ca_invariants.py(Hypothesis plus a seeded population and crafted renter and disabled-dependent cases in the three states, 2021, 2023, 2025, 2026; reusescheck_swapandcheck_monotone). The cases vary the claim input, so claimability follows it and the filing exception is off; the filing exception and claimable-but-unclaimed rules are pinned in YAML instead. Outputs: the credits and deductions listed under invariant 2,ar_income_tax_before_non_refundable_credits_unitandstate_income_tax. Round-3 rerun atb39eb1b909079700f739774ff6ae3c8d7834e3e3: 5 passed, in one foreground process with the required four-thread caps. CI group:test-other-python-rest-core. It caught a vectorization bug the single-household YAML cases could not (a tax-unit array combined with a person array in two Arizona formulas), fixed before the microsimulations.Microsimulation impact
Real microsimulations on the default dataset,
claimable-filer-federal(23c6229) vs this branch (97ca53c; to be refreshed against 35a2cbc at the new head), record by record (run.py/compare.pyunder the shared lock): 2025 and 2026, four full runs. The dataset setsclaimed_as_dependent_on_another_returnfor nobody (weighted sum 0 in both years).az_income_taxar_income_taxca_income_taxstate_income_taxaz_dependent_tax_credit,az_family_tax_credit,az_increased_excise_tax_credit,ar_personal_credits,ar_low_income_tax_joint,ca_standard_deduction,ca_exemptions,ca_eitc,ca_foster_youth_tax_credit,ca_renter_creditaz_families_tax_rebateThe rebate change is the joint cap fix. The variable is computed in every year, but only 2021's counts in Arizona's refundable credits, so it moves no tax in 2025 or 2026. 2021: the default dataset returns zero for every tax variable in 2021 (
state_income_taxsums to $0 in the base run), so the cap fix's 2021 effect cannot be measured on it and is not estimated here.axiom: TheAxiomFoundation/rulespec-us#1804 queued (AZ: dependent/family credits, undisputed excise, historical rebate, care reader) | TheAxiomFoundation/rulespec-us#1805 queued (AR: lawful credit units, known disabled-child routes, low-income/care readers) | TheAxiomFoundation/rulespec-us#1806 queued (CA: undisputed exemptions, dependent worksheet, CalEITC/FYTC/renter and care composition)
Merge with main after #10087
Merged main after #10087, preserving this PR's original main-relative changes. The three conflicts were
nm_medical_expense_credit.py, its YAML test, andca_cdcc_relevant_expenses.yaml; each takes main unchanged. Main's Arkansas AGI floor and tax-table rounding are preserved, and the two inherited federal changelog fragments are removed from this PR's diff. Merged subsequent main commits through5ec60b209awithout conflicts.Corrected two filer expectations in
ar_personal_credit_disabled_child_of_filer.yamlfromfalsetotrue. Source and dependency comparisons show this was a pre-existing expectation mismatch atff5a45308b, not a behavior change caused by main or either merge: the helper returns true for a person with no parent IDs, including the filer. The disabled-dependent credit separately requiresis_tax_unit_dependent: a direct runtime probe confirms helpertrueand credit$0for the filer in all three original cases. With both members of the first case disabled, the filer still gets$0and the eligible child gets$500.Finish-build validation at
f8ef2f24fe8b3754cf1a5594acc999484cf24535: the requested reruns all passed with exit code 0: repeal (10), AR reform (15), AZ reform (8), CA AB2591 (14), CA reform (9), and the helper (3). The other 19 files retain 273 verified prior passes: 25 files and 332 tests combined. Formatting and lint passed. That finish build’s main-relative diff matched the original PR patch except for the two helper expectations and their comment; the round-3 additions are described below.Response to round 3
[true, true]and[true, false]agree. An extended YAML case asserts helper[true, true]and actual credit[0, 500]for a disabled claimable filer and eligible disabled child; the credit separately excludes filers. No formula or default changed.All nine Readings for Max remain undecided in code, with both readings, citations and worked amounts. Main was merged through
091a744ff2fb1b5765af0c7a131c5ad4afba7f2dwithout conflicts. Validation atb39eb1b909079700f739774ff6ae3c8d7834e3e3: all 334 tests passed (329 YAML cases across 24 files, plus 5 Python invariants). Every file ran in a separate foreground process, one at a time, with the required four-thread caps; no suites or microsimulations ran.uvx ruff@0.15.5 format .left all 7,009 Python files unchanged anduvx ruff@0.15.5 check .passed.dependent_standard_deduction_earned_income.yamlar_cdcc_potential.yamlar_personal_credit_dependent.yamlar_personal_credit_disabled_child_of_filer.yamlar_personal_credit_disabled_dependent.yamlar_personal_credits_potential.yamlar_low_income_tax_joint.yamlaz_families_tax_rebate.yamlaz_family_tax_credit_eligible.yamlaz_family_tax_credit_potential.yamlaz_increased_excise_tax_credit.yamlaz_dependent_tax_credit_potential.yamlaz_dependent_care_expense_subtraction.yamlca_cdcc.yamlca_eitc_eligible.yamlca_foster_youth_tax_credit.yamlca_renter_credit.yamlca_standard_deduction.yamlca_exemptions.yamlrepeal_state_dependent_exemptions.yamlar/dependent_credit_reform_test.yamlaz/dependent_credit_reform_test.yamlca/ab2591/ca_ab2591.yamlca/dependent_credit_reform_test.yamltest_claimable_filer_az_ar_ca_invariants.py🤖 Generated with Claude Code