Repository navigation
Conversation
… insurance deduction 26 U.S.C. 162(l)(2)(B) disallows the deduction for any month the taxpayer is eligible for a subsidized plan of their own or their spouse's employer (Form 7206 line 1). The premium base now leaves out the premiums of a person who has or is offered employer coverage, whose employer pays part of the premiums, or whose spouse on a joint return does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oyer-plan bar Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…issue (#10124) 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.
Problem
self_employed_health_insurance_premiumswasadds = ["health_insurance_premiums"]for any self-employed person. Its documentation said the premiums were for people "not covered by any employer-sponsored health insurance", but nothing enforced that.The law bars the deduction for months with access to an employer plan:
us/statute/26/162/l/2/B.Example (2025). A joint couple:
Change
New
self_employed_health_insurance_employer_plan_eligible(Person, bool) is true when either of these holds:has_esi), is offered it (offered_aca_disqualifying_esi), or has an employer that pays some or all of their premiums (employer_contribution_to_health_insurance_premiums_categorySOME or ALL). Enrollment or an offer shows the person can take part in the plan, and an employer that pays premiums subsidizes it.oh_employer_subsidized_health_plan_eligibleuses the same three inputs for Ohio's version of this rule.A tax unit dependent is barred only by their own coverage. A parent's employer is not among the employers the statute lists for the dependent's own deduction.
self_employed_health_insurance_premiumsis now a formula: the premiums, or 0 when the person is eligible.Not modeled (documented in the variables):
filing_status, which closes a cycle:filing_status→surviving_spouse_eligible→ dependents →dependent_gross_income→dependent_taxable_ss_magi→ this deduction.Premium tax credit (Pub. 974): filed as #10124
PE deducts the full premiums and also pays a PTC on the modeled Marketplace plan. 26 U.S.C. 280C(g) allows no deduction for the part the credit pays, and Rev. Proc. 2014-41 / Pub. 974 resolve the circularity with the iterative or the simplified ("alternative") calculation. I assessed both:
aca_ptcout of the base raisesCycleError: deduction → premiums →aca_ptc→is_aca_ptc_eligible→aca_magi→medicaid_magi→ AGI → … → deduction.get_override_branch, astax_liability_if_itemizingdoes). It needs two things the model doesn't have yet:health_insurance_premiumsin Microcosm data is the reported out-of-pocket premium, already net of the advance credit. Netting PE's credit from it would subtract the credit twice: 515 of the 1,379 self-employed premium records report Marketplace coverage.#10124 has the evidence, the design and acceptance tests from Pub. 974 (2025) pp. 60–63 (deduction $6,138, AGI $103,337, Form 8962 line 26 $1,794). The premium variable's documentation points to it.
Invariants
Tested with Hypothesis in
tests/unit/test_self_employed_health_insurance_employer_plan_properties.py. Each batch places every drawn tax unit twice, as drawn and with every coverage flag cleared, in one vectorized simulation over 2024–2026.A deterministic grid runs all 16 × 16 × 2 combinations of the head's, spouse's and a dependent's flags.
Checked against mutants: main's premium variable (4 tests fail), dropping the spouse route (4 fail), and counting dependents as spouses (3 fail). Each was reverted afterwards.
Tests
New YAML
self_employed_health_insurance_employer_plan.yaml, 9 cases:Profit of $50,000 keeps the earned income limit above the premiums, so the expectations hold with or without #10109.
Fails on main. With the sources reverted in place and the new variable's lines removed:
Local runs.
self_employed_health_insurance_employer_plan.yaml: 9 passed.targeted-53fe0ac784.login the lane folder). Later commits change only documentation and tests.Impact
IMPACT_PENDING
Consumers checked
The only reader of
self_employed_health_insurance_premiumsisself_employed_health_insurance_ald_person. Everything else reads the deduction:dependent_taxable_ss_magi,dependents_self_employed_health_insurance_ald;States that net the deduction from premiums keep the premiums it no longer covers. That matches Form 7206's instructions: "any medical insurance payments not deductible on Schedule 1 (Form 1040), line 17, can be included as medical expenses on Schedule A (Form 1040)".
Data. In the default dataset (
populace_us_2024, buildpopulace-us-2024-spm-20260909), Microcosm already giveshealth_insurance_premiumsonly to self-employed people without their own ESI. Its attribution stage calls that "the conservative, incomplete proxy" for this bar and documents the spouse case as residual overbreadth. In the 2024 data that case is 75 records, 228,000 weighted people and $0.87 billion of premiums. This PR closes it.Open PRs.
self_employed_health_insurance_premiums. Whichever lands second keeps this PR's formula and documentation and adds Document disjoint health premium inputs and correct consumer treatment #10046's pretax-payroll sentence.axiom: us/statute/26/162/l queued (TheAxiomFoundation/rulespec-us#1676; (l)(2)(B) addendum with monthly companion tests: TheAxiomFoundation/rulespec-us#1676 (comment))
🤖 Generated with Claude Code