Skip to content

Make Arizona families rebate subtraction reported#7835

Merged
MaxGhenis merged 4 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/az-rebate-input
Apr 6, 2026
Merged

Make Arizona families rebate subtraction reported#7835
MaxGhenis merged 4 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/az-rebate-input

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Fixes #7481

Related: PolicyEngine/policyengine-taxsim#619

Summary

  • stop recomputing the Arizona Families Tax Rebate subtraction from current-year dependents
  • treat the subtraction as the amount actually received and included in federal AGI, defaulting to zero when not reported
  • update Arizona baseline tests to reflect the reported-input semantics

Testing

  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/az/tax/income/subtractions/az_families_tax_rebate_subtraction.yaml policyengine_us/tests/policy/baseline/gov/states/az/tax/income/integration_2025.yaml -c policyengine_us

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #7835    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           19         2    -17     
  Lines          297        24   -273     
==========================================
- Hits           297        24   -273     
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 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.

@DTrim99
Copy link
Copy Markdown
Collaborator

DTrim99 commented Mar 27, 2026

Program Review: PR #7835

PR Summary

Critical (Must Fix)

None identified

The implementation correctly aligns with Arizona tax law (SB1734, Laws 2023 Chapter 147, Section 3(I)):

  • The Arizona Families Tax Rebate was a one-time payment issued in 2023 based on 2021 tax returns
  • The subtraction should equal the amount actually received and reported in federal AGI, NOT computed from current-year dependents
  • The previous implementation incorrectly computed the subtraction from current-year dependents
  • Making this a reported input with default_value = 0 is the correct approach

Should Address

  1. Reference Format - Use Full URL (Low severity)

    • File: policyengine_us/variables/gov/states/az/tax/income/subtractions/az_families_tax_rebate_subtraction.py
    • Current: reference = "A.R.S. 43-1022 - Subtractions from Arizona Gross Income"
    • Recommended: Use full clickable URL: "https://www.azleg.gov/ars/43/01022.htm"
    • Note: This matches existing patterns in other AZ files, so it is consistent with current codebase
  2. Documentation Field Usage (Low severity)

    • File: policyengine_us/variables/gov/states/az/tax/income/subtractions/az_families_tax_rebate_subtraction.py
    • The documentation field is used, but pattern guidelines prefer using reference or docstrings
    • Note: This is an existing pattern in the codebase and provides helpful context

Suggestions

  1. Test Person Naming Convention (Minor)

    • Current tests use descriptive names (filer, child) instead of sequential names (person1, person2)
    • This is a minor style inconsistency that does not affect functionality
  2. Optional: Add SB1734 Reference (Enhancement)

    • Consider adding the source statute URL as an additional reference

Validation Summary

Check Result
Regulatory Accuracy ✅ Correctly implements SB1734 Section 3(I)
Code Patterns ✅ Follows input variable patterns with minor style notes
Test Coverage ✅ 3 unit tests + 1 integration test adequately cover input semantics
CI Status ✅ All checks passing

Review Severity: APPROVE

Recommendation: Merge as-is

The PR correctly fixes bug #7481 where 2024+ filers were incorrectly receiving a subtraction based on current-year dependents rather than the amount they actually received from the one-time 2023 rebate. The implementation:

  1. Aligns with Arizona law - SB1734 Section 3(I) states the subtraction equals "any rebate received by a taxpayer...and required to be included in Arizona gross income"
  2. Follows PolicyEngine patterns - Uses the same reported input pattern as ssi_reported, snap_reported, tanf_reported
  3. Has adequate test coverage - Tests verify default behavior (zero) and user-provided input pass-through
  4. Maintains production readiness - No breaking changes, CI passing

The minor style suggestions (URL references, person naming) are pre-existing patterns in the codebase and do not affect correctness. They can be addressed in a future cleanup PR if desired.


Review generated by PolicyEngine program-reviewer

@MaxGhenis MaxGhenis merged commit 97bdce3 into PolicyEngine:main Apr 6, 2026
9 checks passed
@PavelMakarchuk
Copy link
Copy Markdown
Collaborator

@MaxGhenis why removing the formula entirely?

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.

az_families_tax_rebate_subtraction incorrectly applied for TY 2024

3 participants