Skip to content

Persistent Code Index

The code index is a persistent, incremental index of a repository that Wayland Core can search without re-reading the tree every time.

Terminal window
wayland-core index build
wayland-core index status
wayland-core index search "<query>"
wayland-core index verify

The persistent index landed in v0.12.26. It builds on the same repository understanding described in RepoMap, but keeps its results on disk between runs.

The index is incremental: a rebuild processes what changed rather than the whole tree.

Its scope is git-respecting, so files your repository already ignores are not indexed. You do not maintain a second ignore list that drifts out of step with the first one.

The store is WAL checkpointed after each refresh. The practical effect is that index status reports a steady-state size rather than a figure that climbs with every refresh and then drops when something compacts in the background. The number you read is the number the index actually occupies.

Two refusals are deliberate and worth knowing about.

Unknown store schema versions are refused explicitly. An index written by a newer Core is not opened on a best-effort basis by an older one. It is refused, by name, rather than read as though it were understood.

Unavailable semantic search says why. When semantic search cannot run, index status reports:

semantic status=unavailable

with a reason attached. A capability that is off tells you it is off and what would turn it on, instead of quietly degrading to a keyword match that you then mistake for semantic results.