--- name: omp-extension-stale-module-audit description: "Diagnose omp extension misbehavior (handler timeouts/silence, cross-instance arbitration failures like simultaneous speech) when the on-disk fix is already deployed: running sessions hold pre-upgrade in-memory bundles; compare ps lstart against artifact mtimes and merge dates." --- # Stale in-memory omp extension bundles Symptom class: an extension behaves as if unfixed even though the disk artifact contains the fix — recurring handler timeouts, silence, or (multi-instance coordination features) arbitration failures that look like code bugs. Root cause: **omp loads the bundle at session start; `omp plugin upgrade` on disk does not touch the code already running in live sessions.** ## Recipe 1: date the sessions against the artifact ```bash date stat -c '%y %n' ~/.omp/plugins/node_modules//dist/index.js # last upgrade ps -eo pid,lstart,etime,args | grep 'omp' | grep -v grep # each session's boot ``` Any session whose START predates the artifact mtime holds an older bundle — for it, the "fix" never shipped. When the feature landed in git, compare against the merge date, not the last upgrade (`git log --format='%h %cI %s' main | grep -i `): a session can predate the feature *existing*. Fix is always: restart (`/quit`, then `omp --resume `) — resume is lossless. It is the user's live session; never kill it yourself. ## Recipe 2: cross-process arbitration — a bypasser explains "simultaneous X" When a feature serializes across sessions via files (e.g. dankvoice stage: `~/.cache/dankvoice/stage/` with `lease.json` = `{holder,pid,expires}`, one `-.json` entry per queued item, FIFO = filename order, lease TTL 6 s), overlap between two actors proves **at least one actor never consults the directory** — the mechanism can't serialize against a bypasser. Census the queue live (`watch -g -d 'ls ; cat /lease.json'`): a live, renewing lease proves the new sessions coordinate; then Recipe 1 finds the bypasser. Known residual hazard to note, not silently fix: a lease heartbeat is a timer on the holder's own event loop; a stall longer than the TTL lets a peer steal the lease mid-action. Mitigation = pid-liveness check in the steal path. ## Verification After restarts, the symptom must vanish while the queue shows traffic. If it persists, look for actors on OTHER hosts (file arbitration is per-box), or the TTL-steal hazard above.