Repository navigation
Fix Social Security secondary earnings threshold reform - #10380
Conversation
PR Review: Fix Social Security secondary earnings threshold reformSummaryThis PR fixes four defects in the CBO "donut" reform (
The formulas match CBO's 2024 option and OACT provision E2.5. I hand-checked every new expectation, and the old-code reproductions in the PR body hold. The baseline clamp cannot change any current-law result. The tests activate the reform through the top-level One issue is open. The reform still raises Critical (must fix)None. Should address1. The reform's wage base leaks into Connecticut and Delaware paid-leave contributions
These flow through Example, traced statically: a Connecticut resident in 2027 with $400,000 wages and a $250,000 threshold.
The law caps these contributions at the federal base, which the CBO option leaves unchanged:
The 42 USC 430 base is still the current-law cap, so state contributions keyed to it should not change. Fix. Have the three state variables read the federal base directly:
Then add a contrib YAML case: CT, 2027, $400,000 wages, threshold $250,000, expecting The alternative is to leave If you prefer to keep this PR narrow, a linked follow-up issue noted in the PR body would also resolve this item. Suggestions1. Pin the reform's wage base for wages below or inside the donut in YAML. All three wage-base outputs in
2. Refresh the cost section of the PR body with the CI numbers. The body says draft CI checks are skipped and that no Linux timing exists. Full CI has now run at this head:
The local 786-second / 1.56 GiB figure seems to predate the baseline-reuse commit. Label it that way or replace it. 3. Align the references.
4. Note when the donut closes in the model. The model's cap parameter passes $250,000 in 2035 ($254,400, the CBO January 2025 forecast). With a fixed $250,000 threshold, the donut therefore closes in 2035, a year before the 2036 date in CBO's text. One sentence in the PR body or parameter description would help anyone comparing scores. Verified correct
Hand-checks (threshold $250,000; cap $192,300 in 2027, from the parameter and input; cap $263,100 in 2036, from input; $168,600 in 2024):
The PR body table also checks out: $42,445.20 (342,300 × 12.4%), $35,770.90 (288,475 × 12.4%) and $49,600. Axiom line assessment
The Should address item does not affect this either: the recommended fix leaves every baseline state value identical. CI status
Branch status
Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
The formulas match CBO option 60955 and OACT E2.5 (max(threshold, cap), a fixed nominal threshold, 6.2% + 6.2% and 12.4% SECA, wages-first SE, no benefit credit), the baseline clamp is inert, every contrib YAML uses reforms:, and 12 hand-checks pass. One should-address item: under the reform, taxable_earnings_for_social_security still rises above the 42 USC 430 base, and CT and DE paid-leave contributions read it, though C.G.S. 31-49g(b)(1) caps them at that base (CT 2027, $400k wages: $1,711.50 vs $961.50). It predates this PR, but since the PR fixes this reform, please cap those state variables at min(wages, cap) or file a linked follow-up. Four suggestions. Full report in the comment above.
|
David, thanks. This answers your 10-22 review at Should address: the CT/DE paid-leave leak. Fixed in this PR, as you suggested.
Suggestions
29 cases pass. Fresh CI is running, and an independent delta review is queued. |
PR Review (round 2): Fix Social Security secondary earnings threshold reformPR #10380 (author: MaxGhenis), head SummaryThe open should-address item, the CBO donut reform's wage base leaking into Connecticut and Delaware paid-leave contributions, is fixed the way we recommended.
I found no new critical or should-address issues. Two small optional polish items are below. Prior findings
New findingsCritical: none. Should address: none. Suggestions (optional polish): N1. Consider moving the dated sentence out of the parameter description.
N2. Optionally refresh two lines of the body.
VerifiedHand-checks of every new or changed expectation (threshold $250,000; cap $192,300 in 2027, supplied as an input and matching
Further reform trace (not tested): in 2036, with $400,000 of wages, Connecticut is now 0.5% × 263,100 = 1,315.50 rather than the $2,000 round 1 found. Baseline results are unchanged:
Law and references:
Other checks:
AxiomLine:
CI27 pass, 0 failed, 0 pending. I re-checked
Branch
0 critical, 0 should and 2 optional suggestions are open at this head. Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Round 2: S1 is fixed. CT and DE paid-leave contributions now use min(payroll_tax_gross_wages, SS cap), so baseline is unchanged and under the reform CT 2027 at $400k is $961.50 and DE is $769.20 each, both pinned. All four suggestions are fixed. Two small suggestions. Branch note: #10285 conflicts in both DE files; keep the capped wages, add its deduction share, and extend this PR's test stub. Full report in the comment above.
|
US + core hub merge audit, us#10380 at
|
Fixes the CBO Social Security secondary earnings threshold (donut) reform. Closes #10376.
Problem and fix
All four defects were reproduced by executing the upstream formula bodies:
max(threshold, cap).For wages
W, net SE earningsS, capC, andU = max(threshold, C):An infinite threshold preserves current-law results. The baseline clamp also preserves current-law results because baseline taxable wages never exceed the cap.
Sources
CBO's 2024 option 60955, dated December 12, 2024, applies the second alternative to wages and net self-employment earnings above a fixed $250,000 threshold alongside earnings below the current-law cap. It states that “the $250,000 threshold would not change”. Scheduled benefits continue to use the current-law cap. The parameter and both reform variables now cite this option; the SE override also cites 26 USC 1402(b) for wages-first allocation.
OACT E2.5 says to “tax all earnings once the current-law taxable maximum exceeds $250,000.” The model's current-law cap parameter is $254,400 in 2035, from CBO's January 2025 forecast. A fixed $250,000 threshold therefore closes the donut in 2035 in this model, one year before the 2036 date in CBO's 2024 text.
Preserve state paid-leave contribution bases
The reform's additional federal taxable earnings previously leaked into Connecticut employee and Delaware employee/employer paid-leave contributions. Each of these three variables now computes
min_(payroll_tax_gross_wages, gov.irs.payroll.social_security.cap)directly. This matches the baseline federal wage formula exactly and continues to follow parameter changes to the federal contribution and benefit base.Invariant: holding other inputs and parameters fixed, Connecticut employee and Delaware employee/employer paid-leave contributions are identical with and without the secondary-threshold reform, for every input. The existing Hypothesis property now checks these actual state formulas for every generated wage/cap/threshold vector, with varying contribution rates and employee shares, within the same 150-example budget and without additional model construction.
For 2027 wages of $400,000, threshold $250,000, and federal cap $192,300, CT remains $192,300 × 0.5% = $961.50. DE's full rate is 0.4% + 0.08% + 0.32% = 0.8%; at the default 50% employee share, each contribution remains $192,300 × 0.8% × 50% = $769.20. New variable-named contrib YAML cases activate the reform through
reforms:and also assert the enlarged federal wage base of $342,300.The existing baseline YAML tests of all three state variables are in
state_paid_leave_premiums_2027.yaml. They supplyemployment_income; none suppliestaxable_earnings_for_social_security, so no input conversion is needed. The existing CT/DE tests intests/core/test_payroll_contributions.pyalso derive wages from employment income and do not input the individual taxable-earnings variable. No other reader of that individual wage-base variable exists outside federal payroll/SECA after these three fixes. CO, MA, ME, OR and WA read the separate employer-total taxable-earnings input, which this reform does not change.Hand calculations and coverage
With a $250,000 threshold:
YAML covers these calculations, combined-earnings boundaries, SE-only income, and the baseline clamp. It now also pins wages below the cap ($100,000), inside the donut ($192,300 taxable from $200,000 wages), and between the threshold and a higher cap ($255,000 wages and taxable earnings in 2036), plus the CT/DE paid-leave invariant. Python covers the default-start 2026 activation while 2025 stays current law, a finite 2036 interval, and an always-infinite threshold.
The Hypothesis property checks total Social Security tax never falls below baseline, SECA stays nonnegative, combined taxable earnings do not exceed wages plus net SE, the allocated bases equal the combined policy base, baseline SECA remains unchanged, and infinite thresholds are a no-op.
Validation and test cost
make formatand Ruff lint passed. All final test processes exited successfully with four-thread caps, one file per foreground process.Local macOS/Python 3.13 measurements include startup and cleanup. Peak RSS is recorded with Python
getrusage(bytes on macOS). The wage file was rerun after the initial BSD timing tool could not read a sandboxed kernel-clock value; this table contains the final successful runs.Total: 29 unique cases passed (25 YAML, 4 Python), including the 150-example Hypothesis property. In the Python run, activation took 83.33 seconds and the property call took 23.04 seconds.
The integration test reuses an isolated clone of the existing baseline and verifies that its threshold remains infinite. The property keeps 150 generated examples and shrinking, and now covers the state contribution invariant with actual formula methods and generated rates/shares. It suppresses the input-generation timing diagnostic because Hypothesis initially scans constants from thousands of loaded policy modules.
CI routing is unchanged: Contrib
other-shard-1discovers all four CBO YAML files as a 13-case batch and the existing Python file. The new CT/DE cases reuse the existing 2027 reform/parameter cache combination; the batch still has only two distinct cached model combinations. Expanded-batch Linux timing and memory have not been measured here.Full CI completed at the previous head
da469a15e6965e64f02e72be05b3445181516b97: all 27 checks passed. In Contribother-shard-1, the Python file took about 14 seconds and did not enter the 25 slowest tests (cutoff 21.5 seconds); the two original contrib YAML files passed as a 10-case batch in 90.8 seconds with 4,920 MB peak RSS. These are Linux CI measurements before this follow-up; the local measurements in this section describe the updated files.Past scores of this reform understated revenue because negative SECA canceled added wage tax, SE earnings were omitted, and future thresholds could fail to activate. Removing overlapping bases also corrects the wage overstatement once the cap exceeds the threshold.
Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
86d3ae6c6dagainst this PR's heada7b70c85f8, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.ct_employee_paid_leave_contributionde_employee_paid_leave_contributionde_employer_paid_leave_contributionemployee_social_security_taxemployer_social_security_taxself_employment_social_security_taxstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsNo output changed in either year: the weighted sums at the merge base and at the head are identical, and no record changed. The by-state run shows no change in any state for any of these outputs. Under current law the PR changes nothing; it changes results only when the CBO secondary-earnings-threshold reform is applied.
Comparison files are in
fixes/10380-impact/on the hub host.impact: none under current law (2025 and 2026 microsimulation at this head: no output or record changed); the PR changes only the CBO secondary-earnings-threshold reform
axiom: n/a: CBO reform option, not enacted law; the baseline clamp changes no current-law result