Skip to content

Map taxsim_pprofinc to SSTB self-employment income - #9307

Closed
MaxGhenis wants to merge 1 commit into
mainfrom
taxsim-pprofinc-sstb
Closed

Map taxsim_pprofinc to SSTB self-employment income#9307
MaxGhenis wants to merge 1 commit into
mainfrom
taxsim-pprofinc-sstb

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

taxsim_pprofinc (TAXSIM v28, SSTB income of the primary and secondary taxpayer) carried no formula and was labeled "Assumed zero" — so every emulator comparison told TAXSIM no SSTB income exists, while the SSTB slice also never reached taxsim_psemp (which reads self_employment_income, the non-SSTB variable). SSTB income simply vanished from TAXSIM inputs.

This maps taxsim_pprofinc = sstb_self_employment_income summed over the head and spouse per the v28 definition. No double-boxing (Feenberg's rule from the 2026-07-24 meeting): psemp already excludes the SSTB variable. With the Microcosm occupation-classified SSTB split (Microcosm #530), the QBID comparison becomes meaningful above the thresholds for the first time.

Tests: zero without SSTB income, head-only mapping, and head+spouse summation with dependent exclusion.

Fixes PolicyEngine/policyengine-taxsim#1141

🤖 Generated with Claude Code

taxsim_pprofinc (TAXSIM v28) carried no formula and was documented as
assumed zero, so every emulator run told TAXSIM no SSTB income exists.
Map it to sstb_self_employment_income summed over the head and spouse,
per the v28 primary-and-secondary definition. No double-boxing:
taxsim_psemp reads self_employment_income, which excludes the SSTB
variable.

Fixes PolicyEngine/policyengine-taxsim#1141

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 5c62fe89833bceafa477e33ef74b95e6fe96fcc7)
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8326a14) to head (b376f18).
⚠️ Report is 53 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #9307    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           12         1    -11     
  Lines          161        12   -149     
==========================================
- Hits           161        12   -149     
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.

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Closing without merge — Pavel is right that this targets the wrong layer. The TAXSIM mapping logic moved to the policyengine-taxsim emulator, whose current main already maps pprofinc/sprofinc → sstb_self_employment_income (variable_mappings.yaml, with the §199A(d)(3) phaseout note) and sums psemp+pbusinc into self_employment_income per Feenberg's spec that businc ≡ semp. The pe-us contrib/taxsim variables this PR edited are a legacy copy; my "assumed zero" finding described that stale layer, not the live emulator. No pe-us change needed.

@MaxGhenis MaxGhenis closed this Aug 18, 2026
@MaxGhenis
MaxGhenis deleted the taxsim-pprofinc-sstb branch August 18, 2026 23:01
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.

pprofinc (TAXSIM v28, SSTB income) is assumed zero; the SSTB split now provides a real value

1 participant