Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic

Relationships

#2268 main is red: handleWorkerPrune pushes outside the sync gate, failing serve_deps_rules_test

Opened by skunk-ape · 9/18/2026· Shipped 9/18/2026

Discovered while verifying #2260 — this is a pre-existing failure on main, not caused by that branch.

What fails

integration/serve_deps_rules_test.ts, test "serve functions that push must run under the sync gate":

Violations: src/serve/handlers/admin_handlers.ts: handleWorkerPrune

Reproduced at origin/main a3e60933 in a clean detached worktree (2 passed, 1 failed), and it fails identically on any branch built on top. The commit that introduced it is a3e60933, "reap stale worker records and token bindings from ephemeral fleets" (#2509).

Why it matters

The rule exists for a real race, and its own failure message states it: a serve function that mutates the local cache and pushes must run as one unit under the sync gate, or a poller pull can land between the local delete and the push. That is the same class of bug as #2247.

handleWorkerPrune deletes worker model definitions and pushes, but connection.ts dispatches it bare at the "worker.prune" case (around line 2959), while the neighbouring mutating handlers are wrapped in withSyncGate at the call site.

Suggested fix

Wrap the handleWorkerPrune dispatch in withSyncGate(ctx.syncGate, ...) the way the adjacent cases in connection.ts do. If prune is genuinely safe to run ungated, the alternative is an entry in UNGATED_PUSH_HANDLERS with a comment saying why — but the delete-then-push shape suggests the gate is the right answer.

Impact

Every branch cut from current main fails deno task test, so the verify-build gate cannot pass and no attestation can be produced. This blocks the PR for #2260 and anything else in flight.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 3 MOREASSIGNED+ 2 MOREREVIEW+ 10 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/18/2026, 12:45:57 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape assigned skunk-ape9/18/2026, 12:07:13 AM
stack72 assigned stack729/18/2026, 12:10:38 AM

Sign in to post a ripple.