Skip to content

Conversation

@DTrim99
Copy link
Collaborator

@DTrim99 DTrim99 commented Jan 6, 2026

Summary

Update the Arizona income tax model for tax year 2025, including parameter value updates, 2025 references for all parameters, and implementation of new modelable programs.

Fixes #7111

Changes

Parameter Value Updates

  • Standard deductions updated for 2025 (Single: $15,750, Joint: $31,500, HOH: $23,625, MFS: $15,750)
  • Charitable contributions rate updated to 34%

2025 Reference Updates

  • Tax rate parameters
  • Exemption parameters (aged, blind, stillborn, parent/grandparent)
  • Dependent tax credit parameters
  • Family tax credit parameters
  • Increased excise tax credit parameters
  • Property tax credit parameters
  • Subtraction parameters
  • Charitable contribution credit parameters

New Programs (Planned)

  • 529A ABLE Account Contributions Subtraction
  • Adoption Expenses Subtraction
  • Wood Stove/Fireplace Conversion Subtraction
  • Arizona Families Tax Rebate Subtraction
  • Filing requirement threshold parameters

Status

  • Documentation collected
  • Parameters updated
  • Variables implemented
  • Tests written
  • CI passing

Test Plan

  • Update existing test files for 2025 parameter values
  • Create new test cases for new subtractions
  • Run integration tests for 2025 tax year
  • Verify make format passes
  • Verify make test passes

Primary Source

2025 Arizona Form 140 Instructions


This is a draft PR created for early visibility. Implementation work is in progress.

DTrim99 and others added 6 commits January 6, 2026 09:38
Starting implementation of Arizona 2025 individual income tax updates.
Documentation and parallel development will follow.

Fixes PolicyEngine#7111

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update az_base_standard_deduction.yaml with 2025 values (Single: $15,000, Joint: $30,000, HOH: $22,500, Separate: $15,000)
- Update az_increased_standard_deduction_for_charitable_contributions.yaml with 34% rate tests
- Add az_529a_able_account_subtraction.yaml testing $2,000/$4,000 limits by filing status
- Add az_adoption_expense_subtraction.yaml testing $40,000 cap (2025) and $5,000/$10,000 limits (2026+)
- Add az_wood_stove_conversion_subtraction.yaml testing $500 cap
- Add az_families_tax_rebate_subtraction.yaml for one-time rebate subtraction
- Add az_income_tax_filing_required.yaml with 2025 filing thresholds
- Add integration_2025.yaml for end-to-end 2025 Arizona tax calculation scenarios

Tests based on 2025 Arizona Form 140 Instructions and A.R.S. 43-1022, 43-1027, 43-1041

Closes PolicyEngine#7111

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update parameters with 2025 values:
- Standard deduction: Single $15,000, Joint $30,000, HOH $22,500
- Increased standard deduction rate: 34%
- Add 2025 references to all tax rate and subtraction files

New subtractions implemented:
- az_529a_able_account_subtraction: $2,000/$4,000 cap based on filing status
- az_adoption_expense_subtraction: $40,000 for 2023-2025 (reverts to $5,000/$10,000 in 2026)
- az_wood_stove_conversion_subtraction: $500 maximum
- az_families_tax_rebate_subtraction: Pass-through for federal taxable rebate

New filing requirement variable:
- az_income_tax_filing_required: Thresholds $15,750 (single), $31,500 (joint)

All values parameterized with zero hard-coded numeric values.
References embedded from official Arizona DOR documentation.

Fixes PolicyEngine#7111

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tests created based on documentation for Arizona 2025 income tax model update.
Variables and parameters for Arizona 2025 income tax model update.
- Add 2025 standard deductions ($15,750 single/$31,500 joint/$23,625 HOH)
- Update Arizona income tax parameters with 2025 references
- Add comprehensive 2025 integration tests
- Update charitable contribution, capital gains, family tax credit,
  dependent credit, and exemption parameters

Closes PolicyEngine#7111

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7112   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10         6    -4     
  Lines          144        69   -75     
=========================================
- Hits           144        69   -75     
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
Collaborator Author

DTrim99 commented Jan 6, 2026

PR Review: Arizona 2025 Income Tax Model Update

Overall Assessment: APPROVE with minor suggestions

This PR correctly implements Arizona 2025 income tax updates including standard deduction increases, charitable contribution rate updates, new subtractions, and filing requirement thresholds. The implementation is well-structured and properly wired into the existing Arizona tax model.


What's Working Well

  1. New subtractions are properly integrated: All 4 new subtractions (529A ABLE, adoption expenses, wood stove conversion, and Arizona Families Tax Rebate) are:

    • Added to subtractions.yaml so they flow into az_subtractions.py
    • Have proper input variables that users can specify
    • Correctly use defined_for = StateCode.AZ
  2. Parameter values have 2025 references: All updated parameters include the 2025 Form 140 Instructions as a reference source.

  3. Good test documentation: Tests include detailed calculation comments explaining expected values.

  4. Modelable programs: All new subtractions ARE modelable because:

    • They have user-specifiable input variables (az_able_account_contributions, az_adoption_expenses, az_wood_stove_conversion_expense, az_families_tax_rebate_received)
    • The logic is straightforward (min of expense and cap)
    • No complex eligibility criteria that can't be captured by inputs

Should Address

  1. Test count is borderline excessive:

    • integration_2025.yaml: 56 tests (1,301 lines)
    • az_income_tax_filing_required.yaml: 20 tests
    • Individual subtraction files: 9-15 tests each

    Suggestion: The integration test file is comprehensive but could be trimmed. Consider:

    • Removing tests that duplicate what's already in unit test files (e.g., filing requirement boundary tests appear in both integration_2025.yaml and az_income_tax_filing_required.yaml)
    • The "Compare 2024 vs 2025" tests (lines 1236-1276) are good for documentation but could be trimmed to 1-2 examples
  2. Variable unit mismatch: az_income_tax_filing_required.py (line 8) has unit = USD but the variable is a boolean. Should be removed or changed:

# policyengine_us/variables/gov/states/az/tax/income/az_income_tax_filing_required.py:8
unit = USD  # Should be removed - this is a bool variable
  1. Filing requirement parameter missing pre-2024 values: filing_requirement.yaml only has values starting from 2024-01-01. Consider adding historical values or documenting when this was introduced.

Suggestions (Non-blocking)

  1. Consider consolidating similar edge case tests: For example, az_families_tax_rebate_subtraction.yaml has multiple tests that all just pass through the input value since the variable has no cap. Tests 9-11 ("Single dependent under 17", "Single dependent 17 or older", "Three dependents under 17") test the same code path as tests 1-3.

  2. Add a README or module docstring: The new subtractions would benefit from a brief note explaining they were added for 2025 tax year.


Validation Summary

Check Result
New programs modelable Yes - all have user inputs
Variables wired in correctly In subtractions.yaml
References included 2025 Form 140 refs added
Code patterns correct Uses defined_for, proper patterns
Test coverage Comprehensive but some duplication
CI Status Most passing, some pending

Next Steps

  1. Consider removing 5-10 duplicate tests from integration_2025.yaml
  2. Fix the unit = USD on the boolean variable
  3. Wait for remaining CI checks to complete

Generated with Claude Code

- Remove `unit = USD` from boolean variable az_income_tax_filing_required.py
- Remove 6 duplicate filing requirement tests from integration_2025.yaml (already in dedicated test file)
- Remove 3 redundant passthrough tests from az_families_tax_rebate_subtraction.yaml
- Renumber integration test sections after removal

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@DTrim99
Copy link
Collaborator Author

DTrim99 commented Jan 6, 2026

Fixes Applied

Issues Fixed

  1. Fixed unit attribute mismatch (az_income_tax_filing_required.py)

    • Removed unit = USD from boolean variable - boolean variables should not have a unit attribute
  2. Removed duplicate tests (integration_2025.yaml)

    • Removed SECTION 9 with 6 filing requirement boundary tests that duplicated tests in az_income_tax_filing_required.yaml
    • Renumbered remaining sections (10→9, 11→10)
    • Reduced integration tests from 56 to 50
  3. Removed redundant tests (az_families_tax_rebate_subtraction.yaml)

    • Removed 3 edge case tests that tested the same pass-through logic as existing tests
    • Reduced tests from 11 to 8 while maintaining full coverage

Verification

  • All tests pass locally:
    • az_families_tax_rebate_subtraction.yaml: 8/8 passed
    • az_income_tax_filing_required.yaml: 20/20 passed
    • integration_2025.yaml: 50/50 passed
  • Code formatted with make format

Summary

File Change Tests Removed
az_income_tax_filing_required.py Removed unit = USD N/A
integration_2025.yaml Removed duplicate section 6 tests
az_families_tax_rebate_subtraction.yaml Removed redundant tests 3 tests

Total test reduction: 9 duplicate/redundant tests removed

Ready for re-review.

Copy link
Collaborator

@PavelMakarchuk PavelMakarchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High level notes

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont model the filing requirements, I dont think it is in the legal code but a combination of deductions and exemptions etc.
Please remove

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is cluttering the model, we dont have relevant data

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not model the rebate itself?

p = parameters(period).gov.states.az.tax.income.subtractions.adoption

filing_status = tax_unit("az_filing_status", period)
expenses = tax_unit("az_adoption_expenses", period)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to model this, this should be a federal input

…ction, make adoption expenses federal

Per reviewer feedback:
- Remove az_income_tax_filing_required variable and filing_requirement parameter
- Remove az_wood_stove_conversion_subtraction (no relevant data)
- Convert az_adoption_expenses to federal qualified_adoption_expenses input
- Keep az_families_tax_rebate_subtraction (subtraction is needed for tax filings)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@DTrim99
Copy link
Collaborator Author

DTrim99 commented Jan 7, 2026

Review Feedback Addressed

Changes Made

Issue Action Taken
Remove filing_requirement.yaml ✅ Deleted parameter file
Remove az_income_tax_filing_required.py ✅ Deleted variable file and tests
Remove wood stove conversion subtraction ✅ Deleted variable, parameter, input, and tests
Move adoption expenses to federal input ✅ Created qualified_adoption_expenses at federal level

Details

  1. Filing Requirement - Removed entirely per feedback that filing requirements aren't modeled in PolicyEngine

  2. Wood Stove Conversion - Removed entirely per feedback about model clutter without relevant data

  3. Adoption Expenses - Converted from state-specific az_adoption_expenses to federal qualified_adoption_expenses so other states can reuse it

  4. Arizona Families Tax Rebate - Kept the subtraction. This is a valid use case: the rebate is federally taxable but AZ-exempt, so users who received the rebate need to subtract it from AZ income. The input variable allows users to specify the rebate amount they received.

Files Changed

Deleted:

  • policyengine_us/parameters/gov/states/az/tax/income/filing_requirement.yaml
  • policyengine_us/variables/gov/states/az/tax/income/az_income_tax_filing_required.py
  • policyengine_us/variables/gov/states/az/tax/income/subtractions/az_wood_stove_conversion_subtraction.py
  • policyengine_us/variables/household/expense/person/az_wood_stove_conversion_expense.py
  • policyengine_us/parameters/gov/states/az/tax/income/subtractions/wood_stove/max_amount.yaml
  • policyengine_us/variables/household/expense/person/az_adoption_expenses.py
  • Related test files

Added:

  • policyengine_us/variables/household/expense/tax_unit/qualified_adoption_expenses.py (federal input)

Modified:

  • az_adoption_expense_subtraction.py - Now uses federal input
  • subtractions.yaml - Removed wood stove entry
  • Test files updated accordingly

Verification

  • ✅ All 255 Arizona income tax tests pass
  • ✅ Code formatted with make format

Question for Reviewer

Regarding Arizona Families Tax Rebate: I kept the subtraction because it serves a legitimate purpose - users who received the 2023/2024 rebate need to subtract it from Arizona taxable income (federally taxable but AZ-exempt). Should this also be removed, or is the current approach acceptable?


Ready for re-review.

@DTrim99 DTrim99 marked this pull request as ready for review January 7, 2026 21:17
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.

Update Arizona 2025 Individual Income Tax Model

2 participants