Add New York Unemployment Insurance Program - #8144
Conversation
Starting implementation of New York State Unemployment Insurance. Documentation and parallel development will follow.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8144 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 2 13 +11
Lines 31 186 +155
==========================================
+ Hits 31 186 +155
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:
|
…tion - benefit/max_amount.yaml: 2025-10-13 → 2025-10-06 (first Monday Oct 2025) - ny_ui_raw_weekly_benefit_rate.py: add $143 formula floor for all 3 divisor-26 tiers per P832 p.2 - All 11 P832 parameter hrefs: #page=1 → #page=2 - partial/hours_tiers.yaml: add #page=1 to P803 href - unemployment_compensation.py: add ny_ui to adds list - programs.yaml: add ny_ui entry Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes AppliedAll 6 critical issues identified in review have been resolved. Tests pass cleanly. Critical Issues Fixed (6/6)
Test Results54 passed, 0 failed. Not Fixed (out of scope — deferred to follow-up)11 "should address" items noted in review (hours rounding, earnings cap parameter separation, and others) are deferred to a follow-up PR to keep this change focused. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Updated this branch against current Changes in the latest two commits:
Validation:
|
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Program Review — NY Unemployment Insurance (PR #8144)
Source Documents
- PDFs: NYSDOL P832 (Jan 2025, 2 pp; Feb 2026 retrieved separately via verifier), P803 (Oct 2025, 3 pp)
- Statute: NY Lab. Law §§ 525, 527, 590 (HTML)
- Year coverage: 2025 + 2026 layered
- Scope: New state program (~46 files, 3039 additions). PR-body claim: "compute-only" (no upstream wiring) — verified accurate by code validator.
CI Status
All 25 checks pass (including codecov/patch and codecov/project).
Critical (Must Fix)
- min_amount missing 2025 entry —
parameters/gov/states/ny/dol/unemployment_insurance/benefit/min_amount.yaml. P832 (Jan 2025) explicitly states "$136 as of January 2025". Repo has 2020:$104 → 2026:$140; 2025 currently resolves to $104. Add2025-01-01: 136. Verified at 600 DPI on P832 page 2 (Rect 561,256→583,271). - high_quarter_cap effective date wrong —
parameters/gov/states/ny/dol/unemployment_insurance/eligibility/high_quarter_cap.yaml. Per § 527(1)(d), cap = 22 × max WBR. Max became $869 effective 2025-10-06, so cap of $19,118 should be effective 2025-10-06, not 2026-01-01. Also missing the historical $11,088 (22 × $504) value that P832 (Jan 2025) explicitly cites ("if your high quarter wages were $11,088 or more"). Currently undefined for 2025-01-01 → 2025-12-31 (resolves to 0), causing the capped-quarters branch to always pass and silently bypassing the 1.5× test for every 2025 claim. - All P832-2026 citations point to wrong URL — 12+ parameters cite
https://dol.ny.gov/system/files/documents/2026/02/p832-...-2-26.pdfwhich 404s/blocks. Actual URL is2026/03/p832-...-2-26.pdf(verified via direct fetch — document footer "P832 (2/26)"). Affects:benefit/{formula_min_amount, low_divisor, low_hq_threshold, max_amount, min_amount, standard_divisor, two_quarter_hq_threshold}.yamlandeligibility/{base_wages_multiplier, capped_other_quarters_rate, high_quarter_cap, high_quarter_minimum, quarters_required}.yaml. - Duplicate variable: ny_ui_weeks_unemployed — Federal
weeks_unemployedexists atpolicyengine_us/variables/household/demographic/person/weeks_unemployed.py. PA UC (reference impl) uses it directly. NY PR should droppolicyengine_us/variables/gov/states/ny/dol/unemployment_insurance/ny_ui_weeks_unemployed.pyand reference the federal variable inny_ui.py. sources/directory must be removed — 5 markdown files (~1,204 lines) added at repo root:sources/{ny-ui-impl-spec, ny-ui-requirements-checklist, ny-ui-research-summary, ny-ui-scope-summary, working_references}.md. Git history shows prior PRs explicitly stripped analogous artifacts (commitsa8405f8c06,e9bb8c8031,7204130fe8,76aadd1f04). PA UC PR #8124 did not ship asources/directory.lessons/agent-lessons.mdmust be removed — Tooling artifact (24 lines). Commit4308909f46("Remove lessons/agent-lessons.md from PR") establishes the convention. Bonus issue: line 15 of that file tells agents to wire UI variables into the federalunemployment_compensationaggregator, which would break the PR's intended compute-only scope.- min_amount $104 (2020) value unverified — No source corroborates the $104 baseline (statute § 590(5)(a) sets only a $100 floor; neither P832 edition shows $104). The PR jumps from this unsourced value to $140 (2026). Either add a primary source for $104 or back-fill 2020-2024 with the known sequence from NYSDOL.
Should Address
- Missing
defined_for = StateCode.NYon 13 of 14ny_ui_*variables (onlyny_ui.pysets it). PA UC reference setsdefined_foron every helper; considerdefined_for = "ny_ui_monetarily_eligible"forny_ui.pyandny_ui_weekly_payable.pyto match PA's pattern. - Variable labels use unspelled "NY UI" — 12 of 14 labels read
"NY UI <thing>". PA UC precedent spells out:"Pennsylvania unemployment compensation <thing>". Standardize NY UI labels to"New York unemployment insurance <thing>". - Citation precision:
partial/hours_tiers.yamlcites § 522 + § 523 (wrong); should be § 590(5)(c) + P803. No § 590(5-b) exists in current statute.benefit/{min_amount, max_amount, max_weeks}.yaml: use§ 590(5)(a)/§ 590(4)instead of bare§ 590.eligibility/*.yaml: use§ 527(1)(d)instead of bare§ 527.benefit/{formula_min_amount, low_divisor, low_hq_threshold, standard_divisor, two_quarter_hq_threshold}.yaml: use§ 590(5)(a).ny_ui_hours_tier_rate.pyandny_ui_weekly_hours_worked.pyshould cite § 590(5)(c) explicitly.benefit/max_amount.yamlHochul press-release citation needs a date in the title.
- Possible duplicate:
ny_ui_weekly_hours_worked— A federalweekly_hours_workedmay exist. PR variable has no formula. Could be reused if semantics align; otherwise document the distinction (typical-week average vs. specific-claim-week hours). - Test boundary gaps (P1):
high_quarter_capbranch only tested at fringe boundary (cases 10-11 ofny_ui_monetarily_eligible.yaml); missing high-earner case (e.g., HQ=$30,000) where capped test passes vs. 1.5× test fails.- Partial-payment boundary
earnings == WBR + PBC(strict<) not tested. - Earnings-cap boundary
earnings == max_amount(strict>) not tested (ny_ui_weekly_payable.py:21). - 3-quarter case (
quarters_with_wages: 3) never tested — all 2-or-3-qtr cases usequarters_with_wages: 2. high_quarter_capundefined for 2025 — no 2025 test at HQ ≥ $19,118 verifies behavior (overlaps with critical fix #2).- 2-or-3-quarter formula
formula_min_amount = 143floor not exercised (e.g., HQ low enough that average/26 drops below $143).
ny_ui_weekly_benefit_ratereturns min_amount for zero-wage claimant — non-obvious; only zeroed bymonetarily_eligiblemultiplier inny_ui_weekly_payable. Untested. Document or fix.partial_benefit_creditlacks $504/$869 cap — PR body mentions a "10× partial_benefit_credit_min" rule but no source supports it; the actual cap comes frommax_amount. PBC scales to $435 at WBR=$869 (2026) and is untested.- PDF inconsistency note: P832 (Feb 2026) text says formula floor is "$143" while declaring the minimum benefit rate is "$140" — likely a publication artifact. Repo uses $143 for
formula_min_amountwhich matches the PDF example for the divisor-26 path; consider adding a comment to clarify the two distinct floors. - P803 mechanical input-prep rules: P803 #page=2 prescribes "round up to nearest whole hour" and "max 10 hrs/calendar day" for hours;
ny_ui_weekly_hours_worked.pyandny_ui_gross_weekly_earnings.pydo not enforce these (could be left to user but worth documenting).
Suggestions
- The compute-only PR is correctly NOT wired into
spm_unit_benefits/household_state_benefits/ federalunemployment_compensation. Make sure future PRs follow this once #8301 settles the shared income-flow allocation. - Statutory derivations (
high_quarter_minimum= 221 × min wage, rounded down to nearest $100;high_quarter_cap= 22 × max WBR) could be computed parametrically rather than as fixed values, withmin_wage/max_amountas inputs — avoids silent drift. - Add Not-Modeled notes for alternate base period (§ 527(2)), benefit recalculation (§ 590(12)), waiting period (§ 590(7)), requalification (§ 527(6)), Shared Work (§ 599), SEAP (§ 599-r), and § 590(8)-(11) specialized populations.
- Consider splitting
max_amountinto separate "max WBR" and "partial-UI earnings cutoff" parameters; they coincide numerically at $504/$869 but are regulatorily distinct (P803 vs § 590(5)(a)) and the PR's ownlessons/agent-lessons.mdwarns against the conflation. - Refactor
ny_ui_raw_weekly_benefit_rate.py(50+ lines, comment-heavy) by extractingny_ui_four_quarter_wbrandny_ui_two_three_quarter_wbrhelpers.
Investigated and Cleared
high_quarter_minimum2026 = $3,500 — verified: § 527 rounds down to nearest $100; 221 × $16 = $3,536 → $3,500. Not a mismatch (and confirmed in P832 Feb 2026 directly).- Partial-benefit hours tiers — [0, 11, 17, 22, 31] with shares [1.0, 0.75, 0.5, 0.25, 0] match the current (post-Aug-2021) P803 schedule exactly. The task brief's assumed schedule (0/4/10/20/30) was the pre-Aug-2021 version.
- "compute-only" claim — verified:
ny_uiis NOT inspm_unit_benefits.py,household_state_benefits.yaml, orunemployment_compensationaggregator; no IRS or household variable referencesny_ui*. - PBC rounding —
np.ceil(max(rate × WBR, min))correctly applies the § 525 "next higher multiple of one dollar" rule. - WBR
np.floor— correctly implements § 590(5)(a) "lowered to the next multiple of one dollar". - Capped test in monetary eligibility —
where(high_quarter_wages >= high_quarter_cap, capped, standard)correctly implements the § 527 cap-branched logic (bug is only in the cap value itself).
PDF Audit Summary
| Topic | Cells Confirmed | Mismatches |
|---|---|---|
| Monetary eligibility (5 params + variables) | 4 | 1 (high_quarter_cap date) |
| Weekly benefit rate structure (7 params) | 7 | 0 (values correct; URL wrong) |
| min_amount values | 0 (no 2025 entry) | 1 (missing $136 for 2025) |
| max_amount + 2026 values | 4 | 0 |
| Partial benefits + hours tiers | 4 | 0 |
| Max weeks | 1 | 0 |
| Region/county map | N/A | N/A |
Validation Summary
| Check | Result |
|---|---|
| Regulatory Accuracy | Largely correct; 2 confirmed value/date mismatches + missing historical values |
| Reference Quality | All params have refs; 3 critical un-corroborated values + 6 precision warnings |
| Code Patterns | 5 critical (duplicate var, sources/, lessons/, defined_for, labels) |
| Test Coverage | Passes; 5 P1 boundary gaps in untested branches |
| PDF Value Audit | 20/22 cells confirmed; 2 mismatches (min_amount 2025 missing, high_quarter_cap date) |
| CI Status | All passing |
Recommended Severity: REQUEST_CHANGES
Rationale: A confirmed value mismatch (missing $136 min_amount for 2025), a confirmed effective-date error (high_quarter_cap), broken PDF URLs in 12+ citations, a reinvented federal variable, and two directories of tooling artifacts (sources/, lessons/) that don't belong in a state-program PR all warrant changes before merge.
Next Steps
- Author: address the 7 critical items, then re-run.
- To auto-fix:
/fix-pr 8144
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Re-review — NY Unemployment Insurance
Thanks for the thorough revisions — this addressed 6 of the 7 CRITICALs from the last round and most of the SHOULDs. Confirmed resolved:
- ✅
min_amount2025 entry (2025-01-01: 136) added. - ✅
high_quarter_capnow effective2025-10-06: 19_118with the11_088floor so 2025 resolves correctly (test Case 12 confirms). - ✅ All P832 citations corrected to
.../2026/03/...(no2026/02404s remain). - ✅
sources/dir,lessons/agent-lessons.md, and the duplicateny_ui_weeks_unemployedall removed. - ✅
defined_for = StateCode.NYnow on all 13 variables; labels spelled out to "New York unemployment insurance…"; citation precision fixed (hours_tiers.yaml→ § 590(5)(c) + P803; bare § 590/§ 527 made specific). - ✅ Test boundaries added: high-earner cap (Case 12),
earnings == max WBR(Case 7),earnings == WBR + PBC(Case 6).
Still to address
Critical
- Uncorroborated historical
min_amountladder (2020-2024).benefit/min_amount.yamlruns104 / 108 / 116 / 124 / 132 / 136 / 140, but the references only document 2024-2026 (NYS-50 2024/2025, P832 Jan-2025/Feb-2026). The2020-01-01: 104baseline and the 2021-2023 steps aren't sourced, so NY UI results for 2020-2024 rest on unverified floors. Either add a primary NYSDOL source for the 2020-2024 sequence, or drop the unsourced early years and document the verified coverage window (e.g., start at the first sourced year).
Should
2. No 3-quarter case. All monetary-eligibility tests use quarters_with_wages of 4 or 1; add a quarters_with_wages: 3 case to exercise the 2-or-3-quarter WBR formula path (formula_min_amount $143 floor).
3. Stale comment from the fix commit. ny_ui_monetarily_eligible.yaml header still says "$3,500 from 2026-01-05", but the fix moved high_quarter_minimum to 2026-01-01: 3_500. Update the comment (doc-only; test math already matches 2026-01-01).
Once the 2020-2024 min_amount values are sourced (or the coverage trimmed to verified years), this is good to go.
🤖 Reviewed with Claude Code
PolicyEngine-US PR #8144 — New York Unemployment InsuranceProgram Review — via /review-program (multi-agent audit)Source Documents
Branch Status⚠ PR branch is 1721 commit(s) behind main. Rebase required before merge (very stale — pre-dates ~6 months of main). Review was scoped to the PR's actual changes (merge-base diff), so staleness did not affect findings. Critical (Must Fix)
Should Address
Suggestions
Source Audit Summary
Validation Summary
Review Severity: REQUEST_CHANGES3 critical findings (hard-coded regulatory threshold; missing non-NY state guard test; effectively untested core WBR formula). Per review rules, any critical → REQUEST_CHANGES. All three are mechanical to fix — no benefit amounts were found wrong under operative 2025–2026 law, and the two source mismatches are citation/regime-composition issues, not value errors. Next Steps
🤖 Generated by /review-program (Claude Code multi-agent review) |
- Replace the hard-coded 4-quarter threshold in the raw weekly benefit rate with the new eligibility/full_base_period_quarters parameter - Corroborate the 2020-2023 minimum weekly benefit rates ($104/$108/ $116/$124) against archived USDOL Significant Provisions tables with year-tagged references (resolves the open re-review sourcing item) - Correct the legal basis for the hours-tier partial system: cite P803 and Ch. 305 of the Laws of 2021; document that the quoted 590(5)(c) earnings-offset regime is enacted but not administered, and that the WBR+PBC zero gate deliberately retains the statutory rule where the two sources conflict - Guard weeks_unemployed at zero (negative weeks previously produced a negative benefit); document backdated current-law values, the 2025-10-06 step dating, derivations, and microsim-inert inputs - Add direct pre-clamp tests for the raw weekly benefit rate (divisor 26/25 switch, two-highest-quarter tiers, $143 floor), a non-NY state case, hours-tier boundaries, cap-switch pair, and defensive cases Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes Applied (from Program Review)Commits 86cc354 (merge), 397437e, and 42d0a51 address the review above. The branch is now current with Critical
Should Address
Suggestions
Skipped (deliberate)
Verification
🤖 Applied via |
hua7450
left a comment
There was a problem hiding this comment.
Program review — NY Unemployment Insurance
Every formula variable has a dedicated test file, the hours-tier scale is boundary-tested at every published breakpoint, the § 525 ceil is implemented exactly as the statute words it, the § 590(4) benefit-year maximum is correctly modeled as a dollar cap (26 × WBR), and the 2025-10-06 max-rate date is verbatim correct. All 30 CI checks are green. The findings below sit on top of a solid base.
Every value/formula finding was verified two ways: against rendered source pages (NYSDOL P832 Jan-2025 & Feb-2026, P803 Oct-2025, the Claimant Handbook Jan-2026, USDOL Significant Provisions Jan 2020–2026 NY rows) and by running probes against this branch. Several initially-flagged issues were investigated and cleared — noted at the end so they don't get re-raised.
Reviewed head: 42d0a51 · Scope: PR diff only · Branch is 284 commits behind main; worth a rebase (did not affect findings).
Critical
C1 — The partial-benefit rule is a hybrid that matches neither operative regime
ny_ui_weekly_payable.py takes the zero-boundary from the codified statute and the payment amount from administered guidance (the docstring says so). Two rules exist in NY law:
- Codified § 590(5)(c) (identical in both starred versions): "a benefit equal to their weekly benefit rate less the total of the remuneration… which is in excess of their partial benefit credit" — an earnings taper,
WBR − max(earnings − PBC, 0), no hours tiers. - Administered regime (Ch. 277 L.2021 § 31 hours system, published in P803, whose chart column is headed "% REDUCTION IN UI"):
hours_tier_rate × WBR, with the only earnings rule being the gross cap — no WBR + PBC gate.
| Case | Inputs | Model | Statute (taper) | Pure P803 |
|---|---|---|---|---|
| Test Case 8 | 0 hrs, $300 earnings, WBR $384 | $384 | $276 | $384 ✓ |
| Test Case 9 | 13 hrs, $575 earnings, WBR $384 | $288 | $1 | $288 ✓ |
| Docstring example | 12 hrs, $260 earnings, WBR $150 | $0 | $0 ✓ | $112.50 |
So the model overpays vs the statute (+$108/wk in Case 8) and underpays vs P803 (−$112.50/wk in your own docstring example) — and the gate uses a § 525 PBC that did not exist before 2024 (C4). Either regime is a defensible encoding; the hybrid is internally inconsistent (gating on a credit it never tapers with). Recommend picking one and encoding it whole — pure P803 (hours_tier_rate × WBR, zeroed above max_amount) is the smaller change and matches administered practice; four test cases and the docstring move with the choice.
C2 — The hours-tier matrix applies to years in which it did not exist
partial/hours_tiers.yaml is keyed 2021-08-16 — the correct date — but policyengine-core extends the earliest value backwards indefinitely. Probe on this branch: ny_ui_hours_tier_rate at 12 weekly hours returns 0.75 for 2019, 2020, and Jan-2021 alike. Before 2021-01-18 NY used the day-count rule (25% of WBR lost per day worked; a 2020 claimant with 12 hours over 2 days lawfully got 50%, the model pays 75%), and the Jan–Aug 2021 "Matrix 1" (P803 p.3) is absent entirely. Since the day-count rule needs a days-worked input that doesn't exist, the honest remedy is a start-date guard so the program returns 0 before its earliest supported year, rather than earlier keys.
C3 — high_quarter_minimum silently resolves $3,400 for 2020–2024; 2023 and 2024 are provably wrong
Only 2025/2026 keys exist, and the file comment says pre-2025 values were "not backfilled" — but core backfills silently (probe: 2020–2024 all resolve $3,400). Sighted values: $3,100 for 2023 (USDOL Jan-2023, NY row: "1½ x HQW; $3,100 in HQ") and $3,300 for 2024 (P832 Jan-2025: "increased from $3,300 for claims filed in 2024"). This parameter gates the whole program via ny_ui_monetarily_eligible, so 2023–24 claimants between the true threshold and $3,400 are wrongly ineligible. The missing years are already corroborated inside this PR — your min_amount series is exactly high_quarter_minimum / 25 at every year (221 × minimum wage, floored to $100: $2,600 / $2,700 / $2,900 / $3,100 / $3,300).
C4 — partial_benefit_credit_min / _rate are dated 2020-01-01, but § 525 did not exist until 2024
§ 525 was added by Ch. 277 L.2021 with a contingent effective date landing in 2024; the USDOL Jan-2020 NY row reads "None. All employment affects WBA" — NY disregarded no earnings in 2020. The parameters should start at the § 525 effective date.
Should address
- A1 — The hours ladder is cited to the wrong authority, and the session-law cite is mis-numbered
§ 590(5)(c) contains no hours or percentages in either starred version. The ladder derives from Ch. 277 L.2021 § 31, as added by Ch. 305 L.2021 § 14 (hours→days mapping) combined with former § 523 (days→quarters of WBR) — that derivation reproduces your thresholds exactly. "Ch. 305 of the Laws of 2021 (S7148) § 31" in hours_tiers.yaml is therefore mis-numbered (§ 31 belongs to Ch. 277; Ch. 305's operative section is § 14). Also, ny_ui_hours_tier_rate.py's claim that the offset regime's "activation is contingent (Ch. 56 of 2025 Part KK § 4)" is inaccurate — Part KK § 4 is a funds-transfer contingency gating all of Part KK; what displaces the offset in practice is Ch. 277 § 31's sunset awaiting the commissioner's IT certification (Ch. 277 § 33). The nysenate bill URL is Cloudflare-gated; https://assembly.state.ny.us/leg/?default_fld=&leg_video=&bn=S7148&term=2021&Text=Y serves the text unauthenticated.
- A2 — Dead reference on
high_quarter_cap's 2020 value (HTTP 403)
The value itself is correct (§ 527(1)(d)'s 22 × max WBR: 22 × 504 = 11,088; 22 × 869 = 19,118, and $504 is sighted in every USDOL edition 2020–2025). But the cited Jan-2025 P832 URL now 403s — the only source for the pre-October-2025 figure. Working replacement: https://web.archive.org/web/20250326164458if_/https://dol.ny.gov/system/files/documents/2025/01/how-your-weekly-unemployment-insurance-benefit-payment-is-calculated-p832.pdf#page=2
- A3 — Three variables cite § 590 for rules § 590 does not contain
ny_ui_weekly_hours_worked.py (round-up + 10-hr/day reporting rules), ny_ui_gross_weekly_earnings.py (the gross-earnings cutoff as an earnings ceiling, and the self-employment exclusion), and ny_ui_weekly_payable.py (a bare § 590 for a rule its own docstring attributes to three sources) — all of these live only in P803. Cite P803 on the first two and a tuple of § 590(5)(c) / § 525 / P803 on the third.
- A4 — P803's "round up to the nearest whole hour" is not implemented:
ny_ui_hours_tier_ratepasses the raw float to.calc(). Integer hours are exact (all 8 boundaries verified); 16.5 hours pays 0.75 instead of 0.50. One-linenp.ceilfix. - A5 — The 2025-10-06 step in
max_amount/high_quarter_capis inert inside model year 2025 (YEAR-period consumers resolve $504/$11,088 for all of 2025; the step first bites in 2026). The keying is correct and should stay — but add a one-line comment stating the consequence. Also the test named "after October 2025" actually runs atperiod: 2026. - A6 —
programs.yamlstatus: completeisn't supportable while C1–C4 stand and the model returns non-zero back-extrapolated results for 2020–2024;partialis accurate for now. - A7 — No "not modeled" documentation block. Worth listing: § 527(2) alternate base period, § 527(6) requalification, § 600 pension offset, § 591 availability/work search, § 590(4)'s § 601/§ 599(2) duration exceptions — and affirmatively that NY has no dependency allowance. (Compare
pa_uc.py.) - A8 —
ny_uiis not wired into any income aggregate. This matchespa_uc/ok_ui/nj_unemployment_insuranceprecedent, but say whether the deferral is deliberate; eventual wiring must not double-count with theunemployment_compensationinput. - A9 — All 74 test cases run at 2025/2026; the six pre-2025
min_amountvalues are never selected by any test (they are all correct — sighted in USDOL NY rows — but a typo would be invisible to CI). - A10 — Smaller reference items:
capped_other_quarters_ratelists § 527(1)(d) first but the 0.5 is only published as a test in P832;max_amountdocuments no reason for the 2019–2025 freeze (§ 590(5)(b)'s trust-fund suspension supplies it);max_weekscould note the § 601/§ 599(2) exceptions;min_amountcites a rolling NYS-50 URL worth pinning to an archive capture. - A11 — Minor: hard-coded
2inny_ui_raw_weekly_benefit_rate's two-quarter average;ny_ui_weekly_hours_workednearly shadows the existingweekly_hours_worked(different default and concept — considerny_ui_claim_week_hours_worked); dollar figures restated in comments;amount: 1.0→1; redundantdefault_value = 0on several variables.
Investigated and cleared (please don't "fix" these)
- The 2025-10-06 keying of
max_amount/high_quarter_capis right; keying 2025-01-01 would overpay every pre-October 2025 claim. max_weeksis not dangling — it binds atny_ui.pyviamin_()(verified: exactly 26 × $504).- The P803 10-hours-per-day cap is unmodelable from a weekly scalar; deferring to the input is correct.
hours_tiersthresholds reproduce the published bands exactly for integer hours — no threshold shift needed.- The § 525
ceilplacement (after themax_) is exactly right. low_hq_threshold$3,575 /formula_min_amount$143 /two_quarter_hq_threshold$4,000 at 2020 are correct — statutory constants from L.2013 ch. 57 part O, in force well before 2020 (the "calculator convenience" hedges in those file comments can be replaced with the statutory cite).- All seven
min_amountvalues sighted and confirmed against USDOL NY rows.
Severity: REQUEST_CHANGES
All four criticals change household benefit amounts. None is structural — the variable graph, entity choices, parameter layout, and test discipline are all sound, and most fixes are localized.
🤖 Generated with Claude Code
Set period: week on standard_divisor and low_divisor (weekly benefit divisors, previously period: year); remove the dead Jan-2025 P832 reference from high_quarter_cap. Cosmetic metadata cleanup, no calculation impact — NY UI suite 84/84 pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fixes Applied — remaining review itemsFollowing up on the earlier fix round (commits Should-Address fixed
Bonus
Verification
Everything from the program review is now addressed. 🤖 Generated with Claude Code |
…ions, mark status partial Applies the independent findings from the program review: - C3: backfill high_quarter_minimum for 2020-2024 (2023=$3,100, 2024=$3,300; 2020-22 via statutory derivation), fixing the silent $3,400 back-extrapolation that made 2023-24 claimants between the true threshold and $3,400 wrongly ineligible. Add pre-2025 min_amount + 2023/2024 boundary tests (A9). - A1/A3: correct the hours-tier authority (Ch.277 §31 as added by Ch.305 §14), swap the Cloudflare-gated bill URL, and point earnings/hours/payable variables at P803 for rules that live there. - A5-A11: note the inert 2025-10-06 step, mark programs.yaml status 'partial', add a not-modeled block and income-aggregate-deferral note, pin/repair references, and minor cosmetics. C1 (partial-benefit regime) and the coupled C2/C4/A4 are deferred for an author decision and left untouched. NY UI suite 93/93 pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fixes applied from @hua7450's review — and one decision neededIncorporated the independent findings from the program review above (pushed just now, NY UI suite 93/93 pass). I deliberately left the C1 partial-benefit regime and the items coupled to it untouched — that's an author call, flagged below. Applied (independent of the C1 regime choice)
|
Closes #8143
Summary
Implements New York Unemployment Insurance under
ny_ui, aligned with the merged PA UC Phase-1 pattern.Scope
Modeled in this PR:
policyengine_us/programs.yamlNot modeled or deferred:
unemployment_compensationFollowing PA UC (#8124), this is a compute-only state UI implementation until the shared allocation and income-flow question is settled in #8301.
Authority
Files
policyengine_us/parameters/gov/states/ny/dol/unemployment_insurance/*: NY UI parameterspolicyengine_us/variables/gov/states/ny/dol/unemployment_insurance/*: NY UI eligibility and benefit formulaspolicyengine_us/tests/policy/baseline/gov/states/ny/dol/unemployment_insurance/*: eligibility, benefit-rate, partial-benefit, weekly-payable, and integration coveragepolicyengine_us/programs.yaml: modeled-program metadataTest Plan
uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/ny/dol/unemployment_insurance -c policyengine_usgit diff --check