Skip to content

Add New York Unemployment Insurance Program - #8144

Open
daphnehanse11 wants to merge 14 commits into
PolicyEngine:mainfrom
daphnehanse11:ny-unemployment-insurance
Open

Add New York Unemployment Insurance Program#8144
daphnehanse11 wants to merge 14 commits into
PolicyEngine:mainfrom
daphnehanse11:ny-unemployment-insurance

Conversation

@daphnehanse11

@daphnehanse11 daphnehanse11 commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Monetary eligibility under NY Lab. Law § 527
  • Weekly benefit-rate formulas under NY Lab. Law § 590 and NYSDOL P832
  • 2025 and 2026 minimum and maximum weekly benefit values
  • Partial benefit credit and hours-tier reductions under NY Lab. Law §§ 525 and 590(5)(c), with NYSDOL P803 guidance
  • Annual benefit amount capped by maximum benefit weeks
  • Program registry metadata in policyengine_us/programs.yaml

Not modeled or deferred:

  • Shared income-flow integration through unemployment_compensation
  • Per-quarter wage decomposition from annual survey income
  • Day-level enforcement of the 10-hours-per-day cap
  • Able/available/work-search conditions, adjudicated disqualifications, dismissal pay, pension offsets, Shared Work, SEAP, and Extended Benefits
  • Automatic alternate-base-period claim recomputation
  • Intra-year claim filing dates; annual 2025 simulations use the pre-October 2025 maximum benefit regime, while annual 2026 simulations use the post-October 2025 regime

Following 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 parameters
  • policyengine_us/variables/gov/states/ny/dol/unemployment_insurance/*: NY UI eligibility and benefit formulas
  • policyengine_us/tests/policy/baseline/gov/states/ny/dol/unemployment_insurance/*: eligibility, benefit-rate, partial-benefit, weekly-payable, and integration coverage
  • policyengine_us/programs.yaml: modeled-program metadata

Test Plan

  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/ny/dol/unemployment_insurance -c policyengine_us
  • git diff --check

daphnehanse11 and others added 3 commits April 23, 2026 13:26
Starting implementation of New York State Unemployment Insurance.
Documentation and parallel development will follow.
)

Adds NY UI benefit with formula-based WBR, 3-tier partial benefit
with hours-based tiers, 3 monetary eligibility tests, and max WBR
change effective 2025-10-13 ($504 → $869).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Apr 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0eec199) to head (42d0a51).
⚠️ Report is 24 commits behind head on main.

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     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…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>
@daphnehanse11

Copy link
Copy Markdown
Collaborator Author

Fixes Applied

All 6 critical issues identified in review have been resolved. Tests pass cleanly.

Critical Issues Fixed (6/6)

  1. benefit/max_amount.yaml — effective date corrected
    2025-10-132025-10-06 (first Monday of October 2025 per P832 p.2)

  2. ny_ui_raw_weekly_benefit_rate.py — $143 formula floor added for all divisor-26 tiers
    Per P832 p.2: "If this calculation is less than $143, your benefit rate is $143." Applied max_(floor(...), p.formula_min_amount) to all three divisor-26 tiers (4-quarter HQ > $3,575; 2/3-quarter HQ > $4,000; 2/3-quarter HQ $3,576–$4,000). The divisor-25 tiers (HQ ≤ $3,575) are correctly unaffected. Added benefit/formula_min_amount.yaml parameter (value: 143) with P832 #page=2 reference. Updated test cases 8 and 9 (expected WBR 137 → 143 and 140 → 143 respectively, both at HQ=$3,576).

  3. All 11 P832 parameter hrefs — page anchor corrected
    #page=1#page=2 across all NY UI parameter files. Page 1 contains only the base-period calendar diagram; all rate/threshold values are on page 2.
    Files updated: benefit/low_divisor.yaml, benefit/low_hq_threshold.yaml, benefit/max_amount.yaml, benefit/min_amount.yaml, benefit/standard_divisor.yaml, benefit/two_quarter_hq_threshold.yaml, eligibility/base_wages_multiplier.yaml, eligibility/capped_other_quarters_rate.yaml, eligibility/high_quarter_cap.yaml, eligibility/high_quarter_minimum.yaml, eligibility/quarters_required.yaml

  4. partial/hours_tiers.yaml — P803 href page anchor added
    Added #page=1 to the P803 PDF href.

  5. variables/gov/states/unemployment_compensation.pyny_ui added to adds list
    Ensures the NY UI benefit flows into AGI and federal tax calculations.

  6. programs.yamlny_ui entry added
    New entry with id: ny_ui, category: state_benefits, agency: NYSDOL, status: complete.

Test Results

54 passed, 0 failed. make format clean. No new issues introduced.

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.

@daphnehanse11

Copy link
Copy Markdown
Collaborator Author

Updated this branch against current upstream/main and aligned it with the merged PA UC implementation (#8124).

Changes in the latest two commits:

  • Merged current upstream/main into ny-unemployment-insurance.
  • Updated the ny_ui modeled-program metadata to use the same style as PA (category: Benefits, state coverage, full agency name, verified years).
  • Removed the unemployment_compensation adds = ["ny_ui"] wiring. Following PA, this remains a Phase-1 compute-only program until the shared allocation/income-flow question is settled.

Validation:

  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/ny/dol/unemployment_insurance -c policyengine_us -> 54 passed.
  • uv run --extra dev ruff check policyengine_us/variables/gov/states/unemployment_compensation.py -> passed.
  • uv run --extra dev ruff format --check policyengine_us/variables/gov/states/unemployment_compensation.py -> already formatted.

@PavelMakarchuk PavelMakarchuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

  1. min_amount missing 2025 entryparameters/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. Add 2025-01-01: 136. Verified at 600 DPI on P832 page 2 (Rect 561,256→583,271).
  2. high_quarter_cap effective date wrongparameters/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.
  3. All P832-2026 citations point to wrong URL — 12+ parameters cite https://dol.ny.gov/system/files/documents/2026/02/p832-...-2-26.pdf which 404s/blocks. Actual URL is 2026/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}.yaml and eligibility/{base_wages_multiplier, capped_other_quarters_rate, high_quarter_cap, high_quarter_minimum, quarters_required}.yaml.
  4. Duplicate variable: ny_ui_weeks_unemployed — Federal weeks_unemployed exists at policyengine_us/variables/household/demographic/person/weeks_unemployed.py. PA UC (reference impl) uses it directly. NY PR should drop policyengine_us/variables/gov/states/ny/dol/unemployment_insurance/ny_ui_weeks_unemployed.py and reference the federal variable in ny_ui.py.
  5. 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 (commits a8405f8c06, e9bb8c8031, 7204130fe8, 76aadd1f04). PA UC PR #8124 did not ship a sources/ directory.
  6. lessons/agent-lessons.md must be removed — Tooling artifact (24 lines). Commit 4308909f46 ("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 federal unemployment_compensation aggregator, which would break the PR's intended compute-only scope.
  7. 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.NY on 13 of 14 ny_ui_* variables (only ny_ui.py sets it). PA UC reference sets defined_for on every helper; consider defined_for = "ny_ui_monetarily_eligible" for ny_ui.py and ny_ui_weekly_payable.py to 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.yaml cites § 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.py and ny_ui_weekly_hours_worked.py should cite § 590(5)(c) explicitly.
    • benefit/max_amount.yaml Hochul press-release citation needs a date in the title.
  • Possible duplicate: ny_ui_weekly_hours_worked — A federal weekly_hours_worked may 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_cap branch only tested at fringe boundary (cases 10-11 of ny_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 use quarters_with_wages: 2.
    • high_quarter_cap undefined for 2025 — no 2025 test at HQ ≥ $19,118 verifies behavior (overlaps with critical fix #2).
    • 2-or-3-quarter formula formula_min_amount = 143 floor not exercised (e.g., HQ low enough that average/26 drops below $143).
  • ny_ui_weekly_benefit_rate returns min_amount for zero-wage claimant — non-obvious; only zeroed by monetarily_eligible multiplier in ny_ui_weekly_payable. Untested. Document or fix.
  • partial_benefit_credit lacks $504/$869 cap — PR body mentions a "10× partial_benefit_credit_min" rule but no source supports it; the actual cap comes from max_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_amount which 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.py and ny_ui_gross_weekly_earnings.py do 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 / federal unemployment_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, with min_wage / max_amount as 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_amount into 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 own lessons/agent-lessons.md warns against the conflation.
  • Refactor ny_ui_raw_weekly_benefit_rate.py (50+ lines, comment-heavy) by extracting ny_ui_four_quarter_wbr and ny_ui_two_three_quarter_wbr helpers.

Investigated and Cleared

  1. high_quarter_minimum 2026 = $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).
  2. 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.
  3. "compute-only" claim — verified: ny_ui is NOT in spm_unit_benefits.py, household_state_benefits.yaml, or unemployment_compensation aggregator; no IRS or household variable references ny_ui*.
  4. PBC roundingnp.ceil(max(rate × WBR, min)) correctly applies the § 525 "next higher multiple of one dollar" rule.
  5. WBR np.floor — correctly implements § 590(5)(a) "lowered to the next multiple of one dollar".
  6. Capped test in monetary eligibilitywhere(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 PavelMakarchuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_amount 2025 entry (2025-01-01: 136) added.
  • high_quarter_cap now effective 2025-10-06: 19_118 with the 11_088 floor so 2025 resolves correctly (test Case 12 confirms).
  • ✅ All P832 citations corrected to .../2026/03/... (no 2026/02 404s remain).
  • sources/ dir, lessons/agent-lessons.md, and the duplicate ny_ui_weeks_unemployed all removed.
  • defined_for = StateCode.NY now 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

  1. Uncorroborated historical min_amount ladder (2020-2024). benefit/min_amount.yaml runs 104 / 108 / 116 / 124 / 132 / 136 / 140, but the references only document 2024-2026 (NYS-50 2024/2025, P832 Jan-2025/Feb-2026). The 2020-01-01: 104 baseline 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

@DTrim99

DTrim99 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

PolicyEngine-US PR #8144 — New York Unemployment Insurance

Program 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)

  1. Hard-coded 4 quarters threshold in the raw WBR formula.
    policyengine_us/variables/gov/states/ny/dol/unemployment_insurance/ny_ui_raw_weekly_benefit_rate.pyfour_quarter_case = quarters_with_wages >= 4. The four-quarter cutoff that selects the standard formula vs the 2/3-quarter averaging formula (P832 p.2; § 590(5)(a)) is a regulatory threshold and must come from a parameter (e.g. eligibility/full_base_period_quarters.yaml). Only 0/1/2 are permitted as bare literals.

  2. No non-NY state test — the defined_for = StateCode.NY guard is entirely untested.
    All 7 test files use state_code: NY. Nothing confirms a resident of another state with identical wage inputs receives ny_ui: 0. This is the standard state-gate regression guard and a vectorized defined_for failure would go undetected. Add e.g. state_code: CA, HQ $10,000, base $30,000, 4 quarters, 26 weeks → ny_ui: 0 to ny_ui.yaml or integration.yaml.

  3. ny_ui_raw_weekly_benefit_rate — the PR's most complex formula — is effectively untested.
    Its only direct assertion is the trivial zero-wage case (ny_ui_weekly_benefit_rate.yaml Case 13). The divisor-26/25 switch, the three 2/3-quarter tiers, and the $143 divisor-26 floor (P832 p.2) are exercised only through ny_ui_weekly_benefit_rate, whose min/max clamp masks raw-value errors (e.g. raw 130 vs 143 both clamp to the 2025 min of $136). Add a dedicated ny_ui_raw_weekly_benefit_rate.yaml with pre-clamp assertions: HQ $3,576 4-qtr → floor(3576/26)=137 lifted to 143; HQ $3,575 → floor(3575/25)=143 with no floor; HQ $2,500 2-qtr → 100 (proves the divisor-25/tier-3 path has no $143 floor).

Should Address

  1. Hours-tier citation names the wrong legal instrument (source-audit mismatch Basic prototype #1, CONFIRMED by code-path verification — documentation/citation fix, not a calculation error).
    partial/hours_tiers.yaml and ny_ui_hours_tier_rate.py cite NY Lab. Law § 590(5)(c) as defining the tiers, but the current § 590(5)(c) text is the contingent earnings-offset regime (benefit = WBR − remuneration in excess of PBC) and contains no hours tiers. The paid amounts (tier × WBR) match operative NYSDOL practice for the verified years 2025–2026 (P803 Oct 2025; tiers 0-10/11-16/17-21/22-30/31+ → 1.0/0.75/0.5/0.25/0.0 verified exact). The tiers' actual authority is the temporary hours-based program of Ch. 305 of the Laws of 2021 (S7148) § 31 plus NYSDOL guidance; the permanent § 590(5)(c) offset regime's activation remains contingent (Ch. 56 of 2025, Part KK, § 4). Fix: keep P803 as primary reference, replace/annotate the § 590(5)(c) cite with Ch. 305 (2021), and document in the docstring that the earnings-offset text is not yet administered.

  2. Hybrid partial-benefit gate zeroes weeks P803 would pay (source-audit mismatch Run black formatting on docs #2, CONFIRMED — bounded calculation divergence).
    ny_ui_weekly_payable.py pays P803 amounts (tier × WBR) but adds a statutory gate earnings ≥ WBR + PBC → $0 from § 525/§ 590(5)(c). Under the operative hours system the only earnings rule is the gross-pay cap. Verified example: WBR $150, 12 hrs, $260 earnings, 2025 (cap $504) → repo pays $0; P803 pays 0.75 × 150 = $112.50. The result matches neither regime (amounts follow P803, gate follows the not-yet-operative statute); affected class is bounded (roughly earnings ≥ max(1.5·WBR, WBR+$100) but ≤ cap — low-WBR claimants with relatively high earnings). Since the two official sources genuinely conflict, this is SHOULD ADDRESS: either drop the WBR+PBC gate (pure P803, recommended given the PR pays P803 amounts) or switch the amount to the § 590(5)(c) offset — do not mix regimes.

  3. benefit/min_amount.yaml — 2020–2025 yearly values ($104/$108/$116/$124/$132/$136) not corroborated by any fetched source.
    Only $140 (2026, P832 p.2) is directly confirmed; $136 (2025) is consistent with the $3,400÷25 derivation. § 590(5)(a) does not contain the ascending schedule (statutory minimum is $100), and the cited NYS-50 pages do not print the per-year minimums; the live nys50.htm link is non-archival and will drift. Add a source that prints the year-by-year minimum (specific NYS-50 edition pages or archived P832 editions) for each value.

  4. eligibility/high_quarter_minimum.yaml starts at 2025-01-01 while every sibling parameter starts 2020-01-01.
    Pre-2025 simulations silently backfill the 2025 value ($3,400) via backward extrapolation into ny_ui_monetarily_eligible (gated only by StateCode.NY). Within verified_years: "2025-2026" this is harmless, but the asymmetric backdating should be intentional: add earliest-year entries or document the backfill.

  5. Several current-law values are backdated to 2020-01-01 although they post-date the 2025 amendments (or 2021 for partial rules).
    formula_min_amount.yaml ($143 — a 2025-budget product), low_hq_threshold.yaml ($3,575), two_quarter_hq_threshold.yaml ($4,000), partial_benefit_credit_rate.yaml / partial_benefit_credit_min.yaml (§ 525 PBC appears tied to the 2021/2025 amendments; P803-era partial UI was days- then hours-based with no PBC), and partial/hours_tiers.yaml has no pre-2021-08-16 values (P803 documents the Jan–Aug 2021 interim mapping). Harmless within 2025–2026 coverage, but gate to amendment effective dates or document the anachronism so backward extension is not silently wrong.

  6. Parameter period: metadata inconsistency.
    Weekly dollar rates correctly use period: week, but low_divisor.yaml, standard_divisor.yaml, partial_benefit_credit_rate.yaml, and the per-quarter dollar thresholds high_quarter_cap.yaml, high_quarter_minimum.yaml, two_quarter_hq_threshold.yaml, low_hq_threshold.yaml carry period: year. Results are unaffected (read as plain scalars), but the labels are semantically misleading — align each period: with the figure's true cadence.

  7. eligibility/quarters_required.yaml uses unit: int.
    Per project gotchas, integer-typed units have tripped parameter validation (cf. rate_unit: int on scale parameters). Confirm it validates cleanly or drop the unit.

  8. Test gaps in eligibility/WBR boundaries (merged from test review S2–S5, S8):

    • Hours-tier internal edges 16/17 (0.75→0.50) and 21/22 (0.50→0.25) never tested (ny_ui_hours_tier_rate.yaml covers only 10/11 and 30/31).
    • No case isolates quarters_with_wages: 2 as the passing edge of the two-quarter test.
    • The cap-switch boundary in ny_ui_monetarily_eligible.py is untested: no pair where HQ one dollar below vs at the cap makes the standard-1.5x and capped tests disagree; the 2025 cap value $11,088 is never used in any test.
    • No negative/zero-wage cases (negative HQ through the divisor-25 path; all-zero monetary eligibility → false).
    • No 4-quarter case where the $143 floor is uniquely responsible (e.g. HQ $3,600 → floor(3600/26)=138 → 143), distinguishing a floor bug from the divisor-25 coincidence floor(3575/25)=143.
  9. Oct-2025 step values only validated via period: 2026.
    max_amount (504→869) and high_quarter_cap (11,088→19,118) step on 2025-10-06, but YAML period: 2025 resolves at Jan 1, so post-step values during Oct–Dec 2025 are structurally untestable in the YAML harness. Confirm this is acceptable and note it in the test files; pre-step 2025 values are covered ($504 yes, $11,088 no — see Translate tax formulas #8).

  10. Input-variable documentation vs behavior (merged):

    • ny_ui_weekly_hours_worked.py documentation describes NYSDOL round-up-to-whole-hour and 10-hours/day cap rules the formula does not implement (raw input) — state explicitly that the conventions are the claimant's upstream responsibility.
    • ny_ui_gross_weekly_earnings.py — P803 excludes self-employment earnings from the $869 cutoff; the input has no documentation of this exclusion.
    • Both are annual-period variables representing a single representative claim week; the WBR+PBC gate compares this annual-labeled weekly figure to weekly amounts, implicitly assuming constant weekly earnings — document the simplification.

Suggestions

  1. Add a dating comment on the 2025-10-06 step. The Governor's press release says payments increase "the week of October 13"; the audit confirmed 2025-10-06 (first Monday of October, per statute) is correct and Oct 13 is the payment lag — a one-line comment in benefit/max_amount.yaml / eligibility/high_quarter_cap.yaml would preempt future confusion. (Reference-validator flag resolved by the source audit; no value change needed.)
  2. Add the session-law pin-cite for $869 (FY2026 budget amendment to § 590(5), Ch. 56 of the Laws of 2025) so the increase traces to law rather than a press release.
  3. Note derivations on eligibility dollar parameters: high_quarter_minimum = 221 × minimum wage floored to $100 (§ 527(1)(d)); high_quarter_cap = 22 × max benefit rate (22 × 504 = 11,088; 22 × 869 = 19,118 — arithmetic verified).
  4. Additional test cases: 25-week ny_ui case where the 26×WBR MBA cap does NOT bind; hours = 0 with earnings > 0 below cap → full WBR (locks in the hours>0 partial classification); earnings exactly one dollar below WBR+PBC (paying side of the strict <); an integration case routing divisor-25 (HQ ≤ $3,575) through the partial tiers and $869 cap; negative weeks_unemployed (add max_(..., 0) or document out-of-scope); an early-year minimum (e.g. 2020 $104) if pre-2025 coverage is ever claimed.
  5. Future staleness: § 590(5) raises the maximum to 50% of the average weekly wage on 2026-10-05 (first Monday of Oct 2026, subject to § 590(5)(b) fund-balance suspension). Value not yet published — flag for a follow-up parameter update.
  6. Microsim behavior note: all six wage/hours inputs default to 0, so the program is inert in dataset runs — consistent with economy: false / household: true already declared in index.yaml; add a line in the changelog or index description making the household-only scope explicit.
  7. Cosmetics: drop the duplicated ", page 2" prose from parameter title: fields (the #page=2 anchor already carries it); fix the test comment "$3,500 from 2026-01-05" (parameter steps 2026-01-01); harmonize the two documentation styles (bare reference vs documentation = (...)) across the 13 variables.

Source Audit Summary

Category Count Detail
Values confirmed correct 25 16 benefit/eligibility parameters (incl. both max_amount and high_quarter_cap steps, formula/threshold logic, 2025-10-06 date verified as first Monday of October) + 9 partial-benefit checks (tier boundaries/rates/effective date, PBC rate/floor/ceil rule, $869 cap value/ordering, gate consistency)
Mismatches confirmed 2 Both verified by code-path trace and downgraded to SHOULD ADDRESS: (1) § 590(5)(c) cited for hours tiers it does not contain — citation error, amounts match operative P803 practice; (2) WBR+PBC gate zeroes weeks P803 would pay — hybrid of conflicting official sources, bounded class
Mismatches cleared 0 (the 2025-10-06 vs "week of Oct 13" date flag was resolved within the audit as correct — payment lag, not a date error)
Unmodeled / uncorroborated 7 min_amount 2020–2025 yearly values (uncorroborated); PBC 2020 backdating (likely anachronistic); pre-Oct-2025 $504 earnings cap (by construction); pre-2021-08-16 partial rules (absent); self-employment exclusion (undocumented); pre-2025 high_quarter_minimum (absent); 2026-10-05 max step (not yet published)

Validation Summary

Validator Result
Regulatory review No critical regulatory errors; core § 527 / § 590(5)(a) / § 525 / P803 logic verified correct incl. $143 floor scoping and divisor tiers; 4 should-address (citation/backdating/documentation)
References All 16 parameters have references; structural values traced to statute/DOL text; 3 should-address (min_amount corroboration, derived-dollar notes; date flag later cleared by audit)
Code patterns 1 critical (hard-coded 4); 4 should-address (period metadata, backfill dates, unit: int); changelog present, entities consistent, no TODO/stubs, no reinvented shared variables
Test coverage 2 critical (no non-NY test; raw WBR near-zero direct coverage); 8 should-address; no non-functional/tautological tests; integration chain covered (7 cases)
Source audit (PDF) 25 matches / 2 mismatches (both confirmed, severity SHOULD ADDRESS per code-path verification)
CI status All 26 checks pass

Review Severity: REQUEST_CHANGES

3 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

  1. Rebase onto main (branch is 1721 commits behind).
  2. Run /fix-pr 8144 to apply the critical fixes (parameterize the 4-quarter threshold, add the non-NY test, add ny_ui_raw_weekly_benefit_rate.yaml) and work through the should-address list — items SA-1/SA-2 (partial-benefit citation and gate) need an author decision on which regime (P803 vs statutory offset) is the intended baseline.
  3. Re-run make format and the NY YAML shard (policyengine-core test policyengine_us/tests/policy/baseline/gov/states/ny/dol/unemployment_insurance -c policyengine_us) before pushing.

🤖 Generated by /review-program (Claude Code multi-agent review)

DTrim99 and others added 3 commits August 4, 2026 12:04
- 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>
@DTrim99

DTrim99 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Fixes Applied (from Program Review)

Commits 86cc354 (merge), 397437e, and 42d0a51 address the review above. The branch is now current with main (clean merge, zero conflicts — it was 1,721 commits behind).

Critical

  • Hard-coded quarters threshold parameterized: the 4 in ny_ui_raw_weekly_benefit_rate.py is now eligibility/full_base_period_quarters.yaml (P832 p.2, § 590(5)(a)).
  • Non-NY state test added: a CA resident with qualifying wages now asserts ny_ui: 0, exercising the previously untested defined_for = StateCode.NY gate.
  • Direct pre-clamp tests for the raw weekly benefit rate (new ny_ui_raw_weekly_benefit_rate.yaml, 8 cases): divisor-26 vs divisor-25 switch at the $3,575 threshold, two/three-quarter average-of-two-highest tiers, the $143 formula floor isolated as uniquely responsible, and zero/negative high-quarter edges.

Should Address

  • 2020–2023 minimum WBA history corroborated ($104/$108/$116/$124) against Wayback-archived USDOL "Significant Provisions" January tables, with year-tagged archive references — this resolves @PavelMakarchuk's open re-review sourcing item with primary sources rather than trimming the history.
  • Partial-benefit legal basis corrected: the hours-tier files now cite P803 and Ch. 305 of the Laws of 2021 (S7148 § 31) as the operative basis; docstrings note the quoted § 590(5)(c) earnings-offset regime is enacted but not administered (activation contingent under Ch. 56 of 2025, Part KK). The earnings ≥ WBR + PBC zero-gate is documented as a deliberate retention of the statutory rule where P803 and statute conflict (low-WBR/high-earnings weeks) — kept as an author-visible decision rather than silently changed.
  • Negative-weeks guard: ny_ui now floors weeks_unemployed at 0 (previously produced a negative benefit), mirroring the AL/OK pattern; test added.
  • Backdated current-law values annotated (formula minimum, thresholds, PBC, hours tiers — verified for 2025–2026, earlier dates carry current values for calculator convenience); high_quarter_minimum pre-2025 backfill note; stale "2026-01-05" comment corrected to 2026-01-01; hours-tier boundary tests (16/17, 21/22), 2025 cap-switch pair at $11,088, two-quarter eligibility edge, and zero-wage cases added.

Suggestions

  • 2025-10-06 step dating comments (first Monday of October; Ch. 56 of 2025 pin-cite for $869) and a flagged follow-up for the unpublished 2026-10-05 max (50% of average weekly wage); derivation notes (HQ minimum = 221× minimum wage floored to $100; HQ cap = 22× max WBR); title/reference cleanup; household-only scope noted (wage inputs default to 0 — inert in dataset runs); extra tests: 25-week non-binding MBA cap, hours-0-with-earnings full WBR, earnings at WBR+PBC−1, divisor-25-through-tiers integration case.

Skipped (deliberate)

  • Switching the payable formula to pure P803 (dropping the statutory gate) — a benefits-changing regime choice documented for the author/maintainer instead.
  • The 2026-10-05 maximum value (unpublished; flagged as follow-up).

Verification

  • All 84 NY UI YAML tests pass locally (policyengine-core test .../ny/dol/unemployment_insurance -c policyengine_us), single run.
  • ruff format + check clean.

🤖 Applied via /fix-pr (Claude Code)

@DTrim99
DTrim99 requested a review from PavelMakarchuk August 4, 2026 17:22
@DTrim99
DTrim99 requested a review from hua7450 August 13, 2026 18:23

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_rate passes the raw float to .calc(). Integer hours are exact (all 8 boundaries verified); 16.5 hours pays 0.75 instead of 0.50. One-line np.ceil fix.
  • A5 — The 2025-10-06 step in max_amount / high_quarter_cap is 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 at period: 2026.
  • A6programs.yaml status: complete isn't supportable while C1–C4 stand and the model returns non-zero back-extrapolated results for 2020–2024; partial is 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.)
  • A8ny_ui is not wired into any income aggregate. This matches pa_uc/ok_ui/nj_unemployment_insurance precedent, but say whether the deferral is deliberate; eventual wiring must not double-count with the unemployment_compensation input.
  • A9 — All 74 test cases run at 2025/2026; the six pre-2025 min_amount values 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_rate lists § 527(1)(d) first but the 0.5 is only published as a test in P832; max_amount documents no reason for the 2019–2025 freeze (§ 590(5)(b)'s trust-fund suspension supplies it); max_weeks could note the § 601/§ 599(2) exceptions; min_amount cites a rolling NYS-50 URL worth pinning to an archive capture.
  • A11 — Minor: hard-coded 2 in ny_ui_raw_weekly_benefit_rate's two-quarter average; ny_ui_weekly_hours_worked nearly shadows the existing weekly_hours_worked (different default and concept — consider ny_ui_claim_week_hours_worked); dollar figures restated in comments; amount: 1.01; redundant default_value = 0 on several variables.

Investigated and cleared (please don't "fix" these)

  • The 2025-10-06 keying of max_amount/high_quarter_cap is right; keying 2025-01-01 would overpay every pre-October 2025 claim.
  • max_weeks is not dangling — it binds at ny_ui.py via min_() (verified: exactly 26 × $504).
  • The P803 10-hours-per-day cap is unmodelable from a weekly scalar; deferring to the input is correct.
  • hours_tiers thresholds reproduce the published bands exactly for integer hours — no threshold shift needed.
  • The § 525 ceil placement (after the max_) 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_amount values 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>
@DTrim99

DTrim99 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Fixes Applied — remaining review items

Following up on the earlier fix round (commits 397437e / 42d0a51), which resolved all 3 criticals, 9 of 10 should-address, and all 7 suggestions. Re-checked every review item against the current tree; only one was genuinely still open.

Should-Address fixed

  • SA6 — period metadata on the weekly divisors. benefit/standard_divisor.yaml and benefit/low_divisor.yaml now carry period: week (they convert high-quarter wages to a weekly benefit; were period: year). Verified week is a valid parameter-metadata period in the repo (105 uses); did not introduce quarter (used nowhere → would fail validation), so the four per-quarter dollar thresholds and the /1 partial-benefit-credit rate were left as-is, matching the sibling NJ UI convention. Cosmetic only — values read as scalars, zero calculation impact.

Bonus

  • Removed the dead Jan-2025 P832 reference from eligibility/high_quarter_cap.yaml (the live Feb-2026 P832 link remains).

Verification

  • NY UI YAML suite: 84/84 pass.
  • Scope: 3 files, +2/−4 (metadata + a stale reference only). No logic touched.

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>
@DTrim99

DTrim99 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Fixes applied from @hua7450's review — and one decision needed

Incorporated 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)

  • C3 (real eligibility fix)high_quarter_minimum.yaml only had 2025/2026 keys, so core silently back-extrapolated $3,400 to 2020–2024; 2023 and 2024 were provably wrong. Backfilled 2023 = $3,100 (USDOL Significant Provisions Jan 2023) and 2024 = $3,300 (P832 Jan 2025), with 2020–2022 = $2,600 / $2,700 / $2,900 via the statutory derivation (= min_amount × 25). Added the missing pre-2025 min_amount cases plus 2023/2024 monetary-eligibility boundary tests (A9) that would have caught this.
  • A1 / A3 — corrected the hours-tier authority (Ch. 277 L.2021 §31, as added by Ch. 305 L.2021 §14; the "Part KK §4" note reworded), swapped the Cloudflare-gated bill URL for the unauthenticated assembly.state.ny.us text, and repointed the hours/earnings/payable variables at P803 for rules that live only there.
  • A5–A11 — added the "2025-10-06 step is inert within 2025" note (keying unchanged) and renamed the mis-labeled test; programs.yaml status complete → partial; added a "not modeled" block (§527(2)/(6), §600, §591, §590(4) exceptions, no dependency allowance) and a note that the income-aggregate deferral is deliberate (must not double-count with unemployment_compensation); pinned/repaired the remaining references; minor cosmetics.
  • A2 was already resolved in the prior commit (the dead Jan-2025 P832 link was removed).

⚠️ Needs an author decision — C1 (and the items coupled to it), not applied

  • C1 — the partial-benefit regime. Your review shows ny_ui_weekly_payable is a hybrid that matches neither operative rule (overpays vs the statutory §590(5)(c) taper, underpays vs the P803 hours system in its own docstring example). This is a genuine design choice — pure P803 (hours_tier_rate × WBR, zeroed above max_amount) vs the statutory earnings taper — and four test cases + the docstring move with whichever is chosen, so I left it for @daphnehanse11 to pick rather than choosing a regime unilaterally. (Flagging that my own earlier review had accepted this hybrid as by-design; your probing shows it isn't self-consistent — worth the author resolving.)
  • C2 / C4 / A4 are coupled to that decision and also left as-is: C2 (the hours-tier matrix back-extending pre-2021 → the honest fix is a program start-date guard, which is a supported-range/regime choice), C4 (the §525 PBC params dated 2020 but §525 is effective 2024 — re-dating interacts with which regime uses the credit), and A4 (np.ceil on hours rounding, moot if the statutory taper is chosen since it removes hours tiers). These should be resolved together with C1.

Everything in your "Investigated and cleared" list was left untouched, as intended.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add NY unemployment insurance

4 participants