Implement Utah Unemployment Insurance (ut_ui) - #8281
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8281 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 12 +9
Lines 49 147 +98
=========================================
+ Hits 49 147 +98
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:
|
- Split min_base_period_wages into 2024/2025 ($5,300) and 2026 ($5,500) entries - Fix Claimant Guide page references (printed p.11 = file p.13) - Update test boundary cases to match new $5,300 threshold
- Replace misleading 2025 form URL with Wayback Machine archive snapshot - Clarify Claimant Guide page references (printed p.11 = file p.13) - Add 2024/2026 boundary tests for min_base_period_wages (Cases 28-32) - Use canonical verb in base_period_to_high_quarter_ratio description - Pair statute and admin rule citations on min_quarters_with_wages
Derived from 2024 max WBA ($712) per UC § 35A-4-201(16) + § 35A-4-401(2)(b)(ii): both values depend on the same insured average fiscal year wage. Working backward, 8% × annual_IAFY ≈ $4,772, rounded up to next $100 = $4,800. - Update 2024-01-01 entry from $5,300 to $4,800 - Adjust edge case boundaries (Cases 28-29) to test new $4,800 floor
|
Rebased onto current main (branch is now main + 5 commits). One substantive change during the rebase: the commit wiring |
Program Review — Utah Unemployment Insurance (PR #8281)Program Review — via /review-program (multi-agent audit)Read-only multi-agent review of PR #8281 (new program: Utah Unemployment Insurance, Source Documents
Branch Status⚠ PR branch is 41 commit(s) behind main. Consider rebasing before merge. Review scoped to merge-base diff; staleness did not affect findings. Critical (Must Fix)
Should Address
Suggestions
Source Audit Summary
Validation Summary
Review Severity: REQUEST_CHANGESTwo confirmed parameter-value errors in a tested year (2024) — both the 2023 schedule's figures encoded one year late — plus the tests that lock them in. Structure, formulas, rounding, boundaries, and 2025/2026 values are otherwise excellent; once the 2024 values, dependent tests, and derivation comment are corrected (and ideally the citation fixes in Should Address 1–3), this is a high-quality implementation. Next Steps
🤖 Generated by /review-program (Claude Code multi-agent review) |
- Correct 2024 max WBA $712 -> $746 and 2024 minimum base-period wages $4,800 -> $5,100 per the archived January 2024 DWS Benefit Schedule; recompute the four dependent 2024 test cases - Rename agency path dwf -> dws (Department of Workforce Services); pre-existing dwf/fep left for separate cleanup - Fix R994-401-202 -> R994-401-201 pin-cites; make the Claimant Guide the value-bearing citation for the 2-quarter rule and 40-hour threshold; add per-year archive.org references for schedule values - Document unmodeled provisions (waiting week, 20-week alternative sunset, child-support and voluntary tax withholding) and zero-default microsim-inert inputs - Add boundary and defensive tests: WBA floor cases, partial earnings at WBA-1, MBA equality, negative wages, just-above-floor eligibility Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes Applied (from Program Review)Commit 2ee6840 addresses all actionable findings from the review above. Critical
Should Address
Suggestions
Skipped (deliberate)
Verification
🤖 Applied via |
Summary
Implements Utah Unemployment Insurance (UI) in PolicyEngine, administered by the Utah Department of Workforce Services (DWS) under Utah Code Title 35A Chapter 4 and Utah Admin Code R994 series.
Closes #8280
Regulatory Authority
Weekly Benefit Amount (WBA) Formula
floor(high_quarter_wages / 26) − 5, capped at the annual maximumMonetary Eligibility Tests
Duration of Benefits
clamp(floor(0.27 × base_period_wages / WBA), 10, 26)Partial Benefits
floor(max(0, WBA − max(0, earnings − 0.30 × WBA)))Requirements Coverage
ut_ui_base_period_wages.py(docstring)ut_ui_base_period_wages.py(docstring)eligibility/min_base_period_wages.yaml($5,500)ut_ui_monetarily_eligible.pyut_ui_monetarily_eligible.yamlCase 2; edge Cases 1-3eligibility/min_quarters_with_wages.yaml(2)ut_ui_monetarily_eligible.pyut_ui_monetarily_eligible.yamlCase 3; edge Cases 6-7eligibility/base_period_to_high_quarter_ratio.yaml(1.5)ut_ui_monetarily_eligible.pyut_ui_monetarily_eligible.yamlCase 4; edge Cases 4-5ut_ui_monetarily_eligible.pyut_ui_monetarily_eligible.yamlCase 1wba/divisor.yaml(26);wba/subtraction.yaml($5)ut_ui_weekly_benefit_amount.pyut_ui_weekly_benefit_amount.yamlCase 1wba/max_amount.yaml(712/777/806)ut_ui_weekly_benefit_amount.pyut_ui_weekly_benefit_amount.yamlCases 2-3; edge Cases 10-13min_amount.yaml)ut_ui_weekly_benefit_amount.py(max_(raw, 0))ut_ui_weekly_benefit_amount.py(× monetarily_eligible)ut_ui_weekly_benefit_amount.yamlCase 4duration/multiplier.yaml,min_weeks.yaml,max_weeks.yamlut_ui_duration_weeks.pyut_ui_duration_weeks.yamlCases 1-3duration/min_weeks.yaml(10)ut_ui_duration_weeks.pyut_ui_duration_weeks.yamlCase 2; integration Case 4duration/max_weeks.yaml(26)ut_ui_duration_weeks.pyut_ui_duration_weeks.yamlCase 1; edge Cases 16-17duration/multiplier.yaml(0.27)ut_ui_duration_weeks.pyut_ui_duration_weeks.yamlCases 1-3ut_ui_maximum_benefit_amount.pyut_ui_maximum_benefit_amount.yamlCases 1-2; integration Cases 2-5partial/earnings_disregard_rate.yaml(0.30)ut_ui_weekly_payable_amount.pyut_ui_weekly_payable_amount.yamlCases 2-3; edge Cases 19-20ut_ui_weekly_payable_amount.pyut_ui_weekly_payable_amount.yamlCase 3; edge Case 20ut_ui_weekly_payable_amount.py(earnings ≥ WBA → 0)ut_ui_weekly_payable_amount.yamlCase 4; edge Case 18partial/hours_threshold.yaml(40)ut_ui_weekly_payable_amount.pyut_ui_weekly_payable_amount.yamlCase 5; edge Cases 21-23ut_ui_gross_weekly_earnings.py(docstring)ut_ui.py(defined_for=StateCode.UT)ut_ui.py+ut_ui_duration_weeks.py(26-week cap absorbs waiting week)ut_ui_base_period_wages.py(Person/YEAR/USD)ut_ui_high_quarter_wages.py(Person/YEAR/USD)ut_ui_quarters_with_wages.py(Person/YEAR/int)ut_ui_gross_weekly_earnings.py(Person/YEAR/USD)ut_ui_weekly_hours_worked.py(Person/YEAR/hour)ut_ui_weeks_unemployed.py(Person/YEAR/week)29 in-scope requirements (22 modeled + 7 input definitions) — all covered.
Not Modeled (14 items)
Files Added
policyengine_us/parameters/gov/states/ut/dwf/unemployment_insurance/policyengine_us/variables/gov/states/ut/dwf/unemployment_insurance/policyengine_us/tests/policy/baseline/gov/states/ut/dwf/unemployment_insurance/programs.yamlupdated withut_uiState entry (status=complete, verified_years="2024-2026")Tests
floor(HQ/26) − 5clipped to[0, max_wba]reproduces the published schedule exactly (e.g., HQ $15,054 → WBA $574; HQ ≥ $21,086 → WBA $806 cap)