Implement Alabama Unemployment Insurance (al_ui) (ref #8282) - #8283
Implement Alabama Unemployment Insurance (al_ui) (ref #8282)#8283daphnehanse11 wants to merge 9 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8283 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 3 12 +9
Lines 49 158 +109
==========================================
+ Hits 49 158 +109
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds the Alabama Unemployment Compensation program (Code of Alabama Title 25, Chapter 4) with monetary eligibility, weekly benefit amount, sliding-scale duration tied to state unemployment rate, dual-cap maximum benefit, partial-week earnings disregard, and the 1-week waiting period. All parameters effective 2020-01-01 per Act 2019-204. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- al_ui.py: fix partial-benefit fallback (was returning full WBA when
weekly_earnings >= WBA; should return 0 per "deemed employed" rule
in § 25-4-72 / USDOL Tbl 3-8). Now uses al_ui_partial_weekly_benefit
directly, which already handles this case correctly.
- Fix 5 BRR PDF page anchors (printed page vs file page; off by 3):
eligibility/{bpw_to_hqw_multiplier,quarters_with_wages}.yaml,
wba/{max,min_threshold}.yaml, waiting_weeks.yaml.
- Replace Ala. Admin. Code 480-4-3-.11 citation with statute § 25-4-73
for the 1/3 WBA partial disregard (480-4-3-.11 is procedural).
- Add al_ui entry to programs.yaml registry.
- Add test case for weekly_earnings >= WBA returning 0 (locks in the
al_ui.py fix).
- Fix two parameter description verbs ("requires" → "sets").
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Round 2 review identified that the "two quarters of your base period" sentence is on file page 7 of the BRR handbook (printed page 4), not page 8. Page 8 has the related "two highest base period quarters" phrasing, which supports the value but is less direct. Tightening the anchor for precision. Round 2 found 0 critical issues otherwise — all Round 1 fixes verified correct, no regressions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Program Review — PR #8283 (Implement Alabama Unemployment Insurance,
|
| Check | Result |
|---|---|
| Regulatory Accuracy | Correct — WBA/round-half-down/$275/3-prong eligibility/duration all match statute; no reinvented variables; documentation/pinpoint-citation items only |
| Reference Quality | 0 missing refs, format PASS; broken article-4 URLs + pinpoint subsections to fix; act-number to reconcile |
| Code Patterns | 0 critical / 3 should / 4 suggestion — zero hardcoded values, correct Person/YEAR entities, complete programs.yaml; stray lessons file + agency field |
| Test Coverage | Strong (round-half-down tie, $44.50, $275, 3 prongs, MBA both caps, partial boundaries, 11 integration); gap: middle duration brackets 16/17/18 |
| Source Audit | $275 / $44.50 / 1.5× / 2-quarter / 14-20-week scale / round-half-down all confirmed vs statute + BRR + USDOL |
| CI Status | Passing |
Review Severity: COMMENT
A correct, thorough, cleanly-parameterized new program with an unusually complete test suite and no blocking defects. Before marking ready: fix the broken reference URLs (item 1), drop the stray lessons/agent-lessons.md (item 2), align the programs.yaml agency field (item 3), add the middle-duration-bracket tests, and rebase off the 1689-commit lag.
Next Steps
To auto-apply the actionable items: /fix-pr 8283
Review generated with Claude Code via /review-program
- Remove stray lessons/agent-lessons.md - Set programs.yaml agency to State per convention - Add just-below/just-at boundary tests for the 16/17/18-week duration brackets (Cases 5-14) - Document intentional modeling choices: partial weekly benefit applied to every payable week, and the statutory WBA/MBA formulas as authoritative over the BRR handbook's simplified gloss - Justia URLs and pinpoint cites verified correct as-is (Article 4; (b)(5)/(b)(2)) and left unchanged Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Addressed the review items and rebased onto current main (branch is now main + 9 commits):
Alabama suite passes 391/391 locally (includes the 10 new bracket cases). |
Re-review — items addressed, and a correction to my own prior findingThanks for the fixes. First, an important retraction of the top item from my earlier review: ❌→✅ The Everything else I flagged is resolved:
Two minor residuals (non-blocking, optional):
Net: the implementation was already regulatorily correct (WBA/round-half-down/$275/3-prong eligibility/duration all verified), and this round removes the scratch file, aligns the agency field, and closes the duration-bracket test gap. LGTM once CI settles green (still running) and the branch is rebased off its main lag. Re-review via /review-program |
Summary
Implements the Alabama Unemployment Insurance program (Code of Alabama Title 25, Chapter 4).
Closes #8282.
Regulatory Authority
Monetary Eligibility (§ 25-4-77(a)(4))
A claimant is monetarily eligible if ALL of the following are true:
Weekly Benefit Amount (§ 25-4-72(b))
np.ceil(x - 0.5))Maximum Benefit Amount and Duration (§ 25-4-74(a))
Partial-Benefit Provisions (§ 25-4-72; NELP 2015 reform)
Waiting Week
Requirements Coverage
eligibility/quarters_with_wages.yamlal_ui_monetarily_eligible.pyal_ui_monetarily_eligible.yamleligibility/bpw_to_hqw_multiplier.yamlal_ui_monetarily_eligible.pyal_ui_monetarily_eligible.yamlwba/min_threshold.yamlal_ui_monetarily_eligible.py,al_ui_weekly_benefit_amount.pyal_ui_weekly_benefit_amount.yamlal_ui_unrounded_wba.pyal_ui_unrounded_wba.yamlal_ui_weekly_benefit_amount.pyal_ui_weekly_benefit_amount.yamlwba/min_threshold.yamlal_ui_weekly_benefit_amount.pyal_ui_weekly_benefit_amount.yamlwba/max.yamlal_ui_weekly_benefit_amount.pyal_ui_weekly_benefit_amount.yamlmba/duration_weeks.yaml,state_unemployment_rate.yamlal_ui_max_weeks.pyal_ui_max_weeks.yamlmba/bpw_fraction.yamlal_ui_maximum_benefit_amount.pyal_ui_maximum_benefit_amount.yamlal_ui_maximum_benefit_amount.pyal_ui_maximum_benefit_amount.yamlal_ui_partial_weekly_benefit.pyal_ui_partial_weekly_benefit.yamlpartial/disregard_rate.yamlal_ui_partial_weekly_benefit.pyal_ui_partial_weekly_benefit.yamlwaiting_weeks.yamlal_ui.pyal_ui.yaml,integration.yamlNot Modeled
Historical Notes
All AL UI parameters in this PR start at 2020-01-01, matching the effective date of Act 2019-204 which introduced:
The 1/3 partial-earnings disregard has been in effect since 2015-06-13 (prior was a flat $15) — using the 2020-01-01 effective date in the parameter is conservative (i.e., the rule was already in effect by then).
State unemployment rate values in
state_unemployment_rate.yamlare approximate decimal-form FRED ALUR series values for 2020-01 through 2026-04. Reviewers should verify these against the authoritative FRED series before merge.Test Coverage
Files Added
Modified:
policyengine_us/variables/gov/states/unemployment_compensation.py— addedal_uito theaddslist so it flows into the federalunemployment_compensationaggregator.