Expand description
Process-liveness tracking via OS advisory locks.
Each session holds an exclusive flock on .oxicode/issues/.alive/<session_id>.
The lock is released by the OS when the process exits (including crashes
and kill -9). This lets us answer “is session X still alive?” without
any wall-clock timeout, PID-recycling heuristics, or heartbeats.
Structs§
- Alive
Guard - RAII guard for an acquired alive-lock.
Constants§
- ORPHAN_
AGE_ SECS - Minimum age (seconds) a dead alive-lock file must reach before reaping.
- TUI_
OWNERSHIP_ ID - Single source of truth for the liveness identity used by the TUI
(and any in-TUI operations: agent tool,
/issueslash command, panel).
Functions§
- acquire
- Try to acquire (and hold) an exclusive advisory lock for
session_id. - alive_
path - Path of the alive-lock file for
session_idunderissues_dir. - is_
session_ alive - Returns
trueiff a live process currently holds the alive-lock forsession_id. Used to decide whether ancrate::store::issues::Assignmentis still valid. - reap_
orphans - Best-effort, idempotent cleanup of dead alive-lock files under
<issues_dir>/.alive/.