Skip to content

[codex] Clarify legacy TAXSIM umbrella vars#7898

Open
MaxGhenis wants to merge 6 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/issue-7897-taxsim-state-taxable-income
Open

[codex] Clarify legacy TAXSIM umbrella vars#7898
MaxGhenis wants to merge 6 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/issue-7897-taxsim-state-taxable-income

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

This marks the remaining TAXSIM-shaped PE-US umbrella variables as legacy compatibility surfaces rather than generic cross-state PolicyEngine-US outputs.

What changed

  • clarify state_taxable_income, state_agi, state_property_tax_credit, state_cdcc, state_eitc, and state_ctc as legacy compatibility umbrellas
  • update the related parameter lists to describe them as compatibility groupings
  • remove these TAXSIM-facing umbrella outputs from the PE-US integration baseline so PE-US only treats the core cross-state aggregators as public outputs

Why

Issue #7897 exposed that some TAXSIM outputs were relying on umbrella variables whose semantics are not internally consistent across states. This PR narrows PE-US responsibility to the aggregators that are truly core PE-US concepts, while the paired TAXSIM PR owns the explicit compatibility mapping layer.

Validation

  • uv run policyengine-core test /Users/maxghenis/worktrees/policyengine-us-issue-7897/policyengine_us/tests/policy/baseline/gov/tax/income/integration.yaml -c policyengine_us

Paired PR

  • policyengine-taxsim: companion PR on the same branch name

@MaxGhenis MaxGhenis force-pushed the codex/issue-7897-taxsim-state-taxable-income branch from ea38d31 to 427e60e Compare March 29, 2026 11:32
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (edaf7b1) to head (70a1e30).
⚠️ Report is 31 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #7898      +/-   ##
===========================================
+ Coverage   97.26%   100.00%   +2.73%     
===========================================
  Files           5         8       +3     
  Lines          73        97      +24     
  Branches        2         0       -2     
===========================================
+ Hits           71        97      +26     
+ Misses          1         0       -1     
+ Partials        1         0       -1     
Flag Coverage Δ
unittests 100.00% <100.00%> (+2.73%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

PavelMakarchuk and others added 2 commits March 30, 2026 15:49
These are first-class PE-US variables, not deprecated:
- Remove "(legacy compatibility umbrella)" from all labels
- Remove deprecation documentation strings
- Restore original descriptions (not "Legacy compatibility list")

Add missing states:
- state_taxable_incomes: NH, PA
- state_cdccs: WV, MD (refundable)
- state_ctcs: NC
- state_property_tax_credits: IL, MT (rebate), OK

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace triple-duplicated _ok_child_credit_components helper with
delegation pattern (like MN):
- ok_child_tax_credit_component: checks if CTC > CDCC, returns
  combined credit if so, else 0
- ok_child_care_credit_component: combined minus CTC component
- ok_child_care_child_tax_credit: restored to original formula
  (max of CDCC and CTC portions, prorated)

Components still sum to combined credit (verified).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants