Skip to main content

Module lock

Module lock 

Source
Expand description

Hardened locking protocol for state.json.

Uses fd-lock with four-factor stale detection and full-jitter exponential backoff. The lock is scoped strictly around state.json read-modify-write sequences; it must never be held across git worktree add or any other long-running operation.

Structs§

StateLock
An acquired state lock. The underlying file descriptor holds an exclusive flock; releasing happens automatically on drop (fd close).