Repository navigation
Apply the 6012(a)(1) federal filing requirement from 2026 - #10137
Conversation
…ed 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>
…rement - 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>
…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>
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>
…t 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>
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>
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>
…stem 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>
8ff66c7 to
634f2ee
Compare
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>
Hand-off to the US + core hubHead: Independent review (GPT-6.1 Sol via Subfleet): round 1 REQUEST_CHANGES at Passed locally at the head:
Pending: CI. Run 38238135593 at Impact: in the body. A full 2026 microsim pair: +43,205 weighted tax units required to file (33 records); no change to EITC, income tax, state tax, net income or benefits. Files: Decisions (none blocks the merge; both defaults are no change):
Axiom: TheAxiomFoundation/rulespec-us#1696 queued, extended with companion cases C1–C16. Follow-ups owed, not blocking:
🤖 Generated with Claude Code |
|
US + core hub merge audit, us#10137 at
|
#10135, which this PR was stacked on, has merged; this PR's diff is now its own changes against main.
What is wrong
tax_unit_is_required_to_fileapplies the 2018–2025 rule in every year: a return is due when gross income is more thanstandard_deduction. That rule is 26 U.S.C. 6012(f), and it covers only "a taxable year beginning after December 31, 2017, and before January 1, 2026". Pub. L. 119-21 does not amend section 6012; its sections 70102 and 70103 made the larger standard deduction (63(c)(7)) and the zero exemption amount (151(d)(5)) permanent. So from 2026 the rule is 6012(a)(1), with an exemption amount of zero:For a tax unit nobody can claim as a dependent, the model got 2026 wrong in two ways:
Chart A of the 2017 Form 1040 instructions, the last year under (a)(1), reads the same way: it lists only age, and a return is due if gross income "was at least" the amount.
Fix
gov.irs.income.filing_requirement.standard_deduction_rule.applies: false before 2018, true for 2018 to 2025, false from 2026. A reform can keep 6012(f) by setting it to true.basic_standard_deductionplus one additional standard deduction for each spouse aged 65 or older (aged_head,aged_spouse, and the existingaged_or_blind.amountfor the filing status). The WFTCA contributed reform'sbonus_guaranteed_deduction, which its parameter describes as "an increase to the basic standard deduction", counts too; it is zero unless that reform is on. A married individual filing separately must file with any gross income, as before.No new inputs. Existing parameters supply every amount.
Readings and open points
Tests
tax_unit_is_required_to_file.yaml: 29 cases. 2026: single, head of household and surviving spouse filers, under and over 65, blind and not, a dollar under and at each threshold; joint returns with no, one and two spouses aged 65, and both blind; separate returns at $0 and $1. 2025: the same thresholds under 6012(f), blindness included and the exact dollar excused. Two cases pin the claimable-filer reading (d1395). 9 of the 29 fail ona9e58977ff(#10135's head): every 2026 case whose gross income equals the 6012(a)(1) threshold (Cases 2, 3, 6, 7, 9, 11, 13, 15 and 17; three of them with a blind filer). Two cases incontrib/congress/wftca.yamlpin the WFTCA bonus in the 2026 threshold.tests/core/test_filing_requirement_invariants.py(new). The reference rules are computed from the published amounts (Rev. Proc. 2025-32 sec. 4.14 for 2026, Chart A 2025 for 2025), not from the model's parameters.test_threshold_grid: one simulation over every filing status and every combination of age 65 and blindness for the head and spouse, at $0, $1, and a dollar under, at and over each rule's threshold. The 2026 result equals 6012(a)(1) and the 2025 result equals 6012(f), on every row.test_filing_requirement_properties: Hypothesis draws batches of tax units (any filing status, age, blindness and claimability; wages, interest, dividends, self-employment profit or loss; gross income often exactly at a threshold), each with a blind-flipped and an aged variant, plus three fixed anchor units in every example: a blind filer nobody can claim at the 2026 threshold, a claimable filer over the unearned income test, and a joint unit headed by a younger claimable adult (round 1's counterexample).Invariants (each executed):
tax_unit_role_input), so a variant cannot change who heads the unit.tests/core/test_filing_requirement_dependent_invariants.py(from #10135). Its property 7, "being claimable never removes the requirement", now has one intended exception from 2026: gross income exactly equal to the threshold of a sighted tax unit nobody can claim. (a)(1)(A) requires that unit to file ("less than"), while the claimable-filer test is "in excess of" (d1395). The property skips exactly those units, andtest_claimability_can_end_the_requirement_at_the_thresholdpins the case.simulate()now passes keyword options toSimulation.Mutation check (at
634f2ee275; the later commit changes only comments and the test units' roles; each mutant of the formula against the new YAML file, #10135's 48 cases,wftca.yamland both Python files):a9e58977ff): 6012(f) in every year>instead of>=Every mutant fails at least one test. Hypothesis shrinking was off for this check, so the Python counts are a lower bound.
CI cost. The new Python file runs in the
coregroup of the rest Python tests and uses only the default tax-benefit system. Locally (macOS, shared host at load 150-250, not Linux CI): 6.1 s inside pytest (0.55 s and 0.44 s of calls) and 32.6 s wall time including the model import, with a peak of 1.03 GB, the same as #10135's invariants file alone (1.04 GB). An earlier version checked the switch with a reformed tax-benefit system; that cost a second parameter tree (+0.68 GB peak) in a group that already peaks at 13.3 GB on the 16 GB runner (run 38210034933,rest-python-core-resources.txt), so properties 4 and 5 compare with references instead.Also passing:
tax_unit_is_required_to_file_dependents.yaml(48),tax_unit_is_filer.yaml(both),eitc_filer_gate.yaml,section_911_state_eitc.yaml,medicaid_person_is_required_to_file.yaml,basic_standard_deduction.yaml(124 cases together with the new file), andcontrib/congress/wftca.yaml(4).Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
f4539bc050against this PR's heada9ed655465, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.tax_unit_is_required_to_filetax_unit_is_filereitcaca_ptcis_medicaid_eligiblestate_income_taxincome_taxhousehold_net_incomehousehold_benefits2025 is unchanged. In 2026, 33 records (43,205 weighted tax units) become required to file and 3 records (total weight 0.004) become filers; no other output changes. That matches the owner's 2026 run in "Impact (2026)" below, which compared against #10135's earlier head, so #10022's § 911 add-back in the merge base doesn't change the result on this dataset.
Comparison files are in
fixes/10137-impact/on the hub host.Impact (2026)
A real microsimulation on the default dataset (
populace_us_2024.h5@populace-us-2024-spm-20260909), one run per side under the shared heavy-job lock: #10135's earlier head1a5dd0586aagainst this PR's earlier head8ff66c7ea5, both on main065d0e9560. Sums are weighted.tax_unit_is_required_to_file(tax units)tax_unit_is_filer(tax units)eitcincome_taxstate_income_taxaca_ptchousehold_net_income,household_benefitsis_medicaid_eligible(people)Of the 33 records that become required to file, 30 were already filers in the model. None of the 33 changes in EITC, income tax, state income tax, net income or benefits. 2025 is unchanged: the switch keeps 6012(f) there, and that path is the old formula.
The numbers hold at this PR's current head. Since the run, the branch was rebased onto #10135's
a9e58977ff, whose round-1 change touches only the unearned income test, which applies only to claimable adults, and the WFTCA term was added, which is zero without that reform. A tax unit nobody can claim gets the same result at both heads on each side, and this PR does not change a claimable unit, so every record's difference is the same. Comparison files:~/reviews/pe-us-6012a1-2026-10-11/impact/on the hub host.Independent review
Round 1 (GPT-6.1 Sol via Subfleet, at
634f2ee275): REQUEST_CHANGES, two minor findings. The reviewer recomputed the 2026 thresholds against Rev. Proc. 2025-32 and confirmed the switch dates, the age-only additions, the equality comparison, and that no path sends a claimable unit to the new test.Round 2 (at
2a9771fcb9): APPROVE. Both findings resolved (the second as a documented deferral to d1403; the reviewer notes the Taxpayer Advocate post supports the literal and $5 readings, not the model's> $0, which this PR only preserves). One inherited nit, not from this PR: the26/6012#creference duplicates the section 6012 entry; left for a later reference cleanup so the reviewed head stays the head. Reports:~/reviews/pe-us-6012a1-2026-10-11/review-r1.mdandreview-r2.mdon the hub host.Merge with main
Merged main
f4539bc050400372ac2a4a8634b7df70c9a960bfwithout rebasing. The formula and variable-named YAML conflicted with #10022; main's newer #10135 also conflicted in the dependent YAML and invariant file. Preserved all 29 PR filing cases and all 8 main cases, all 49 dependent cases (including farm income), and both the separate-filer and 2026 equality exceptions in the claimability invariant. No original case names collide and no original expectations change.This PR supplies the 2026 age-only threshold and equality comparison. #10022 supplies the gross section 911 add-back: Form 2555 line 43 when leaves apply, otherwise the nonnegative legacy exclusion; stacking deductions do not reduce it. The merged formula is:
METHODOLOGY_CHOICE: no (for this merge). 26 U.S.C. 6012(c) applies “For purposes of this section” and computes gross income “without regard to the exclusion provided for in section 911”, so its add-back also applies to the (a)(1) threshold after (f)'s 2018–2025 period. The previously documented d1395/d1403 choices remain.
Added one combined case: a blind single filer aged 40 in 2026 has $10,000 wages and a $6,100 gross housing exclusion. Allocable deductions of $6,100 leave line 2c at
max(0, $6,100 - $6,100) = $0, but filing gross income is$10,000 + $6,100 = $16,100. That equals the$16,100 + $0 agethreshold, requiring a return; blindness's $2,050 increases the standard deduction to $18,150 but not this threshold. All 37 old filing cases retain their expectations.All requested files passed, one file per process with OMP/OpenBLAS/MKL/vecLib/NumExpr capped at four threads and OMP_WAIT_POLICY=PASSIVE:
tax_unit_is_required_to_file.yaml38;tax_unit_is_required_to_file_dependents.yaml49;cdcc_filing_status_eligible.yaml6;clean_vehicle_credit_prior_year_filing_status.yaml2;wftca.yaml4;test_filing_requirement_dependent_invariants.py5;test_filing_requirement_invariants.py2. Total: 106 passing cases/tests.make format(format and lint) and whitespace checks also passed.The conflict resolution adds no behavior beyond this PR's stated rule plus #10022's gross-exclusion rule. No additional merge-specific methodology requires an impact rerun; the existing impact section still describes its stated older baseline rather than combined current-main totals.
axiom: TheAxiomFoundation/rulespec-us#1696 queued (extended in this comment with companion cases C1–C16 for filers nobody can claim, from the same sources as the YAML cases here)
🤖 Generated with Claude Code