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

Relationships

#2955 A nested structural swamp spawned by swamp serve skips every lock serve holds, including other runs' locks

Opened by hammz · 10/2/2026· Shipped 10/2/2026

Problem

waitForPerModelLocks (src/cli/repo_context.ts) skips any per-model lock file whose pid matches the parent marker (SWAMP_LOCK_HOLDER_PID, plus the ancestor list being added for swamp-club#2659). The marker identifies a process, not a run.

A long-lived swamp serve runs several workflow and model runs concurrently, and every lock they take carries serve's pid. When run A's shell step spawns a nested structural swamp command (for example swamp data gc), that child skips all of serve's locks: run A's own lock (intended, to avoid deadlock) and also run B's lock (not intended). The child can then do structural work while run B is mid-write to its model data, which is exactly the race the symmetric drain exists to prevent (design/enablers/datastores.md, Lock Lifecycle).

The same applies to two parallel steps within one swamp workflow run on the CLI: a nested structural child of step A skips step B's lock.

This predates swamp-club#2659 and is not changed by it. Found during that issue's adversarial plan review (ADV-4).

Expected

A nested swamp skips only the locks held on behalf of the run (or step) that spawned it. One direction: record a run or step identifier in the lock file and hand that identifier down to the child, instead of matching on the pid alone.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 11 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/2/2026, 8:07:00 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz10/2/2026, 5:46:26 PM

Sign in to post a ripple.