Skip to content

Net household members' Medicaid MAGI before the zero floor, and give each spouse their own deductions - #9860

Merged
MaxGhenis merged 34 commits into
mainfrom
medicaid-magi-joint-floor
Oct 14, 2026
Merged

MaxGhenis merged 34 commits into
mainfrom
medicaid-magi-joint-floor

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Medicaid household income now sums members' signed MAGI before applying one zero floor to the household total. Each person's Medicaid AGI reads the reviewed above_the_line_deductions_person allocator now on main. With one spouse earning $30,000 and the other losing $20,000, main's per-person floor counts $20,000; this PR counts $10,000 = max(0, $30,000 - $20,000).

The PR also preserves its separate-spouse income membership correction, the conservative positive-income fallback for family-wide relatives without parent links, and the Medicaid dependent filing-requirement correction: a business loss no longer turns other income into unearned income, and 401(k) deferrals do not hide unearned income.

Reconciliation after #9890 landed

Merged main 654a0c9b54a57e6422f4d0418d0d039a3bb3537c into approved head 6c5f5cddd8ad7cb43c21cd84ff281d382e9ecee7 with history-preserving merge commit 77e92b20487a36815a09407193fbec50542b96eb. #9890 landed as 7e9ce42c1856d4b759e55f6f4fca3ba007b9bf2d.

Both branches carried the same concept: own-spouse ALDs, filer/dependent attribution, business/capital loss allocation, HSA ownership reconciliation and equal fallback, filer_share, per-person federal AGI, D.C. capital/business loss adjustments, Montana ALD allocation, MI/PA withholding floors and Virginia additions allocation. Those implementation changes and their tests now belong to main; every model overlap keeps main's version. The duplicate ALD changelog fragment was removed because its provision was already released. loss_ald keeps main's declarative sum, which has the same components and order as the old PR formula.

The remaining delta is one Medicaid changelog, five Medicaid variables, four Medicaid YAML files and the Medicaid household invariant file. The ALD determinism fixture repair is no longer in the delta: #10221 fixed the same fixture on main, and a second merge of main at 121d534b6b takes main's version (none of the probed formulas read unemployment_compensation directly; test_ald_determinism.py 9 passed, the spouse-ALD invariants 7 and the Medicaid household invariants 5 on that tree). No IRS or state formula/test change remains in the PR delta. No additional non-Medicaid fix from #9860 was needed.

Behavioral differences explicitly retained from main

These are static formula comparisons of the old PR with fetched main, not new microsimulation results. Dollar amounts below use only the stated incomes/deductions. The SE examples explicitly supply zero self_employment_tax_ald and zero person equivalents so the differing loss formula is isolated.

Concrete household/input Old #9860 Main retained by this merge
2025 single age 45, ordinary SE +$10,000, SSTB SE -$5,000 Nets categories first: loss $0, gross $10,000, AGI $10,000. Reversing signs to -$10,000/+$5,000 gives loss $5,000, AGI $0. Deducts each category's loss: $5,000 loss, AGI $5,000. Reversed signs give $10,000 loss and AGI -$5,000. IRC 461(l).
Same +$10,000/-$5,000 on joint head, spouse no income Loss shares [0, 0], federal person AGIs [$10,000, $0]. Allowed loss $5,000, but ownership weights still use net SE; equal fallback gives loss shares [$2,500, $2,500] and AGIs [$7,500, -$2,500]. Joint AGI $5,000 is correct. Open question for separate review: should known category-owned losses retain their owner in the federal allocator? This reconcile leaves main's allocation.
2025 Kentucky joint head ordinary SE -$5,000/SSTB +$5,000, spouse wages $40,000 Loss $0; Kentucky AGIs [$5,000, $40,000]. Federal AGIs [$2,500, $37,500]; Kentucky reverses equal federal allocation, then deducts head's $5,000: [$2,500+$2,500-$5,000, $37,500+$2,500] = [$0, $40,000]. This integration landed in #9890. Form 740 instructions p. 13.
2025 joint ages 45, wages [$1,000, $6,000], directly supplied actual IRAs [$6,000, $6,000] Deductions [$6,000, $6,000], AGIs [-$5,000, $0]. Single wages $20,000/actual IRA $8,000 gives AGI $12,000. Lower-earner compensation is $1,000+max($6,000-$6,000,0)=$1,000: deductions [$1,000, $6,000], AGIs [$0, $0]. Removing spouse IRA frees compensation, so head deducts $6,000. Single IRA is capped at $7,000, giving AGI $13,000. These deduction limits were already on main. IRC 219.
2025 joint ages 45, directly supplied IRS wages [$130,000, $6,000], head IRA $7,000 and traditional 401(k) $1,000 Entire IRA deducted; AGIs [$123,000, $6,000], joint $129,000. MAGI $136,000; covered-spouse phaseout $126,000-$146,000 reduces deduction by $7,000 x $10,000/$20,000=$3,500. AGIs [$126,500, $6,000], joint $132,500. Existing main behavior. Pub. 590-A Table 1-2.
2024 Montana single age 70, wages $100,000, medical $10,000, Medicare enrollment false Zero individual Montana AGI floor gives medical deduction $10,000. Federal medical deduction $10,000 - 7.5% x $100,000 = $2,500; Montana's $5,500 age subtraction does not reduce the federal floor. Existing main fix; pre-2024 joint medical and joint standard formulas agree. Form 2 instructions p. 15.
2023 Montana separate spouse, supplied medical_expense_health_insurance_premiums $6,000, own self_employed_health_insurance_ald_person $1,000, other medical $500, mt_agi_indiv $40,000 Medical deduction $6,000+$500-$3,000=$3,500. Removes previously deducted premiums: $6,000-$1,000+$500-$3,000=$2,500. Existing main fix. Form 2 instructions p. 36.
2025 West Virginia age 66, wages $4,000, taxable state refund $2,000 Senior deduction $6,000; total subtractions $8,000; WV AGI -$2,000. Removes same-person refund before senior cap: senior deduction $4,000, subtractions $6,000, WV AGI $0. Main similarly excludes own military income and 529 contributions; at supplied AGI $6,000, military income $2,000 gives old/main senior $6,000/$4,000, and 529 $1,000 gives $6,000/$5,000. Existing main fix. IT-140 Schedule M p. 6.

Test retention and changes

No distinct test case was dropped and no YAML expected output changed. A normalized audit of all 22 original YAML files found 129 matching cases with identical inputs, outputs, periods and tolerances. Every ALD/state case from the old PR remains on main, including all old Montana medical (3), Montana standard (8), and WV (5) cases. Main's additional HSA ratio, IRA compensation, medical and WV cases remain. The HSA fallback case has main's renamed title with identical inputs/results. The merge briefly duplicated Ohio's identically named spouse-IRA case; the redundant copy was removed, leaving main's existing case intact.

The first determinism run passed 8 cases but its hash-seed child failed because main's student-loan MAGI formula reads total_unemployment_compensation, while the slim fixture captured only unemployment_compensation. The fixture now captures the total as well. It still compares the same five production formulas and float32 holders with its full-country oracle across all six hash seeds; all nine tests and expectations are retained. The repaired file passed all 9 cases, including all six hash seeds (local wall 110.52 s, pytest 74.58 s, peak reported process RSS 1,047,199,744 bytes; the failed pre-repair run was 62.45 s, pytest 6.01 s, peak 1,056,260,096 bytes). This is a test-harness repair, with no policy formula or full-model construction added. After #10221 landed the same repair on main, the second merge of main (121d534b6b) took main's version of the file, so it no longer appears in this PR's diff.

The Medicaid invariant now excludes traditional_ira_deduction alongside student-loan deductions from the head's independence comparison, because IRA deductions respond to shared compensation and joint MAGI. For example, in the $1,000/$6,000 wage household above, removing the spouse's $6,000 IRA legitimately raises the head's deductible IRA from $1,000 to $6,000. All generated households still receive the accounting, signed-netting, floor, swap and fixed $7,500 SE-reduction checks; no simulation construction or test case was added.

Fresh verification runs each file separately in the foreground, sequentially, with all five thread caps set to 4 and OMP_WAIT_POLICY=PASSIVE, using supplied Python 3.13.9 / Core 3.33.2 / pytest 9.1.1 / Hypothesis 6.168.5. No partner contract tests were edited. No microsimulation or full suite was run.

89 passed across 10 files. make format (ruff format and check) passed with no formatting changes.

File Passed
medicaid_adjusted_gross_income_person.yaml 10
test_medicaid_household_income_invariants.py 5
medicaid_household_income.yaml 13
medicaid_magi_person.yaml 2
medicaid_person_is_required_to_file.yaml 8
test_spouse_above_the_line_deductions_invariants.py 7
test_ald_determinism.py 9
mt_medical_expense_deduction_joint.yaml 8
mt_standard_deduction_joint.yaml 9
wv_senior_citizen_disability_deduction_person.yaml 18

The new Medicaid Python file tests vectorized accounting, metamorphic relations and independent linked membership across simulation API calls; policy examples remain in variable-named YAML. It runs in the existing Rest Python shard 2/core group. The reconcile adds no test cases or simulation constructions to that file. Local macOS measurement including startup: 102.25 s wall, 36.79 s pytest, with 13.66 s total test calls. Before-reconcile timing was not measured in this checkout. Its initial BSD resource wrapper could not obtain peak memory because the sandbox denied sysctl; test execution itself passed. Other file measurements use per-process getrusage in untracked evidence. These local results do not establish Linux CI group memory usage. The repository's historical pre-isolation core group report was 13.3 GB / 11:51; current group fit remains for CI, with no added runners or parallel heavy processes.

Law and approved methodology

42 CFR 435.603(d), (e), (f) defines the included members and summation of MAGI-based income; IRC 36B(d)(2) supplies the MAGI methodology. 2025 Form 8962 instructions, line 3, p. 8 combines signed taxpayer and dependent MAGIs before flooring only the total.

Methodology ruling (Max, d1120, 2026-10-09): approved as built. A non-filer Medicaid household sums its members' signed MAGI and floors only the household total at zero (42 CFR 435.603(d)(1); Form 8962 line 3). Unlinked relatives' income counts only when positive.

axiom: TheAxiomFoundation/rulespec-us#1507 queued (42 CFR 435.603(d)(1): us/policies/medicaid/magi_household_income_pipeline.yaml already sums members' MAGI with no per-member floor; the queued companion tests pin a spouse's negative MAGI offsetting the household)

Hub microsimulation impact (current head)

A real microsimulation on the default dataset, main at the merge base 800e5bf53c against this PR's head 987402badf, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.

Output 2025 change 2026 change 2025 records changed (weighted) 2026 records changed (weighted)
medicaid +570 +1,730 1,768 (2,569,887) 5,272 (18,083,468)
is_medicaid_eligible +60,642 +194,970 68 (60,642) 73 (194,970)
is_chip_eligible -19,311 -19,449 14 (19,311) 11 (19,449)
aca_ptc -48.81M -342.79M 8 (9,656) 10 (23,336)
household_health_benefits +0 +0 0 (0) 0 (0)
household_net_income_including_health_benefits -43.87M +18.81M 1,015 (1,725,096) 2,574 (8,900,110)
state_income_tax +0 +0 0 (0) 0 (0)
income_tax +0 +0 0 (0) 0 (0)
household_net_income +31,594 +5.81M 7 (44) 8 (5,668)
household_benefits +31,594 +5.81M 7 (44) 8 (5,668)

Federal and state income tax don't change: the per-spouse deductions are main's since #9890, so this PR's remaining effect is Medicaid's signed netting of members' MAGI. Medicaid eligibility rises by 60.6k people in 2025 (68 records) and 195.0k in 2026 (73 records); no one loses it. is_chip_eligible changes for 14 and 11 records, a net fall of 19.3k and 19.4k. Total medicaid moves by only $570 and $1,730 out of about $880bn, because the model holds each state's Medicaid spending fixed: medicaid_cost_if_enrolled divides the state's calibrated spending by medicaid_slcsp_state_denominator, which over a dataset sums weight × cost index × enrollment by state. More enrollees therefore lower the per-person value for others: $398.5M moves between records in 2025 (1,709 down, 59 up) and $2,071.7M in 2026 (5,210 down, 62 up). aca_ptc falls by $48.8M in 2025 (8 records) and $342.8M in 2026 (10 records), all decreases. Net income including health benefits changes by −$43.9M and +$18.8M; net income without health benefits rises by $0.03M and $5.8M (7 and 8 records).

Comparison files are in fixes/9860-impact/ on the hub host.

MaxGhenis and others added 6 commits October 6, 2026 06:27
adjusted_gross_income_person split every above-the-line deduction other than
the three self-employment ones 50/50 between head and spouse on a joint
return. Each person now takes their own deductions through
above_the_line_deductions_person; only tax-unit-level inputs (HSA, tuition
and fees, domestic production, possession income) are divided equally.
Adds alimony_expense_ald_person, loss_ald_person and
limited_capital_loss_person, moves Medicaid's per-person AGI and Montana's
Social Security worksheet onto the same attribution, and applies Montana's
capital loss rule for spouses filing separately (MCA 15-30-2110(6)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
loss_ald_person now divides the Section 461(l)-limited business loss by each
spouse's business losses and the rest of loss_ald by their capital losses, so
it stays right when loss_ald gains capital components (#9788). Adds the
filer_share helper used by the per-person deduction variables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Attributing each spouse's deductions in Medicaid AGI without also netting the
couple's MAGI before medicaid_magi_person's zero floor moved Medicaid
eligibility in both directions; the two belong in one Medicaid change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view r1 fixes; strengthen property test

The property test's new independent 461(l) check still has a test-side
indexing bug: the model gives the right limited_business_loss (256,000 for a
2026 single filer with a 1.5M loss).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eductions

above_the_line_deductions_person gave a tax unit dependent every person-level
deduction recorded on them, including employer adoption assistance and
education savings bond interest, which gov.irs.ald.filer_amounts_recorded_on_dependents
marks as the filer's. Those now count only for the head and spouse, whose
parts already take them up through above_the_line_deductions. The dependent's
part matters once Medicaid AGI reads it for a dependent's own return.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 3 commits October 6, 2026 09:17
…d spouse

Education savings bond interest and employer adoption assistance recorded on
a dependent are the filer's (gov.irs.ald.filer_amounts_recorded_on_dependents),
but which spouse's is not recorded. They reached the head's and spouse's parts
through the reconciliation to above_the_line_deductions, in proportion to
each spouse's other deductions, so the spouse's IRA deduction changed the
head's share. They are now divided equally, as the other amounts recorded
only for the return are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Units that set a tax-unit deduction directly run in their own simulation.
  An input given for one tax unit is an input for every unit in a
  simulation, so one unit's loss_ald set to 0 zeroed every other unit's.
- The Section 461(l) reference keeps each business source's gain and loss
  separate (aggregate income against aggregate deductions), as the model
  does, rather than netting a person's sources first.
- The capital loss reference nets losses against capital gains and
  distributions before the 1211(b) limit, as main does since #9788.
- The alimony identity skips units that set alimony_expense_ald directly:
  alimony_expense_ald_person stays each payer's own alimony there.
- The reference gives a dependent's filer amounts to the head and spouse
  equally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…list

above_the_line_deductions_person now reads gov.irs.ald.filer_amounts_recorded_on_dependents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 3 commits October 6, 2026 10:35
…ouse AGI

With each spouse's own deductions, a spouse with a business loss or an IRA
deduction above their income has negative AGI, and these two withholding
estimates multiplied it by the rate. Every other state's withholding formula
already floors its base at zero.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
va_agi_person divides tax-unit additions by each spouse's share of federal
AGI. A spouse with negative AGI got a negative share and the other spouse
more than all of it. A spouse with negative AGI now gets none, as
#9878 does for Delaware's itemized deductions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Directly set loss_ald still reconciles through loss_ald_person, so its identity is checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the medicaid-magi-joint-floor branch from 016520c to e3660c8 Compare October 6, 2026 14:36
…ules are modeled

Montana spouses who filed separately on one form through 2023 allocate
capital losses by one of two elections (ARM 42.15.206(3)) and recompute the
Section 461(l) limit with the single filer's threshold. Neither is modeled.
Giving each spouse their own federal losses instead of half moved Montana
away from both. With one spouse's $1,000 gain against the other's $3,000
loss, the loss spouse's AGI was $7,000, though separate tracking caps the
loss at $1,500 ($8,500). A $600,000 business loss on one spouse used the
joint limit, lowering tax by $45.65 against main.

mt_loss_ald_reallocation adds back to each spouse's federal AGI the
difference between their own loss_ald_person and an equal share of the
return's loss_ald, so Montana divides losses as before. The IRA and other
deductions still go to the spouse who has them (former MCA 15-30-2110(8);
ARM 42.15.206(1)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the medicaid-magi-joint-floor branch from e3660c8 to 14a53e3 Compare October 6, 2026 16:27
…t return's AGI

mt_standard_deduction_joint and mt_medical_expense_deduction_joint added each
spouse's mt_agi_indiv, which is floored at zero. With each spouse's own
deductions, a spousal IRA above that spouse's income was lost to the floor:
head wages $30,000 and a $6,000 spousal IRA gave a joint deduction of $6,000
(20% of $30,000) instead of $4,920 (the floor, 20% of the joint $24,000
being less). Both now read mt_agi_joint, the joint column's Montana AGI
through 2023. Their tests take mt_agi_joint as the input. Adds the spousal
IRA case, a single filer's loss and a case with student loan interest and an
IRA in each spouse's own column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the medicaid-magi-joint-floor branch from 1681b9b to b8be91c Compare October 6, 2026 20:48
Review r5: the medical floor had no year gate, so reading mt_agi_joint also
changed 2024 and later, when mt_agi_indiv is zero for everyone and main's
floor was zero. From 2024 Montana starts from federal itemized deductions,
whose floor is a share of federal AGI, a separate fix. The joint AGI now
applies while married filing separately on the same return is allowed
(through 2023); 2024 on is unchanged from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the medicaid-magi-joint-floor branch from b8be91c to 4afd853 Compare October 6, 2026 21:31
Comment only (review r6).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 5 commits October 7, 2026 06:36
…se allocation from 2024

Per Max's d1014 ruling:
- DC: spouses filing separately on the same return each deduct their own
  capital losses up to their own capital gains plus the $1,500 married filing
  separately limit (D-40 instructions, line c), via
  dc_separate_capital_loss_adjustment. It applies only to the separate column;
  dc_taxable_income_joint keeps the federal joint deduction.
- Montana: mt_loss_ald_reallocation and mt_applicable_ald_deductions apply only
  while spouses may file separately on the same form (through 2023).

Adds YAML cases and DC/Montana invariants to the spouse property test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bute each spouse's own deductions

medicaid_magi_person floored each person's MAGI at zero, and
medicaid_household_income added the floored amounts, so a spouse's business
loss never offset the other spouse's wages on their joint return. Household
income is the sum of every member's MAGI-based income (42 CFR 435.603(d)(1)),
and the 36B methodology the regulation adopts (435.603(e)) combines the
taxpayer's and dependents' modified AGIs "even if one or both of them are
negative" before entering a negative total as zero (Form 8962, line 3).
medicaid_magi_person is now unfloored and medicaid_household_income floors
only the household's total.

medicaid_adjusted_gross_income_person now subtracts
above_the_line_deductions_person, so each spouse's own IRA deduction,
student loan interest, alimony and business and capital losses lower only
their own amount, and a dependent's own deductions, alimony paid included,
lower the dependent's own AGI. Tax-unit-only MAGI additions are divided
equally between the head and spouse with filer_share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ned in the Medicaid filing test

medicaid_person_is_required_to_file took unearned income as gross income less
earned_income. Gross income counts each source's positive amount, so a
self-employment loss made other income look unearned: a dependent with a
5,000 loss and 100 of interest had 5,100 of unearned income and was required
to file. With household members' MAGI no longer floored, that would count the
dependent's negative income. Unearned income is now gross income less the
positive wage and self-employment sources it includes (Pub. 501, Table 2),
which also stops 401(k) deferrals, left out of box 1 wages, from hiding
unearned income.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hypothesis draws batches of joint filers with dependent children, non-filing
couples, cohabiting spouses filing separately and single filers, with losses,
own deductions and children who may be required to file. For every
household: joint filers' household income is max(0, J + D), with J the
couple's MAGI figured from the tax unit's AGI; the spouses' MAGIs add up to
J; spouses outside a joint return are netted before the floor; income is
never negative and is zero exactly when the unfloored sum is not positive;
and three metamorphic relations hold (the spouse's own deductions never
change the head's, swapping spouses changes nothing, and lowering the
spouse's self-employment income never raises household income).

20 examples plus a seeded population of 200 households: 44 s wall and
1.17 GB peak locally (macOS, loaded host).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ive dependents the claimant's separate spouse

Two findings from review r1:

- A non-filer household's parents and siblings are read from the whole family,
  which can include people outside the household, such as a grandparent who
  is also a parent there. With signed amounts, a grandmother's $5,000 loss
  cut her granddaughter's household income from $12,000 to $7,000, though
  42 CFR 435.603(f)(3)(iii) leaves her out. Those relatives' amounts are now
  added only when positive: each child's, and each couple's parents' netted
  together, so married parents' losses still offset each other. The
  individual's and spouse's amounts stay signed.
  #9406's co-resident parent IDs fix the
  membership itself.
- A dependent's tax household is the claimant's (435.603(f)(2)), which
  includes the claimant's cohabiting spouse who files separately (f)(4).
  Household size already counted that spouse; household income now does
  too.

Also corrects two comments to the 2025 standard deduction, $15,750.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r2 notes:
- A non-filer child's own amount and their siblings' enter with the
  family's children, only when positive, and unmarried co-resident parents
  are each counted only when positive. The documentation now says so,
  rather than "always added signed".
- Medicaid AGI documentation says a dependent's own business and capital
  losses are not modeled.
- New case: married non-filer parents, $12,000 of wages and a $5,000
  business loss, give their child's household $7,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the medicaid-magi-joint-floor branch from 9824d72 to d4b561e Compare October 7, 2026 10:37
…oss_ald

Review r7: dc_separate_capital_loss_adjustment removed the computed capital
loss deduction even when loss_ald was set directly, so it took out an amount
federal AGI did not contain. It now removes the capital part of each spouse's
loss_ald_person (loss_ald less the business loss, by own capital losses). Adds
YAML cases with loss_ald set to $0 and $1,000, and the property test checks
every unit against that capital part, keeping the nonnegative couple sum for
computed units only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 6 commits October 7, 2026 10:57
…s_ald

Review r8: with loss_ald set directly and both business and capital losses,
dc_self_employment_loss_addition isolated the business loss by subtracting
the computed capital deduction, while loss_ald_person (and so federal AGI and
the DC capital adjustment) takes the business part first. Use
min(limited_business_loss, loss_ald), as loss_ald_person does; the amount is
unchanged when loss_ald is computed. Adds computed and direct mixed-loss YAML
cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 9, 2026 01:04
@MaxGhenis
MaxGhenis marked this pull request as draft October 9, 2026 01:05
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Context for the hub from the original session, which is handing this PR over and will not push to it.

🤖 Generated with Claude Code

MaxGhenis and others added 4 commits October 13, 2026 22:39
Keep main's landed spouse ALD allocation, loss calculations, state
integrations and all applicable regression cases. Retain #9860's signed
Medicaid member sums, household zero floor, own-ALD reads, separate-spouse
income membership and dependent filing-requirement correction.

Account for shared IRA compensation and MAGI limits in the Medicaid
independence property. Capture total unemployment compensation in the
main determinism probe so its dependency set matches current main.
Take main's determinism-test fixture from #10221 (total_unemployment_compensation
only); none of the probed formulas read unemployment_compensation directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The documentation said a spouse's business loss lowers only that spouse's
amount. loss_ald_person divides it in proportion to each spouse's own net
business losses, and equally when neither has one. Documentation only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restating the allocation left out the equal share of a Form 4797 loss.
Refer to loss_ald_person instead. Documentation only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit e6d4b05 into main Oct 14, 2026
27 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#9860 at 987402badf5970094434183ea1424c425b06d436 (squash): Net household members' Medicaid MAGI before the zero floor, and give each spouse their own deductions.

  • Review: GPT-6.1 Sol r5 APPROVE at 987402b (doc-only delta; reviews-gen/us-9860/review-r5.md), after r3 full review APPROVE of the reconciled PR at 121d534 (no P1/P2, METHODOLOGY no) and r4 at f5c83ea. Methodology approved by Max as built (d1120).
  • Gates checked live at merge:
    • gh pr checks exits 0;
    • the latest Pull request run at the head concluded success;
    • MERGEABLE;
    • not a draft;
    • no reviewer's latest review requests changes;
    • the semantic-overlap guard;
    • head pinned.
  • Impact (hub full-file microsimulation, merge base 800e5bf53c against this head, in the description): 2025: medicaid +570 (1,768 records); is_medicaid_eligible +60,642 (68 records); is_chip_eligible -19,311 (14 records); aca_ptc -48.8M (8 records); household_net_income_including_health_benefits -43.9M (1,015 records); household_net_income +31,594 (7 records) | 2026: medicaid +1,730 (5,272 records); is_medicaid_eligible +194,970 (73 records); is_chip_eligible -19,449 (11 records); aca_ptc -342.8M (10 records); household_net_income_including_health_benefits +18.8M (2,574 records); household_net_income +5.8M (8 records).
  • Axiom: TheAxiomFoundation/rulespec-us#1507 queued (42 CFR 435.603(d)(1): us/policies/medicaid/magi_household_income_pipeline.yaml already sums members' MAGI with no per-member floor; the queued companion tests pin a spouse's negative MAGI offsetting the household)

@MaxGhenis
MaxGhenis deleted the medicaid-magi-joint-floor branch October 14, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant