Skip to content

Add shared self-employment expenses and derive gross self-employment income - #9665

Closed
hua7450 wants to merge 9 commits into
mainfrom
liheap-shared-inputs
Closed

hua7450 wants to merge 9 commits into
mainfrom
liheap-shared-inputs

Conversation

@hua7450

@hua7450 hua7450 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

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-inputs branch 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.
  • Sixteen YAML cases and a changelog entry. The final diff contains only these four added files; the design and adoption documentation is preserved in Clarify shared self-employment gross/net inputs and plan program adoption #9682.

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:

  • All 16 shared-variable YAML cases passed, covering expenses, losses, mixed sources, multiple people, direct overrides, partnership separation, monthly conversion, and preservation of net income, wages, and the self-employment tax base.
  • All 5 input-definition and code-health tests passed.
  • make format (formatting and lint) and git diff --check passed.

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.

@hua7450
hua7450 marked this pull request as ready for review September 28, 2026 20:47
@hua7450
hua7450 marked this pull request as draft September 28, 2026 21:02
@hua7450 hua7450 changed the title Add shared inputs for work expenses, gross self-employment income, and dwelling type Add shared work expenses and derive gross self-employment income Sep 28, 2026
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (2d6a227).
⚠️ Report is 96 commits behind head on main.

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     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hua7450
hua7450 marked this pull request as ready for review September 29, 2026 00:26
hua7450 and others added 2 commits September 28, 2026 21:20
…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>
@hua7450 hua7450 changed the title Add shared work expenses and derive gross self-employment income Add shared self-employment expenses and derive gross self-employment income Sep 29, 2026
@hua7450 hua7450 closed this Sep 29, 2026
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