Fix business income SECA and LSR inputs#8156
Merged
MaxGhenis merged 3 commits intoPolicyEngine:mainfrom Apr 25, 2026
Merged
Conversation
49894e3 to
0fea261
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8156 +/- ##
============================================
+ Coverage 85.36% 100.00% +14.63%
============================================
Files 3 10 +7
Lines 41 204 +163
Branches 2 4 +2
============================================
+ Hits 35 204 +169
+ Misses 6 0 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0fea261 to
047f979
Compare
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
Companion data PR: PolicyEngine/policyengine-us-data#828
Root cause
The household
Simulationconstructor iterated over the emptied employment-income holder when moving self-employment inputs into before-LSR storage. SSTB self-employment had before-LSR plumbing but no constructor transfer. SECA and multiple downstream income source lists also referenced the Schedule J-stylefarm_incomeinput where they meant Schedule Ffarm_operations_income.Tests
ruff checkon touched Python files.venv/bin/python -m pytest policyengine_us/tests/core/test_business_income_regressions.py policyengine_us/tests/test_parameter_files.py -q.venv/bin/python -m pytest policyengine_us/tests/core/test_business_income_regressions.py policyengine_us/tests/core/test_behavioral_response_measurements.py -q.venv/bin/python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/irs/self_employment/taxable_self_employment_income.yaml policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/qbid/qualified_business_income.yaml policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/qbid/sstb_qualified_business_income.yaml policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/qbid/qualified_business_income_deduction.yaml -c policyengine_us.venv/bin/python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/household/income/person/market_income.yaml policyengine_us/tests/policy/baseline/household/income/household/household_market_income.yaml -c policyengine_us.venv/bin/python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/ma/tax/income/gross_income/integration.yaml policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/taxable_income/nj_gross_income.yaml policyengine_us/tests/policy/baseline/gov/states/ct/oec/c4k/ct_c4k_countable_income.yaml policyengine_us/tests/policy/baseline/household/income/person/market_income.yaml policyengine_us/tests/policy/baseline/household/income/household/household_market_income.yaml -c policyengine_us.venv/bin/python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/ct/oec/c4k/ct_c4k_family_fee.yaml policyengine_us/tests/policy/baseline/gov/states/mi/tax/income/mi_household_resources.yaml -c policyengine_usuv run python policyengine_us/tests/run_selective_tests.py --base-branch upstream/main --coverage.venv/bin/python -m pytest policyengine_us/tests/core -quv run --extra dev towncrier check --compare-with upstream/main --staged