Skip to content

Keep what a container session indexes in the state directory - #21

Merged
daniel-rossier merged 1 commit into
mainfrom
user-index-in-state
Nov 19, 2026
Merged

daniel-rossier merged 1 commit into
mainfrom
user-index-in-state

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

A /reindex inside a container wrote into the image's index directory, in the container's writable layer, and was lost with the container; the manual said it went to the state volume.

The harness image now names the index it ships (SPEAR_SHIPPED_DB_PATH). The session's own index lives in the state directory, is read before the shipped one and is the only one written.

Checked in a container: a small unknown tree is indexed, a second container finds its 3 chunks, and the shipped corpus still answers (4260 chunks). Unit tests for the layered lookup; the suite passes.

A reindex inside a container wrote into the image's own index directory,
in the container's writable layer: it was gone when the container was. The
manual said it went to the state volume.

An image now names the index it ships. The session's own index is then a
second one, beside its other state, read before the shipped one and the
only one written; the indexers learn the place from the environment. The
startup check asks the same layered lookup, so a corpus indexed by the user
is no longer reported as missing.
@daniel-rossier
daniel-rossier merged commit 2f0edbd into main Nov 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant