Skip to content

Let employers deduct less than the permitted state payroll premium, and apply Massachusetts' PFML cap swap from 2027 - #10285

Merged
MaxGhenis merged 16 commits into
mainfrom
payroll-employer-deduction-share
Nov 9, 2026
Merged

MaxGhenis merged 16 commits into
mainfrom
payroll-employer-deduction-share

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

On main, the documentation of employee_state_payroll_tax calls its components "mandatory", but for nine programs in eight states the variable counts the largest employee share the employer may deduct. In those programs the law caps what the employer may deduct from wages and leaves the amount to the employer. This PR:

  1. Adds employer_state_payroll_premium_deduction_share (Person input, default 1), the share of the permitted employee premium the employer deducts. state_payroll_premium_deduction_share holds it between 0 and 1, because an employer may not deduct more than the permitted share. For each optional program the employee amount becomes the permitted amount times that share, and the employer-side variable takes the part the employer doesn't deduct. Each law makes that part the employer's, except New York's PFL statute, which says "No employer shall be required to fund any portion of the family leave benefit" (WCL §209(3)(b)). The model has no MN or NY employer cost, so there that part goes nowhere. At the default, every output stays the same.
  2. Applies the swap of Massachusetts' deduction caps in Acts 2026 c. 101 §§25–26 from January 1, 2027, to 40% of family and 100% of medical, with a new parameter, family_employee_share. The Department of Family and Medical Leave (DFML) swaps its 2027 rates at the same time (family 0.70%, medical 0.18%), so the employee share stays 0.46% and the employer share 0.42%.
  3. Fixes the Connecticut citation. ct/tax/payroll/paid_leave/employee_rate cited CGS 31-49e, the definitions section. Section 31-49g(b)(1) holds the contribution and its 0.5% ceiling.
  4. Rewrites the documentation on employee_state_payroll_tax, employer_additional_state_payroll_tax, the employer-level aggregate and the touched program variables, to separate mandatory withholding from optional employer pass-through and cite the deduction rule.

The October 2026 PolicyBench payroll audit found the gap. PolicyBench now excludes the four affected outputs, so no PolicyBench reference depends on this PR.

Programs and the rule each follows

Program Who owes the premium; what the employer may deduct Employee amount (2026 rates) Employer side
CO FAMLI Employer remits; "may deduct up to 50 percent" (C.R.S. 8-13.3-507(5)); a deduction not taken counts as an election to pay it (7 CCR 1107-1 §1.4(6)(A)) share × 0.44% employer half (10+ employees) + undeducted
DE Paid Leave Employer remits; "shall deduct not greater than 50%" and "may elect to pay all or any portion"; liable for the full amount (19 Del. C. §3705(d)–(g)) share × 50% of the size-based rate rate × (1 − 50% × share)
MA PFML Employer remits; may deduct up to 100% family / 40% medical before the swap, 40% / 100% after it (M.G.L. c. 175M §6(c)–(e); Acts 2026 c. 101 §§25–26); employer pays the rest "in all instances" (458 CMR 2.05(5)) share × 0.46% undeductible part (25+) + undeducted
ME PFML Employer remits 100% (15+) or 50% (<15) and "may deduct up to 50%" (26 M.R.S. §850-F(5)) share × 0.5% employer half (15+) + undeducted
MN Paid Leave Premium payable by the employer, which pays at least half (a small employer at least a quarter of the full rate, 268B.14 subd. 5a(b)(1)); employees pay only "the remaining portion, if any" (Minn. Stat. 268B.14 subds. 1, 3, 5a) share × 0.44% none in the model
NY PFL and DBL Each employee "shall contribute" (WCL §209(1)); employer "is authorized to collect" up to the caps (§209(3)–(4)) and pays DBL cost beyond what it collects (§210(1)) share × capped amount none in the model (insurance premium)
VT Child Care Contribution "Each employer shall pay"; may withhold up to a quarter; responsible for any unpaid amount (32 V.S.A. §10553(a)(1), (c)(2)) share × 0.11% 0.33% + undeducted
WA PFML Employer "may deduct ... up to" the employee share and "may elect to pay all or any portion" of it (RCW 50A.10.030(3)); a deduction not taken counts as an election to pay (WAC 192-510-065(2)) share × 1.13% × (1 − 28.57%) employer portion (50+) + undeducted

The model's other programs stay unchanged, because each statute puts the contribution on the worker and requires withholding. They comprise CA SDI (UIC 984, 986), CT Paid Leave (CGS 31-49g(b)(1), (3)), NJ TDI, FLI, UI and workforce, Paid Leave Oregon (ORS 657B.150), the Oregon statewide transit tax, PA UC, RI TDI and WA Cares (RCW 50B.04.080).

We sort the programs by each law's deduction text. The input covers programs whose law caps a permissive deduction ("may deduct up to", "shall deduct not greater than", "is authorized to collect", "may deduct and withhold ... not more than", "the remaining portion, if any") and, apart from New York PFL, makes a deduction not taken the employer's. It leaves out programs whose law requires a fixed deduction, even where the employer may also pay the worker's contribution for them.

  • WA PFML. RCW 50A.10.030(1) and (7)(a) assess the premium on each worker and have the employer "collect from the employees". But (3)(a)–(b) say "may deduct ... up to", (3)(c) lets the employer "pay all or any portion" of the employee share, and WAC 192-510-065(2) makes a missed deduction the employer's. So the input covers Washington, and the default of 1 matches (7)(a).
  • Paid Leave Oregon. ORS 657B.150(2)(b) says the employer "shall deduct employee contributions ... in an amount that is equal to 60 percent" of the rate. Its (5) lets the employer pay "the required employee contributions" as an employer-offered benefit. That changes who pays a required contribution and leaves the deduction rule alone, so the input leaves Oregon out. The model doesn't cover the (5) election or voluntary payment of WA Cares or CA SDI.

employer_total_additional_state_payroll_tax applies the person's share to the employer's whole payroll, as if the employer deducts the same share from everyone. 458 CMR 2.05(5)(d) allows different shares for different groups, which a single per-person input can't express.

The date of the Massachusetts swap

Acts 2026 c. 101, approved June 12, 2026, amends M.G.L. c. 175M §6. Section 25 strikes "40" in lines 22, 33 and 39 and inserts "100", and section 26 strikes "100" in lines 25, 33 and 43 and inserts "40". Each figure appears three times in §6, in (c), (d) and (e), so the caps swap for employers, small employers and covered business entities.

The sources name two years:

  • Section 45 applies sections 25 and 26, among others, "for taxable years beginning on or after January 1, 2026".
  • Section 43(a) has the Executive Office of Labor and Workforce Development, consulting DFML, issue guidance on "the impact for employers and employees in calendar year 2027". The guidance covers adjustments DFML takes "to ensure the overall balance of employee and employer contribution levels remain unchanged". Section 43(b) has DFML notify the legislature's committees within 30 days of "making administrative adjustments to the annual contribution rates".
  • DFML applies the change "effective January 1, 2027". Its page, last updated October 1, 2026, keeps 2026 on the old split. For 2027 it lists up to 40% of family (0.28% of wages) and up to 100% of medical (0.18%), and employers of 25 or more pay the remaining 0.42%.
  • The Department of Revenue, in a working draft Technical Information Release dated June 23, 2026, applies the new caps "for taxable years beginning on or after January 1, 2026".

This PR keeps 2026 on main's split and swaps the caps from January 1, 2027, the date in DFML's published rates. us-ma:pfml-cap-swap-effective-date in source_conflicts/candidates.yaml records as an open question whether section 45's 2026 date governs. Both dates put the swap in place by 2027, so the question touches 2026 alone. On $100,000 of 2026 wages the code gives a $460 employee contribution, and applying section 45's date to DFML's 2026 rates would give $772.

Invariants

These hold for every worker, wage, employer size and share, in 2026 and 2027. policyengine_us/tests/core/test_state_payroll_premium_deduction_share_invariants.py checks them with Hypothesis, running three copies of each drawn worker in one vectorized simulation:

  1. Scaling. The optional programs' employee amount equals clip(share, 0, 1) × the amount at the default, so the default deducts the full permitted share and a share outside 0–1 acts as the nearer bound.
  2. Mandatory parts stay put. employee_state_payroll_tax minus the optional components doesn't depend on the share.
  3. Conservation. In the six states with an employer side (CO, DE, MA, ME, VT, WA), the employee and employer premiums sum to the same amount at any share, because the employer pays what it doesn't deduct. MN and NY employer amounts stay zero at any share.
  4. Monotonicity. A larger share never lowers the employee amount or raises the employer amount.
  5. Differential. When employer-level wage totals equal the worker's wages, with the same Social Security cap, employer_total_additional_state_payroll_tax equals employer_additional_state_payroll_tax in each of those six states, at any share and employer size.
  6. Massachusetts balance across the swap. For wages under both years' wage bases, the 2027 employee and employer amounts equal the 2026 amounts.

The test compares amounts to float32 precision, within a cent. A second test, test_massachusetts_2027_swaps_deduction_caps_and_rates, pins the four 2027 Massachusetts parameter values, because the six properties hold whether or not those values swap. The property test fails on each of 27 one-line mutations. They drop a share or undeducted term, remove the clip, change a 2027 Massachusetts cap or rate, uncap Massachusetts employer wages, or move one of the aggregate's size thresholds up or down by one.

Cost

The property test builds 8 simulations of at most 171 people over two years. In CI run 42612794607, it took 0.95 s in Rest Python shard 3, inside a process that ran 1,029 tests in 20:30. On a shared macOS host, the file peaks at about 1.7 GB and the model import alone at about 1.1 GB.

Tests

  • state_payroll_premium_deduction_share.yaml (16 cases) and employer_total_additional_state_payroll_tax.yaml (1 case), both under policyengine_us/tests/policy/baseline/gov/states/tax/payroll/, cover each program's employee and employer amounts at partial shares, and the employer aggregate. Comments derive the expected values from the statutory and agency rates.
  • ma_employee_paid_leave_contribution.yaml gains five cases: 2026 on the old caps, 2027 on the new caps and rates, a 2027 small employer, a 2027 partial share, and a partial share above the 2027 wage cap.
  • test_payroll_contributions.py passes unchanged, which covers the default-share outputs, and test_input_variable_definitions.py passes with the new input.
  • test_increase_taxable_earnings_for_social_security.py now supplies the default share to the evaluator that test_donut_invariants builds by hand from the Delaware formulas.

Not in this PR

  • Federal tax on an employer-paid employee share. For state-run PFML funds, Rev. Rul. 2025-4 (Situation 4) treats an employer's voluntary payment of the employee's permitted share as compensation, in the employee's gross income and federal employment tax wages. Notice 2026-6 doesn't extend the pick-up transition relief to 2026. The ruling doesn't address private or self-insured plans (footnote 3), and New York employers may cover PFL and DBL that way (WCL §211). The ruling also doesn't address Vermont's Child Care Contribution, which funds child care. When the share falls below 1, this PR lowers the employee's payroll deduction and doesn't add the pick-up to wages.
  • MN employer premium and NY employer coverage cost. The model has no employer variable for them, so the undeducted part lands nowhere. Model the Minnesota Paid Leave employer premium #10294 adds the Minnesota premium.

Impact

At the default share of 1, no output changes. Every formula reduces to main's at that share, and in 2027 Massachusetts' swapped caps and rates give each worker the employee and employer amounts main gives. Across 480 one-person households (16 states, 5 wages, 6 employer sizes) and 2025–2027, all 23 variables we compared, including household_net_income, match main bit for bit.

axiom: M.G.L. c. 175M s. 6 / Acts 2026 c. 101 → TheAxiomFoundation/rulespec-us#1817 queued; C.R.S. 8-13.3-507 → TheAxiomFoundation/rulespec-us#1818 queued; Minn. Stat. 268B.14 → TheAxiomFoundation/rulespec-us#1819 queued; N.Y. WCL 209 → TheAxiomFoundation/rulespec-us#1820 queued; 19 Del. C. 3705 → TheAxiomFoundation/rulespec-us#1821 queued; 26 M.R.S. 850-F → TheAxiomFoundation/rulespec-us#1822 queued; 32 V.S.A. 10553 → TheAxiomFoundation/rulespec-us#1823 queued; RCW 50A.10.030 → TheAxiomFoundation/rulespec-us#1824 queued (all blocked on corpus ingestion, TheAxiomFoundation/axiom-corpus#893); CGS 31-49g(b)(1) citation fix: n/a: reference-only change.

impact: none at the default share of 1; outputs matched main bit for bit across 480 one-person households, 23 variables and 2025–2027

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits October 19, 2026 14:33
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>
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 19, 2026 19:06
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (aae7f98) to head (d9e2c8b).
⚠️ Report is 83 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main    #10285    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            1         1            
  Lines           37       193   +156     
==========================================
+ Hits            37       193   +156     
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.

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

Copy link
Copy Markdown
Contributor Author

Hand-off to the US + core hub.

MaxGhenis and others added 2 commits October 19, 2026 17:44
Brings in main through 1661d71, including #10279's update to North Carolina SA Case 37, which was the only CI failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

MaxGhenis commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Hand-off update: #10282 was closed because #10279 already landed the same NC Special Assistance test fix on main. The branch already had main merged in at 21:44Z (33b1f9091e, which includes #10279). At 22:37Z I also ran GitHub's update-branch, which added 3698893465ee80dd94199b0fad4606eaaf1318b5, a second main merge and now the head. Both commits only bring in main: none of this PR's files changed after 727ebcb, where the review agreed. There is no remaining dependency; what's left is CI.

Brings in main through c39af98 (#10185, #10199 and others) so CI runs on the combined tree. The two sides share no files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99

DTrim99 commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

PR Review: Let employers deduct less than the permitted state payroll premium, and apply Massachusetts' 2027 PFML cap swap

PR #10285 (author: MaxGhenis). Head 6ad174a080. The branch is 7 ahead of main and 16 behind. First review.

Summary

The PR adds employer_state_payroll_premium_deduction_share (Person input, default 1). It is the share of the permitted employee premium that the employer actually deducts, held to 0–1 by the new state_payroll_premium_deduction_share. It covers eight programs whose law caps a permissive deduction: 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 becomes the permitted share times this input. In the six programs with an employer variable, that variable picks up the part not deducted. The PR also encodes the Massachusetts cap swap under Acts 2026 c. 101 §§25–26 from 2027-01-01, together with DFML's 2027 rate swap, and fixes the Connecticut citation to CGS 31-49g(b)(1).

I re-read the primary sources for all eight programs and for Connecticut. Each one matches the PR's split between the "may deduct up to" programs and the mandatory-withholding programs, and each matches its employer-pays-the-rest rule. The Acts 2026 c. 101 text and DFML's 2027 split confirm the Massachusetts values. Every formula reduces to the old one at the default share, so no existing result changes. Employee plus employer equals the required remittance at any share in all six modeled states. The code is vectorized, and the share is applied only inside the state-gated program variables.

I hand-checked all 20 new YAML cases and two existing capped Massachusetts cases. All eight axiom issues are OPEN, labelled pe-parity, dispatch-ready and consistent with the head. CI is 29/29 green. git merge-tree is clean against main (which now includes #10295), against #10154, and against both together.

One should-fix item remains: three parameter descriptions don't follow the house template. There are three optional suggestions.

Critical (must fix)

None.

Should address

1. Three parameter descriptions don't follow the house template.

  • Where (line 1 of each):
    • parameters/gov/states/ma/tax/payroll/paid_leave/family_employee_share.yaml (new): "Largest share of the Massachusetts PFML family leave contribution an employer may deduct from wages."
    • parameters/gov/states/ma/tax/payroll/paid_leave/medical_employee_share.yaml (rewritten): "Largest share of the Massachusetts PFML medical leave contribution an employer may deduct from wages."
    • parameters/gov/states/de/tax/payroll/paid_leave/employee_share.yaml (rewritten): "Largest share of each Delaware Paid Leave contribution an employer may deduct from wages."
  • The template: "one sentence, spell the program out fully (no acronyms), [State] [verb] ... under the [Full Program Name] program."
    • All three open with a noun phrase instead of "[State] [verb]".
    • The two Massachusetts descriptions use the acronym "PFML".
    • None has the "under the ... program" clause.
  • Fix, for example:
    • "Massachusetts limits an employer's deduction from wages to this share of the family leave contribution under the Paid Family and Medical Leave program."
    • The same sentence with "medical leave contribution" for medical_employee_share.
    • "Delaware limits an employer's deduction from wages to this share of each contribution under the Paid Leave program."

Suggestions

1. Federal tax treatment of the part the employer pays (documented deferral; consider a follow-up issue).

  • What's missing. The input, employee_state_payroll_tax and the aggregate docstrings say the federal treatment of an employer's payment of the employee share is not modeled. That treatment is the "pick-up" in Rev. Rul. 2025-4. The citation is correct, and the relief has ended for 2026. Notice 2026-6, footnote 2: "This notice does not extend the third component of the transition relief announced in Revenue Ruling 2025-4 to an employer pick-up for calendar year 2026, and consequently, contemplates that employers will treat contribution amounts they voluntarily pay on behalf of their employees to a State PFML program as wages for Federal employment tax purposes under §§ 3121(a), 3306(b), and 3401(a)".
  • Effect. Take a share below 1 in CO, DE, ME, MA, MN or WA from 2026 on. The model raises net income by the full undeducted amount, but federal law adds that amount to W-2 wages for income tax and FICA. The employee can also deduct it as a state tax if itemizing.
    • Example: CO 2026, $100,000 of wages, share 0.5. The employer picks up $220, and the model leaves out FICA of 7.65% × 220 = $16.83 plus the income tax on $220.
  • Why it isn't blocking. The default share is unaffected, and the limitation is stated in the docstrings.
  • Suggestion. File a follow-up issue and link it from the input's docstring, so users who lower the share see where the model stops.

2. Optional YAML cases for two paths that only the Hypothesis test reaches.

  • Wage cap with a partial share. No YAML case puts a partial share on wages above the Social Security base. MA 2027, $250,000 of wages, share 0.5:
    • wages capped at $192,300
    • permitted 0.46% × 192,300 = 884.58
    • ma_employee_paid_leave_contribution = 442.29
    • ma_employer_paid_leave_contribution = 0.42% × 192,300 + 442.29 = 807.66 + 442.29 = 1,249.95
    • This also pins the 2027 cap together with the swapped parameters.
  • Employer aggregate with a share. employer_total_additional_state_payroll_tax is checked only by property 5 and by the existing default-share Python tests. A case: CO 2026, employer_total_taxable_earnings_for_social_security: 1_000_000, employer_state_payroll_premium_deduction_share: 0.5, default headcount. That gives 0.44% × 1,000,000 + 0.5 × 0.44% × 1,000,000 = 4,400 + 2,200 = 6,600.

3. Small text fixes.

  • PR body, "Not in this PR". "2027 premium rates for CO, DE, ME, MN, NY and WA still carry 2026 values forward" is out of date now that Encode the published 2027 state paid leave premiums (CO, WA, NY, NJ) and cite the unchanged 2027 rates #10295 is on main:
    • It encodes CO 0.86%, WA 1.2% with a 29.3% employer share, and NY PFL 0.452% with a $451.81 maximum.
    • It cites official confirmation that DE, ME and MN are unchanged.
    • Drop or update that bullet.
  • Test-module docstring. test_state_payroll_premium_deduction_share_invariants.py:3-7 says these programs "put the premium on the employer". That is not true for:
    • New York, where WCL §209(3)–(4) makes it an employee contribution the employer "is authorized to collect".
    • Washington, where RCW 50A.10.030(1) assesses the premium "for each individual in employment".
    • The variable docstrings were corrected in r1, and the hub review left this one open as a P3.
  • Reference titles. family_employee_share.yaml and medical_employee_share.yaml cite "Massachusetts General Laws Chapter 175M Section 6". The house style asks for the full subsection path, so "Section 6(c)-(d)" would point straight at the caps.
  • Optional comment on the date. Add a one-line comment beside the 2027-01-01 entries in the two share files explaining why the swap is not dated 2026-01-01 under §45's "taxable years" clause (§43(a) and DFML). Then the decision travels with the parameter and not only in the PR body.

Verified correct

  • Default behaviour is unchanged.
    • Every touched employee formula is permitted × state_payroll_premium_deduction_share.
    • Every touched employer formula adds (1 − share) × permitted, or for DE uses rate × (1 − 0.5 × share). At share = 1 each reduces exactly to the formula on main.
    • The aggregate employer_total_additional_state_payroll_tax makes the same changes, applying the person's share to the whole payroll, as its docstring says.
    • The share is clipped to 0–1 (clip(share, 0, 1)), and the YAML clip case pins 1.5 → 1 and −0.5 → 0.
    • The code is vectorized throughout (clip, where, select, array arithmetic).
    • The share variable has no defined_for. It is read only inside variables already gated by defined_for = StateCode.XX.
  • Conservation (employee + employer = required remittance, for any share):
    • CO: 10+ employees remit 0.88% (= 0.44% + undeducted + deducted). Fewer than 10 remit 0.44%.
    • DE: full rate at 25+, parental rate only at 10–24, 0 below 10.
    • MA: 0.88% at 25+, 0.46% below 25.
    • ME: 1.0% at 15+, 0.5% below 15.
    • VT: 0.44%.
    • WA: the full rate at 50+, the employee share below 50.
    • MN and NY: employer cost not modeled, as the docstrings say.
  • Batch lessons:
  • Massachusetts swap (Acts 2026 c. 101, "Approved, June 12, 2026", emergency preamble):
    • §25: "striking out, in lines 22, 33 and 39, the figure '40', each time it appears, and inserting ... 100".
    • §26: "striking out, in lines 25, 33 and 43, the figure '100' ... 40".
    • The lines. In c. 175M §6, "40" and "100" each appear three times: (c)(1) "shall not deduct more than 40 per cent" (medical), (c)(2) "may deduct not more than 100 per cent" (family), (d) the small-employer remittance, and (e)(1)–(2). So the swap reaches employers, small employers and covered business entities.
    • §43(a): guidance on "the impact for employers and employees in calendar year 2027, including ... any administrative adjustments ... to ensure the overall balance of employee and employer contribution levels remain unchanged".
    • §45: applies §§25–26 "for taxable years beginning on or after January 1, 2026".
    • §49: "Section 22 shall take effect on January 1, 2027". The PR body cites this as the counter-point.
    • DFML (search capture of the mass.gov rates page; the page itself returns 403 to automated requests):
      • 2027 family leave: "Up to 40% ... can be withheld (0.28% of eligible wages) ... the remaining 60% (0.42% of eligible wages)".
      • 2027 medical leave: "Up to 100% ... (0.18% of eligible wages)".
      • Small employers: "fewer than 25 covered individuals must send an effective contribution rate of 0.46%".
      • Effective date: "effective January 1, 2027".
      • These figures imply family 0.70% and medical 0.18%, which matches the parameters.
    • Date assessment. I agree with 2027-01-01.
      • DFML administers calendar-year rates and applies the swap from 2027. §43(a) frames the change as calendar 2027.
      • A literal 2026 reading would apply swapped caps to the unswapped 2026 rates. That gives a 0.772% employee maximum, which no employer applied, and it would make lawful 2026 family-leave deductions above 40% excessive after the fact.
      • The PR documents both readings, and its 2026 cases pin the outcome.
    • Effect on outputs. The swap leaves every household's amounts unchanged (2026 0.18 + 0.4 × 0.70 = 0.46; 2027 0.4 × 0.70 + 0.18 = 0.46). Only the Python parameter-pin test can tell the swap from carrying 2026 forward, and that justifies that test.
  • Statutory employee maximum and employer rule for each state (each re-read at the official source):
    • CO: C.R.S. 8-13.3-507(5) (CRS 2025, file p. 222): "An employer with 10 or more employees may deduct up to 50 percent of the premium ... and shall remit 100 percent ... An employer with fewer than 10 employees may deduct up to 50 percent ... and shall remit 50 percent". 7 CCR 1107-1 §1.4(6) and (6)(A) (rule PDF, file pp. 7–8): "If an employer fails to deduct the maximum allowable employee share ... the employer is considered to have elected to pay that portion".
    • DE: 19 Del. C. §3705(d)–(f): "an employer shall deduct not greater than 50% of the contribution required for the employee. However, an employer may elect to pay all or any portion of the employee's share". §3705(g): "the employer remains liable for the full amount of the contribution, including that amount not deducted".
    • ME: 26 M.R.S. §850-F(5): 15 or more employees "may deduct up to 50% ... and shall remit 100%"; fewer than 15 "may deduct up to 50% ... and shall remit 50%".
    • MN: Minn. Stat. 268B.14:
      • subd. 3: "employers must pay a minimum of 50 percent of the annual premiums ... Employees, through a deduction in their wages ... must pay the remaining portion, if any".
      • subd. 5a(b)(1): small employers "must pay a minimum of 25 percent of the rate calculated in subdivisions 6 and 7".
      • So the employee maximum is 0.44% for both regular and small employers, which matches employee_rate.
    • NY: WCL §209(3)(a): DBL is "one-half of one per centum ... but not in excess of sixty cents per week". (3)(b): DFS sets the PFL maximum. (4): "the employer is authorized to collect from his or her employees ... through payroll deductions". §210(1): the employer pays "the cost of providing disability benefits in excess of the contributions collected".
    • VT: 32 V.S.A. §10553(a)(1): "Each employer shall pay the Child Care Contribution ... may deduct and withhold ... not more than one quarter". (b): 0.44%. (c)(2): "Employers shall be responsible for the full amount of any unpaid contributions".
    • WA: RCW 50A.10.030(3): "may deduct ... up to". (3)(c): "may elect to pay all or any portion of the employee's share". (7)(a): "must collect from the employees". WAC 192-510-065(2): a deduction not taken means "the employer is considered to have elected to pay that portion".
    • MA employer rule: 458 CMR 2.05(5) (text checked on Cornell LII): "The employer ... in all instances shall be responsible for paying and remitting the remainder of any required contribution not lawfully deducted". It also allows "differing percentages" by group, which the aggregate docstring acknowledges. I couldn't check the #page=12 anchor on the mass.gov PDF because mass.gov blocks automated requests.
    • CT fix: In CGS chapter 557, 31-49e is "Paid family and medical leave. Definitions". 31-49g(b)(1) says "each employee ... shall contribute ... provided that the percentage shall not exceed one-half of one per cent". The #sec_31-49g anchor exists. This is a valid reference-only n/a.
  • Hand checks (all 20 new cases; 2026 unless noted; $100,000 of wages; default headcount 100):
    • CO default: 0.44% × 100,000 = 440 employee, 440 employer ✓.
    • CO clip: share 1.5 → 1, giving 440 / 440. Share −0.5 → 0, giving 0 employee and 440 + 440 = 880 employer ✓.
    • CO share 0.5: employee 220 (state and total also 220). Employer 440 + 220 = 660 ✓.
    • CO 9 employees, share 0.25: employee 110. Employer 0 + 0.75 × 440 = 330 ✓.
    • MA 2026 share 0.5: 0.5 × (0.18% + 0.4 × 0.70%) × 100,000 = 230. Employer 0.6 × 0.70% × 100,000 + 230 = 420 + 230 = 650 ✓.
    • MA 2026, 24 employees, share 0: 0 / 460 ✓.
    • MA 2026 default: 460 / 420 ✓.
    • MA 2027 default: 0.4 × 0.70% + 1 × 0.18% = 0.46% → 460. Employer 0.6 × 0.70% = 0.42% → 420 ✓.
    • MA 2027, 24 employees: 460 / 0 ✓.
    • MA 2027 share 0.5: 230 / 650 ✓.
    • ME share 0.5: 0.5 × 0.5% × 100,000 = 250. Employer 500 + 250 = 750 ✓. With 14 employees: 250 / 250 ✓.
    • DE share 0.5: 0.8% × 0.5 × 0.5 × 100,000 = 200. Employer 0.8% × 0.75 × 100,000 = 600 ✓.
    • DE 20 employees, share 0: 0. Employer 0.32% × 100,000 = 320 ✓.
    • VT share 0.5: 0.11% × 100,000 × 0.5 = 55. Employer (0.33% + 0.055%) × 100,000 = 385 ✓.
    • WA share 0.5:
      • employee 0.5 × 1.13% × 0.7143 × 100,000 = 403.5795
      • WA Cares 0.58% = 580
      • state total 983.5795
      • employer 1.13% × 0.2857 × 100,000 + 403.5795 = 322.841 + 403.5795 = 726.4205 ✓
    • WA 49 employees, share 0: 0 / 807.159 ✓.
    • MN share 0.5: 0.5 × 0.44% × 100,000 = 220 ✓.
    • NY share 0.5:
      • PFL: min(0.432% × 100,000, 411.91) × 0.5 = 205.955
      • DBL: min(500, 31.20) × 0.5 = 15.60
      • total 221.555 ✓
    • Mandatory withholding at share 0: CA SDI 1.3% = 1,300, CT 0.5% = 500, PA UC 0.07% = 70 ✓.
    • Wage cap at the default share (existing MA cases, unchanged): 2025: 0.46% × 176,100 = 810.06. 2024: 0.46% × 168,600 = 775.56 ✓.
  • Callers.
    • employee_state_payroll_tax feeds employee_payroll_tax, which feeds household_tax_before_refundable_credits, spm_unit_payroll_tax, spm_unit_paycheck_withholdings, taxsim_tfica, the FICA marginal-rate helper and Alabama's itemized-deduction sources.
    • The employer variables feed employer_state_payroll_tax and employer_total_state_payroll_tax.
    • At the default share all of these are unchanged.
  • Test design.
    • The Hypothesis property test (8 examples, at most about 141 people, 2026–2027) checks multi-state structural invariants that YAML can't express. It doesn't re-implement a formula. Cost is reported (5.0 s test time, 1.04 GB local peak, core shard).
    • The parameter-pin test reads the shared system without building a model.
    • The YAML file is named after state_payroll_premium_deduction_share.
  • Changelog, references, partners.
    • One top-level changelog.d/payroll-employer-deduction-share.added.md. added fits a new input.
    • The variable references are single and valid. The multi-page CO rule href has a # PDF pages 7-8 comment, which follows the convention.
    • No partner contract test is touched.

Axiom line assessment

Valid. The line has eight queued entries and one n/a.

CI status

All 29 checks pass at head 6ad174a080 (gh pr checks 10285, re-checked at the end of this review). Nothing is pending.

Branch status

Verdict: REQUEST_CHANGES

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

The mechanism, the statutes for all eight states and the Massachusetts 2027 change all check out, the default share of 1 leaves every existing output unchanged, and all 20 new cases hand-check. One should-address item: three parameter descriptions (MA family and medical employee shares, DE employee share) don't follow the house template. Three suggestions, and a note to update the branch past #10295 before merging. Full report in the comment above.

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Picking this up for the US hub. I'll post a hand-off comment here when it's ready.


Generated by Claude Code

Brings in #10295's 2027 premium rates and #10380's Delaware wage base
(payroll_tax_gross_wages capped at the Social Security base). The two
Delaware conflicts keep main's wage base and references and this
branch's deduction share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite the MA family and medical and DE employee-share descriptions to
the house template; cite c. 175M s. 6(c)-(d) and say beside the MA
2027-01-01 entries why the swap is dated 2027; fix the invariants test
docstring's description of NY and WA, which the statute does not put on
the employer; and add YAML cases for a partial share above the 2027 wage
cap (MA) and for the employer-level aggregate at a partial share (CO),
paths only the property test reached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_donut_invariants evaluates the Delaware paid leave formulas with a
hand-built person() that supplies their inputs. Since main's merge the
formulas also read state_payroll_premium_deduction_share, which it
didn't supply (KeyError in Contrib other-shard-1). Supply the default
share of 1, under which the contributions are the ones the reform must
preserve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Ready for hub review

Head: 62a9f63e6970896ee993fe119305d71036af81ca

Picked up at 6ad174a080 (unchanged since 2026-10-20, so no new commits to read). Three commits on top:

What the item asked for

Merge current main. Done as a merge commit. Two conflicts, both in Delaware: #10380 changed the wage base in de_employee_paid_leave_contribution.py and de_employer_paid_leave_contribution.py to min_(payroll_tax_gross_wages, social_security.cap) and replaced the references.

Should address: the three descriptions (house template).

  • ma/tax/payroll/paid_leave/family_employee_share.yaml:1: "Massachusetts limits an employer's deduction from wages to this share of the family leave contribution under the Paid Family and Medical Leave program."
  • ma/tax/payroll/paid_leave/medical_employee_share.yaml:1: the same with "medical leave contribution".
  • de/tax/payroll/paid_leave/employee_share.yaml:1: "Delaware limits an employer's deduction from wages to this share of each contribution under the Paid Leave program."

Suggestion 2: two YAML cases, hand-checked:

  • ma_employee_paid_leave_contribution.yaml, last case: MA 2027, $250,000, share 0.5. Wages cap at the 2027 Social Security base, 192,300. Permitted 0.46% × 192,300 = 884.58; employee 0.5 × 884.58 = 442.29; employer 0.42% × 192,300 + 442.29 = 807.66 + 442.29 = 1,249.95.
  • New tests/policy/baseline/gov/states/tax/payroll/employer_total_additional_state_payroll_tax.yaml (named after the variable): CO 2026, employer_total_taxable_earnings_for_social_security 1,000,000, share 0.5, default headcount 100. 0.44% × 1,000,000 + 0.5 × 0.44% × 1,000,000 = 4,400 + 2,200 = 6,600.

Suggestion 3: text fixes.

  • PR body, "Not in this PR": the 2027-rates bullet now says Encode the published 2027 state paid leave premiums (CO, WA, NY, NJ) and cite the unchanged 2027 rates #10295 is merged in. Its replacement bullet says the federal pick-up isn't modeled and is proposed as a follow-up.
  • test_state_payroll_premium_deduction_share_invariants.py:3-9: the docstring now uses employee_state_payroll_tax's wording. NY is "authorized but not required to collect"; WA's employee share is one the employer "may deduct up to and may pay in any part"; only CO, DE, ME, MA, MN and VT premiums are described as the employer's.
  • Reference titles: both MA share files now cite "Massachusetts General Laws Chapter 175M Section 6(c)-(d)".
  • Date comment: family_employee_share.yaml:6 and medical_employee_share.yaml:6. "Dated 2027-01-01, not 2026-01-01: s. 45 applies ss. 25-26 to taxable years from 2026, but s. 43(a) frames the change as calendar year 2027, and the Department of Family and Medical Leave applies it from January 1, 2027."

Suggestion 1 (federal pick-up): not modeled, per the item. It is listed as a follow-up below.

CI failure the merge exposed, and its fix

The first run at 7cb554e630 (run 41400200144) failed one job, Contrib other-shard-1. test_increase_taxable_earnings_for_social_security.py::test_donut_invariants (from #10380 on main) raised KeyError: 'state_payroll_premium_deduction_share'.

  • Why. That test evaluates the Delaware formulas with a hand-built person() that supplies their inputs. Since the merge, those formulas also read the share.
  • The fix (62a9f63e69). test_increase_taxable_earnings_for_social_security.py:204-206 supplies the default share of 1, under which the Delaware contributions are the ones the CBO reform must preserve.
  • What else I checked. The reform itself (reforms/cbo/payroll/increase_taxable_earnings_for_social_security.py) doesn't redefine the Delaware variables, so no model change is needed. The file passes locally (4).

Tests run (one file per process)

Mutants: none. This round changes descriptions, comments and tests, plus the merge resolution, which keeps both sides' formulas verbatim.

CI

Pull request run 41407953599 at 62a9f63e69: success, all 34 jobs passed. That includes Contrib other-shard-1, which failed at 7cb554e630.

Judgment calls

  • The date comment paraphrases §§ 43(a) and 45 from the review's quotes. I couldn't reach malegislature.gov from this session, so that reading is unverified by me; the review quotes the text.
  • Possible source-conflict entry. The MA 2027 date follows § 43(a) and DFML over § 45's literal "taxable years" clause. I worded the comment so it doesn't trip the source-conflict ratchet. If the hub treats it as a statute-versus-agency reading, it belongs in the register with a marker on those two lines; I didn't add one, because the register lives in rulespec-us.
  • "(c)-(d)" in the reference titles comes from the review's reading of § 6 (subsection (c) holds the caps, (d) the small-employer rule). I couldn't open the section to confirm the lettering.
  • The new aggregate case is in a new variable-named file, not in state_payroll_premium_deduction_share.yaml, per CLAUDE.md's variable-named YAML rule.
  • PR body. I also removed two local review-file paths from the body.

Proposed follow-up issue

Model the federal wage treatment of an employer's pick-up of state PFML employee premiums (Rev. Rul. 2025-4; Notice 2026-6)
When employer_state_payroll_premium_deduction_share < 1 in CO, DE, ME, MA, MN or WA from 2026, the undeducted employee premium should count as the employee's W-2 wages for income tax and FICA, and be deductible as a state tax if itemizing. Today the model raises net income by the full amount: CO 2026, $100,000 at share 0.5 omits 7.65% × $220 = $16.83 of FICA plus the income tax on $220.

Reply to DTrim99

Thanks for the review. Taking each item in turn:

  1. Should address, three descriptions. Rewritten to the template, using your wording: ma/.../family_employee_share.yaml:1, ma/.../medical_employee_share.yaml:1 and de/.../employee_share.yaml:1.
  2. Suggestion 1, the federal pick-up. Not modeled in this PR. It is proposed as a follow-up issue (Rev. Rul. 2025-4; Notice 2026-6), with your CO example as the witness, and the PR body says so. The input's docstring already states the limitation; the issue link can be added once the issue exists.
  3. Suggestion 2, YAML cases. Both added with your numbers, which I re-derived:
    • MA 2027, $250,000, share 0.5 → 442.29 / 1,249.95 (ma_employee_paid_leave_contribution.yaml, last case).
    • CO employer aggregate at share 0.5 → 6,600 (new employer_total_additional_state_payroll_tax.yaml).
  4. Suggestion 3, text fixes.
    • The "Not in this PR" bullet is updated.
    • The invariants docstring no longer says NY and WA put the premium on the employer (test_state_payroll_premium_deduction_share_invariants.py:3-9).
    • Both MA references now cite "Section 6(c)-(d)".
    • The one-line date comment sits beside each 2027-01-01 entry.
  5. Branch. main is merged in. The Delaware conflicts with Fix Social Security secondary earnings threshold reform #10380 keep main's wage base and this PR's share.

Generated by Claude Code

@MaxGhenis

MaxGhenis commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Hub review in progress

Head under review: 62a9f63e6970896ee993fe119305d71036af81ca (unchanged since the hand-off).

Firm so far:

  • Merge. The Delaware resolutions keep main's (Fix Social Security secondary earnings threshold reform #10380) wage base and references verbatim and this PR's share verbatim (diffed against each parent). The head merges cleanly with current main (6145ad4513).
  • Hand values recompute from the parameters: MA 2027 884.58 permitted → 442.29 / 1,249.95; CO aggregate 6,600.
  • Tests pass at the head, one file per process: share YAML 16, aggregate YAML 1, MA YAML 11, 2027 premiums YAML 12, CBO contrib DE YAML 1, invariants 2, CBO donut 4, payroll contributions 100, input definitions 4, source conflicts 103.
  • CI run 41407953599 at the head: 34/34 jobs passed.
  • Possible P2. source_conflicts/candidates.yaml on main already holds us-ma:pfml-cap-swap-effective-date (state open, follows: conflicting-source, code: []) for this PR's MA date. The PR doesn't update it, and the hand-off says no register entry was needed.
  • No law source reachable from this VM (the proxy blocks malegislature.gov, mass.gov, hklaw.com, govinfo.gov, ecfr.gov and irs.gov).

Mutants and the default-share comparison against main: running.


Generated by Claude Code

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Ready for hub review
VERDICT: APPROVE
62a9f63
METHODOLOGY_CHOICE: yes

Delta review of 6ad174a080..62a9f63e69: the merge of main at bc830d69c7 (main side 97b6d5135c), the review changes at 7cb554e630, and the CI fix at 62a9f63e69. The head hasn't moved since the hand-off. It merges cleanly with current main (6145ad4513, 95 commits later), and none of those commits touches a payroll path.

I found no P1. At the default share, outputs are bit-identical to current main. Every new expected value recomputes. All six mutants are killed. DTrim99's should-address item is resolved. There is one P2 (a stale source-conflict backlog item for the MA date, which the hand-off missed) and three P3s.

Findings

P2-1. The MA 2027 date is an open source-conflict backlog item that this PR leaves stale

  • Where: source_conflicts/candidates.yaml:3636-3666 (on main since 2026-10-20, so it reaches this branch through the merge). The deciding lines are policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_employee_share.yaml:5-7 and medical_employee_share.yaml:5-7.
  • What it says: item us-ma:pfml-cap-swap-effective-date has state: open, pe_us.follows: conflicting-source and code: []. Its note says "the open PR follows the 2027 reading, while main has no cap swap. Code not yet on main". The file's own legend defines conflicting-source as "against the statute; the 2026-10-19 rule calls for a model change".
  • What the hand-off says: "If the hub treats it as a statute-versus-agency reading, it belongs in the register ... I didn't add one, because the register lives in rulespec-us." It also says the comment was "worded ... so it doesn't trip the source-conflict ratchet". The in-repo backlog item already exists, and the PR neither cites nor updates it.
  • Failure scenario: once this merges, the backlog says no code implements the reading (code: [], "not yet on main"), which is false. It also still says the code follows a source against the statute, with the conflict open. Under CLAUDE.md's 2026-10-19/20 rule, that classification calls for a model change. No output is wrong, but a reader of the register is told the shipped 2027 date is undecided and contrary to statute.
  • Command: sed -n 3636,3667p source_conflicts/candidates.yaml at the head prints the entry above. uv run pytest -q policyengine_us/tests/code_health/test_source_conflicts.py gives 103 passed: the check doesn't catch this, because code: [] lists nothing.
  • Fix (before merge; the classification is the hub's call):
    • Decide the reading. In my view §43(a) is itself statute, so this is a tie between §45 and §43(a) that DFML's practice breaks. That is CONTRIBUTING's "the agency breaks true ties" case, not "against the statute". If Max's "decide and cite" stands as the ruling, record it.
    • Replace the item's pe_us, state and note with:
        pe_us:
          follows: statute
          code:
          - policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_employee_share.yaml
          - policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_employee_share.yaml
          - policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_rate.yaml
          - policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_rate.yaml
          prs:
          - https://github.com/PolicyEngine/policyengine-us/pull/10285
        state: ruled
        note: The code follows s. 43(a) and DFML, dating the swap 2027-01-01; the 2026 cases in
          ma_employee_paid_leave_contribution.yaml pin 460 on $100,000 against 772 under the literal s. 45 reading.
      If the hub doesn't treat it as ruled, keep state: open and follows: conflicting-source, but still fill in code: and correct the note.

P3-1. The MA reference titles say "Section 6(c)-(d)", but the comment two lines above names (e)

  • Where: family_employee_share.yaml:14 and medical_employee_share.yaml:14.
  • The mismatch: the same files' comments (line 5) say §26 and §25 strike the figure in "s. 6(c)(2), (d) and (e)(2)" and "(c)(1), (d) and (e)(1)". DTrim99's report says the swap reaches covered business entities through (e).
  • Failure scenario: a reader following the title goes straight past the covered-business-entity caps.
  • Fix: - title: Massachusetts General Laws Chapter 175M Section 6(c)-(e) in both files.
  • Caveat: I couldn't open c. 175M §6 from this VM (see below), so this rests on the PR's own comment and DTrim99's quote.

P3-2. The body has no impact: line

  • Where: PR body, "## Impact". It has a heading and prose, but no literal impact: line next to axiom:.
  • Fix: add impact: none at the default share; outputs bit-identical to main in a 480-household × 8-variable × 2025–2027 comparison; no population run needed.

P3-3. The CI fix pins the share to 1 where it could draw it

  • Where: test_increase_taxable_earnings_for_social_security.py:204-206.
  • Does it still check Fix Social Security secondary earnings threshold reform #10380's claim? Yes. test_donut_invariants asserts that the CBO reform leaves the DE contributions equal to baseline, with the same inputs in both runs. The reform doesn't override any DE variable (grep -rl for the DE contribution variables and the share in policyengine_us/reforms finds nothing), so the claim is the same for any share, and supplying 1 doesn't weaken it.
  • What it no longer covers: the share now varies on the baseline path but not in this test. Drawing it as deduction_share=st.floats(min_value=0, max_value=1), passed in place of the literal 1, would cover the reform at a partial share at no extra model cost. Optional.

DTrim99's review, item by item

Item Status at the head
Should address: three descriptions Resolved. de/.../employee_share.yaml:1, ma/.../family_employee_share.yaml:1 and ma/.../medical_employee_share.yaml:1 each read "[State] limits ... under the [...] program" with no acronym, using his suggested wording verbatim.
Should address (implied): merge main for #10295 Resolved. Merged at bc830d69c7. state_paid_leave_premiums_2027.yaml (#10295) passes 12/12 at the head.
Suggestion 1: federal pick-up (Rev. Rul. 2025-4; Notice 2026-6) Left unmodeled. The reason holds, and this is a follow-up, not a defect this PR adds. At the default share nothing moves. At a share below 1, main had no way to express the case: it overstated the employee's deduction by the whole undeducted amount (CO 2026, $100k, share 0.5: main 440, the law about 220). The head gets the deduction right and omits only the federal add-back (DTrim99's figure: $16.83 of FICA, plus income tax on $220). The limitation is in the docstrings. The follow-up issue is proposed in the hand-off but not filed; the hub raises it.
Suggestion 2: two YAML cases Resolved. MA 2027 $250k at share 0.5 gives 442.29 / 1,249.95 (ma_employee_paid_leave_contribution.yaml, last case). CO aggregate gives 6,600 (new employer_total_additional_state_payroll_tax.yaml). Both recompute (below), and both are mutant-tested.
Suggestion 3a: "Not in this PR" bullet Resolved. The body now says #10295 is merged in.
Suggestion 3b: test-module docstring (NY, WA) Resolved. test_state_payroll_premium_deduction_share_invariants.py:3-9 describes NY as "authorized but not required to collect" and WA as an employee share the employer "may deduct up to and may pay in any part".
Suggestion 3c: full subsection path in titles Resolved as asked ("6(c)-(d)"). See P3-1 for (e).
Suggestion 3d: date comment Resolved. One line at family_employee_share.yaml:6 and medical_employee_share.yaml:6. Its wording matches the §45 and §43(a) quotes in DTrim99's report; I couldn't fetch the act itself.

Every should-address item is resolved, so the hub can dismiss the CHANGES_REQUESTED review (5591620322) with a note. P2-1 is new and not one of his items.

Checked and sound

  • Delaware merge.

    • I diffed each DE file against both parents.
    • Against main's side (97b6d5135c), the only changes are this PR's docstring and the share: permitted * state_payroll_premium_deduction_share (de_employee_paid_leave_contribution.py:22-33) and * (1 - deducted) with deducted = p.employee_share * share (de_employer_paid_leave_contribution.py:22-35).
    • Against the PR's side (6ad174a080), the only changes are Fix Social Security secondary earnings threshold reform #10380's min_(payroll_tax_gross_wages, social_security.cap) wage base and its two references.
    • Both sides are kept verbatim.
    • The employer aggregate's DE branch uses employer_total_taxable_earnings_for_social_security both here and on main, so Fix Social Security secondary earnings threshold reform #10380 didn't change it and the merge doesn't either.
  • Hand values, from the parameters at the head (system.parameters). The 2027 SS cap is 192,300; MA 2027 family is 0.007 and medical 0.0018, with caps 0.4 / 1; CO 2026 is 0.0044 / 0.0044.

    • MA permitted = (0.4 × 0.007 + 0.0018) × 192,300 = 884.58. Employee = 0.5 × 884.58 = 442.29. Employer = 0.6 × 0.007 × 192,300 + 442.29 = 807.66 + 442.29 = 1,249.95.
    • CO = 0.0044 × 1,000,000 + 0.5 × 0.0044 × 1,000,000 = 6,600.
    • I computed these with exact fractions before reading the formulas.
  • Impact at the default share.

    • Setup: one script run once per tree, against current main (6145ad4513). The grid is 16 states × 5 wage levels (0 to 250k) × 6 employer sizes (5 to 100) = 480 one-person households, for 2025, 2026 and 2027.
    • Variables: employee_state_payroll_tax, employer_state_payroll_tax, employer_additional_state_payroll_tax, employer_total_additional_state_payroll_tax, employer_total_state_payroll_tax, employee_payroll_tax, household_net_income and income_tax.
    • Result: all 24 arrays are bit-identical (np.array_equal). The diff can't move a baseline output, so no population check is needed beyond what the hub already runs.
  • The defect at main. grep -rl employer_state_payroll_premium_deduction_share on main finds nothing, so main can't express a partial deduction. A CO worker at $100k shows employee_state_payroll_tax = 440 in 2026 whatever the employer deducts.

  • Tests at the head (one file per process, thread caps at 4):

    File Result
    state_payroll_premium_deduction_share.yaml 16 passed
    employer_total_additional_state_payroll_tax.yaml 1 passed
    ma_employee_paid_leave_contribution.yaml 11 passed
    state_paid_leave_premiums_2027.yaml 12 passed
    contrib/cbo/payroll/de_employee_paid_leave_contribution.yaml 1 passed
    test_state_payroll_premium_deduction_share_invariants.py 2 passed
    test_increase_taxable_earnings_for_social_security.py 4 passed
    test_payroll_contributions.py 100 passed
    test_input_variable_definitions.py 4 passed
    code_health/test_source_conflicts.py 103 passed
  • Mutants. The hand-off lists none for this round. I ran six, each in its own process on the review checkout, restoring after each; git status is clean at 62a9f63e69.

    Mutant Killed by
    M1: the DE employee formula drops the share (a merge that kept main's return) state_payroll_premium_deduction_share.yaml (2 cases) and the invariants test (AssertionError at :177)
    M2: the DE employer formula reverts to main's (1 - p.employee_share) the same YAML (2 cases) and the invariants test (:185)
    M3: the MA 2027 family cap is left at 1 ma_employee_paid_leave_contribution.yaml (4 cases)
    M4: the aggregate's CO branch drops the undeducted term employer_total_additional_state_payroll_tax.yaml (the new case)
    M5 (mine): the MA employer formula uses uncapped employment_income ma_employee_paid_leave_contribution.yaml (1 of 11 cases fails; 10 pass)
    M6: the CI fix reverted test_donut_invariants, KeyError: 'state_payroll_premium_deduction_share'
  • Readers.

    • state_payroll_premium_deduction_share is read by 16 state-gated program variables (CO, DE, MA, ME, VT, WA on both sides; MN and the two NY employee sides) and by the employer aggregate.
    • employer_state_payroll_premium_deduction_share is read by the clip variable and named in the docstrings of employee_state_payroll_tax and employer_additional_state_payroll_tax.
    • family_employee_share and medical_employee_share are read by the two MA variables and the aggregate.
    • The DE variables are read by de_employee_state_payroll_tax and de_employer_additional_state_payroll_tax.
    • No reform reads or overrides any of them. Nothing becomes reachable and worse at the default share.
  • CI. Run 41407953599 at the head passed 34/34 jobs, including Contrib other-shard-1, which failed at 7cb554e630.

  • Scope and overlap.

  • Body and hand-off claims checked: the test counts, "34 jobs passed", the file:line pointers, the 2027 rates passing 12, and that the reform doesn't redefine the DE variables. The axiom: line is present (eight queued and one n/a). I didn't recheck the rulespec issues, which are outside this session's repository scope.

What I couldn't check

  • Law sources. This VM's proxy blocks malegislature.gov, mass.gov, hklaw.com, govinfo.gov, ecfr.gov, uscode.house.gov, irs.gov and delcode.delaware.gov. I couldn't read M.G.L. c. 175M §6(c)–(e), Acts 2026 c. 101 §§25, 26, 43, 45 and 49, DFML's 2027 rates page, or Rev. Rul. 2025-4 and Notice 2026-6.
    • So the 2027 date note at family_employee_share.yaml:6 agrees with the quotes in DTrim99's report and the earlier hub review, but I haven't confirmed it against the act.
    • The same goes for the 2027 MA rates (0.70% / 0.18%) and the 2027 SS base (192,300), which I took from the parameters.
    • One web-search summary paraphrased Bloomberg Government as saying employers "pay 40% of the family leave contribution" and "withhold 60%". That is the reverse of DFML's split as quoted in both reviews ("Up to 40% ... can be withheld (0.28% of eligible wages)"). I couldn't open either page to settle it, and I read the summary as a paraphrase error. The hub may want to confirm against DFML before merge.
  • Population data. I ran no microsimulation. The household comparison above is the impact check.
  • Linux CI memory for the new YAML files: not measured; CI's green run covers them.
  • The author's 13 earlier mutants (mutants.py on the hub's machine): not rerun. The formulas they targeted are unchanged in this round except the DE merge, which M1 and M2 cover.

Generated by Claude Code

@MaxGhenis

MaxGhenis commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Picking this up for the US hub. I'll post a hand-off comment here when it's ready.


Generated by Claude Code

The backlog item still said no code implemented the 2027 date. List the
four parameter files that carry it and say the code follows DFML's
2027-01-01 date while keeping 2026 on the old split, as main does. The
2026 question under s. 45 stays open, so state and follows are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6HsvgHCDJEA9psAheP
Acts 2026 c. 101 ss. 25-26 change the figures in s. 6(c)(1)-(2), (d)
and (e)(1)-(2), so the title should reach (e), where the covered
business entity caps sit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6HsvgHCDJEA9psAheP
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Ready for hub review

Head: b68dbc4c8291f3d014fc7d34e035c3d923401b0b

This round fixes P2-1 the hub's way and fixes P3-1 from the round 2 review. P3-2 (the impact: line) and P3-3 (drawing the share in the donut test) are left for the hub, and the PR body is unchanged.

Commits

  • be044affc4: merge origin/main (9f0242f6de) into the branch, as a merge commit. No conflicts. Of the 540 files it brings in, two overlap this round's work: source_conflicts/candidates.yaml and policyengine_us/tests/code_health/test_source_conflicts.py.
  • 7aaffd1e89: update the MA cap-swap backlog item to match the code.
  • b68dbc4c82: cite c. 175M § 6(c)-(e) in the two MA employee-share titles.

What was asked and how I resolved it

  1. Pick-up and merge. Pick-up comment posted. Merged origin/main with a merge commit (no rebase); no files conflicted. I reran the PR's test files after the merge (see Tests).
  2. P2-1: us-ma:pfml-cap-swap-effective-date (source_conflicts/candidates.yaml:3694).
    • state: open and pe_us.follows: conflicting-source are kept (:3717, :3725). It isn't marked ruled.
    • pe_us.code lists four files. All four carry the 2027-01-01 date.
      • family_employee_share.yaml:7 and medical_employee_share.yaml:7 carry the cap swap.
      • family_rate.yaml:6 and medical_rate.yaml:6 carry DFML's matching rate swap.
    • prs: was already on this item on main, holding this PR's URL only. It's unchanged, and the test accepts it.
    • The note now says what the code does (:3726-3728), with no decision number.
    • Command: uv run pytest -q policyengine_us/tests/code_health/test_source_conflicts.py gives 103 passed.
  3. P3-1: titles. family_employee_share.yaml:14 and medical_employee_share.yaml:14 now read Massachusetts General Laws Chapter 175M Section 6(c)-(e). I didn't fetch c. 175M § 6 or Acts 2026 c. 101 myself. The subsection list comes from the hub's 2026-11-03 reading of those sources and matches the files' own line-5 comments.
  4. Left for the hub: P3-2 and P3-3, as instructed. The body is not edited.

candidates.yaml diff

   pe_us:
     follows: conflicting-source
-    code: []
+    code:
+    - policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_employee_share.yaml
+    - policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_employee_share.yaml
+    - policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/family_rate.yaml
+    - policyengine_us/parameters/gov/states/ma/tax/payroll/paid_leave/medical_rate.yaml
     prs:
     - https://github.com/PolicyEngine/policyengine-us/pull/10285
   state: open
-  note: 'A rule-required model change depends on resolving the two statutes; the open PR follows the 2027 reading,
-    while main has no cap swap. Code not yet on main: policyengine_us/variables/.../employee_state_payroll_tax,
-    ma_employee_paid_leave_contribution (YAML).'
+  note: The code follows DFML's January 1, 2027 date for the cap and rate swap and keeps 2026 on the old split, as
+    main does. Whether §45's 2026 date governs stays open. At $100,000 of 2026 wages the code gives a $460
+    employee contribution; applying the swap in 2026 under §45 would give $772.

Hand computation of the 2026 witness

The 2026 parameters at the head are family rate 0.0018, medical rate 0.007, family share 1 and medical share 0.4.

  • Head: (0.0018 × 1 + 0.007 × 0.4) × 100,000 = 460.
  • § 45 reading (shares swapped to 0.4 and 1 in 2026, 2026 rates kept): (0.0018 × 0.4 + 0.007 × 1) × 100,000 = 772.

I computed both with exact fractions. The model agrees: ma_employee_paid_leave_contribution for 2026 gives 460 at the head and 772 under a reform that sets the two shares to 0.4 and 1 for 2026. The figures match the item's existing example: line.

Tests at the head

One file per process, after the merge.

File Result
ma_employee_paid_leave_contribution.yaml 11 passed
employer_total_additional_state_payroll_tax.yaml 1 passed
state_paid_leave_premiums_2027.yaml 12 passed
state_payroll_premium_deduction_share.yaml 16 passed
contrib/cbo/payroll/de_employee_paid_leave_contribution.yaml 1 passed
test_input_variable_definitions.py 4 passed
test_payroll_contributions.py 100 passed
test_state_payroll_premium_deduction_share_invariants.py 2 passed
test_increase_taxable_earnings_for_social_security.py 4 passed
code_health/test_source_conflicts.py 103 passed

The two Python files that use hypothesis first failed to collect, because the VM's environment lacked that dev dependency. After uv pip install hypothesis they passed as listed.

Mutants

None. This round changes no formula or value: one YAML metadata title per file and the backlog item. A mutant to the backlog item's paths would fail its tracked-file check, but I didn't run one.

CI

Pull request run 41738540327 at b68dbc4c82 was still in progress 60 minutes after the push (00:21Z). 34 jobs had succeeded and none had failed. Two were still running: Contrib other-shard-1 and Contrib other-shard-3. The hub should confirm the final conclusion before landing.

Judgment calls

  • The two rate files are in code:. They carry 2027-01-01 rather than a share. The 460-versus-772 witness depends on the shares, but under the § 45 reading the 2026 rates would also have to move with them to keep the totals. So the rates are part of the dated decision. Drop them if the hub wants only the deciding lines.
  • The note says "cap and rate swap". It says that because the code dates both at 2027-01-01.
  • No # Source conflict marker is added. The item isn't registered, and markers must name registered entries.

Proposed follow-up

None beyond those already raised in round 2. The hub has the federal pick-up issue.


Generated by Claude Code

MaxGhenis and others added 3 commits November 9, 2026 04:12
…e open

Add workers on each side of the employer-size thresholds in
employer_total_additional_state_payroll_tax to the property test, so the
per-worker and employer-level paths meet at those sizes.

State both Massachusetts dates in the share-file comments and the 2026 test
comment without choosing between them, add the Department of Revenue's
working draft and source URLs to us-ma:pfml-cap-swap-effective-date, limit
the input's documentation to what the employer-side variables carry, and
cite c. 175M s. 6(c)-(e) in the Massachusetts employee variable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the changelog's claim that the employer pays any part it does not
deduct, which the New York PFL statute and the model's Minnesota and New York
sides don't support, and date the Massachusetts swap without calling it the
2027 swap. Name the federal treatment's subject in the input's documentation,
and limit the register item's section 43(a) reading to the guidance it directs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis MaxGhenis changed the title Let employers deduct less than the permitted state payroll premium, and apply Massachusetts' 2027 PFML cap swap Let employers deduct less than the permitted state payroll premium, and apply Massachusetts' PFML cap swap from 2027 Nov 9, 2026
@MaxGhenis
MaxGhenis dismissed DTrim99’s stale review November 9, 2026 13:08

David, d9e2c8b05f answers each item:

  • Should 1: the three descriptions use your wording, in de/tax/payroll/paid_leave/employee_share.yaml, ma/tax/payroll/paid_leave/family_employee_share.yaml and medical_employee_share.yaml.
  • #10295: this head includes main with #10295, and state_paid_leave_premiums_2027.yaml passes.
  • Suggestion 1: the model still leaves out the federal pick-up, and the description lists it under Not in this PR with Rev. Rul. 2025-4 and Notice 2026-6.
  • Suggestion 2: YAML cases now cover both examples: Massachusetts 2027 at $250,000 and a 0.5 share (442.29 and 1,249.95), and the Colorado employer aggregate at a 0.5 share (6,600).
  • Suggestion 3: the description drops the stale 2027 rates bullet, and the invariants docstring describes New York and Washington as their statutes do. The Massachusetts reference titles read "Section 6(c)-(e)", and line 6 of both share files explains the date.
@MaxGhenis
MaxGhenis merged commit 5462cb8 into main Nov 9, 2026
38 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merging at d9e2c8b05f as an admin squash with --match-head-commit, past the required-review gate.

  • Checks: gh pr checks passes all 38 checks at this head, including pull request run 42612794607 (36 of 36 jobs). GitHub reports the PR MERGEABLE, and no change request stands: we dismissed DTrim99's review 5591620322 on 2026-11-09 with a mapping of each point to its fix.
  • An independent review at 7e30327ec5 found no code defect and asked for boundary rows in the property test, neutral wording on the Massachusetts date and corrections to the description. c5a479b919 and d9e2c8b05f make those changes, and the same reviewer approved d9e2c8b05f. The commits after 7e30327ec5 change the property test's rows and comments, documentation strings, comments, the changelog and source_conflicts/candidates.yaml, and no formula, parameter value or expected value moved.
  • The source-conflict guard (103 of 103), the property file (2 of 2) and the Massachusetts cases (11 of 11) pass on this tree. The property test fails on each of the 27 one-line mutations the description lists.
  • main moved after this run's base, most recently to 2680130de9. Both sides changed only source_conflicts/candidates.yaml, and the two versions merge cleanly. We tested this head merged with 14de5b316a, the last main commit to change code. The source-conflict guard (103 of 103), the aggregate-list check (34 of 34), the property file (2 of 2), the Massachusetts cases (11 of 11) and the state payroll YAML folder (30 of 30) pass.
  • us-ma:pfml-cap-swap-effective-date stays open in source_conflicts/candidates.yaml. Both dates put the swap in place by 2027, and this PR keeps 2026 on main's split.

@MaxGhenis
MaxGhenis deleted the payroll-employer-deduction-share branch November 9, 2026 13:15
MaxGhenis added a commit that referenced this pull request Nov 9, 2026
Main's #10285 rewrote the documentation of employee_state_payroll_tax.
The resolution keeps its text and lists Hawaii TDI with New York's
contributions, which the employer is authorized but not required to
collect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 9, 2026
HRS 392-43(a) permits the employer to withhold the contribution without
requiring it, like New York's PFL and DBL. Following main's #10285, the
employee amount is the 0.5% limit times state_payroll_premium_deduction_share,
which defaults to 1. Hawaii joins the programs whose employer cost the model
doesn't hold, in the documentation of employee_state_payroll_tax,
employer_additional_state_payroll_tax and the share input, and in the share
invariants test. Three YAML cases cover a share of 0.5, 0 and 1.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 9, 2026
…er-averaged rates

#10285 (merged 2026-11-09) added employer_state_payroll_premium_deduction_share
and Massachusetts' 2027 swap of the family and medical deduction caps. This
merge resolves its conflicts with the 2018-2027 histories:

- The MA employee and employer rate variables read family_employee_share
  beside medical_employee_share at each quarter start.
- The MA and VT employee contributions multiply the averaged permitted amount
  by state_payroll_premium_deduction_share. The employer contributions and
  employer_total_additional_state_payroll_tax add the undeducted part, as
  #10285 does at January 1.
- family_employee_share starts at 1 on 2019-10-01, when contributions began:
  DFML's 2019-2023 rate pages let the employer withhold the whole family
  contribution. medical_employee_share keeps 0.4 from 2019-10-01 and takes
  #10285's 2027 value of 1.
- The history invariants check the family share in the schedule, draw a
  deduction share for each worker in the differential, and widen the employer
  bound by the employee part the employer may cover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 9, 2026
Main's Minnesota Paid Leave premium (#10294) and its premium deduction
share (#10285) touched the same employer payroll aggregates as this
branch. The employer aggregates now list Minnesota's and New Jersey's
components side by side, and employee_state_payroll_tax's documentation
names Alaska UI among the contributions the statute puts on the worker
and makes the employer withhold (AS 23.20.165(c)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants