← ClaudeAtlas

mempalace-repair-mine-interferencelisted

Diagnose and resolve MemPalace repair failures caused by active mine jobs holding the SQLite write lock, an install script respawning miners, or FTS5 full-text index corruption discovered alongside HNSW corruption. Use when `mempalace repair` hangs, errors with "database is locked", or when FTS5 queries return nothing after HNSW is fixed.
williamblair333/Uncle-J-s-Refinery · ★ 3 · AI & Automation · score 73
Install: claude install-skill williamblair333/Uncle-J-s-Refinery
## When to use Invoke after `mempalace-hnsw-corruption-fix` Step 4 (delete corrupt HNSW binaries) when repair is blocked by a lock error, or when FTS5 queries stop returning results after HNSW repair. ## Step 1 — Detect the lock fuser ~/.mempalace/palace/chroma.sqlite3 lsof ~/.mempalace/palace/chroma.sqlite3 If processes appear, check if they are mine jobs: ps aux | grep mempalace ## Step 2 — Assess: stuck or legitimately working? Check CPU usage. If miners are consuming CPU (>10%), they are actively working, not stuck. But each write risks re-triggering the `updatePoint` corruption bug before the version pin is applied. Safe to kill — SQLite is ACID. ## Step 3 — Find and stop the spawning source An install script or cron may be restarting miners. Check before killing: crontab -l | grep mempalace systemctl list-units | grep mempalace ps aux | grep -E "(install|mine|mempalace)" | grep -v grep Stop the spawning source first, then kill the mine processes: # Kill all mine jobs (SIGTERM is clean — SQLite rolls back in-flight transactions) pkill -f "mempalace mine" Wait ~5 seconds, then verify only the MCP server remains: ps aux | grep mempalace | grep -v grep ## Step 4 — Run repair ```bash # Use from-sqlite mode to avoid SIGBUS from corrupt HNSW headers CHROMA_API_IMPL=chromadb.api.segment.SegmentAPI \ mempalace repair --mode from-sqlite --yes --archive-existing ``` ## Step 5 — Detect FTS5 corruption If repair succeeds but keyword search returns nothing, the FT