Add Alabama HB527 overtime compensation deduction reform#7660
Add Alabama HB527 overtime compensation deduction reform#7660DTrim99 wants to merge 4 commits intoPolicyEngine:mainfrom
Conversation
Implements HB527 which provides an Alabama income tax deduction for qualified overtime compensation, capped at $1,000 per taxpayer (or $2,000 for joint filers). Uses federal FLSA overtime premium calculation. Closes PolicyEngine#7658 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implementation NotesFiles Created
How It Works
UsageTo enable the reform in a simulation: from policyengine_us import Simulation
situation = {
# ... household setup ...
}
# Enable via parameter
situation["gov.contrib.states.al.hb527.in_effect"] = {2025: True}
sim = Simulation(situation=situation)Or apply the reform directly: from policyengine_us.reforms.states.al.hb527 import al_hb527_overtime_deduction
sim = Simulation(
situation=situation,
reform=al_hb527_overtime_deduction
) |
PR Review: Alabama HB527 Overtime Compensation Deduction🔴 Critical (Must Fix)
🟡 Should Address
🟢 Suggestions
Validation Summary
What's Working Well
Next StepsTo auto-fix issues: |
PR Review: Alabama HB527 Overtime Compensation Deduction (Updated)🔴 Critical (Must Fix)
🟡 Should Address
🟢 Suggestions
Validation Summary
What's Working Well
Next StepsTo auto-fix issues: 🤖 Generated with Claude Code |
- Fix incorrect legal citation (26 USC 225 -> 29 USC 207) - Remove unused adds/subtracts from al_agi class (keep formula only) - Add #page=1 anchors to PDF references - Change test error margin from 1 to 0.1 - Rename test persons from spouse1/spouse2 to person1/person2 - Add edge case tests: Head of Household, Married Filing Separately, Joint with one spouse no overtime Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes Applied🔴 Critical Issues Fixed
🟡 Should-Address Issues Fixed
Verification
Ready for re-review. 🤖 Generated with Claude Code |
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Per-taxpayer cap should be applied per-person, not per-return
The bill caps the deduction at "$1,000 per taxpayer." The code applies the cap at the tax-unit level:
cap = where(joint, p.cap * 2, p.cap)
return min_(total_overtime, cap)This means a joint filer where only one spouse has overtime gets a $2,000 cap instead of $1,000. Test Case 8 ("Joint filers one spouse no overtime") expects $2,000 — likely incorrect.
Fix: cap each person's overtime individually, then sum:
person_capped = min_(person("fsla_overtime_premium", period), p.cap)
return tax_unit.sum(person_capped)Minor items:
- PR body cites "26 U.S.C. § 225" for FLSA overtime — FLSA is 29 U.S.C. § 207
- Consider documenting interaction with the federal overtime exemption (One Big Beautiful Bill) — if both are active, overtime could be excluded federally and deducted at AL level
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Bill Details
Test plan
Closes #7658
🤖 Generated with Claude Code