Conversation
hua7450
marked this pull request as ready for review
September 28, 2026 20:47
hua7450
marked this pull request as draft
September 28, 2026 21:02
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9665 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 2 -2
Lines 76 27 -49
Branches 2 1 -1
=========================================
- Hits 76 27 -49
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…into liheap-shared-inputs
hua7450
marked this pull request as ready for review
September 29, 2026 00:26
…nt income, add boundary tests Move the work_expense definition into documentation metadata and label it as self-employment work expenses; state that the input includes cost of goods sold so self_employment_gross_income reconstructs gross receipts; document the covered sources, the combined zero floor, the SNAP input relationship and the under-reporting bias; add IRS form references; append three YAML cases (mixed-sign floor, expenses without a business, cost of goods sold). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…oss income per source Rename work_expense to self_employment_expense so the input does not read as the employee work-expense deduction used across TANF programs. Define it as business expenses other than cost of goods sold, so net profit plus the input equals Schedule C line 7 and Schedule F line 9 gross income. Floor gross self-employment income at the sum of each source's net profit floored at zero, so a loss in one source does not offset another when expenses are omitted. Update the tests for both changes and add cases for complete expenses, partial expenses, and a regular loss alongside SSTB profit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
7 tasks
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
Existing self-employment variables contain net profit. This proposal adds one shared expense input and a derived gross-income variable so a future API questionnaire can reconstruct gross income with one additional expense answer.
The PR is being closed without merging to preserve this work for later. The broader design decisions and program adoption roadmap are tracked in #9682. The
liheap-shared-inputsbranch is retained for reopening.Changes
self_employment_expense: an annual person-level empty input with the ordinary zero default, covering business expenses already deducted from regular, SSTB, and farm net income. Excludes cost of goods sold, employee work expenses, and personal income and self-employment taxes.self_employment_gross_income: an annual person-level calculation that adds those expenses back to the three existing net-income sources, subject to the fallback below.For example, $15,000 net profit plus $25,000 of matching expenses reconstructs $40,000 gross income after cost of goods sold. Accounting references are the archived tax year 2025 Schedule C and Schedule F, including Schedule F's accrual-method section.
Limits and future work
The formula preserves losses through the expense add-back, then floors the result at the sum of the three net-income categories individually floored at zero. This is a modeling fallback, not an IRS rule or a benefit-program loss rule, and remains a design decision to revisit in #9682. Missing expenses default to zero but do not establish actual gross income. Complete expenses reproduce tax-reported gross income only when the floor does not bind and the net amounts have not already been adjusted by tax loss limitations.
The calculation excludes separately reported partnership earnings, combines farm and non-farm amounts, and uses non-farm income after labor-supply responses. Direct gross overrides do not infer net income or expenses. Tax-accounting expense add-backs do not determine a benefit program's allowable deductions.
No existing tax or benefit calculation consumes either new variable. Existing net-income definitions and program formulas are unchanged. The all-state LIHEAP effort, including Kansas (#9663), proceeds independently and will not adopt these variables as part of that implementation. Other program migrations require separate policy review and PRs.
Validation
Validated locally at
2d6a227c11b39b99e502c791e3b4ea5cf582a3ee:make format(formatting and lint) andgit diff --checkpassed.The full microsimulation suite was not rerun locally, and CI was not monitored for this cleanup. Revalidate the final revision when the PR is reopened.
Related to #9682; merging the shared-variable addition would not complete that broader roadmap.
axiom: n/a: Adds a shared input and accounting calculation; program-specific policy adoption is separate.