Relationships
#2981 Fail fast when nested structural commands under parallel runs wait on each other's locks
Opened by hammz · 10/2/2026· Shipped 10/6/2026
Follow-up to swamp-club#2955. Once a nested swamp skips only the per-model locks held for the run or step that spawned it, two parallel workflow steps (or two concurrent swamp serve runs) that each spawn a nested structural command (data gc, workflow evaluate --all, datastore sync, and so on) wait on each other's step lock in the first drain of waitForPerModelLocks (src/cli/repo_context.ts). Each sibling holds its step lock until its own child exits, so both block until SWAMP_LOCK_TIMEOUT_MS and then fail with LockTimeoutError. #2955 makes that timeout error say what happened and documents the pattern. This issue is to detect the cycle and fail fast instead. One direction: each nested drain writes a short-lived draining marker listing the lock nonces it inherited, and a drain waiting on a lock whose nonce another active drain lists fails immediately. A deterministic tie-break lets one side proceed.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.