Stats
Actions
Tags
From claude-dejavu
Rescues a corrupted Weaviate shard by walking LSM segments, recreating the class, restoring records with vectors, and gap-reindexing missing entries from Postgres canonical.
How this command is triggered — by the user, by Claude, or both
Slash command
/claude-dejavu:dejavu-rescue --class <C> [--shard <id>] [--dry-run] [--yes] [--include-quarantined <path>]The summary Claude sees in its command listing — used to decide when to auto-load this command
The user is asking you to rescue a Weaviate class whose on-disk shard has a torn / truncated LSM segment that prevents the class from loading. Use the bash command: claude-dejavu rescue-shard $ARGUMENTS Required: - `--class <C>` — class name (e.g. `ClaudeDejavuTurn`) Common: - `--dry-run` — walk + report what WOULD happen. No DELETE, no batch insert, no gap-reindex. Safe to run anytime. - `--shard <id>` — restrict to one shard id (default: all shards under the class). - `--yes` — skip the typed-confirmation prompt before the destructive phase. The default flow requires typing `y...
The user is asking you to rescue a Weaviate class whose on-disk shard has a torn / truncated LSM segment that prevents the class from loading.
Use the bash command:
claude-dejavu rescue-shard $ARGUMENTS
Required:
--class <C> — class name (e.g. ClaudeDejavuTurn)Common:
--dry-run — walk + report what WOULD happen. No DELETE, no batch
insert, no gap-reindex. Safe to run anytime.--shard <id> — restrict to one shard id (default: all shards under
the class).--yes — skip the typed-confirmation prompt before the destructive
phase. The default flow requires typing yes interactively.--include-quarantined <path> — extra .db segment to walk alongside
the live shard (e.g. a file you preserved before Weaviate stopped
loading it).Phases (destructive on apply, in this order):
dejavu-rescue scan-shard extracts records
from every segment, with truncation tolerance for torn writes.DELETE /v1/schema/<C> then POST /v1/schema from
the canonical class definition in code/weaviate-class.json./v1/batch/objects.turns canonical set; re-embed any missing entries.Recommended workflow:
--dry-run first to confirm record counts look sane.claude-dejavu session-copy take --tag pre-rescue snapshot
for rollback safety.--dry-run, add --yes when scripting).Exit codes: 0 ok, 1 generic failure, 2 invalid args, 3 binary missing, 130 user abort.
npx claudepluginhub hthsolid/claude-dejavu --plugin claude-dejavu