Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gets Net excess losses between co-resident spouses before SSI, MSP and Medicaid exclusions. Keep Connecticut and Minnesota own/deemed budgets consistent, prevent negative child/student exclusions, and isolate New Hampshire self-employment losses from wages. Add vectorized property and differential coverage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use Kentucky's own business-source floors and preserve Minnesota gross-income premium restoration without resurrecting losses. Add SD and WY source-presence regressions and complete direct reader coverage across 23 states, including loss-to-profit monotonicity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 29, 2026 14:42
4 of 5 tasks
…ings POMS SI 00820.210 B.2.c binds SSI, not Connecticut's or Maryland's own programs. UPM 5020.05 A, 5020.70 C.3 and 5030.10 A count each person's own earnings and reduce self-employment earnings only by self-employment expenses; COMAR 07.03.07.08 sets deductions for an individual, and Maryland DHS states that "The assistance unit is always one person." Connecticut's three budget readers now read ct_ssp_own_earned_income, the person's signed SSI earnings floored at zero; spouse-deemed earnings still net an own loss through the spouse's after-loss SSI earnings. Maryland PAA reads ssi_marital_earned_income only under the couple computation and the applicant's own ssi_earned_income otherwise. SSI and its spouse-deemed amounts keep the POMS treatment. Tests: re-derive the Connecticut spouse-loss cases and pin the hub's probe couple; add Maryland own-earnings and reverse-direction cases, a California supplement case with farm profit, farm and partnership SGA cases, a couple whose farm profit ends the couple computation, the issue #10558 parent-deeming case, and a generated property that a spouse's loss never changes the applicant's CT or MD figures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extend the CT/MD property so that, where SSI deems no spouse income, the applicant's Connecticut gross earned income, earned disregard and countable earned income stay the same when only the spouse's business loss changes, and the gross earned income equals the applicant's own earnings. SSI itself, which Connecticut counts as unearned income, may still change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every Connecticut spouse in the generated property has a business loss. Check that ct_ssp_own_earned_income stays at or above zero for all of them, so an own residual loss cannot be deducted again from earnings that SSI already nets through the spouse's after-loss amount. 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.
Fixes #10531
Fixes #10558
What and why
A Texas senior aged 67 with $60,000 of Schedule C profit receives no SSI or MSP Part B coverage. On base
8b17892d2cba99a82961ea32fbaf9d69c6ba73d6, putting that profit in farm operations or partnership SECA earnings instead produces $11,928 SSI and $2,434.80 MSP Part B coverage. Both cases are now treated like Schedule C: SSI $0, MSP Part B coverage $0, and personal Part B premium $2,434.80.Add the disjoint
farm_operations_income(active Schedule F) andpartnership_self_employment_net_earnings(the K-1 Box 14 SECA component) once to SSI earned sources, and correct “unearned” to “earned” in the description. Do not add passive farm rent, allpartnership_income, ortotal_self_employment_income, which would duplicate or misclassify income. The tax-base formula applies its NESE adjustment to the partnership input, confirming that the input is pre-adjustment despite its name.The loss-rule review also exposed existing errors. Keep signed individual earnings for own-income readers, but apply a spouse's excess business loss to the other spouse's earned SSI/MSP/optional-Medicaid budget, using the existing co-resident spouse identification. Prevent negative earned balances from increasing child allocations or creating negative student exclusions. MN readers combine the same loss-adjusted own earnings with deemed earnings so the loss is deducted once. Connecticut SSP and Maryland PAA do not adopt SSI's loss offset: they count the applicant's own earnings, so a spouse's residual loss no longer reduces them (reading (e) below). MN restores pretax premiums only after covering any otherwise unabsorbed business loss, preventing false positive gross income. NH floors each person's combined self-employment income before adding wages. KY instead floors each modeled business source separately: a loss reduces neither another business's profit nor either spouse's wages. Kentucky spouse deeming now takes the ineligible spouse's own Kentucky earned-income amount while retaining the remaining deeming arithmetic and combining earnings before the $65 and one-half disregard. Restoring these sources also moves
ssi_engaged_in_sga, sois_ssi_disabled, so a couple's computation: a disabled spouse whose farm profit exceeds the SGA amount becomes an ineligible spouse whose income is deemed (see the couple section below).Merged main
8cd756f5f5efc07bf7e4108030afef8876345f25in merge commitb1525c5106ca507534a0e79c59b2b8acb5d58981. It brought current Medicaid income/asset rules, state SNAP/LIHEAP and program updates, SSA PIA ratio and South Carolina TANF updates, and spouse-swap invariant coverage. Resolved one append conflict in MSP YAML by retaining main's 14 added state-exclusion cases and this PR's two loss cases; the formula auto-merged, and all 21 MSP cases pass. #10141 remains separate.Governing text
Invariants and intentional exceptions
ssi_earned_incomeunchanged; no added source is counted twice.ct_ssp_own_earned_income, never negative) or, where SSI deems no spouse income, the applicant's Connecticut earned budgets or Maryland PAA countable income.Reader audit
Each row checks that program's own law; qualifying active farm/partnership earnings count as earned in all audited readers. Classification sharing does not assert that tax net profit captures every program-specific expense or averaging adjustment.
ssi_earned_income;ssi_earned_income_after_spousal_loss;ssi_marital_earned_incomessi_countable_incometable); CT SSP and MD PAA no longer read it for the applicant's own earnings.ssi_earned_income_deemed_from_ineligible_spouse,ssi_income_deemed_from_ineligible_spouse,is_ssi_spousal_deeming_appliesssi_earned_income.ssi_unearned_income_deemed_from_ineligible_parent,ssi_ineligible_child_allocationssi_earned_income.ssi_blind_or_disabled_working_student_exclusionssi_earned_income.ssi_engaged_in_sgamsp_countable_income(own earnings and spouse-deemed earnings)medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse,medicaid_optional_senior_or_disabled_unearned_income_deemed_from_ineligible_parentca_wdp_gross_earned_incomemn_msa_gross_income,mn_msa_net_income_eligible,mn_msa_personnh_ssp_countable_incomewi_cts_gross_earned_incomect_ssp_own_earned_income,ct_ssp_countable_income,ct_ssp_earned_income_disregard,ct_ssp_gross_incomect_ssp_own_earned_income, the person's signed SSI earnings floored at zero: own business losses still reduce own wages, but a spouse's residual loss does not. Spouse-deemed earnings keep SSI's after-loss amount, which already nets an applicant's own loss, so the floor stops that loss counting twice. SSI itself keeps POMS and enters as unearned income. UPM 5025.15 partial-year averaging remains an input limitation.co_state_supplement_countable_income,co_oap_own_countable_income,co_oap_deemed_incomeva_ag_countable_incomevt_aabd_ep_countable_income_ok_ssp_incomehelper:ok_ssp_countable_income,ok_ssp_own_countable_income;ok_ssp_spouse_child_allocationor_ssp_countable_incomenc_sa_countable_incomeoh_rss_countable_incomesd_ssp_caresd_ssp_independentwy_ssp_eligiblemd_paa_countable_incomessi_earned_income, floored after the student exclusion; under the couple computation it keepsssi_marital_earned_income. Pooling spouses at all is a separate question, unchanged here. Spouse-deemed income stays SSI'sssi_income_deemed_from_ineligible_spouse. State production expenses remain a methodology constraint.ky_ssp_earned_income,ky_ssp_earned_income_deemed_from_ineligible_spouse,ky_ssp_countable_incomeky_ssp_earned_income; remaining deeming arithmetic is retained, and §8(6) earnings combination still precedes the $65/half disregard. State-disallowed tax expenses, §8(3) conservation ordering and distinct parental methodology remain limitations.tx_ssi_state_supplement_eligiblemt_ssp,nv_oss,nj_ssp,vt_aabd_federalpa_sspny_sspri_sspNH nets businesses within a person and floors their combined result before wages. Kentucky instead forbids a loss crossing from one business to another or to either spouse's wages. Its spouse-deemed earned input now uses the ineligible spouse's own Kentucky amount, with the other retained deeming steps unchanged. MN own-and-deemed budgets use the loss-adjusted SSI helper consistently; CT and MD count the applicant's own earnings, as reading (e) states. Other state expense/partial-year conventions remain input limitations, as the table states.
The recorded static audit covers direct earned-source and earned-income readers, all direct consumers of the changed marital/deeming budgets, and their state function wrappers: 34 state outputs across 23 sampled states, including Kentucky's own-income helper. The Kentucky spouse-deemed variable added in this revision is additional coverage; it is not included in that prior differential's output list. The audit excludes unbounded propagation through SSI as transfer income. The table distinguishes classification from program-specific expense/deeming rules.
Readers of
ssi_countable_incomeThese 24 files read
ssi_countable_income, so counting farm and partnership earnings moves them too. A grep at this head finds no others (three more matches are comments). Each row asks whether the program's own law follows SSI's income counting, and so reaches farm and partnership income: 20 CFR 416.2025(b) covers federally administered supplements, and a state-administered program needs its own text. This is research only; none of these readers changes here.uncapped_ssi_ssi_state_supplementhelper (mt_ssp,nv_oss,nj_ssp,vt_aabd_federal,pa_ssp,ri_ssp,ny_ssp)ssi_resources_deemed_from_ineligible_parentis_optional_senior_or_disabled_for_medicaidis_medically_needy_for_medicaidca_capi,ca_capi_income_eligibleca_state_supplementco_state_supplement_countable_incomefl_oss,fl_oss_eligibleia_ssa_federalia_ssa_smme_countable_incomeid_aabdin_ssp_rcapin_ssp_sapnla_ossnc_sa_eligibleny_sspsc_ssi_state_supplement,sc_ssi_state_supplement_eligible,sc_ssi_state_supplement_pnatx_ssi_state_supplement_eligibleva_ag_countable_incomeThe other readers of
ssi_marital_earned_incomeandssi_earned_income_after_spousal_lossfollow SSI methodology and keep the POMS treatment: SSI's own deeming and countable income,msp_countable_income(SSA 1905(p)),medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouseandmedicaid_optional_senior_or_disabled_countable_income(42 CFR 435.601), and Minnesota MSA. Minnesota administers MSA itself under Minn. Stat. 256D.435, which the MN row above cites for SSI deeming and exclusions; this revision did not re-read it for a loss-offset rule.Remaining methodology questions: Kentucky §8(3) spouse conservation versus §8(6) combined-earnings ordering, plus its distinct parental methodology. Neither subsection states a business-loss offset, so it does not contradict the per-source floor adopted here. Kentucky's retained SSI student/unearned and remaining deeming inputs are an approximation; raw business inputs also do not expose every business or state-disallowed depreciation. The 7.65% SSI deduction is settled and deferred to the follow-up; NH's combined self-employment floor is settled and implemented here.
SGA and self-employment losses (for the hub).
ssi_engaged_in_sgacompares signedssi_earned_incomewith the SGA amount, so an own self-employment loss lowers SGA earnings against wages. POMS DI 10505.015 D.3 (multiple work efforts): “When an individual has wages and has a loss from self-employment, do not use the loss to reduce total earnings.” Main already nets Schedule C losses this way; this PR extends that to farm and partnership losses. Netting one business's loss against another business follows 20 CFR 404.1081(c), “A loss in one trade or business you carry on offsets the income from another trade or business”, and DI 10510.012 B, which starts from NESE. This PR does not change the SGA computation.State loss rules found in the
ssi_countable_incomereader review (for the hub). Idaho AABD (IDAPA 16.03.05.403.06) disallows “Loss of Farm Income Subtracted From Other Income”. Indiana's Medicaid budget, which SAPN uses, says “Self-employment business losses cannot be used to offset or reduce other, non-self-employment income (i.e. wages)” (IHCPPM 3410.15.00). Indiana RCAP's own income rule was not found. Both Idaho and Indiana read SSI countable income, which lets losses offset wages.Proposed separate follow-up (no issue created): Missouri SAB omits active partnership self-employment earnings from its earned source list.
Its own source list already contains farm income and is unaffected by the SSI-list change; the omission is independent. Review active partnership NESE against MO SAB Manual 0410.015.05, preserving passive investment treatment.
SGA, disability and the couple computation
Restoring these sources moves
ssi_engaged_in_sga, sois_ssi_disabled, so whether two spouses are an eligible couple. Newssi_spouse_farm_sga.yamlpins two Texas couples in 2026: a head aged 67 with no income, and a spouse aged 50 who meets the disability criteria.8cd756f5f5is_ssi_disabled(head, spouse)ssi, annual (head, spouse)is_ssi_disabled(head, spouse)ssi, annual (head, spouse)On main the farm profit counted nowhere, so the spouse stayed disabled and the two were paid as an eligible couple, at half the couple rate each. Here the spouse's farm earnings exceed the SGA amount, so the spouse is not disabled (20 CFR 416.905(a): “The law defines disability as the inability to do any substantial gainful activity”). Not aged, blind or disabled, the spouse is an ineligible spouse under 416.1160(d), and 416.1802(a) counts “part of that person's income as yours”. Under 416.1163(d) the $2,000 exceeds the $497 rate difference, so the head is paid as a couple: $1,491 − ($2,000 − $85) / 2 = $533.50 a month. The second case reproduces the downstream shape, where the head's SSI rose and the spouse's fell to zero. With farm profit alone above SGA and no other spouse income, the head's SSI cannot rise: at least $9,750 a year is then deemed, which leaves the head less than the half couple rate main paid. The result follows these sections, within the model's existing income-only SGA test (see the limitations below). #10141's 416.1163(e)(2) limit, “Your SSI benefit under the deeming rules cannot be higher than it would be if deeming did not apply”, cannot bind here: $533.50 is below the $994 the head would receive without deeming. It binds only while the deemed amount stays under the $5,964 annual rate difference, that is, while the spouse's earned income stays under about $12,700 to $12,950 a year, depending on how much of the $20 general exclusion the head's own unearned income uses. Here $11,490 is deemed from $24,000 of farm earnings.
Open-PR overlap
The following open-PR merge-tree analysis was recorded at reviewed head
6cb74d7c4ee2a566a30712673200a6aa371d3f69, 2026-10-29 13:19:24 UTC. Those PR-head comparisons are historical. This revision has since merged main8cd756f5f5efc07bf7e4108030afef8876345f25, retaining both additions in its one MSP YAML append conflict as noted above; it has not pre-merged #10141.Exit 1 below denotes a hypothetical merge conflict. Exact common/conflict files and semantic integration requirements follow; raw command logs remain untracked locally for the hub.
1b52a6d7c08574c47aa87d762efc996f55a0ff588b17892d2c6559b7c3358e935951799543890a6bbbef30d8f4ssi_earned_income_after_spousal_lossrouting and nonnegative child-earned contribution in the new monthly formulas. Keep CT/MN own/deemed earnings consistent, including MN gross-premium restoration. Preserve KY's separate positive-business source computation when adapting its monthly budget. Combine NH's add/add test cases and preserve its separate self-employment loss rule.a53311ad7b201b8f9aa7b37185fbde55b34b4382ssi_earned_income_after_spousal_losswith its_ssi_spouse_indexselection in both conflicted files. Its changes to_ssi_spouses.pyalso affect this PR's SSI loss helper and MN gross-premium restoration. Both Kentucky's countable-income pooling and its new spouse-deemed earned-income helper retain marital-unit assumptions: the former must adopt #10141's two-spouse total helper, and the latter its spouse-selection helper, when integrating the third-adult fix. This PR does not pre-merge #10141; whichever PR lands second adapts.7291aa771386606c03e87ce736fd07007da6350amsp_countable_income.pyandmsp_countable_income.yaml; formula auto-mergesb5fb5cabb2227fab8e00d40a9fc3bb964768f0cd(merged)#10146 exact conflict files
policyengine_us/tests/policy/baseline/gov/hhs/medicare/savings_programs/income/msp_countable_income.yamlpolicyengine_us/tests/policy/baseline/gov/states/nh/dhhs/ssp/nh_ssp_countable_income.yaml(add/add)policyengine_us/variables/gov/hhs/medicaid/income/deemed/from_ineligible_spouse/medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse.pypolicyengine_us/variables/gov/hhs/medicare/savings_programs/income/msp_countable_income.pypolicyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_spouse/ssi_earned_income_deemed_from_ineligible_spouse.pypolicyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_spouse/ssi_income_deemed_from_ineligible_spouse.pypolicyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/ssi_ineligible_child_allocation.pypolicyengine_us/variables/gov/states/ct/dss/ssp/income/ct_ssp_countable_income.pypolicyengine_us/variables/gov/states/ct/dss/ssp/income/ct_ssp_earned_income_disregard.pypolicyengine_us/variables/gov/states/ky/dcbs/ssp/ky_ssp_countable_income.pypolicyengine_us/variables/gov/states/mn/dhs/msa/eligibility/mn_msa_net_income_eligible.pypolicyengine_us/variables/gov/states/mn/dhs/msa/mn_msa_person.py#10146 other common files, merging automatically
policyengine_us/tests/policy/baseline/gov/ssa/ssi/eligibility/income/deemed/ssi_ineligible_child_allocation.yamlpolicyengine_us/variables/gov/states/ct/dss/ssp/income/ct_ssp_gross_income.pypolicyengine_us/variables/gov/states/mn/dhs/msa/income/mn_msa_gross_income.pypolicyengine_us/variables/gov/states/nh/dhhs/ssp/nh_ssp_countable_income.pyOther exact conflict files
#10141:
policyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_spouse/ssi_earned_income_deemed_from_ineligible_spouse.pypolicyengine_us/variables/gov/ssa/ssi/eligibility/income/marital/ssi_marital_earned_income.pyAutomatically merged common files for #10141:
policyengine_us/variables/gov/states/mn/dhs/msa/eligibility/mn_msa_net_income_eligible.pypolicyengine_us/variables/gov/states/mn/dhs/msa/mn_msa_person.py#10360:
policyengine_us/tests/policy/baseline/gov/hhs/medicare/savings_programs/income/msp_countable_income.yamlAutomatically merged common file for #10360:
policyengine_us/variables/gov/hhs/medicare/savings_programs/income/msp_countable_income.py#10483: none.
Validation
At revision
7f5467b8e11d03f528314faa05d28b1cbfd90e17, every YAML file named below ran in its own foreground process under the 4 GB / 1800 s cap: 160 cases in 21 files pass. They cover all 13 Connecticut SSP files (99 cases), all four Maryland PAA files (md_paa.yaml10,md_paa_countable_income.yaml6,md_paa_imputed_federal_ssi.yaml5,integration.yaml14),ca_state_supplement.yaml(10),ssi_engaged_in_sga.yaml(8), the newssi_spouse_farm_sga.yaml(2) andfrom_ineligible_parent.yaml(6). The property file passes all 10 tests.ruff format,ruff checkandgit diff --checkpass. All 33 CI checks pass at this head: the Pull request run 41198024956 concludedsuccess, observed 2026-10-31 12:45 UTC after polling every five minutes.Differential against merge base
8cd756f5f5. The run covered 480 seeded couples (240 CT, 240 MD, 960 people) with wages, signed Schedule C and SSTB income, Social Security and private pensions. Farm and partnership inputs were zero, so main counts the same sources.ct_ssp_gross_incomeminusssimatches main exactly. Of the 132 other differences, 122 come only from flooring a person's own negative earnings at zero. The remaining 10 also involve main giving an adult a “child allocation” from negative earnings (max_(0, 0 - income)inssi_ineligible_child_allocation), which this PR's floor removes.ssi_marital_earned_incomeis nonnegative (373 rows),md_paa_countable_incomematches main in 370. The 3 mismatches each have a positive-earning applicant and an ineligible spouse with a residual loss and a pension. On main, that adult “child allocation” from the spouse's negative earnings cut the spouse's deemed pension, for example $10,188 to $1,581, so SSI deemed nothing; this PR deems the full pension. That runs throughssi_income_deemed_from_ineligible_spouse, not through PAA's own earnings. The 5 other MD differences are applicants with residual losses. Main deducted each loss twice, as an allocation against the spouse's earnings and again in the combined countable income; this PR deducts it once.Mutants for this revision. Each mutant ran in a scratch worktree, one process each under 2 GB / 900 s. All five YAML runs (
ct_ssp_countable_income.yaml;md_paa_countable_income.yamlform4) hit the 2 GB RSS cap during the first YAML case, about 180 s in, so they count as unrun, not as kills. The targeted property-k test_spouse_loss_neverfits under the cap and killed all five by assertion.m5first survived it, because the property draws applicants with nonnegative own earnings; the never-negative assertion now kills it.m1:ct_ssp_countable_incomereadsssi_earned_income_after_spousal_lossm2:ct_ssp_earned_income_disregardreadsssi_earned_income_after_spousal_lossm3:ct_ssp_gross_incomereadsssi_earned_income_after_spousal_lossm4:md_paa_countable_incomereadsssi_marital_earned_incomeunconditionallym5:ct_ssp_own_earned_incomedrops its zero floorAt the previous revision
4550dd0597deec0d367a61dfa5b0cd37a475d03c, all 134 YAML cases across 15 files pass through the standard CLI, including all 21 MSP cases, 15 Kentucky cases and nine unchanged Kansas TANF contract cases. Every added/changed YAML file was run separately. Nolightyamlfallback was needed. The code-health guard passes (1 test, 1.54s pytest / 14s process wall), and all nine property tests pass. All eight review mutants are killed by assertion failures.make format(ruff formatting/lint) andgit diff --checkpass. All 33 CI checks passed at this head, observed 2026-10-30 09:07:43 UTC after approximately 90 minutes of polling at five-minute intervals. The original-head results below are historical and are reported separately.New Kentucky cases compare the reviewed head with this revision:
The first case restores the recorded base's $20,000 / $790.83 values. Both revised outputs follow Kentucky's prohibition on transferring a business loss, while retaining the earnings combination before its $65/half disregard.
An additional §8(6) case gives the applicant $600 wages and the ineligible spouse $20,000 wages; Kentucky countable income is $815.83 monthly, confirming their earnings combine before the disregard.
The CT/MD probe uses a 67-year-old applicant with $12,000 of wages and a 60-year-old spouse with $2,000 of wages and a $7,000 Schedule C loss. Base is merge base
8cd756f5f5efc07bf7e4108030afef8876345f25; the previous head is4550dd0597deec0d367a61dfa5b0cd37a475d03c. Connecticut's countable income exceeds main only because SSI rose: Connecticut counts the SSI payment as unearned income, less the $562 community-alone disregard.In the reverse direction (applicant $5,000 Schedule C loss, ineligible spouse $10,000 of wages), MD PAA countable income is $0 on main, at the previous head and here. The routes differ. Here, POMS B.2.c leaves the spouse $5,000 of after-loss earnings, below the $5,964 deeming threshold. On main, the applicant's negative earnings gave the applicant a $5,000 “child allocation” (the error #10558 describes), which took the spouse's deemed earnings to the same $5,000. With $15,000 of spouse wages, main deducted the loss twice and deemed $1,990; the previous head and this head deem $4,490, deducting it once.
Generated property cases now draw negative business income for either spouse and for children/students; state-specific properties use their own state. These invariants extend the finite sourced YAML examples:
max(e_a + e_b, 0)m1a,m2m1b(child allocation)m3m4s1,s2,s3m1–m5The local before measurement passed all four existing property tests in 17.00s pytest / 35.77s process wall. The timing wrapper then exited 1 because macOS denied its
sysctl kern.clockrateread; this occurred after pytest's successful result. No before peak RSS was captured. The expanded nine-test file passes in 20.40s pytest / 33s process wall, a 3.40s increase in pytest time. An instrumented measurement including startup took 30.63s and peaked at 2.648 GiB under the 4 GB cap / 1800s timeout. These local measurements retain the existing CI budget. Each mutant ran its targeted property from the same file using-k,-qand-xin an isolated scratch copy under 2 GB / 900s. All eight failed assertions; none failed during import/collection or hit a cap.m1a: residual loss left unflooredm1b: child loss reduces unearned incomem2: spouse-loss step removedm3: NH floor after wagesm4: KY loss offsets another business, context adapteds1: farm source removeds2: partnership source removeds3: farm source duplicatedThe reviewer’s original
m4patch targets the generator syntax removed by the code-health fix, so its context no longer applies. The scratch mutation preserves the same semantic fault: replace the sum of individually floored Kentucky business sources with a single floor after summing all business sources. Both the original and context-adapted patches are retained as evidence.For existing Linux CI context, the reviewed head's run 40894251789 ran these four tests in 43.117s including shared setup in Python shard 2's
core-1group. That group completed 1,950 tests in 1,512.48s; the job took 27m30s against its existing 90-minute budget. Local before/after measurements and this historical Linux measurement are reported separately; this revision changes no CI runners or budgets.At this revision, main's updated routing places the property file in Python shard 5. All nine tests passed in 41.504s including shared setup; the five new property calls total 3.47s. Its
core-1group completed 945 tests in 887.74s, and the entire shard finished in 30m39s within the existing 90-minute budget. Uploaded resource reports give the fullcore-1process a peak of 11.263 GiB before (27m00.76s wall, 1,950 tests) and 7.437 GiB after (16m07.58s wall, 945 tests). Group membership and setup times differ, so this is not a controlled whole-group comparison and does not attribute the decrease to this change. These Linux group peaks are separate from the local single-file peak reported above.Original-head validation
8b17892d2cba99a82961ea32fbaf9d69c6ba73d6with farm/partnership zero and nonnegative Schedule C/SSTB. Restored 15 exact base variable classes, rather than only reverting the source list.gov/ssa/ssi/income/ssi_earned_income.yamlgov/ssa/ssi/ssi.yamlgov/ssa/ssi/income/ssi_earned_income_after_spousal_loss.yamlgov/ssa/ssi/income/ssi_marital_earned_income.yamlgov/ssa/ssi/eligibility/income/deemed/ssi_ineligible_child_allocation.yamlgov/ssa/ssi/eligibility/income/ssi_blind_or_disabled_working_student_exclusion.yamlgov/hhs/medicare/savings_programs/income/msp_countable_income.yamlgov/states/nh/dhhs/ssp/nh_ssp_countable_income.yamlgov/states/ct/dss/ssp/income/ct_ssp_countable_income.yamlgov/states/mn/dhs/msa/mn_msa_person.yamlpartners/analytics_coverage/edge_cases/state/ks/tanf.yamlgov/states/sd/dss/ssp/sd_ssp_independent.yamlgov/states/wy/health/ssp/wy_ssp_eligible.yamlgov/states/ky/dcbs/ssp/ky_ssp_countable_income.yamlgov/states/mn/dhs/msa/income/mn_msa_gross_income.yaml[60000.0, 0.0, 60000.0]versus[60000, 60000, 60000][60000.0, 60000.0, 0.0]versus[60000, 60000, 60000][60000.0, 120000.0, 60000.0]versus[60000, 60000, 60000]The following signed-loss cases intentionally change even with farm/partnership zero. Each was run against the actual recorded base and the fixed policy; amounts are annual except MSP/NH/KY/MN monthly values.
spouse_business_loss_offsets_applicant_wagesmsp_countable_income@2026-01[457.5, 0.0][249.1666717529297, 0.0]spouse_business_loss_offsets_applicant_wagesssi@2026[6438.0, 0.0][8938.0, 0.0]spouse_business_loss_offsets_applicant_wagesssi_countable_income@2026[5490.0, 0.0][2990.0, 0.0]child_business_loss_cannot_reduce_unearned_incomessi_ineligible_child_allocation@2026[0.0, 8364.0][0.0, 5364.0]student_exclusion_cannot_be_negativessi_blind_or_disabled_working_student_exclusion@2026[-3000.0][0.0]new_hampshire_business_loss_cannot_offset_wagesnh_ssp_countable_income@2026-01[360.5][860.5]kentucky_business_loss_cannot_offset_wagesky_ssp_countable_income@2026-01[217.5][467.5]minnesota_gross_earnings_cannot_be_negativemn_msa_gross_income@2026-01[-66.66667175292969][0.0]New Python-file measurement: 153 seconds including startup; pytest reported 45.25s; process peak 2.404 GiB. These are local macOS measurements, not whole-group or Linux CI benchmarks. The base has no corresponding property file.
All tests ran as single-file foreground processes with the numeric thread caps, load gate <=100, and 4 GB/1800s process-group cap; each mutant used 2 GB/900s. No suites, folder runs, microsimulations, or partner-file edits.
make formatandgit diff --checkpassed. Evidence remains untracked.The new Python file uses vectorized cases and a shared read-only country model for source repartition, monotonicity, and exact cross-output comparisons that YAML cannot enumerate. It follows the existing core test selection; no runner changes. The preceding historical figures describe local single-file validation. Revised-head Linux timing and memory reports are summarized above.
make format(ruff formatting and lint).impact: pending (hub)
axiom: TheAxiomFoundation/rulespec-us#1970 queued
The rulespec-us main tree was checked read-only and has no 20 CFR 416.1110 encoding. A dispatch-ready
pe-parityissue body is drafted for the farm/partnership NESE classification, earned-loss offsets, and the NH/KY state loss rules, with corpus citations, verbatim law, required outputs and companion tests. It is posted as TheAxiomFoundation/rulespec-us#1970 (pe-parity); no RuleSpec was authored or encoder run here.🤖 Generated with Claude Code