You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two independent codex-unlock processes can inspect and revalidate the same completed owner concurrently. Both can reach process.kill before the owner exits, both send SIGTERM to the same PID, and both report outcome unlocked. The native writer lock cannot coordinate doctors because it is exclusively held by the Codex owner.
Required changes
serialize unlock attempts for the same canonical CODEX_HOME and thread UUID across processes
keep the coordination primitive outside Codex native lock paths and never delete a native lock file
use an actual advisory lock rather than lock-file existence
keep coordination data private to the same user and validate directory/file ownership, type, mode, symlink state, and canonical home identity
fail closed without signaling when coordination cannot be established
leave list and inspect read-only and unaffected
do not add force, waiting takeover, SIGKILL, or stale native lock deletion
Acceptance criteria
two concurrent CLI unlock commands against one real advisory lock produce exactly one SIGTERM attempt
the competing invocation is refused with a stable reason and sends no signal
release of the operation lease allows a later invocation
coordination setup, contention, symlink/permission failure, and cleanup paths are tested
existing owner, transcript, inode, lock-set, and post-signal invariants remain unchanged
Dependencies
Discovered by and should land with the regression matrix in #24 before #16.
Activity