Repository navigation
Let farm, partnership and S corporation plans set the self-employed health insurance limit - #10120
Conversation
…ncome 26 U.S.C. 162(l)(2)(A) caps the deduction at earned income within the meaning of section 401(c), which section 401(c)(2)(A)(v) and (vi) reduce by the section 404 plan deduction and the section 164(f) deduction for half of self-employment tax. Form 7206 (and Pub. 535 Worksheet 6-A before 2023) subtracts the share of Schedule 1 line 15 attributable to the plan business and the line 16 plan deduction from that business's net profit. The model used net profit alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orm 7206 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eduction Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd S corporation plans Form 7206 allows the plan to be established under a Schedule F farm, a partnership with K-1 box 14 code A earnings, or an S corporation in which the person is a more-than-2% shareholder (162(l)(5), line 11), one form per plan. Add self_employed_health_insurance_plan_business (default: the business with the largest earned income) and s_corp_shareholder_medicare_wages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n plans Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the default's limits - Limit YAML Cases 18 and 19 name PARTNERSHIP and S_CORPORATION. - The plan business input says when a partner's or shareholder's own policy counts, and that all Schedule C income is one business. - Cite PDF pages 1-2 of the Form 7206 instructions. - Drop the sum-of-businesses bound, which the differential property implies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Heads-up from #10109, which this PR is stacked on. #10109 is now at
Expect conflicts in those three files when you merge #10109's branch or 🤖 Generated with Claude Code |
|
Picking this up for the US hub. I'll post a hand-off comment here when it's ready. Generated by Claude Code |
#10109 squash-merged with later commits this branch did not have. Keep this branch's per-business limit and add #10109's documentation of the single Schedule C business and the per-person line 15. In the limit YAML, keep main's Cases 1-10 in place (Case 8 now names SCHEDULE_C, since an unnamed business takes the largest) and append this branch's cases as 11-21. In the ALD YAML, append this branch's four cases as 9-12. In the property test, take main's independent Schedule SE reference for line 15 and its SSTB draws. Delete #10109's changelog fragment, which main already released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The per-business rewrite computed profit x (1 - line 15 / line 5), which adds two float32 roundings. For one-business filers it moved the limit from main's value by up to $0.03 (92 of 400 Schedule C-only test filers). Each business now subtracts line 15 x its own share of line 5, the same operations main uses, so Schedule C-only limits match main bit for bit. The limit also documents that each kind of business is one total per person, and that CRP payments, the optional methods and the personal-services test are not modeled. The two 162 references are one source, so they become one entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan business input now says that a farm, a partnership and an S corporation are each one total per person, like the Schedule C business, and that premiums a partnership or S corporation pays or reimburses go in health_insurance_premiums. The S corporation input says those premiums are box 1 wages but not box 5 wages (26 U.S.C. 3121(a)(2)(B)), so they belong in employment_income but not here, and that is_self_employed must be set even when the shareholder has no other earned income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ALD Case 11 kept the reimbursed premiums out of box 1 wages, which the Form 7206 instructions require for the plan to count as established under the S corporation, so its AGI of 0 couldn't occur. Box 1 wages are now 22,000 and AGI 12,000. The property test compared the deduction with the model's own limit; it now uses the reference limit for each copy. Limit Cases 15 and 19 gain their hand computations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Picking this up for the US hub. I continue the earlier session's work on this branch (its last commit is Generated by Claude Code |
#10571 overrode self_employed_health_insurance_earned_income_limit with a copy of main's Schedule C-only formula plus the draw profits in line 5, so with the reform on, the farm, partnership and S corporation plan businesses this branch adds were ignored. The baseline formula is now a module-level Form 7206 line 13 helper that takes extra line 5 profits, and the reform calls it with the SECA-taxed draw profits. Three new reform cases cover a named farm, the unnamed default, and a named Schedule C beside a larger farm. The pure harness names the Schedule C business, which its oracle assumes, and supplies S corporation wages of zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Picking this up for the US hub. I continue the earlier sessions' work on this branch (last commit Generated by Claude Code |
|
Ready for hub review Head: This continues two earlier sessions' work. Their commits on this branch,
My commits are What the item asked for
Hand computations (2027, owners' draw reform on, the reform's synthetic $200,000 cap, q = 0.9235)Schedule C $10,000, farm $60,000,
These are the three new cases at I rechecked #10528's cases and the body's example by hand, all exactly:
Tests (Linux, Python 3.14, one file per process)
CIThe Pull request run at this head passed: 41726791519, conclusion Judgment calls
Overlap
Proposed follow-up issueLet the self-employed health insurance limit name one of several Schedule C businesses. The inputs hold one Schedule C total per person, so a plan under the smaller of two sole proprietorships can't be limited to that business's earned income (#10528's remaining case). Per-business Schedule C inputs, or a plan-business profit input, would close it. Generated by Claude Code |
|
Hub review in progress Reviewing head
Tests, mutants and the main reproduction are still running. Generated by Claude Code |
|
Ready for hub review The head hasn't moved since the hand-off. Main has moved to There are no P1 findings. The code, hand values, tests and reform integration all hold. The findings below are corrections to the body, the hand-off and one input's documentation, plus a fuller follow-up for #10528. FindingsP2. The #10528 follow-up leaves out cases the hand-off says are coveredBody, "Issue #10528", the "Not fixed" bullet; hand-off, "Does this close #10528?" and "Proposed follow-up issue". The hand-off proposes closing #10528 with one follow-up, "a plan under one of two Schedule C businesses", because "the inputs hold one Schedule C total per person". The inputs actually hold two Schedule C amounts,
Replacement for the body's bullet:
Replacement follow-up title and summary: "Let the self-employed health insurance limit name one business among several of the same kind." The model pools SSTB and non-SSTB Schedule C income, all farms and all partnerships, so a plan under one of them can't be limited to that business's earned income. Per-business profit inputs, or a plan-business profit input, would close it. Witness: Schedule C $50,000 non-SSTB plus $1,000 SSTB, plan under the SSTB business: the form gives $929.35 and the model $10,000. P3. The input documentation names only one overstatement case
The documentation says to name the business "when a partnership or S corporation with the largest earned income does not pay or reimburse the premiums". The body lists a second case where the default overstates, a plan under a smaller business (#10528's Case 3: $10,000 by default against the form's $929.35). The input documentation doesn't mention it. Replacement for the documentation's last sentence:
P3. The body's CI line is staleBody, "Results", the "CI:" bullet: "not run; this is a draft." The PR was marked ready at 21:59Z. Pull request run 41726791519 at
P3. The overlap section misses #10560 and has outdated claims about #10121 and #10122Body, "Overlap with other open PRs"; hand-off, "Overlap".
P3. Premium documentation conflicts across files (follow-up)
Checked and sound
What I couldn't check
Generated by Claude Code |
|
Picking this up for the US hub. I'll post a hand-off comment here when it's ready. Generated by Claude Code |
The default takes the business with the largest earned income, so it also overstates when the plan sits under a smaller business (issue #10528's Case 3). The documentation named only the partnership or S corporation case; it now tells users to name the business in both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6HCapAFW41PEgRBjqB
|
Ready for hub review This round answers the r1 review (issuecomment-6618436704). Its one commit, Items
CIPull request run https://github.com/PolicyEngine/policyengine-us/actions/runs/41834014443 at Judgment calls
Proposed follow-up
Generated by Claude Code |
|
Hub review in progress Round 2 delta review of
Still to do: mutants and the final verdict. Generated by Claude Code |
|
Ready for hub review Round 2 delta review. The head hasn't moved past There are no P1 or P2 findings. Every round 1 item is done. The findings below are P3 corrections to the body, plus one overlap the body leaves out. FindingsP3. #10265 is missing from "Overlap with other open PRs"#10265 ("Count eligible long-term care premiums in Schedule A medical expenses", head The two compose. A raw
The default stays the largest-deduction choice, because the deduction is still min(line 3, line 13). Proposed bullet:
P3. The CI line is staleBody, "Results", the "CI:" bullet: run 41834014443 "had passed every job but Contrib (other-shard-1), still running". That run has since completed with conclusion
P3. The #10131 bullet names the wrong stacking point and undercounts its conflictsBody, "Overlap", #10131: "stacked on this PR's old head
The hand-off's judgment calls already note this, but the body still carries the old text. Replacement for the opening: "#10131 (draft, head P3 (for the hub, not the author).
|
| Mutant | Limit YAML | ALD YAML | Reform YAML | Property test | test_owners_draw.py |
|---|---|---|---|---|---|
| 1. Schedule C-only default | 6 fail | 3 fail | 1 fail | 2 fail | 38 pass |
| 2. Line 9 from every business | 1 fail | pass | pass | 2 fail | pass |
| 3. No line 15 share, farm or partnership | 8 fail | 3 fail | 2 fail | 2 fail | pass |
| 4. Pooled default | 5 fail | 1 fail | 2 fail | 2 fail | pass |
| 5. S corporation wages dropped | 2 fail | 1 fail | pass | 2 fail | pass |
| 6. Every business takes all of line 15 | 7 fail | 2 fail | 10 fail | 2 fail | 1 fail |
| 7. Reform without the draw term | pass | pass | 9 fail | pass | 1 fail (test_generated_sehi_limit_counts_seca_taxed_draw_in_line_5) |
| 8. Mine: line 5 leaves out the partnership's profit | 5 fail | 1 fail | pass | 2 fail | 2 fail (test_already_se_partnership_income_cannot_add_a_second_draw, test_generated_sehi_limit_counts_seca_taxed_draw_in_line_5) |
The property test's failures are test_deduction_follows_form_7206 and test_reviewer_example_and_boundaries in every row where it fails. The counts for mutants 1 to 7 match round 1's table. The body's mutant claims hold: all six formula mutants fail the limit YAML and the property test, five fail the ALD YAML (mutant 2 passes it), and mutant 7 fails 9 of the 14 reform cases.
Readers.
self_employed_health_insurance_plan_businessands_corp_shareholder_medicare_wagesare read only inform_7206_line_13.form_7206_line_13is called by the limit variable and byreforms/ssa/owners_draw.py.- The limit is read by
self_employed_health_insurance_ald_personand the owners' draw override. - The per-person deduction is read by:
- federal:
self_employed_health_insurance_ald,dependents_self_employed_health_insurance_ald,dependent_taxable_ss_magiandself_employed_health_insurance_ald_excluded_premiums; - states: MS, OH, MO and MT;
- parameter lists: the QBI deduction definition and South Carolina's two-wage-earner subtractions.
- federal:
This round's commit changes none of their inputs. The PR as a whole can move baseline outputs, as round 1 found: the default raises the deduction where a farm, partnership or S corporation line 13 exceeds the Schedule C limit. This round adds no new movement, so the population check round 1 called for stands unchanged.
Scope. The 11 files include nothing under .github/ or policyengine_us/tests/policy/baseline/partners/. The changelog fragment is a top-level changelog.d/sehi-plan-business-base.fixed.md.
Brief coverage. Items 1, 2, 3, 5, 6 and 7 are done as asked. Item 4 cites the head's run but not its conclusion, because it hadn't finished at hand-off (see the P3 above).
What I couldn't check
- Sources. From this session, irs.gov, uscode.house.gov, govinfo.gov, ecfr.gov, law.cornell.edu and web.archive.org all failed: the proxy refused the tunnel or the host didn't resolve. So I confirmed no statute or form text this round. This round adds no legal claim; its new statements are about the code and the arithmetic, which I checked against the code and a model run. The witness's 0.9235 and 15.3% rates are the Schedule SE figures the PR's tests already use.
- Defect at
main. This round fixes no defect. I didn't rerun round 1's main-versus-PR comparison. - The Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121 merged tree. I didn't rerun the owners' draw reform YAML there. It takes about 10 GB, and the mutant runs were using that memory.
- Population impact. I can't reach the microdata.
Generated by Claude Code
PR Review: Let farm, partnership and S corporation plans set the self-employed health insurance limitSummaryThe PR replaces main's Schedule C-only earned income limit (#10109) with a module-level
A second new enum input, I read the law first, and the structure follows it:
The code applies these lines per business:
The unnamed-business default is a documented methodology choice for missing data, not a legal rule. It never lowers a deduction relative to main. It can overstate the deduction when a partnership or S corporation with the larger limit doesn't pay or reimburse the premiums, and the input documentation says to name the business in that case. There are no critical or should-address findings. The suggestions are housekeeping. CI is green at the head (37 pass, 1 skipped). The branch is 28 commits behind main. It merges cleanly, but #10265 and #10560 have landed since the PR's CI ran, so it should merge main before landing. CriticalNone. Should addressNone. Suggestions
Verified correct
Axiom line assessment
CI status
That run predates the merges of #10265 and #10560 into main. I checked the merged tree statically (see Branch status). CI hasn't run it. Branch status
Verdict: APPROVE |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #10265, the deduction is the smaller of Form 7206 line 3 (the medical premiums plus eligible long-term care premiums) and line 13. The property test still capped it at the medical premiums, and no test put long-term care premiums under a farm, partnership or S corporation plan. - ALD YAML Cases 13 to 16 add long-term care premiums under an S corporation, a farm, a partnership and the default business. Each checks the long-term care part and Schedule A as well as the deduction. - The property test draws long-term care premiums, checks the deduction against line 3 and adds property 6: the long-term care part and Schedule A. - The plan business, S corporation wage and long-term care premium inputs say that long-term care premiums a partnership or S corporation pays or reimburses go in long_term_health_insurance_premiums, on the insured person. - The reform case with S corporation profits but no box 5 wages now says so in its name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The S corporation wage input's documentation now says the model's payroll tax wages start from employment_income, so they include the long-term care premiums it routes there. Three test comments name the year of the $850 limit, the premiums property 6 counts, and both zero lines in the owners' draw case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan business input now says a partner also enters premium guaranteed payments in partnership_income, and in partnership_self_employment_net_earnings when the partnership reports them in K-1 box 14 code A, matching the S corporation input's employment_income sentence. Both inputs cite Notice 2008-1 for when a plan is established by the S corporation and for the box 1 vs box 5 treatment, and the plan business input cites the Form 1065 instructions' line 4c note that guaranteed payments are net earnings from self-employment. Documentation and references only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves the conflicts with #10120's shared form_7206_line_13 helper, which the owners' draw reform also calls. Line 8 now uses #10120's per-business share of line 15, and line 9 keeps this branch's split of line 16 across the retirement plan's businesses. #10120's new SEHI cases (13 to 16 in the deduction file, 17, 20 and 21 in the limit file) keep their numbers, and this branch's cases follow them (deduction Case 17; limit Cases 22 to 25). The property test takes #10120's version here; the next commit adds the retirement plan business and its line 9 reference back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
US + core hub merge audit, us#10120 at
🤖 Generated with Claude Code |
…anch Main's copies of the seven conflicting files match #10120's head (eddc35a) exactly, so this branch's later versions stand. Every other file takes main's side or a three-way merge on #10120's head, and source_conflicts/candidates.yaml merged cleanly on that base. Main's release compiled #10120's changelog fragment, so the merge removes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #10120, which shares four files with this branch: the owners' draw reform and its doc, the health insurance limit YAML and the reform's Python test. Git merged each file without conflicts, keeping both sides. On the merged tree all 13 test files the two PRs change under above_the_line_deductions, the owners' draw tests and both property tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N2tyHT12N9L3WVu8rJokf1
Part of #10528.
What and why
The law caps the self-employed health insurance deduction at the earned income of the business the health plan sits under. On
main,self_employed_health_insurance_earned_income_limit(#10109) treats the person's Schedule C business as that business in every case. So a farmer or partner whose plan sits under the farm or partnership gets no deduction however large their premiums, and a more-than-2% S corporation shareholder can't use their wages from the corporation.This PR lets the plan sit under any of the four businesses Form 7206 allows, and computes line 13 for that business alone:
total_self_employment_income, SSTB and non-SSTB together, as onmain), Schedule F (farm_operations_income) and a partnership (partnership_self_employment_net_earnings, K-1 box 14 code A). Line 4 is that business's net profit, floored at 0. Each business subtracts Schedule 1 line 15 × its share of line 5 (lines 5 to 8), with the same operationsmainuses for Schedule C. So a filer with only Schedule C income getsmain's limit bit for bit.s_corp_shareholder_medicare_wages, the W-2 box 5 wages from an S corporation in which the person is a more-than-2% shareholder. They are part ofemployment_income, not in addition to it.form_7206_line_13(person, period, other_line_5_profits=0). The owners' draw reform (Count the owners' draw in the SEHI limit's line 5 under the owners' draw reform #10571) overrode this variable with a copy ofmain's Schedule C-only formula. It now calls the same helper with its SECA-taxed draw profits as extra line 5 profits, so the plan business choice holds with the reform on.self_employed_health_insurance_plan_business(SCHEDULE_C,SCHEDULE_F,PARTNERSHIP,S_CORPORATION; defaultUNSPECIFIED) names the business. Without it, the limit is the largest of the four line 13 amounts.Example (2024): farm profit $20,000 and premiums $25,000.
maindeducts $0. Form 7206 for a plan under the farm gives 20,000 − 1,412.955 = $18,587.05, which leaves AGI at 0.Sources
The default when the business isn't named
The premium inputs don't say where the plan sits, so the default is a methodology choice: the business with the largest line 13. With no business named, the model takes the business with the largest line 13 amount. That gives the filer the largest deduction, because the deduction is the smaller of line 3 and that business's line 13.
main's Schedule C limit, so no deduction falls.Where it can be wrong, as the input's documentation says:
SCHEDULE_Fgives the form's $929.35.Not changed
is_self_employedgate onself_employed_health_insurance_premiums. A shareholder must setis_self_employedeven when the S corporation wages are their only earned income; both new inputs say so. Lifting the gate would edit the premium variable that Exclude employer-plan-eligible premiums from the self-employed health insurance deduction #10122 rewrites (see below).payroll_tax_gross_wagessubtractsfica_pre_tax_contributionsfromemployment_income, so the model taxes those premiums, which Notice 2008-1 leaves out of Social Security and Medicare wages. That list's one premium input,pre_tax_health_insurance_premiums, also comes out of income tax wages, so no input takes these premiums out of payroll tax wages alone. In ALD Case 11 (2025), payroll tax wages come to $22,000 instead of $10,000. Employee Social Security and Medicare tax come to $1,683 instead of $765, $918 too much, and the employer's share rises by the same $918. Case 11 sets no state, so it runs in California, whereemployee_payroll_taxalso includes $264 of state disability insurance, $1,947 in all. Both input documentation strings say so. A follow-up could add an input for these premiums togov.irs.gross_income.fica_pre_tax_contributions.Invariants
Tested with Hypothesis in
policyengine_us/tests/unit/test_self_employed_health_insurance_properties.py. Each drawn filer appears six times in one vectorized simulation over 2022, 2024 and 2026: with no named business, with higher medical premiums, and once naming each business.main.The strategies draw losses in each business, SSTB and non-SSTB Schedule C income, S corporation wages, wages above the Social Security wage base, the $400 threshold and large plan deductions. They also draw long-term care premiums up to $2,000, on both sides of the $850 to $930 limit for ages 41 to 50. Comparisons allow float32 rounding (relative 1e-6) on top of a cent.
Test plan
self_employed_health_insurance_earned_income_limit.yaml, 21 cases.main's Cases 1–10 stay in place. Case 8 now namesSCHEDULE_C, because the same inputs without a name give the partnership's $18,940.28 (new Case 11). New Cases 11–21 cover a farm only, a partnership only, a larger farm beside Schedule C and each of the four businesses named. They also cover a Schedule C plan deduction that leaves the partnership larger, and S corporation wages with and without a named Schedule C business.self_employed_health_insurance_ald.yaml, 16 cases:main's 8, then farm only and partnership only (both end at AGI 0), an S corporation shareholder whose box 1 wages include the reimbursed premiums (deduction $10,000, AGI $12,000), and a named farm. Cases 13 to 16 add long-term care premiums under an S corporation, a farm, a partnership and the default (which takes the farm). Each checks the long-term care part and Schedule A as well as the deduction.contrib/ssa/owners_draw_self_employed_health_insurance_earned_income_limit.yaml, 14 cases: Count the owners' draw in the SEHI limit's line 5 under the owners' draw reform #10571's 11, then a named farm beside a draw ($56,147.89), the same filer with no named business (the farm's $56,147.89, not Schedule C's $9,357.98), and a named Schedule C ($9,357.98). The zero-limit case now reads "S corporation profits without box 5 wages leave the limit at zero", since a farm, a partnership or box 5 wages would each give a limit.tests/reforms/test_owners_draw.pynamesSCHEDULE_Cin its pure harness, whose oracle takes the Schedule C business as the plan business.main(4e71481e19, this PR's test files): the limit file has 12 failures and 9 passes, the ALD file 4 failures and 8 passes. The passes aremain's own cases. Value failures include 0 vs 18,940.28, 18,587.05 and 27,880.57; 4,646.76 vs 37,174.09; and 3,587.05 vs 9,293.52. The rest stop at the new inputs.ruff formatandruff checkon the changed Python files.changelog.d/sehi-plan-business-base.fixed.md.Results
Runs at
eddc35a698(macOS, one file per process): limit YAML 21 passed, ALD YAML 16 passed,test_reference_urls.py32 passed andtest_no_concatenated_reference_urls.py48 passed;ruff checkandruff format --checkpass on both changed files. The commit changes only documentation strings and reference lists: with string constants blanked and thereferenceassignments dropped, each file's syntax tree matches031c6bcfda's.Runs at
031c6bcfda(macOS, one file per process): ALD YAML 16 passed, the property test 2 passed andtest_source_conflicts.py103 passed;ruff checkandruff format --checkpass. The commit changes only comments and documentation strings: with string constants blanked, each Python file's syntax tree matches69a8b3b48b's, and the YAML file loads to the same data.Runs at
69a8b3b48b(macOS, one file per process): ALD YAML 16 passed and the property test 2 passed;ruff format --checkandruff checkpass on the changed Python files. The owners' draw reform YAML, where only a case name changed, exceeded the session's 6 GB memory cap per process locally, so CI runs it. The commit changes only tests and documentation, so the model code is577118d432's.Line 2 mutant. With line 2 dropped from
self_employed_health_insurance_ald_person.py, Cases 13 to 16 fail (the four cases with long-term care premiums), Cases 1 to 12 pass, and the property test fails at property 1.On
main(a8dc8d9067, the merge'smainparent), with this head's ALD YAML: 8 cases fail and 8 pass. For Cases 13 to 16,maingives deductions of $0, $0, $0 and $1,858.70, and Schedule A keeps $7,860, $20,880, $12,810 and $19,071.29. Case 13 drops the box 5 input, whichmainlacks.Runs at
735cb03ef8, which changes only the plan business input's documentation: limit YAML 21 passed, ALD YAML 12 passed and owners' draw reform YAML 14 passed (one file per process).ruff format --checkandruff checkpass on the changed file. The property test andtest_owners_draw.pyweren't rerun.Runs at
da6240b489(Linux, Python 3.14, one file per process): limit YAML 21 passed, ALD YAML 12 passed, property test 2 passed, owners' draw reform YAML 14 passed,test_owners_draw.py38 passed.Related files at
da6240b489: 23 files and 444 items, all passed. They covered every file that mixes self-employed premiums with farm, partnership or S corporation inputs. They also covered the ALD determinism and dependent invariants, the filing requirement and the Michigan household resources tests thatmainhad changed since the previous merge. Earlier, at the merge commitf6d142c533, 23 files passed (381 items). They cover every file that mixes self-employed premiums with farm, partnership or S corporation inputs, plus the files Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109 moved. Those are QBI, EITC and standard-deduction earned income, the AK, AZ, CA, ME, MI, MT, ND, NH, OH, UT and WI programs, Schedule A and the premium conservation test. The seven that compute this deduction passed again at this head (116 items). With Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121's head merged in, the health insurance and plan files pass together (71 items).Mutants, each run in its own process with the code restored afterwards:
All six fail the limit YAML and the property test, and five fail the ALD YAML. A seventh, the reform calling the helper without the draw term, fails 9 of the 14 reform cases.
Float32. For 400 Schedule C-only filers, this head's limit equals
main's bit for bit. The PR's earlier(1 − rate)form differed on 92 of them by up to $0.03.Cost of the property test. It runs in the Rest job's "remaining" pytest group. In CI run 41834014443 at
735cb03ef8(Rest, Python shard 5),test_deduction_follows_form_7206took 1.68 s andtest_reviewer_example_and_boundaries0.13 s. Measured on this session's Linux VM, not CI, two runs each:main's version 40.5–44.0 s and 947 MB peak resident memory; this version 39.9–40.7 s and 950 MB.CI: at
eddc35a698, run 42415841679 passed all 35 jobs.Issue #10528
All 2026 with $10,000 of premiums, as in the issue:
maingives $0 and $27,880.57.maingives $1,858.70 since Limit the self-employed health insurance deduction to net profit less half of SE tax and plan deductions #10109.SCHEDULE_F, which gives $929.35. The default takes the larger Schedule C business and gives $10,000.main), all Schedule F profit and all K-1 box 14 code A earnings. So it can't limit a plan to an SSTB business apart from a non-SSTB one, or to one of two farms or partnerships. Case 3 also needsSCHEDULE_Fnamed; by default it givesmain's $10,000.Overlap with other PRs
b184b86cda): no shared files; the two PRs' file lists are disjoint, andgit merge-tree --write-treeof this head andb184b86cdaexits 0, a textual check only. At Exclude employer-plan-eligible premiums from the self-employed health insurance deduction #10122's earlier headbc6f8b6958, each merged withmain(25c4253483) and the two merged with each other without conflict. One semantic point for whoever lands second. The shareholder takes the deduction under their own plan through the corporation, so that plan shouldn't count as "other coverage" under 162(l)(2)(B) if a user flags it withhas_esi.916a414df6):git merge-tree --write-treeof this head and916a414df6exits 0, a textual check only. Both editpolicyengine_us/reforms/ssa/owners_draw.py(its import block and the reform'supdate_variablelist) and the same paragraph ofdocs/contributed_reforms/owners_draw.md. With Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121 atffcd227b72, the merged tree passed the limit (21), ALD (12), plan ALD (3) and owners' draw self-employed health insurance (14) YAML files, one file per process on Linux. Limit self-employed plan contributions to the Pub. 560 maximum deduction #10121 keeps the retirement plan under Schedule C, which matches this PR's line 9.s_corp_shareholder_medicare_wages.pyandself_employed_health_insurance_plan_business.pytell users to put premiums a partnership or S corporation pays or reimburses intohealth_insurance_premiums, and long-term care premiums intolong_term_health_insurance_premiums, on the insured person. This PR adds the matching sentence tolong_term_health_insurance_premiums.py, which says it excludes employer-paid premiums and which Exclude employer-plan-eligible premiums from the self-employed health insurance deduction #10122 doesn't touch.main'sself_employed_health_insurance_premiums.pysays the same of medical premiums, but Exclude employer-plan-eligible premiums from the self-employed health insurance deduction #10122 rewrites that file, so this PR leaves it alone. Whichever of the two lands second adds one sentence there: premiums an S corporation pays or reimburses for a more-than-2% shareholder, reported in box 1, count as the shareholder's own.c1401819d6, stacked on this PR's47bba5e893): conflicts in four files. In the limit variable: the documentation and the whole formula, which this head moves into the module-levelform_7206_line_13; Let farm and partnership plans take the self-employed plan deduction #10131 must keep itsother_line_5_profitsargument for the owners' draw reform. In the limit YAML: Case 17's name (Let farm and partnership plans take the self-employed plan deduction #10131's "Case 15") and the end of the file, where Let farm and partnership plans take the self-employed plan deduction #10131's planned Cases 20–23 must become 22–25. In the ALD YAML, Let farm and partnership plans take the self-employed plan deduction #10131's farmer case (its Case 11) now meets this PR's Cases 11 to 16 and becomes Case 17. And the property test, where this PR's long-term care changes add to the ten regions that conflicted before.39de3f2f78, so this PR carries both changes. The deduction equals the smaller of line 3 and this PR's line 13, and line 3 adds eligible long-term care premiums (line 2) to the medical premiums (line 1). So a farmer, partner or S corporation shareholder can now deduct long-term care premiums too. Schedule A leaves out the premiums the head's and spouse's deductions took, medical premiums first, so none of their premiums counts twice. Example (2026, age 55): S corporation box 5 wages of $7,000, $6,000 of medical premiums and $2,500 of long-term care premiums, $1,860 of them eligible. The deduction comes to $7,000 and Schedule A keeps $860;maingives $0 and $7,860. ALD Cases 13 to 16 and invariant 6 test the two together.be457a1e67, so this PR carries both changes. It moved the owners' draw arithmetic intopolicyengine_us/tools/social_security/owners_draw.py. Git mergedowners_draw.pyandowners_draw.mdwithout hand resolution, and this PR's override of the limit came through unchanged.main's design, not this PR's). A dependent who takes their own deduction still leaves their medical premiums on the filers' Schedule A, so those premiums count twice; Count eligible long-term care premiums in Schedule A medical expenses #10265 already takes a dependent's long-term care part out. This PR widens who reaches that, since dependents with farm, partnership or S corporation income now get a deduction. Run at69a8b3b48b(2025): a dependent with $10,000 of K-1 box 14 code A earnings, $3,000 of medical premiums and $1,000 of long-term care premiums deducts $3,480, and the filers' Schedule A keeps $3,000.maingives $0 and $3,480. Whether to take the medical premiums out too is a separate methodology decision.DTrim99's suggestions
DTrim99 approved on 2026-11-05 with five optional suggestions:
main. Done: "Not changed" no longer lists line 2, the Count eligible long-term care premiums in Schedule A medical expenses #10265 and Add annual Social Security earnings histories and per-year reforms #10560 bullets say they landed, and the Let farm and partnership plans take the self-employed plan deduction #10131 bullet names the four files that conflict at this head.git merge-treeofeddc35a698and Let farm and partnership plans take the self-employed plan deduction #10131'sc1401819d6lists no conflict in the lockfiles or the changelog. "Cost of the property test" now gives the CI timings.eddc35a698adds it toself_employed_health_insurance_plan_business: a partner also enters those guaranteed payments inpartnership_income, and inpartnership_self_employment_net_earningswhen the partnership reports them in K-1 box 14 code A.eddc35a698cites it in both new inputs, page 2 for the box 1 and box 5 treatment and page 3 for when a plan counts as established by the S corporation. The plan business input also cites the Form 1065 instructions' page 43.Microsimulation impact
We compared
mainat the merge basea8dc8d9067with577118d432on the default dataset for 2026.577118d432merges thatmaininto this branch's735cb03ef8, and the head's three later commits change only documentation strings, references and tests. The branch raises the self-employed health insurance deduction by $39.05m. Federal income tax falls by $9.35m and state income tax by $282,139, so household net income rises by $9.63m. Benefits don't change.main's Schedule C limit, so the limit rises for 1,682 people (5,142,250 weighted) and falls for no one.main's limit, or they have none.s_corp_shareholder_medicare_wagesas a new input, so the dataset holds none, and no shareholder's limit changes.mainatabc67b98de, before Count eligible long-term care premiums in Schedule A medical expenses #10265 and Glide CMS health spending upraters to the Trustees' long-range growth rates #10119 merged. So no 2026 record combines a changed limit with the long-term care premiums that Count eligible long-term care premiums in Schedule A medical expenses #10265 adds to line 3.maintotal, 2026self_employed_health_insurance_earned_income_limit(people)self_employed_health_insurance_aldadjusted_gross_incomeincome_taxstate_income_taxhousehold_net_income(households)household_benefitsimpact: on the default dataset in 2026, the self-employed health insurance deduction rises by $39.05m, federal income tax falls by $9.35m and state income tax by $282,139. Benefits don't change.
axiom: TheAxiomFoundation/rulespec-us#1676 queued, extended with a comment (plan-business limits and companion tests; it waits on IRS source ingestion, corpus release admission and re-pin, and signed encoder approval).
🤖 Generated with Claude Code