Skip to content

Conversation

@hua7450
Copy link
Collaborator

@hua7450 hua7450 commented Jan 11, 2026

Summary

Implements Arizona Cash Assistance (TANF) program.

Closes #7149
Closes #6719


Regulatory Authority


1. Income Eligibility Tests

Needy Family Test

Household Type Income Limit
Standard households 100% FPG
Non-parent caretaker relatives 130% FPG

Source: 2023 Arizona TANF State Plan, Page 18

Payment Standard Test

After passing the Needy Family test, countable income must also be at or below the applicable Payment Standard (A1 or A2).


2. Income Deductions & Exemptions

Earned Income Disregards

Deduction Amount
Flat deduction $90/month
Percentage disregard 30% of remainder

Source: 2023 Arizona TANF State Plan, Page 18

Dependent Care Expense Deduction

Dependent Type Maximum Deduction
Child under age 2 $200/month
Child age 2+ $175/month

Source: A.R.S. § 46-292


3. Payment Standards

Arizona payment standards are calculated as a percentage of the 1992 Federal Poverty Guidelines:

Standard Rate Applies When
A1 36% of 1992 FPG Recipient has shelter costs
A2 36% × (1 - 37%) = ~23% of 1992 FPG Recipient has no shelter costs

Per A.R.S. § 46-207: "the department shall reduce the federal poverty level used in its calculation of payments by thirty-seven per cent if the person is not paying, or is not obligated to pay, shelter costs"

Payment Standard by Family Size (Current - Post Dec 2023)

Family Size 1992 FPG A1 (36%) A2 (~23%)
1 $6,810 $204 $129
2 $9,190 $276 $174
3 $11,570 $347 $219
4 $13,950 $419 $264
5 $16,330 $490 $309
6 $18,710 $561 $354
7 $21,090 $633 $399
8 $23,470 $704 $444

Historical Benefit Reduction (2009-2023)

Arizona implemented a 20% benefit cut during the Great Recession (July 2009 - November 2023), reducing the payment standard rate from 36% to 28.8%.

Sources:


4. Resource Limit

  • $2,000 countable assets

Source: 2023 Arizona TANF State Plan, Page 20


5. Benefit Calculation

Formula

Benefit = Payment Standard − Countable Income

Countable Income Calculation

Countable Income = max(0, Gross Earned − $90 − 30% of Remainder − Care Expenses) + Unearned Income

Example (Family of 3, with shelter, $400 earned income)

  1. $400 − $90 = $310
  2. $310 × 0.70 = $217 (after 30% disregard)
  3. $217 − $0 (no care expenses) = $217 countable income
  4. $347 (A1 standard) − $217 = $130 benefit

6. Not Implemented

The following program rules are documented but not implemented in this PR:

40% Self-Employment Income Standard Deduction

Per 2023 Arizona TANF State Plan, Page 18-19:

"Self-employed family members may be eligible to receive a standard deduction for allowable business expenses equivalent to 40 percent of the countable gross self-employment income. The self-employment standard deduction is applied prior to calculating the earned income disregards."

This deduction applies before the $90 flat and 30% percentage disregards. Without this, benefits for self-employed recipients may be underestimated.

Disabled Adult Dependent Care Deduction

The State Plan mentions care expenses for disabled adults at $175/month, but only child care deductions are implemented.


Files Changed

Parameters (7 files)

gov/states/az/hhs/tanf/
├── income/
│   ├── fpg_limit/
│   │   ├── base.yaml          # 100% FPG limit
│   │   └── non_parent.yaml    # 130% FPG for non-parent relatives
│   └── deductions/
│       ├── flat.yaml          # $90 flat disregard
│       ├── percentage.yaml    # 30% percentage disregard
│       └── care_expenses/
│           └── amounts.yaml   # Child care deduction amounts
├── payment_standard/
│   ├── rate.yaml              # 36% base rate (with historical 20% cut)
│   └── reduction.yaml         # 37% reduction for no shelter
└── resources/
    └── limit.yaml             # $2,000 resource limit

Variables (11 files)

  • az_tanf.py - Main benefit calculation
  • az_tanf_eligible.py - Overall eligibility
  • az_tanf_eligible_child.py - Child eligibility
  • az_tanf_income_eligible.py - Income eligibility
  • az_tanf_resources_eligible.py - Resource eligibility
  • az_tanf_fpg_rate.py - FPG rate selector (100%/130%)
  • az_tanf_fpg_baseline.py - 1992 FPG baseline calculator
  • az_tanf_payment_standard.py - Payment standard (A1/A2)
  • az_tanf_countable_income.py - Total countable income
  • az_tanf_countable_earned_income.py - Countable earned income
  • az_tanf_earned_income_after_disregard_person.py - Per-person earned income after disregards
  • az_tanf_dependent_care_deduction.py - Dependent care deduction

Tests (12 files)

  • Unit tests for each variable
  • Integration test with 9 comprehensive scenarios

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Jan 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (67abb79) to head (6849f24).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #7150       +/-   ##
============================================
+ Coverage   72.11%   100.00%   +27.88%     
============================================
  Files        3794        11     -3783     
  Lines       54662       163    -54499     
  Branches      275         0      -275     
============================================
- Hits        39418       163    -39255     
+ Misses      15228         0    -15228     
+ Partials       16         0       -16     
Flag Coverage Δ
unittests 100.00% <100.00%> (+27.88%) ⬆️

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.

@hua7450 hua7450 marked this pull request as ready for review January 13, 2026 01:51
llennemann added a commit to llennemann/policyengine-us that referenced this pull request Jan 20, 2026
Add individual test files for each Iowa FIP variable following the
Arizona TANF pattern from PR PolicyEngine#7150:

- ia_fip_eligible.yaml (8 tests)
- ia_fip_income_eligible.yaml (8 tests)
- ia_fip_payment_standard.yaml (8 tests)
- ia_fip_standard_of_need.yaml (8 tests)
- ia_fip_countable_income.yaml (8 tests)
- ia_fip_gross_income.yaml (6 tests)
- ia_fip_gross_earned_income.yaml (7 tests)
- ia_fip_gross_unearned_income.yaml (10 tests)

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

PR Review - Arizona TANF Implementation

🔴 Critical Issues (Must Fix Before Merge)

1. Reference Corroboration: 100% FPL Limit Source Missing

File: policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml

  • The cited A.R.S. Section 46-292 does NOT establish a 100% FPL income limit
  • Only the 130% limit for non-parent relatives is explicitly stated in the statute
  • Action: Find an authoritative source that explicitly states the 100% FPL limit for standard TANF cases, or document that this is derived from the State Plan

2. Reference Section Mismatch: Wrong Subsection Cited

File: policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml

  • Title cites A.R.S. Section 46-292(Q) but the 130% FPL threshold is in subsection P(2), not Q
  • Fix: Change reference title to A.R.S. Section 46-292(P)(2) - Non-parent relative income limit

3. Period Access Error in Formula

File: policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py:19

  • az_tanf_fpg_rate is defined with definition_period = MONTH but accessed with period.this_year
  • Fix: Change spm_unit("az_tanf_fpg_rate", period.this_year) to spm_unit("az_tanf_fpg_rate", period)

🟡 Should Address

1. Third-Party Reference Source

File: policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_resources_eligible.py:9-11

  • Uses db101.org (third-party) instead of official government source
  • Consider replacing with: https://www.azleg.gov/ars/46/00292.htm or the TANF State Plan

2. Reference Format - Vague Subsections

Files: income/deductions/flat.yaml, income/deductions/percentage.yaml

  • A.R.S. references cite (P) but should be more specific: (P)(1)

3. Missing Boundary Tests

  • Income exactly at payment standard threshold
  • Resources at $1,999 and $2,001 (unit test, not just integration)
  • Earned income at $89 and $91 (flat disregard boundary)
  • Housing cost at $1 (A1/A2 trigger boundary)

4. Missing Integration Test Scenarios

  • Family with only unearned income (no earned income at all)
  • Non-parent relative with A2 (no shelter) payment standard
  • Pregnant woman with income

🟢 Suggestions

  1. Large family test coverage: Consider adding tests for 7-8+ member families
  2. Reference accessibility: Several State Plan PDF links return 403 - consider verifying accessibility
  3. Comment cleanup: Some comments are verbose; variable names and structure should be self-documenting

✅ What's Implemented Correctly

Component Verification
Payment Standard (36% of 1992 FPG) ✓ Matches A.R.S. 46-207.01
37% Shelter Reduction ✓ Matches A.R.S. 46-207(D)
$90 Flat + 30% Earned Disregard ✓ Matches A.R.S. 46-292(P)(1)
$200/$175 Dependent Care ✓ Matches A.R.S. 46-292(P)(1)
1992 FPG Values ✓ Verified against HHS records
Historical 20% Cut (2009-2023) ✓ Properly parameterized
No Hard-coded Values ✓ All values from parameters
Variable Naming ✓ All use az_tanf_* prefix
Pattern Usage ✓ Correct adds, add(), max_()
Entity Levels ✓ Proper SPMUnit/Person usage
Vectorization ✓ Uses where(), &, `

Validation Summary

Check Result
Regulatory Accuracy ✅ Implementation matches statutes
Reference Quality ⚠️ 2 critical issues (100% FPL source, wrong subsection)
Code Patterns ⚠️ 1 critical issue (period access)
Test Coverage ⚠️ Missing boundary tests
CI Status ✅ All checks passing

Documented Limitations (Acknowledged)

The PR correctly documents these as NOT implemented:

  1. 40% Self-Employment Income Standard Deduction
  2. Disabled Adult Dependent Care Deduction ($175/month)

Test Coverage: 75 Tests Passing

Category Count
Unit tests per variable 63 tests
Integration scenarios 12 tests

Next Steps

To auto-fix code issues: /fix-pr 7150

Or address manually:

  1. Fix the period access in az_tanf_income_eligible.py line 19
  2. Update reference subsection in fpg_limit/non_parent.yaml
  3. Add authoritative source for 100% FPL limit in fpg_limit/base.yaml

🤖 Generated with Claude Code - Complete Review Plugin

@PavelMakarchuk
Copy link
Collaborator

@hua7450 please take a look at the missing 100% fpl reference

@hua7450
Copy link
Collaborator Author

hua7450 commented Feb 2, 2026

@hua7450 please take a look at the missing 100% fpl reference

Can't find it in Statues, but its in both state plan and official website of Arizona TANF

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.

Arizona TANF payment values 2017, 2018, 2019 Implement Arizona TANF (cash assistance) program

2 participants