Repository navigation
Conversation
Add employer_state_payroll_premium_deduction_share (default 1) for the programs whose statute puts the premium on the employer and lets it deduct up to a share from wages: CO FAMLI, DE Paid Leave, ME and MA PFML, MN Paid Leave, NY PFL and DBL, the VT Child Care Contribution and WA PFML. The employee amount is the permitted share times the deduction share; the employer-side variables carry the part it does not deduct. Encode Acts 2026 c. 101 ss. 25-26 for Massachusetts from 2027-01-01, with DFML's 2027 family and medical rates, and cite CGS 31-49g(b)(1) for the Connecticut paid leave rate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…variants Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the deduction-share programs by the employer's choice, not by who owes the premium (NY and WA put the contribution on the worker), note that MN and NY employer costs are not modeled, state why WA PFML is in and Paid Leave Oregon is out, and note that Rev. Rul. 2025-4's treatment of an employer-paid employee share as wages is not modeled. Cap the one-worker employer's taxable total in the invariants so the employer-level path is checked for every modeled state and size, pin the 2027 Massachusetts parameter values, and add file-page anchors to the PDF references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Minn. Stat. 268B.14 makes the premium payable by the employer, which pays at least half (subd. 3); a small employer under subd. 5a pays 75% of the rate and at least a quarter of the full rate. The employer pays the premium less the employee deduction, so the part of the permitted employee share an employer does not deduct (PR #10285) now lands on the employer side. - New parameters: rate (0.88% for 2026 and 2027), employer_minimum_share, and small_employer/{rate_share, employer_minimum_share, max_headcount, max_average_quarterly_wage}. They replace employee_rate (0.44%), which is now derived. - New variables: mn_paid_leave_small_employer (employer_headcount and a new average quarterly wage input stand in for subds. 5b and 5c), mn_paid_leave_premium_rate, mn_paid_leave_permitted_employee_rate, mn_paid_leave_premium, mn_employer_paid_leave_contribution, mn_employer_additional_state_payroll_tax and employer_total_mn_paid_leave_taxable_wages. - employer_additional_state_payroll_tax and the employer-level employer_total_additional_state_payroll_tax include Minnesota. - YAML cases computed from the statute and DEED rates, MN rows in the payroll contribution tests, and MN in the deduction-share invariants, with a new statute-literal property for Minnesota. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re' into mn-employer-paid-leave-premium # Conflicts: # policyengine_us/variables/input/employer_payroll.py
A reform of the rate or the employer minimums reaches both sides, and a small employer minimum above the small employer premium leaves employees nothing (subd. 5a(b)(2), "the remaining portion, if any"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The small employer wage limit is now the statutory 150% (subd. 5a(a)(2))
times DEED's statewide average annual wage ($73,989 for 2026 premiums,
from DEED's small employer designation notice) per quarter, compared in
whole cents as DEED states it ($27,745.88). This replaces the
max_average_quarterly_wage parameter, which had no period and cited a page
that gives no year.
- The permitted employee rate is capped at the premium as well as floored at
0 ("the remaining portion, if any"); the reform test covers both.
- The structural shares and limits no longer carry zero placeholders before
2026; the rate alone gates the program.
- The property test draws the average wage in whole cents, so its float64
reference can't disagree with the model's float32 input below a cent.
- Cite DEED's July 31, 2026 bulletin for the 2027 rate, and move the
employee_rate removal into a removed changelog fragment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at32 - Restore the 0000-01-01 sentinels on the Minnesota Paid Leave shares and limits. pe-us backdates parameters only to 2015, so without them every Minnesota employer-side calculation before 2015 raised ParameterNotFoundError (caught by the delta review; a 2014 YAML case now guards it). - Compare the unrounded average wage with DEED's cent-rounded limit at the input's float32 precision, instead of rounding the input to cents: an average a fraction of a cent above $27,745.88 now fails the test, as it does against DEED's published limit, while an input of exactly $27,745.88 still meets it. A YAML case covers $27,745.885. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re' into mn-employer-paid-leave-premium
- The Minnesota Paid Leave shares and limits now carry their 2026 values from 0000-01-01, so a reform that sets an earlier rate gets the statutory split instead of a zero employer minimum; the zero rate still keeps the program off before 2026, and pre-2015 years still compute. - Round the small employer wage limit to the cent half up, as the repo does for Minnesota's taxable wage base, instead of numpy's half-to-even. - Say that DEED calculates the statewide average annual wage each year, and that 150% of $73,989 / 4 is $27,745.875, which DEED gives as $27,745.88. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The sentinel comment now says what happens: earlier years read the 2026 value every year, and the zero rate keeps every amount at 0 before 2026. - A reform setting the statewide average to $73,991 puts the limit at $27,746.625, which half-up rounding makes $27,746.63; the new test fails under numpy's half-to-even rounding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hand-off to the US + core hub.
🤖 Generated with Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10294 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 4 1 -3
Lines 76 193 +117
Branches 2 0 -2
==========================================
+ Hits 76 193 +117
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:
|
PR Review: Model the Minnesota Paid Leave employer premiumPR #10294 (author: MaxGhenis). Head SummaryThe PR adds the employer side of Minnesota Paid Leave under Minn. Stat. 268B.14:
Scope. This review covers only #10294's own six commits ( Law and sources. I re-read 268B.14 subds. 1, 3, 4, 5a–5c, 6 and 7 and 268B.01 subd. 43 on the Revisor's site. I also re-read DEED's small employer designation notice and DEED's July 31, 2026 bulletin for 2027. Every rate, share, limit and wage base matches the law and DEED's figures:
Code.
Tests, axiom and branch.
Open items. One should-fix item remains, the same one we raised on #10285: seven new parameter descriptions don't follow the house template. There are five optional suggestions. Critical (must fix)None. Should address1. Seven new parameter descriptions don't follow the house template.
Suggestions1. Report the cost of the two new reform tests (CLAUDE.md, "Measure simulation-heavy additions").
2. Keep the 2027 carry-forward note in
3. Separate the new flow case from Minnesota unemployment insurance values that are out of date on
4. Update one sentence in rulespec-us#1819 to match the head's wage-limit logic.
5. Small text fixes.
Verified correct
Axiom line assessmentValid. The line reads
CI status29 checks pass and 3 are skipping at head
Branch status
Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Minnesota's rate, the employer/employee split, the small-employer reduction, the wage limit and the float32 boundary all match 268B.14 and DEED, and all 22 new cases hand-check. One should-address item: seven new MN parameter descriptions don't follow the house template (rewrites are in the report). Five suggestions. Merge #10285 first; the merge with it and with main is clean. Full report in the comment above.
Stacked on #10285. CI only runs on PRs into
main, so this branch contains #10285's commits. Reviewgit diff 3698893465..HEAD(3698893 is #10285's current head, which mergesmain): commits156453fd59,5e55446497,f2f4314171,f5b8ec27a2,b0596abccfanda19c04c83c, plus merges of #10285's head (75ec5a58dc,c1c6da1a38). This PR merges after #10285. (#10282, which #10285 waited on, was closed once #10279 fixed the same NC test onmain.)What this changes
Minnesota Paid Leave had only an employee-side variable. So
employer_additional_state_payroll_tax,employer_payroll_taxand the employer-levelemployer_total_additional_state_payroll_taxleft out Minnesota's employer premium. Under #10285, the part of the permitted employee share an employer does not deduct also had nowhere to land. This PR models the premium under Minn. Stat. 268B.14:state_payroll_premium_deduction_sharetimes the permitted employee portion.Each rate applies to taxable wages: wages up to the Social Security base rounded to the nearest $1,000, which is $185,000 in 2026 (268B.01, subd. 43). The two statutes differ here. 268B.14, subd. 4 caps wages at the unrounded Social Security maximum, $184,500 for 2026. The model, which already did this on main before this PR, follows subd. 43's rounded figure, the one DEED publishes. Using $184,500 instead would lower the 2026 maximum premium per worker from $1,628 to $1,623.60. DEED's premiums page confirms each figure (pl.mn.gov, read 2026-10-19). It gives the 0.88% rate for 2026 and 2027, the 0.66% small employer rate and the 0.44% employee maximum. It adds that "the maximum contribution from employees in this case is the same as an employee of a large employer". DEED's small employer designation notice says the same ("Like large employers, small employers can deduct up to 0.44% of wages"). It also defines the 2026 basis period and the wage limit used below.
Parameters (
gov.states.mn.tax.payroll.paid_leave)rate: 0.88% from 2026, with 2027 entered explicitly.employer_minimum_share: 50%.small_employer.rate_share: 75%.small_employer.employer_minimum_share: 25% of the full rate.small_employer.max_headcount: 30.small_employer.max_average_wage_ratio: 150% (subd. 5a(a)(2)).small_employer.state_average_annual_wage: $73,989 for 2026 premiums (DEED's statewide average annual wage for 2025).Each parameter starts with a
0000-01-01sentinel. pe-us backdates first values only to 2015, so without one, every Minnesota calculation before 2015 fails withParameterNotFoundError; a 2014 YAML case guards this.rate's sentinel is 0, which keeps the program off before 2026. The others carry their 2026 values, so a reform that sets an earlier rate gets the statutory split rather than a zero employer minimum.employee_rate(0.44%) is removed. The 0.44% is now derived as the rate less the employer's minimum. Deriving it is what lets a small employer's employee portion come out right, and lets a reform of the rate or the shares reach both sides. A reform that setgov.states.mn.tax.payroll.paid_leave.employee_ratemust now setrateoremployer_minimum_shareinstead.Variables
mn_paid_leave_small_employer: the subd. 5a(a) test (see the proxies below).mn_paid_leave_premium_rate: the rate, or 75% of it for a small employer.mn_paid_leave_permitted_employee_rate: the premium rate less the employer's minimum, held between 0 ("the remaining portion, if any") and the premium itself.mn_paid_leave_premium: the premium rate times taxable wages.mn_employee_paid_leave_contribution: the permitted employee rate times taxable wages times the deduction share. It was 0.44% times wages times the share, and is unchanged at every current parameter value.mn_employer_paid_leave_contribution: the premium less the employee contribution.mn_employer_additional_state_payroll_tax: added toemployer_additional_state_payroll_tax.employer_total_mn_paid_leave_taxable_wages: the employer-level wage base.employer_total_additional_state_payroll_taxgains a Minnesota branch. It computes (premium rate − share × permitted employee rate) × employer-level wages, reading the same two rate variables as the per-worker path.Proxies for subds. 5a–5c, and what is not modeled
employer_headcount(default 100) stands in for the employer's highest quarterly count of wage records in the basis period, the four quarters ending September 30 of the prior year. For an employer not covered for the whole period, it stands in for the employer's own estimate (5b(c)).mn_paid_leave_employer_average_quarterly_wage. Per DEED, it is the covered wages of the employer's highest-paid quarter divided by its highest employee count. Its default of 0 treats the wage test as met, soemployer_headcountalone decides the small employer rate unless the input is set. Two alternatives were rejected:employer_total_mn_paid_leave_taxable_wagesdefaults toemployer_total_taxable_earnings_for_social_security, which caps each worker at the Social Security base ($184,500 in 2026) rather than Minnesota's rounded base ($185,000). The two bases differ by at most $500 a worker. The default understates in 2026 ($184,500 against $185,000) and overstates in 2027 ($192,300 against $192,000). Users can set the input directly.Default outputs that change
From 2026, every Minnesota worker now has an employer premium. At the defaults (100 employees, full deduction) it is 0.44% of taxable wages, and it flows into:
employer_additional_state_payroll_tax;employer_state_payroll_tax;employer_payroll_tax;employer_cost_of_employment.For Minnesota employer-level inputs, the employer-level path rises the same way:
employer_total_additional_state_payroll_tax,employer_total_state_payroll_tax,employer_total_payroll_taxandemployer_total_cost_of_employment. Employee-side amounts don't change, because the permitted employee rate is 0.44% for both sizes of employer. Household outputs don't change either. No household or tax-unit variable reads these employer-side variables. The CRFBtax_employer_payroll_taxreform adds only employer Social Security and Medicare tax to gross income, so it doesn't pick up the premium either.Invariants
These are checked by
policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py(Hypothesis, extended from #10285). They hold for every worker, wage, employer size, average wage and share, in 2026 and 2027:employer_total_additional_state_payroll_taxequals the per-workeremployer_additional_state_payroll_tax.mn_paid_leave_premiumequals that premium;Tests run locally
Targeted files only, per the host rules; the full YAML shards are left to CI.
New
policyengine_us/tests/policy/baseline/gov/states/mn/tax/payroll/paid_leave/mn_employer_paid_leave_contribution.yaml: 22 passed. Each new value is computed by hand in a comment from the statute and DEED figures; cases that repeat a value computed earlier in the file don't repeat the comment. The cases cover:employer_payroll_tax($8,510 on $100,000);state_payroll_premium_deduction_share.yaml(16 passed, its Minnesota case now checks the employer's $660) andmn_employee_paid_leave_contribution.yaml(3 passed).policyengine_us/tests/core/test_payroll_contributions.py: 107 passed. Minnesota is added to the employer-side and employer-level cases. A new test,test_minnesota_paid_leave_shares_follow_the_parameters, applies reforms of the rate and both employer minimums and checks the derived employee portion against two bounds:A second new test,
test_minnesota_small_employer_wage_limit_rounds_half_up, pins the limit's rounding. A reform setting the statewide average to $73,991 gives 150% × $73,991 / 4 = $27,746.625, which rounds half up to $27,746.63. So $27,746.63 qualifies and $27,746.64 doesn't. Half-to-even rounding would give $27,746.62, and the test fails under it.policyengine_us/tests/core/test_input_variable_definitions.py: 4 passed.Invariants: 2 passed (2.7–9.2 s of test time, 31 s wall at most, peak footprint 1.07 GB).
Mutation check
Each mutant breaks one formula, aggregate or parameter. Runs, in order:
The rest of the code is unchanged since r2. Script and results:
~/reviews/mn-employer-paid-leave-premium-2026-10-19/(mutants.py,runs/mutants-*.txt).Review
Independent adversarial review (Opus 5.5, in session; no Subfleet lanes were open),
~/reviews/mn-employer-paid-leave-premium-2026-10-19/runs/review-r1.md.r1: APPROVE, no must-fix. The reviewer recomputed every case and confirmed the statute reading against DEED's small employer designation notice. It found that nothing references
employee_ratein this repo, policyengine-api, policyengine-app-v2 or policyengine.py. It also showed property 7 is independent of the parameter files: under five parameter reforms, only property 7 fails. f2f4314 addresses its findings:removedchangelog fragment.Delta review r2: APPROVE,
runs/review-r2.md. It caught a regression in f2f4314: dropping the placeholders broke pre-2015 calculations, and f5b8ec2 fixes it. b0596ab applies its suggestions:r3: APPROVE at b0596ab (
runs/review-r3.md). It checked the 2014 path and a 2025 backcast reform: under the reform, large employers split 440/440 and small employers 440/220. a19c04c applies its last nit, the sentinel comment, and its optional rounding test.r2 also found that in 2014
employer_total_additional_state_payroll_taxfails for every state withParameterNotFoundError, because Colorado FAMLI's rate parameters onmainstart in 2023 with no sentinel. That is not this PR's change, and open PR #10154 adds the sentinel.Impact
Not run here: a disk pause (#9, 2026-10-19) holds impact runs. Suggested hub queue line, measuring the employer side and confirming households don't move:
axiom: Minn. Stat. 268B.14 → TheAxiomFoundation/rulespec-us#1819 queued (extended with the employer outputs, the subd. 5a leaf inputs and companion rows matching these YAML cases; blocked on corpus ingestion, TheAxiomFoundation/axiom-corpus#893)
🤖 Generated with Claude Code