Repository navigation
Conversation
…0012) TAXSIM-35 v17 is 'Itemized Deductions in taxable income', 0 for a filer who takes the standard deduction. The emulator maps v17 to itemized_taxable_income_deductions, the potential amount, which differs from TAXSIM in 12,308 of 15,000 CPS comparison records. Co-authored-by: PavelMakarchuk <pavel@axiom.org> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#9902 made il_aabd_expense_exemption_person count only the person's own withholding, so it no longer adds the tax-unit state_withheld_income_tax. test_known_violations_only_shrink (#9897) then fails on main because the entry is still listed in KNOWN_VIOLATIONS. Remove it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The limit used 100% of Schedule C net profit. Plan compensation for a self-employed person is 401(c)(2) earned income, net of the deductible part of self-employment tax and of the plan deduction itself, and 404(a)(8)(C) caps the deduction at that earned income before the plan deduction (Pub. 560 Deduction Worksheet for Self-Employed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lan limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
self_employed_pension_earned_income (Pub. 560 worksheet steps 1-3) now uses the business or businesses under which the plan is established: by default every profitable Schedule C, Schedule F and partnership business, or one business named by the new self_employed_pension_plan_business input. 404(a)(8)(C) limits the deduction to earned income from the plan's business; Pub. 560 step 1 allows Schedule F and K-1 box 14 code A profit. Form 7206 lines 9-10 now subtract only the part of Schedule 1 line 16 attributable to each business, in proportion to its earned income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rm 7206 Pension limit: farm only, partnership only, both businesses by default, a named farm or partnership, a farm loss, and one dollar limit across businesses. Two existing cases now name the Schedule C business to keep their meaning. Form 7206: line 9 split by earned income, a retirement plan under the partnership or the farm, and a farmer with AGI of zero. Step 3 again subtracts the plan businesses' share of line 15, which is exact in float32 for one business. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rship plans Pension: every drawn filer runs under each plan business; the reference's step 1 is the plan businesses' net profit; the default's earned income is the sum of the named businesses', its limit is between their largest and their sum, and it never lowers the deduction from a Schedule C plan. AGI stays at or above zero for any filer with only self-employment profit, and a farm grid checks the limit rises with farm profit. Form 7206: filers draw a retirement plan business; line 9 is each business's share of line 16 by line 8, and the shares add up to line 16. Property 5 tightens to AGI >= 0 for filers with no business losses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Draft. Stacked on #10120 (
sehi-plan-business-base, itself on #10109), with #10121 (fix-se-pension-earned-income-limit) merged in (d48dcd8). The diff also shows #10121's files until #10121 lands. Merge order: #10109 → #10120 → #10121 → this PR. This PR touches both #10121's pension variables and #10120's Form 7206 lines 9–10, so it must land last. Both owner sessions have agreed and are not changing those lines.Problem
#10121's
self_employed_pension_earned_income(Pub. 560 worksheet step 3) and #10120's Form 7206 lines 9–10 both assume the self-employed retirement plan is established under the person's Schedule C business. So:The law and the IRS forms allow these plans:
Statute text was verified on 2026-10-11 against govinfo USCODE-2023 (§§ 401(c)(4), 404(a)(8), 414(c), 415(f), 415(h)).
Choosing the plan business when a person has several
New input
self_employed_pension_plan_business(Person enum): SCHEDULE_C, SCHEDULE_F, PARTNERSHIP, or ALL (default): every business with a net profit has a plan, and their earned income adds up. A business with a net loss is left out, so it doesn't reduce the plan's earned income. A named business uses that business's earned income alone, as in Pub. 560's one-plan sentence.Why ALL is the default:
Defined benefit plans, Schedule SE line 1b (CRP payments) and the optional methods are still not modeled.
Form 7206 lines 9–10
Line 9 is the part of line 16 attributable to the health plan's business:
Neither the form nor its instructions say how to split one plan's deduction across businesses. The proportional split matches lines 5–8's split of line 15. It is also exactly what separate plans under each business would give, each contributing at the same rate (the homogeneity point above). Single-business filers are unchanged.
Intended consequence: some SE health deductions fall relative to #10120. Under #10120 + #10121 the retirement plan was Schedule C's by assumption, so a health plan under a farm or partnership subtracted none of line 16. With the ALL default, those businesses now carry their share.
self_employed_pension_plan_business: SCHEDULE_C(now in the test).Change
self_employed_pension_plan_business(input, default ALL).self_employed_pension_earned_income(step 1–3): the plan businesses' net profit less their share of Schedule 1 line 15, split by net profit as on Form 7206 lines 5–8. With ALL this is the combined profit less all of line 15.self_employed_pension_contribution_limit: formula unchanged; the docstring and references now cover the employer and dollar-limit points (414(c), 415(f), 415(h)).self_employed_health_insurance_earned_income_limit(Let farm, partnership and S corporation plans set the self-employed health insurance limit #10120): line 9 is now each business's share of line 16, as above.No circularity. The pension variables read SE income, line 15, the new input and the deferral variables. The SE health limit reads the pension deduction and pension earned income, never the reverse. Neither reads AGI or premiums.
Consumers checked; none needs a change:
qualified_business_incomepools all businesses' QBI and subtracts the whole deduction);ira_compensation(already all four SE sources less lines 15 and 16);ira_active_participant;Invariants
Tested with Hypothesis.
test_self_employed_pension_limit_properties.py). Every drawn filer runs once per plan business, over 2022, 2025 and 2026.test_self_employed_health_insurance_properties.py, Let farm, partnership and S corporation plans set the self-employed health insurance limit #10120's, extended). Filers draw a retirement plan business.~/reviews/se-plan-business-2026-10/tests/mutations.log):Tests
self_employed_pension_contribution_limit.yaml. 8 new cases: farm only, partnership only, Schedule C + farm by default, a named farm, a named partnership, a farm loss outside the plan, a named farm with a loss, and one dollar limit across two businesses. Two Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121 cases now name SCHEDULE_C to keep their meaning.self_employed_pension_contribution_ald.yaml. Farm-only and partnership-only filers deduct $18,587.05 and end at AGI 0.self_employed_health_insurance_earned_income_limit.yaml. Case 15 names SCHEDULE_C. New cases:self_employed_health_insurance_ald.yaml. Case 11: a farmer with both plans ends at AGI 0.Expected values were computed independently of the model (
~/reviews/se-plan-business-2026-10/tests/expected.py).Fails on the base (source files reverted in place to d48dcd8, tests kept; logs in
~/reviews/se-plan-business-2026-10/fails-on-base/):The guards that pass on the base are a farm loss outside the plan and one dollar limit across businesses.
Local runs at c140181, one file at a time:
qualified_business_income.yaml8,sstb_qualified_business_income.yaml7,az_property_tax_credit_income.yaml38,mi_household_resources.yaml48,ira_compensation.yaml12,test_ira_formula_differential.py6,test_ira_invariants.py18;Impact
Data reach (inputs only, certified
populace_us_2024, 2024 values):self_employed_pension_contributions_desiredonly to people with Schedule C profit: 1,654 records, 5.38M weighted, $1.37bn. None have farm or partnership income without Schedule C profit, so the farm-only and partner-only gains do not appear in the data.IMPACT_PENDING. A base (d48dcd8) vs PR (c140181) pair for 2026 on the default dataset is queued under the shared heavy lock.
Review
REVIEW_PENDING (
subfleet run --task review --tier hard).axiom: pending. Addenda are drafted for TheAxiomFoundation/rulespec-us#1676 (162(l) line 9) and #1682 (404(a)(8) plan business); they will be posted after the review.
🤖 Generated with Claude Code