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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Program Review: PR #7660 -- Alabama HB527 Overtime Compensation DeductionSource Documents
Critical (Must Fix)
Should Address
Suggestions
PDF Audit SummaryThe PDF audit agent could not find the implementation files locally because they exist only on the PR branch, not the current working branch. As a result, it reported "NO IMPLEMENTATION EXISTS" and found 0 matches and 0 mismatches. This is an artifact of the review environment, not a real finding. The audit did extract the following provisions from the bill text that should be modeled:
Confirmed correct (cross-referenced with other validator reports):
Mismatch (confirmed by code review):
Unmodeled provisions (noted by PDF audit, may be out of scope for this PR):
Validation Summary
Review Severity: REQUEST_CHANGESThe per-taxpayer cap bug is a regulatory mismatch that produces incorrect results for joint filers with asymmetric overtime. The reference errors (wrong section number, wrong page numbers) prevent traceability to the authoritative source. These must be fixed before merge. Next StepsTo auto-fix issues: Critical fixes required:
|
Summary
Bill Details
Test plan
Closes #7658
🤖 Generated with Claude Code