Skip to content

Apply New Jersey, North Dakota, Ohio, Oklahoma and Pennsylvania rules for a filer who can be claimed as a dependent - #10043

Open
MaxGhenis wants to merge 32 commits into
mainfrom
claimable-filer-nj-pa
Open

MaxGhenis wants to merge 32 commits into
mainfrom
claimable-filer-nj-pa

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

We apply the dependent-filer rules in New Jersey, Ohio, Oklahoma and Pennsylvania, and retain North Dakota's stillborn subtraction when a filer can be claimed elsewhere. We check both spouses on joint returns.

The formulas distinguish claimability, an actual claim, and the would-be claimant's refund-only filing exception:

  • Oklahoma regular exemptions and Pennsylvania forgiveness eligibility read claimable_as_dependent_on_another_return.
  • State dependent counts and childless EITC eligibility read head_or_spouse_is_dependent_elsewhere_without_filing_exception.
  • New Jersey's additional childless EITC condition reads claimed_as_dependent_on_another_return for either filer.
State Behavior
New Jersey Exclude dependents from the dependent exemption, college-dependent exemption and child tax credit when either filer fails the federal dependent-taxpayer test. Apply the dependency conditions to the childless EITC age fallback.
North Dakota Allow the stillborn subtraction without a dependency condition.
Ohio Count nonpublic-school tuition and medical expenses for dependents the filers can claim. Retain the head's and spouse's medical expenses when either filer can be claimed elsewhere.
Oklahoma Remove each claimable filer's regular exemption and exclude dependents the filers cannot claim. Retain the separate special and blind exemptions. Use allowable exemptions for the sales tax credit and apply the frozen federal dependency conditions to childless EITC eligibility.
Pennsylvania Exclude dependents the filers cannot claim from the forgiveness allowance. Allow forgiveness only on an eligible head or spouse's tax, using claimability to determine eligibility. Remove pa_tax_forgiveness_parent_qualifies.

The New Jersey and Oklahoma dependent-exemption reforms, Oklahoma's count in repeal_state_dependent_exemptions, and TAXSIM's Pennsylvania forgiveness rate follow the corresponding formulas.

Source readings and results

North Dakota stillborn subtraction

North Dakota allows the subtraction for each stillbirth with a filed fetal death certificate under N.D.C.C. 57-38-30.3(2)(p), without a dependency condition. Its tax department adds that condition in Schedule ND-1SA. Statute, PDF page 35; 2025 schedule, line 8.

For one stillbirth in 2025, a single filer receives $5,241 whether claimable or independent. Joint filers receive $5,241 whether neither, one or both spouses can be claimed: 1 × $5,241 = $5,241. North Dakota’s tax department would give a claimable filer $0 under the schedule’s added dependency condition.

We record the statute–instructions conflict in source_conflicts/candidates.yaml and update the source-conflict ratchet.

Pennsylvania claimant eligibility

Pennsylvania excludes a head or spouse who can be claimed elsewhere under Tax Reform Code 301(c.2) and 304. We remove the parent-qualification input and actual-claim test; Pennsylvania provides no parental exception in those sections. Tax Reform Code, PDF pages 112 and 127–128.

The tax department asks about an actual claim and permits a parental route in Schedule SP. We record that conflict in source_conflicts/candidates.yaml and update the source-conflict ratchet. 2025 Schedule SP.

With $6,000 each of eligibility income and adjusted taxable income, tax before forgiveness equals $6,000 × 3.07% = $184.20:

Single filer Forgiveness
Claimed and claimable $0
Claimable and not claimed $0
Neither claimed nor claimable $184.20

Under Schedule SP’s actual-claim test, the tax department would forgive $184.20 for the unclaimed but claimable filer. It would also forgive $184.20 for the claimed filer under the parent exception if the parent qualifies. We apply the statutory exclusion.

Pennsylvania with one claimable spouse

We exclude the claimable spouse and retain forgiveness on the other spouse's own tax. We use joint eligibility income and the married table, following Schedule SP where lawmakers leave the allocation unspecified. Schedule SP, Sections I and IV; PIT guide, married claimants.

The tax department requires separate Pennsylvania returns when another taxpayer claims one spouse on a federal return. The model retains one federal joint tax unit and approximates the eligible spouse's separate liability.

With $3,000 per spouse, the eligible spouse receives $3,000 × 3.07% = $92.10 of forgiveness. Pennsylvania would forgive $0 if it denied the joint claim, or $184.20 if it forgave the whole return.

With $7,500 per spouse, each eligible spouse applies a 20% forgiveness rate under the married table. We allocate $15,000 × 3.07% × 20% × 50% = $46.05 to the eligible spouse. Pennsylvania would forgive $0 if it denied the joint claim, or $92.10 if it forgave the whole return.

The model approximates each spouse's tax using their share of person-level Pennsylvania taxable income. It assigns us_govt_interest to neither spouse and omits the tax-unit 529 deduction from that allocation.

Oklahoma special and blind exemptions

We retain the additional exemptions. Oklahoma allows them separately from regular personal exemptions under §2358(E)(1)(b)–(c), without a dependency condition. Its tax department follows the same distinction in Form 511. 2024 SB1452, §2358(E), PDF pages 19–20; 2025 Form 511 instructions, pages 8–9.

A claimable, nonblind single filer aged 66 within the income limit keeps one special exemption: 0 regular + 1 special = 1, a $1,000 deduction.

Ohio medical dependents

Ohio filers use the IRC definition of dependents under R.C. 5747.01(O). A filer whom another taxpayer can claim has no dependents under IRC 152(b)(1).

Ohio lawmakers import IRC 213's meaning of medical care in (A)(10)(c). They widen dependency solely for (A)(10)(a), waiving the gross-income and support conditions in IRC 152(d)(1)(B) and (C). They retain IRC 152(b)(1). R.C. 5747.01(A)(10).

The Ohio Department of Taxation directs filers to include expenses paid for themselves, their spouse and their dependents. It supplies no broader dependency test. 2025 IT 1040 instructions, page 41.

We apply the PR's existing dependent-taxpayer test and claimant filing exception. When either filer fails that test, we count only the head's and spouse's premiums and medical care under (A)(10)(a) and (b). We exclude dependents before applying the medical-expense floor and allocating the deduction among people.

For example, a claimable filer who pays $1,000 of a child's unsubsidized, after-tax health-insurance premiums deducts $0 for them. The same household with an independent filer deducts $1,000. We assume no Medicare eligibility, employer subsidy, reimbursement or duplicate deduction.

Changes that do not depend on claimability

  • Ohio filers can claim the tuition credit for tuition recorded on dependents only. We exclude tuition recorded on a filer. R.C. 5747.75.
  • We test the ages of New Jersey filers when computing the childless EITC. A dependent's age cannot qualify a filer. P.L. 2021, c.130.
  • We test the ages of Oklahoma filers when computing the frozen childless EITC. A dependent's age cannot qualify a filer. 2020 Publication 596, PDF page 16.

Invariants and coverage

test_claimable_filer_nj_pa_invariants.py checks generated and seeded couples across New Jersey, North Carolina, North Dakota, Ohio, Oklahoma and Pennsylvania:

  • Swapping head and spouse labels preserves the listed outputs.
  • Marking another filer claimed never raises the listed exemptions, credits, deductions or forgiveness amounts.
  • Pennsylvania's eligible share stays in [0, 1] and equals one when neither filer can be claimed.
  • Forgiveness stays between zero and tax before forgiveness.

We check Oklahoma's child care/child tax credit for swap invariance only; its federal tax-liability limit can rise when claimability changes. The generated populations contain no stillborn children; North Dakota's YAML cases cover the stillborn subtraction.

YAML cases cover single and joint claimability patterns, swapped spouse labels, claimable-but-unclaimed filers, the filing exception, Pennsylvania's statutory eligibility, Oklahoma's additional exemptions, and the filer-only age tests. Regression cases cover North Dakota’s dependency bar, Pennsylvania’s actual-claim test and parent route, and Ohio’s dependent medical expenses.

Tests

The latest Pull request run at aa18655572 concluded success, with all 36 jobs passing. It passed all 450 cases in the 23 test files this PR changes:

Test file CI job Passed
policyengine_us/tests/code_health/test_source_conflicts.py Python tests / Full Suite - Rest (Python shard 4) 103 passed
policyengine_us/tests/core/test_claimable_filer_nj_pa_invariants.py Python tests / Full Suite - Rest (Python shard 3) 5 passed
policyengine_us/tests/policy/baseline/gov/states/nc/tax/income/deductions/nc_child_deduction.yaml Baseline tests / Full Suite - Baseline (states-shard-1) 15 passed
policyengine_us/tests/policy/baseline/gov/states/nd/tax/income/subtractions/nd_stillborn_subtraction.yaml Baseline tests / Full Suite - Baseline (states-shard-2) 16 passed
policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/ctc/nj_ctc.yaml Baseline tests / Full Suite - Baseline (states-shard-1) 31 passed
policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/eitc/nj_childless_eitc_age_eligible.yaml Baseline tests / Full Suite - Baseline (states-shard-1) 9 passed
policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/eitc/nj_eitc.yaml Baseline tests / Full Suite - Baseline (states-shard-1) 36 passed
policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/exemptions/nj_dependents_attending_college_exemption.yaml Baseline tests / Full Suite - Baseline (states-shard-1) 10 passed
policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/exemptions/nj_dependents_exemption.yaml Baseline tests / Full Suite - Baseline (states-shard-1) 14 passed
policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/oh_non_public_school_credits.yaml Baseline tests / Full Suite - Baseline (states-shard-1) 17 passed
policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/deductions/medical_expense/oh_claimable_filer_medical_expenses.yaml Baseline tests / Full Suite - Baseline (states-shard-1) 8 passed
policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/credits/eitc/federal_credit/ok_federal_eitc_demographic_eligible.yaml Baseline tests / Full Suite - Baseline (states-shard-2) 6 passed
policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/credits/eitc/ok_eitc.yaml Baseline tests / Full Suite - Baseline (states-shard-2) 19 passed
policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/ok_child_care_child_tax_credit.yaml Baseline tests / Full Suite - Baseline (states-shard-2) 15 passed
policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/ok_count_exemptions.yaml Baseline tests / Full Suite - Baseline (states-shard-2) 26 passed
policyengine_us/tests/policy/baseline/gov/states/ok/tax/income/ok_stc.yaml Baseline tests / Full Suite - Baseline (states-shard-2) 29 passed
policyengine_us/tests/policy/baseline/gov/states/pa/tax/income/credits/pa_cdcc.yaml Baseline tests / Full Suite - Baseline (states-shard-4) 12 passed
policyengine_us/tests/policy/baseline/gov/states/pa/tax/income/credits/pa_eitc.yaml Baseline tests / Full Suite - Baseline (states-shard-4) 9 passed
policyengine_us/tests/policy/baseline/gov/states/pa/tax/income/forgiveness/pa_tax_forgiveness_amount.yaml Baseline tests / Full Suite - Baseline (states-shard-4) 20 passed
policyengine_us/tests/policy/contrib/state_dependent_exemptions/repeal_state_dependent_exemptions.yaml Contrib tests / Full Suite - Contrib (other-shard-1) 27 passed
policyengine_us/tests/policy/contrib/states/nj/dependent_exemption_reform_test.yaml Contrib tests / Full Suite - Contrib (states-shard-2) 8 passed
policyengine_us/tests/policy/contrib/states/ok/dependent_exemption_reform_test.yaml Contrib tests / Full Suite - Contrib (states-shard-3) 11 passed
policyengine_us/tests/test_eitc_marital_eligibility_properties.py Python tests / Full Suite - Rest (Python shard 4) 4 passed

The new Ohio premium regression failed at 27ead422bb8269723dba05537437c73a5ed8a3a8: it deducted $1,000 against the expected $0. That run reported one failed case.

We verified the three earlier mutant logs and ran the new Ohio mutant at 5f363a010d. Each mutant failed its selected regression:

Restored behavior Regression Mutant result
North Dakota dependency bar 2025 single filer who can be claimed as a dependent: North Dakota stillborn child subtraction in nd_stillborn_subtraction.yaml $0 against $5,241; one failed
Pennsylvania actual-claim eligibility 2025 single filer claimable and not claimed with $6,000 Pennsylvania income in pa_tax_forgiveness_amount.yaml $184.20 against $0; one failed
Pennsylvania parent input and qualification route test_pa_tax_forgiveness_has_no_parent_qualification_input The restored input violated the absence assertion; one failed
Ohio dependent medical premiums Claimable filer cannot deduct a child's $1,000 premiums in oh_claimable_filer_medical_expenses.yaml $1,000 against $0; one failed

The three earlier runs used 547ab47c024f44f16f6ab0a6e635861f82157edd, 2 GB caps and 2,400-second timeouts. We verified their logs, drivers and unchanged formulas without repeating those runs. The parent-route check rejects the restored input; it does not compute a forgiveness award.

The Ohio mutant changed one eligibility line in a scratch worktree at 5f363a010d. We unset GitHub tokens, set loopback proxies, and used a 6 GB cap and a 2,400-second timeout. A Python audit hook denied sockets, subprocesses and writes outside the worktree. Every restore returned zero from git diff --exit-code.

Formatting and lint passed through make format with the locked Ruff version.

Microsimulation impact

We estimate that this branch changes none of the outputs we measured in 2026 on the default dataset. We compared main at the merge base cc8f4c9d90 with this branch at 5f363a010d. The later merge of main didn't change this branch's own diff.

Every claimability rule here reads claimed_as_dependent_on_another_return, directly or through claimable_as_dependent_on_another_return, which defaults to it. That input has no formula, and the default dataset doesn't carry it, so no record counts as claimable. The dataset also carries no stillbirths and no nonpublic-school tuition, so North Dakota's subtraction and Ohio's tuition credit stay at $0 on both sides. The New Jersey and Oklahoma filer-only age tests changed no record.

Output Main total Change Records changed (weighted)
nd_stillborn_subtraction $0 $0 0 (0)
nd_income_tax $319.3m $0 0 (0)
nj_dependents_exemption $4.05bn $0 0 (0)
nj_ctc $385.6m $0 0 (0)
nj_eitc $643.4m $0 0 (0)
nj_income_tax $29.5bn $0 0 (0)
oh_non_public_school_credits $0 $0 0 (0)
oh_income_tax $10.3bn $0 0 (0)
ok_stc $45.9m $0 0 (0)
ok_eitc $34.1m $0 0 (0)
ok_income_tax $5.22bn $0 0 (0)
pa_tax_forgiveness_amount $218.7m $0 0 (0)
pa_income_tax $18.1bn $0 0 (0)
state_income_tax $578.0bn $0 0 (0)
income_tax $2,595.1bn $0 0 (0)
household_benefits $2,060.0bn $0 0 (0)
household_net_income $17,161.7bn $0 0 (0)

impact: no change in 2026 on the default dataset to these states' exemptions, credits, forgiveness or income taxes, or to federal income tax, benefits or household net income.

Axiom parity

AXIOM_PLACEHOLDER

🤖 Generated with Claude Code

MaxGhenis and others added 18 commits October 8, 2026 11:03
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>
MaxGhenis and others added 5 commits October 11, 2026 12:01
…only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 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>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Status (owner session resumed 2026-10-11 ~16:00Z; not for adoption):

MaxGhenis and others added 3 commits November 5, 2026 14:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 6, 2026 01:27
MaxGhenis and others added 3 commits November 5, 2026 21:14
The NJ childless EITC formula now reads is_tax_unit_dependent,
claimed_as_dependent_on_another_return and
head_or_spouse_is_dependent_elsewhere_without_filing_exception. Main's
property test stubs the formula's inputs and lacked these three, so it
raised KeyError on the merge with main. The stub's one-person units file
their own returns, so the stub sets each input to False.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exclude dependents' premiums and care when either filer fails the
dependent taxpayer test. Keep both filers' expenses and add regression
cases for the medical floor and allocation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main and this branch each added cases to the end of the state dependent
exemption repeal test: main for California's personal credits, this
branch for Oklahoma's regular exemptions. The merge keeps both sets.
Main's change to the repeal reform edits California's exemptions and
this branch's edits Oklahoma's, so the two reform edits merge cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's separated-filer change (#10666) and this branch both edited
pa_tax_forgiveness_rate. The merge keeps both: this branch's rule that a
claimable filer's return counts no dependent children, and main's 72 P.S.
7304(d)(1) base, which gives a separated separate filer the single base and
adds a spouse's eligibility income when the spouse files in another tax
unit. The reference list takes both sides' sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99

DTrim99 commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

PR Review: Apply New Jersey, North Dakota, Ohio, Oklahoma and Pennsylvania rules for a filer who can be claimed as a dependent

Summary

I read each state's statute and the claimed years' instructions first, then the code. The PR uses only existing dependency variables:

  • head_or_spouse_is_dependent_elsewhere_without_filing_exception covers two things. It applies IRC 152(b)(1)'s "no dependents" rule to the NJ dependent and college exemptions, the NJ CTC, Ohio tuition and medical expenses, the Oklahoma exemptions and sales tax credit, and the PA dependent allowance. It also applies the childless-EITC bar in NJ and OK.
  • claimable_as_dependent_on_another_return is used where the rule turns on § 151 allowability: Oklahoma's own regular exemption and the PA claimant test.
  • claimed_as_dependent_on_another_return is used only for NJ's worksheet "listed" test (S1).
  • The federal exemptions_count supplies Oklahoma's "allowable personal exemptions".

The two new PA variables (pa_tax_forgiveness_eligible and pa_tax_forgiveness_eligible_share) hold PA-specific facts, so nothing is reinvented. North Dakota's formula is unchanged from main, which never had a dependency bar. The PR adds references, rewords the documentation and records the statute-against-schedule conflict.

These changes match the governing text for the claimed years:

  • the NJ dependent, college and CTC counts and the filer-only childless age test;
  • Ohio's medical and tuition dependents;
  • Oklahoma's per-filer regular exemption, the retained special and blind exemptions, the $40-per-allowable-exemption sales tax credit, and the frozen 2020 childless-EITC bar;
  • Pennsylvania's claimant exclusion and its dependent allowance.

CI is 35/35 green at head 611ebd6c75, and the head merges cleanly with current main.

Nothing critical is open. Four should items are open:

  1. NJ: a new term follows the NJ-1040 worksheet's "not listed as a dependent" condition where the statute requires only the federal qualifications. The PR doesn't record this, and its own case turns main's $259.60 into $0.
  2. All three candidates.yaml items the PR writes cover 2025 only, but the code runs from 2021.
  3. The new gate in the TAXSIM reform's PA forgiveness rate is unpinned.
  4. The PR body's axiom: section is still AXIOM_PLACEHOLDER, and rulespec-us has no issue for any of these provisions.

Critical (must fix)

None.

Should address

S1. NJ childless EITC: the "not listed as a dependent" term follows the worksheet, not the statute, and isn't recorded (nj_childless_eitc_age_eligible.py: listed_elsewhere = tax_unit.any(filer & person("claimed_as_dependent_on_another_return", period)). The nj_eitc.yaml case "2025 single filer listed as a dependent by someone who files only for a refund" pins it, expecting false and $0.)

  • The statute. P.L. 2021, c.130, §1a(4) (N.J.S.A. 54A:4-7(a)(4)): "The resident individual shall meet all qualifications, except for the minimum or maximum age, for the federal earned income tax credit in order to be eligible". It has no listing condition.
    • The federal qualification is IRC 32(c)(1)(A)(ii)(III). The PR already applies it, with the claimant filing exception, through dependent_elsewhere, just as the model's federal eitc_demographic_eligible does.
  • The instructions. 2025 NJ-1040 instructions, PDF p.44, line 58: "You are not listed as a dependent on another tax return."
  • Where the two differ. listed_elsewhere decides an outcome only when a filer is listed but dependent_elsewhere is false. That happens in two cases:
    • The filer is listed but isn't claimable. No deduction is "allowable ... to another taxpayer", so (III) is met. This is a plain statute-against-instructions conflict.
    • The filer is listed by a would-be claimant who meets the filing exception (the PR's case). This one is arguable. Pub 596 (2025), p.18 states the exception for someone who "can claim you as a dependent on their return, but doesn't".
  • Witness: the PR's own case. It is a 2025 single filer who is claimed and claimable, whose claimant meets the filing exception, below age 25 and childless.
    • Main has no dependency test, so it gives eligible and nj_eitc = 40% × $649 = $259.60.
    • The head gives false and $0. dependent_elsewhere is false, so the result comes from listed_elsewhere alone.
  • No record covers it. candidates.yaml has no NJ item for this. The comment ("The NJ-1040 line 58 worksheet also requires ...") doesn't trip the ratchet. rulespec-us's us-nj/statutes/54a:4-7.yaml has no listing condition: it composes "meets all federal EITC qualifications except age".
  • Fix. Drop listed_elsewhere and change that case to true/$259.60. The statute and dependent_elsewhere already bar a claimable filer, including one who is claimable but unclaimed.
    • If you want the worksheet's reading instead, add a candidate (CONTRIBUTING.md#source-conflicts, step 1). It would set 54A:4-7(a)(4) with IRC 32(c)(1)(A)(ii)(III) against NJ-1040 p.44, give the listed-by-a-refund-only-filer example, and say follows: conflicting-source.
    • Then take it to the project lead, and keep the statutory result until it's ruled.

S2. The three candidates.yaml items understate their years

  • us-nd:stillborn-subtraction-dependency-condition, us-pa:tax-forgiveness-dependent-parent-exception and us-pa:tax-forgiveness-one-claimed-spouse-table all say years: from: 2025, to: 2025.
  • None of the deciding formulas has a year gate:
    • nd_stillborn_subtraction runs from 2021, the parameter's first value; the statute has allowed the subtraction since 2018.
    • pa_tax_forgiveness_eligible, pa_tax_forgiveness_eligible_share and pa_tax_forgiveness_amount apply in every year.
  • North Dakota's added condition isn't new in 2025. The 2022 Schedule ND-1SA, PDF p.2, line 5, says: "You would have been eligible to claim the child as a dependent on your 2022 federal income tax return if the child had been born alive." The 2025 schedule, p.2 repeats it.
  • Fix:
    • Set the ND item to from: 2021 (open-ended).
    • Extend both PA items to the years the formulas cover, after checking that the 2021–2024 Schedules SP ask the same dependency question and offer the same parent route.
    • Otherwise the register entries written after merge will pin a single year.

S3. The TAXSIM reform's new PA dependent gate is unpinned (reforms/taxsim.py, pa_tax_forgiveness_rate: child_dependents = where(filer_is_dependent, 0, tax_unit.sum(is_child_dependent)))

  • The only test that runs the TAXSIM reform on PA (pa_income_tax.yaml) has no claimable filer, so deleting the term fails no test.
  • Witness (static trace). Under the TAXSIM reform: 2025, joint return, head claimable, $7,500 of income each, a child aged 5.
    • With the gate, the excess is 15,000 − 13,000 = 2,000, so the rate is 1 − 0.1 × (2,000 / 250) = 0.2. Forgiveness is 460.50 × 0.2 × 0.5 = $46.05.
    • Without the gate, the limit is 13,000 + 9,500 = 22,500, so the rate is 1 and forgiveness is $230.25.
  • Fix: add this case under reforms: policyengine_us.reforms.taxsim (expect pa_tax_forgiveness_rate: 0.2), or drop the term. TAXSIM itself has no claimability input.

S4. The axiom: section is a placeholder, and no queued issue exists

  • The body. The "Axiom parity" section reads AXIOM_PLACEHOLDER. It is the only unfilled placeholder in the body.

  • The author's claim. The 2026-10-11 comment says "16 provisions, all queued; 6 dispatch-ready drafts are held".

  • What exists in rulespec-us.

  • Fix. The line needs one item for each provision whose result changes from main:

    • NJ 54A:3-1(b), 3-1.1, 4-17.1 and 4-7(a)(4);
    • Ohio 5747.01(A)(10)(a)–(b) and 5747.75;
    • Oklahoma 2358(E)(1), 5011 and 2357.43;
    • Pennsylvania 301(c.2), 301(e.1) and 304, including the mixed-spouse allocation.

    Each queued issue must be OPEN, labelled pe-parity, dispatch-ready (module path, corpus citation, verbatim law, required outputs, and companion tests from the same external sources as the YAML tests) and pinned to head 611ebd6c75. NJ 54A:4-7(a)(4) could extend Add miscellaneous income #1965, which uses the same module, with the dependency-bar companions once S1 is settled. The remaining items can use:

    • North Dakota: n/a: no behavior change (the formula is unchanged from main; only references, documentation and the candidate change);
    • the NJ, OK and repeal contributed reforms: n/a: PE-only reform;
    • TAXSIM: n/a: emulator mapping.

Suggestions

  1. The changelog and body describe changes that main never had.
    • "Allow North Dakota's stillborn subtraction without a dependency condition": main's formula already had no bar, and this PR leaves it unchanged.
    • "Remove pa_tax_forgiveness_parent_qualifies": that variable was never on main.
    • "Regression cases cover North Dakota's dependency bar, Pennsylvania's actual-claim test and parent route": these are mutants of earlier branch states.
    • test_pa_tax_forgiveness_has_no_parent_qualification_input asserts the absence of a name main never had.
    • Reword the changelog (for example, "Document that North Dakota's stillborn subtraction has no dependency condition") and the body. Consider dropping the absence test (CLAUDE.md, "Justify Python coverage").
  2. The filing exception's restoration of dependents is unpinned in some formulas. No case sets dependent_claimant_filing_exception: true for nj_ctc, nj_dependents_attending_college_exemption, ok_stc's has_dependents, or the NJ and OK dependent-exemption reforms. Swapping their helper for the ordinary head_or_spouse_is_dependent_elsewhere would pass every test. Add one exception case each, as nj_dependents_exemption, ok_count_exemptions, the Ohio files and pa_tax_forgiveness_amount already have.
  3. Test location. oh_claimable_filer_medical_expenses.yaml isn't named after a variable (CLAUDE.md, "Test design and CI cost"). Move its eight cases into the existing oh_unreimbursed_medical_care_expense_deduction.yaml, oh_uninsured_unreimbursed_medical_care_expenses.yaml and oh_long_term_care_insurance_premiums.yaml.
  4. Oklahoma references.
    • ok_stc.py cites 68 O.S. 5011 through an introduced 2023 bill (HB 1013XX, PDF p.5). That page shows the subsection relettered H and a proposed $500 amount, while the code comment says "5011(D)". Cite the codified section (OSCN) instead.
    • ok_count_exemptions.py (and the repeal reform's comment) quote only Form 511 for the own-exemption bar. Add 68 O.S. 2358(E)(1)(a), SB 1452, PDF p.19 ("personal exemptions of One Thousand Dollars ($1,000.00) in lieu of the personal exemptions allowed by the Internal Revenue Code") and IRC 151(d)(2), which carry the rule.
  5. CLAUDE.md "Test design and CI cost". The body gives no CI time or memory for the new property file. Cite this head's run 42386513660:
    • The file ran in the Rest Python "core-3" group (shard 2), with 14.47 s + 2.35 s + 1.61 s + 1.48 s ≈ 19.9 s of test calls.
    • The group ran 749 tests in 22:12.
    • The log reports no peak RSS, so say so.
  6. The body is stale or unclear in places.
    • "Tests" cites run 42313238972 at aa18655572 (36 jobs). The head's run is 42386513660 at 611ebd6c75, with 35 jobs.
    • The Ohio section's "We apply the PR's existing dependent-taxpayer test" reads oddly.
    • The title doesn't mention North Carolina, although the property file and nc_child_deduction.yaml cover it (the formula is on main).

Verified correct

The law, read first.

  • New Jersey.
    • The 2025 instructions, lines 10 and 11 (PDF p.9): "You can claim a $1,500 exemption for each child who qualifies as your dependent for federal tax purposes." Line 12: "Student must be claimed as a dependent on line 10 or 11." N.J.S.A. 54A:3-1(b) likewise keys the exemption to federal dependency, so IRC 152(b)(1) leaves a claimable filer with none.
    • 54A:4-17.1 (P.L. 2022, c.24) allows the credit for each child under six "for which the taxpayer is allowed a deduction under N.J.S.54A:3-1", so the CTC gate follows.
    • The filer-only childless age test follows 32(c)(1)(A)(ii)(II), and the (III) bar with the claimant exception is statutory (see S1 for the extra term).
  • North Dakota. N.D.C.C. 57-38-30.3(2)(p), PDF p.35: "Reduced by an amount ... for each birth resulting in stillbirth, as defined in section 23-02.1-01, for which a fetal death certificate has been filed". It has no dependency condition; the schedule adds one. The statute-first result is main's, and the conflict is recorded.
  • Ohio.
    • R.C. 5747.01(A)(10)(a)–(b) covers premiums and medical care "for the taxpayer, the taxpayer's spouse, and dependents". (O): "'Dependents' means dependents as defined in the Internal Revenue Code." (A)(10)(c) widens only (a), for a would-be qualifying relative failing 152(d)(1)(B)–(C), so 152(b)(1) still applies. Excluding dependents before the 7.5% floor is right.
    • R.C. 5747.75 allows the tuition credit to "taxpayers with one or more dependents who attend a nonchartered nonpublic school", so tuition recorded on a filer is rightly excluded.
    • Unchanged and consistent: 5747.025 sets a filer's exemption to zero where an exemption "is allowable to another taxpayer" (main reads claimability). 5747.055 has no dependency condition, and the Ohio EITC follows the federal credit.
  • Oklahoma.
    • 68 O.S. 2358(E)(1)(a) is quoted in Suggestion 4. (b) and (c) give an additional $1,000 "for each taxpayer or spouse who is blind" or "sixty-five (65) years of age or older" (SB 1452, PDF p.19), with no dependency bar. So the claimable filer's regular exemption follows 151(d)(2) spouse by spouse, while the special and blind exemptions stay.
    • 68 O.S. 5011 (as codified in 2021): the claim is "Forty Dollars ($40.00) multiplied by the number of allowable personal exemptions". These are the exemptions "to which the taxpayer would be entitled pursuant to the provisions of the Oklahoma Income Tax Act", except the blind and 65-or-older ones. The $50,000 route needs "one or more allowable personal exemptions other than the allowable personal exemption for that individual or the spouse".
    • OAC 710:50-15-96 says the same, and the 2025 Form 538-S, p.3 step 3 reads "You can claim an exemption for your dependent".
    • 2020 Pub 596, p.16 sets ages 25–64 for both students and nonstudents, and its Rule 12 is the dependency bar. Both carry into the frozen OK credit.
  • Pennsylvania.
    • Tax Reform Code 301(c.2), PDF p.112: "'Claimant' means a person who is subject to the tax ..., is not a dependent of another taxpayer for purposes of section 151". That is allowability, read as claimability, with no parent route.
    • (e.1), PDF p.113: "'Dependent' means a child who is the dependent of a claimant for purposes of section 151".
    • 304(d)(1), PDF p.127 gives $6,500, or "joint poverty income" of $13,000 for "a married claimant", plus $9,500 per dependent.
    • The older regulation (61 Pa. Code § 101.1, a support-test claimant definition) has no parent route either. The parent route comes only from the 2025 Schedule SP, PDF p.3 ("A dependent child may also be eligible ...").
    • The mixed-spouse allocation follows p.5 ("When one spouse is claimed as a dependent ... otherwise qualifying married taxpayers must file separately"), recorded as a gap-fill.
    • Give a separated Pennsylvania filer the unmarried tax forgiveness base #10666's separated-filer base, already merged, coexists cleanly in pa_tax_forgiveness_rate.

The code.

  • Mutation rule. Apart from S3, removing any new gate or term fails a YAML case:
    • New Jersey: the exemption, college exemption and CTC zeros; the 17-year-old filer with a 40-year-old dependent; the claimable-but-unclaimed childless case; the listed-by-a-refund-only-filer case.
    • Ohio: the tuition on a filer, the claimable filer's tuition, the medical [100, 200, 0] / [10, 20, 0] / [1000, 1000, 0] vectors, and the 1,430 total.
    • Oklahoma: the per-filer regular exemptions in both label orders, the child exclusion, the income-limit sales tax case of 0 against $40, and the 20-year-old filer with a 40-year-old dependent.
    • Pennsylvania: the eligible share, the amount, and the 0.4 rate.
    • The NJ and OK reforms, and both labelings of the repeal reform's OK case.
  • Construction.
    • Vectorization is sound: where, &, ~, tax_unit.any and person.tax_unit broadcasts.
    • Entities and periods are correct.
    • There is no new state-gated int or enum key, so the NH Add New Hampshire state supplementation for 2026 #10156 pattern doesn't arise.
    • pa_tax_forgiveness_eligible_share sums only person-level non-taxable sources, consistent with pa_total_taxable_income.
  • Hand-checks (15).
    • PA single unclaimable, $3,000: 3,000 ≤ 6,500, so 100% × 3,000 × 3.07% = 92.10.
    • PA joint with one claimable spouse, $3,000 each: 6,000 ≤ 13,000, so 184.20 × share (3,000 / 6,000) = 92.10.
    • PA joint with one claimable spouse and a child, $7,500 each: the child is excluded; 15,000 − 13,000 = 2,000, so the rate is 20%. 460.50 × 0.2 × 0.5 = 46.05.
    • PA single claimable with a child, $8,000: 8,000 − 6,500 = 1,500, so the rate is 0.4, with share 0 and forgiveness $0. Single unclaimable: 8,000 ≤ 16,000, so 100% × 245.60.
    • OK EITC: 5,000 × 7.65% = 382.50 (below the 2020 cap of 538) × 5% = 19.125, single or joint.
    • OK exemptions: neither claimable with a child = 1 + 1 + 1 = 3; one claimable spouse with a child = 1; claimable with the filing exception and a child = 0 + 1 = 1; claimable filer aged 66 = 0 + 1 special = 1.
    • OK sales tax credit: 3 × $40 = 120; one claimable spouse = $40; claimable single at $30,000 with a child: over $20,000 and no dependent, so 0.
    • OK reform, one claimable spouse: 1 × 1,000 = 1,000.
    • NJ EITC below the federal age: 40% × 649 = 259.60. At federal ages: 40% × 3,000 × 7.65% = 91.80.
    • NJ CTC: NJ taxable income 5,000 − 1,000 − 1,500 = 2,500 ≤ 30,000, so $1,000.
    • NJ exemptions: 1,500 (dependent) and 1,000 (college).
    • Ohio medical: (400 + 600) + (500 + 500) − 7.5% × 8,000 = 1,400, split 700/700, plus long-term care 10/20, giving 710/720 and a total of 1,430. Without the gate: 8,000 − 600 = 7,400.
    • Ohio tuition: min(400, 1,000) = 400.
    • ND: 1 × 5,241 = 5,241.
  • References. These show the cited text: NJ-1040 PDF p.9 and p.44; SB 1452 p.19; Schedule SP p.3 and p.5; Tax Reform Code p.112, p.113 and p.127; 2020 Pub 596 p.16; 2025 ND-1SA p.2. Multi-page variable references carry the # PDF pages comment.
  • Housekeeping.
    • The changelog changelog.d/claimable-filer-nj-pa.fixed.md is top-level.
    • No partner-contract or .github files are touched.
    • The two new KNOWN_UNMARKED lines (one comment each in nd_stillborn_subtraction.py and pa_tax_forgiveness_eligible.py) match recorded candidates, as CONTRIBUTING.md step 1 requires.
    • The three candidates naming this PR are updated (apart from S2).

Axiom line assessment

There is no line: the section reads AXIOM_PLACEHOLDER. rulespec-us has no issue, open or closed, covering this PR's NJ, Ohio, Oklahoma or Pennsylvania provisions, and no module for most of them. The "6 dispatch-ready drafts" the author mentions haven't been filed. The line needs the items listed in S4. Each queued issue must be OPEN, labelled pe-parity, dispatch-ready and pinned to 611ebd6c75. The valid n/a items are North Dakota (no behavior change), the contributed reforms (PE-only) and TAXSIM (emulator mapping).

CI status

gh pr checks 10043 at head 611ebd6c75: 35 of 35 pass in run 42386513660 (2026-11-07). That covers every Baseline and Contrib shard, all eight Rest Python shards, Microsimulation, Household API Partners and PR validation. Nothing fails or is pending.

Branch status

Verdict: REQUEST_CHANGES

@DTrim99 DTrim99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes per the review above: 0 critical, 4 should (NJ childless EITC 'listed as a dependent' term follows the worksheet over 54A:4-7(a)(4) without a record; candidates understate their years; unpinned TAXSIM PA gate; axiom section still a placeholder with no queued issue), 6 suggestions.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants