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>
… dependent A return on which the filer (or, if joint, either spouse) can be claimed as a dependent has no dependents (IRC 152(b)(1)), and these states count only federal dependents. Now, on such a return: - New Jersey gives no dependent or college-dependent exemption and no child tax credit, and its childless EITC age fallback applies the federal dependency test (P.L.2021 c.130) and the filer-only age test; - North Dakota gives no stillborn child subtraction (Schedule ND-1SA line 8); - Ohio's nonpublic school tuition credit counts tuition for the taxpayer's dependents only (R.C. 5747.75, 5747.01(O)); - Oklahoma gives a claimable filer no regular exemption (Form 511 item F), counts no dependents, counts only allowable exemptions for the sales tax credit (68 O.S. 5011(D)), and its frozen-2020 childless EITC applies the dependency and filer-only age tests; - Pennsylvania gives no dependent child allowance, and Tax Forgiveness covers only the tax of a filer who is not claimable or whose claiming parent qualifies (Tax Reform Code 301(c.2), Schedule SP), so one claimable spouse leaves the other's separate claim. The NJ and OK dependent-exemption reforms, the repeal-state-dependent- exemptions reform's Oklahoma count and TAXSIM's PA rate follow suit. 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>
…only Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…claimable-filer-nj-pa
… where each state's rule does
After the input split on the federal branch:
- the 152(b)(1) "no dependents" gates (NJ dependent, college and child tax
credit counts, ND stillborn subtraction, OH tuition credit, OK dependent
exemptions and sales tax credit dependents, PA dependent child allowance,
the NJ/OK reform copies and TAXSIM's PA rate) and the childless EITC tests
(NJ fallback, OK frozen 2020) read
head_or_spouse_is_dependent_elsewhere_without_filing_exception, so a
would-be claimant who files only for a refund leaves them in place;
- Oklahoma's own regular exemption (Form 511: "if you can be claimed")
reads claimable_as_dependent_on_another_return, here and in the
repeal-state-dependent-exemptions copy;
- the NJ line 58 condition ("not listed as a dependent on another tax
return") and Pennsylvania's Tax Forgiveness filer test and separate-claim
split ("a dependent on another person's federal tax return") read the
actual claim, claimed_as_dependent_on_another_return.
The property test draws claimability, the claim and the exception per adult.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt who files only for a refund Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Status (owner session resumed 2026-10-11 ~16:00Z; not for adoption):
|
This was referenced Oct 11, 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
A return on which the filer (or, if joint, either spouse) can be claimed as a dependent on another return has no dependents (IRC 152(b)(1); Publication 501: "you and your spouse can't claim any dependents on your joint return"), unless the would-be claimant is not required to file and files only for a refund (Publication 501's exception). New Jersey, North Dakota, Ohio, Oklahoma and Pennsylvania count only federal dependents, and several of their provisions also bar the claimable or claimed filer directly. The model applied none of these state rules. This PR applies them, reading the federal branch's three inputs as each rule's wording requires and never reading only the head:
claimable_as_dependent_on_another_return;head_or_spouse_is_dependent_elsewhere_without_filing_exception;claimed_as_dependent_on_another_return.Stacked on #10087 (
claimable-filer-federal, head 35a2cbc: federal CTC/ODC, child care qualifying child,exemptions_count, education credits, student loan interest and the input split) and #10024. Retarget tomainonce both have merged.repeal_state_dependent_exemptions.pyis also changed by #10045 and #10053; the hub's landing order is #10045, then this PR, then #10053.nj_dependents_exemptionnj_dependents_attending_college_exemptionnj_ctcnj_childless_eitc_age_eligiblend_stillborn_subtractionoh_non_public_school_credits_potentialok_count_exemptions(andok_exemptions)ok_stcexemptions_count(filers who cannot be claimed, plus dependents unless a filer can be claimed outside the exception); the $50,000 limit needs a dependent the return can claimok_federal_eitc_demographic_eligiblepa_tax_forgiveness_ratepa_tax_forgiveness_amount, newpa_tax_forgiveness_eligible,pa_tax_forgiveness_eligible_share, inputpa_tax_forgiveness_parent_qualifiesThe contributed reforms that copy these formulas follow suit:
nj_dependent_exemption_reform,ok_dependent_exemption_reform, the Oklahoma count inrepeal_state_dependent_exemptions(own exemption reads claimability), and TAXSIM's PA forgiveness rate.Audit rows already fixed upstream (checked against the code on #10087)
These state formulas read a federal output that the base branches correct, so this PR changes no code for them; it adds YAML cases that pin the inherited result (S / J1 / J2 / J0, 2025, hand-computed).
ctc_qualifying_childrenctc_qualifying_childnc_child_deduction$0 / $0 / $0 / $3,000eitc_eligible,eitcnj_eitc$0 / $0 / $0 / $91.80eitceitcpa_eitc$0 / $0 / $0 / $22.95cdcc,cdcc_potentialis_cdcc_eligibleordinary-child branch andcdcc_qualifying_childcare_expensespa_cdcc$0 / $0 / $0 / $320ok_federal_ctc(federal CTC)ok_child_care_child_tax_credit$0 / $0 / $0 / $56.25oh_personal_exemptions_eligible_person,exemptions_countReadings for Max (for the US + core hub to batch)
pa_tax_forgiveness_parent_qualifies(default false), the answer to that form line. Alternative: no input, always deny. (The Axiom report notes 301(c.2) on its face excludes any dependent from being a claimant; the route rests on Schedule SP and the PIT guide.)The earlier reading on actual claim vs claimability is no longer a reading: with the federal branch's split inputs, the actual-claim wording (NJ line 58, PA Schedule SP) reads
claimed_as_dependent_on_another_return, and the "can be claimed" and dependent rules read claimability.Not implemented (audit P2/P3 and unmodeled programs)
pell_grant; the error is not claimability-specific (needs a qualifying-grant input).health_savings_account_aldis an input with no eligibility formula, so there is nothing to gate (audit P2, model scope).is_qualifying_child_dependentis the existing proxy.Changes not gated on the claimability inputs
Three fixes sit in lines this PR touches and apply even when nobody can be claimed: Ohio's tuition credit no longer counts tuition recorded on a filer (the existing cases now record it on a dependent child), and the NJ and Oklahoma childless-EITC age tests look only at filers, as the federal formula does, so a dependent's age no longer qualifies a filer. MICROSIM_UNGATED_PLACEHOLDER
Invariants
pa_tax_forgiveness_eligible_shareis in [0, 1] and equals 1 when no filer is claimed; forgiveness never exceeds tax before forgiveness.Tests
policyengine_us/tests/core/test_claimable_filer_nj_pa_invariants.pyreusescheck_swapandcheck_monotoneon Hypothesis batches (tuition on dependents, the PA parent input, and claimability, claim and exception drawn per adult) and a seeded population in the six states, 2022, 2025 and 2026. PROPERTY_RESULTS_PLACEHOLDERMicrosimulation impact
MICROSIM_PLACEHOLDER
Axiom parity
AXIOM_PLACEHOLDER
🤖 Generated with Claude Code
Merge with main after #10087
Merged main at
6989afda4698d6c643f5dd0ef7ad19aff9f769b8. Conflicts innm_medical_expense_credit.py,nm_medical_expense_credit.yaml, andca_cdcc_relevant_expenses.yamltake main's reviewed versions because this PR left all three unchanged from its federal base. Removed the obsolete federal changelog fragmentsclaimable-filer-federal.fixed.mdandhead-dependent-elsewhere-swap.fixed.md. Before the syntax-only repair below, the exact replay check passed: the merge diff against main matched all 39 paths in this PR's original patch, with no unrelated changes.A separate syntax-only commit quotes 148 YAML case names across 14 files whose unquoted colons prevented parsing. Verification confirms that the intended names and every test input/output value are preserved, with no other line changes; all 19 YAML files parse into 299 cases. The final diff matches the original patch in substance, with this name-quoting syntax repair as the only exception.
Validation: all 20 changed test files passed (299 YAML cases and 4 Python tests).
make formatand Ruff 0.15.5format --check/checkpassed.