Repository navigation
Count farm rent and leave out passive income that is also earned in the EITC investment income test (26 U.S.C. 32(i)(2)(E)) - #9889
Merged
Conversation
…come Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…line Start from net_capital_gains, take out dependents' gains and losses, and add the filers' floored capital gain distributions, so a tax unit amount supplied for net_capital_gains still counts, as it did before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… supplied net_capital_gains is stored in float32, so subtracting a dependent's very large gain from it could move the filers' capital gain line by a few dollars and flip eligibility at the limit (independent review finding, reproduced in the model: a child's 20,000,000 gain turned 11,951 into 11,950). Use the head's and spouse's person-level gains, and read net_capital_gains only where it differs from the members' own gains, that is, where a tax unit amount was supplied. Also widen the property test to dependents' gains of 16 to 64 million, add the two boundary cases, correct the Form 8814 explanation (an election also reaches Worksheet 1 lines 3 and 5) and mention the distributions floor in the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
eitc-passive-earned-overlap-farm-rent
branch
from
October 6, 2026 14:03
916bb02 to
9bc8fc0
Compare
Comparing values alone read an abolished or stale net_capital_gains as a supplied aggregate and subtracted dependents' gains from it (Opus delta review S1; with gov.abolitions.net_capital_gains a child's 5,000 gain made the parent eligible). Check core's input record (is_input, next to the existing _input_keys in tools/period_branch.py) as well. Add a test for that branch and a guard that the formula's gain list matches net_capital_gains.adds; fix a stale test comment and a long YAML header line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
eitc-passive-earned-overlap-farm-rent
branch
from
October 6, 2026 14:39
9bc8fc0 to
1d98c79
Compare
…ow invariant 4 A supplied net_capital_gains that equals the members' own gains and losses in float32 adds nothing to them, so the filers' gains are summed exactly; two YAML cases pin both rounding directions as intended (Sol delta review). Invariant 4 holds for filer gains in the drawn range; past about 16.8 million the previous formula's float32 total could be off by a few dollars, which the direct sum corrects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
eitc-passive-earned-overlap-farm-rent
branch
from
October 6, 2026 14:46
1d98c79 to
ea6c681
Compare
…ital_gains Return to the capital gain line the task specified: the head's and spouse's long- and short-term gains (tax_unit_non_dep_add) plus their floored capital gain distributions. Reading a supplied tax unit net_capital_gains needs to know which tax units supplied it, which core does not record, and every value test for it let a dependent's gain move the filers' result somewhere (four review rounds: float32 collisions, abolished, stale and default-filled values). A supplied tax unit total is now not read, as in irs_gross_income and the NIIT base; no PolicyEngine repo or the microdata supplies it. Drop the is_input helper, the cases that pinned the aggregate reading and the input-record test; pin instead that a supplied total is not read. Add two downstream pins from a 504-household sweep (session bbf31ca6): a dependent's income no longer removes MN child and working family credits or the NM EITC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
eitc-passive-earned-overlap-farm-rent
branch
from
October 6, 2026 16:35
ea6c681 to
419aa90
Compare
This was referenced Oct 6, 2026
…ad; clarify the capital gain comment Docs only, from the bafe4fe reviews: the changelog now says the test reads the head's and spouse's long- and short-term gains and no longer a supplied tax unit net_capital_gains; the variable documentation also says a capital_gains amount set directly on a person is not read; the code comment gives the actual reason the tax unit total is not read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he EITC investment income test (#9635 items 2 and 3) Add the signed Person input eitc_passive_income_also_in_earned_income and subtract it from the passive basket before the zero floor, as 26 U.S.C. 32(i)(2)(E) requires. Include farm_rent_income, income and losses, in the passive basket (Pub. 596 Worksheet 1 lines 11-12, Schedule E line 40). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se and dependent overlap From the #9889 reviews: the overlap input documentation now says it is a partnership share that must also be in partnership_self_employment_net_earnings, that S corporation shares have none, that it can exceed or oppose the net passive and partnership SE amounts, and that a dependent's is not read. The investment income documentation now describes the passive basket and the real estate professional limitation. Two YAML cases cover a spouse's and a dependent's overlap, and the seeded property test asserts that farm rent and the overlap decide eligibility for some units. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
eitc-passive-earned-overlap-farm-rent
branch
from
October 6, 2026 20:43
419aa90 to
d3f9e9d
Compare
…use case's credit; tidy wording From the d3f9e9d review: the seeded test now asserts each new term decides eligibility for some units on its own, the spouse overlap case pins its EITC (7,152, under the joint phase-out start), the changelog no longer mentions S corporations, and one sentence of the input documentation is reworded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 10, 2026
Contributor
Author
|
Context from the original session (19896880) for the hub, which now owns this PR. I won't push to the branch.
🤖 Generated with Claude Code |
Contributor
Author
|
US + core hub merge audit, us#9889 at
|
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.
Summary
This fixes items 2 and 3 of #9635 in
eitc_relevant_investment_income. Item 1, excluding dependents' amounts, landed in #9883.farm_rent_income, including losses, to the passive-income basket.eitc_passive_income_also_in_earned_income, defaulting to zero. Subtract it from the head's and spouse's combined passive amounts before applying one zero floor.The passive basket becomes:
The portfolio and capital baskets retain main's filer-only calculation. Partnership self-employment earnings alone do not alter the passive basket. The overlap input classifies income already supplied elsewhere; it does not add income.
Law and input contract
26 U.S.C. 32(i)(2)(E) excludes amounts included in earned income from both passive income and passive losses. 2025 Publication 596, Worksheet 1, lines 11–13, applies that exclusion before flooring the combined passive basket. Lines 11 and 12 include Schedule E line 40, net farm rental income or loss from Form 4835.
26 U.S.C. 1402(a) includes a partner's distributive share of trade or business income in net earnings from self-employment. That inclusion is subject to the rental, investment-income, and gain exclusions in (a)(1)–(3); (a)(13) excludes a limited partner's distributive share except guaranteed payments for services actually rendered. A general partner who does not materially participate in a partnership's trade or business can therefore have a share that is both passive and earned.
The overlap amount must also be included in
partnership_self_employment_net_earnings; the model does not validate that consistency. S corporation shares have no such overlap. Enter profits positively and losses negatively. Because these inputs aggregate several activities, the overlap can exceed either net aggregate or have the opposite sign. It is subtracted directly without a clamp. A dependent's overlap is ignored.Modeling limits
Rental income retains the existing passive-basket convention. Nonbusiness rents can require a separate basket under §32(i)(2)(C); rental classification and routing remain deferred to rulespec-us#1416.
Form 4835 instructions recognize a real estate professional's nonpassive farm rental. The model lacks an input for that distinction and treats
farm_rent_incomeas passive, as it already doesrental_income. The public variable documentation discloses this limitation.Household examples
Fresh 2025 calculations at the merged head
78a2ed87b99c441a8eccb9b8b61af914cfdbfeaacover all 15 added YAML situations. These are household examples, not a population impact estimate.Tests and invariants
Serial single-file validation passed at the merged head:
make format: passed Ruff formatting and checks.Local macOS / Python 3.13.9 measurements for the same invariant file, including process setup: main snapshot 2839.29s wall time and 0.80 GiB peak RSS (854,966,272 bytes); merged head 217.87s wall time and 0.89 GiB peak RSS (956,268,544 bytes). These local measurements were collected on a busy shared host. Variable host load limits comparisons of incremental runtime; Linux CI measurements are reported separately below.
The test stays in the existing sequential core Rest CI group. Existing main CI evidence at
fdd70629054arecords 849 core tests, 16:01.65 process elapsed time and 12.66 GiB peak RSS; the three invariant case times sum to 8.480s, excluding shared setup. Historical PR CI atfa23f6fc807ealso passed. Its smaller 667-test cohort prevents a controlled group-cost comparison and does not validate the new merge. No new Python test file, CI group, or runner is added.The 15 added YAML cases cover signed overlap, unrelated earnings and S corporation guards, farm rent and losses, the 2025 $11,950 boundary, a spouse's overlap, and a dependent's overlap. The property test extends the existing file and checks, within its finite drawn ranges and numerical precision:
The seeded population has 200 units and runs for 2021 and 2025. It separately asserts that farm rent alone and overlap alone each change eligibility for more than two units in each year. Partner expectations are unchanged.
Hub validation remaining
The hub will run matched 2025 and 2026 microsimulations at the final head against current main, then obtain a delta review and handle ready status, CI, and landing. Impact reporting will include
income_taxandstate_income_taxalongside investment income, eligibility, EITC, and household net income. It will also cover CO, DC, and IL credits that read investment income throughcalculate_eitc_like_amount, withstate_income_taxproviding an aggregate check of their effect. This PR remains a draft.Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
8b059f892dagainst this PR's head78a2ed87b9, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.eitc_relevant_investment_incomeeitceitc_eligibleincome_taxstate_income_taxco_eitcdc_eitcil_eitchousehold_net_incomehousehold_benefitsComparison files are in
fixes/9889-impact/on the hub host.Axiom
axiom: TheAxiomFoundation/rulespec-us#1416 queued
The existing overlap addendum and six hand-computed companion cases cover the earned-income exclusion. Farm rent shares the deferred rental-routing question. The signed-encoder dispatch, d439, is parked; parity follow-up remains with the hub.