travsr fsck
Check the graph against itself and against the filesystem, and optionally repair what it finds.
travsr fsck # report only
travsr fsck --fix # repair
What it checks
| Problem | Meaning |
|---|---|
| Ghost paths | Indexed, but the file is gone from disk. Why a query can return a path:line that no longer exists |
| Orphan edges | An edge whose endpoint node is missing |
| Lexical index parity | The full-text index and the node table no longer describe the same set |
| Self-referential ref/call edges | A symbol recorded as calling itself, which is a defect rather than a curiosity |
Options
| Flag | Meaning |
|---|---|
--fix | Delete ghost nodes and sweep orphan edges. Default is report only |
--json | Machine-readable output |
--force | Override the mass-delete circuit breaker |
--force and the circuit breaker
--fix refuses to proceed when the repair would delete an implausibly large share of the graph. That usually means the working tree is not what the index expects (a branch switch mid-index, a partial checkout, a wrong working directory), and deleting on that basis destroys a good index rather than repairing a bad one.
--force overrides it. Reach for it only once you know why the count is large.
When to run it
- A result names a file that does not exist.
- After a large branch switch or rebase that moved many files at once.
- Before trusting an empty answer: a graph with orphan edges is not evidence of absence.
The report half is available to agents as the get_graph_health MCP tool. --fix is deliberately not exposed over MCP.