Relationships
#5301 A raw Deno.Command child of a workflow step, serve run or runModel target still waits out the lock timeout on its parent's behavior
Opened by stack72 · 12/1/2026
What happens
Since #5001, a child swamp process whose per-behavior lock request finds the lock held for the run that started it fails at once with lock_held_by_parent_run, but only where that can be proven: the lock's nonce was handed down (shell steps, dispatch runners), or the lock carries heldForProcess, which only swamp behavior run writes.
A child an extension starts with its own Deno.Command gets no nonce list. Under a workflow step, a swamp serve run or a context.runModel target the lock carries no mark either, so the child matches it on the pid alone. It still waits out SWAMP_LOCK_TIMEOUT_MS (60 s by default) and exits 75 while its parent waits on it. The timeout now says the holder is above the child. A nested --server request on the step's own behavior waits the same way.
Why the pid is not enough
LockHolderMarker.lockRelation() returns ancestor for a pid match, and that also matches a lock held by a parallel step, another serve run or a parallel runModel target in the same process. With two parallel steps, where step one runs a raw child on the behavior step two holds, the child waits about 5 s today and succeeds. Refusing on the pid alone would fail it.
Expected
A raw child learns which locks are held for the run that started it, so it can fail at once there too, without refusing a child that waits on a sibling run's lock. See "Per-behavior acquires in a child" in design/enablers/datastores.md.
A related case to settle: a Deno.Command child the method never awaits, on its own behavior, used to wait and then run when the parent ended within the lock timeout. Under swamp behavior run it is now refused, and nobody sees the error if its output is discarded. The child cannot tell whether it is awaited.
Open
Click a lifecycle step above to view its details.
Sign in to post a ripple.