Skip to content

Keep a user's corpora in the state directory when the registry is shipped - #20

Merged
daniel-rossier merged 2 commits into
mainfrom
user-corpus-registry
Nov 19, 2026
Merged

daniel-rossier merged 2 commits into
mainfrom
user-corpus-registry

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

Opening spear-chat in the container on a tree the image does not know offered to register its sub-trees and then exited with cannot write the corpus registry (/opt/spear/client/projects.json): Permission denied.

The registry now has a second, user-owned file: projects.json in the state directory. It is written when the shipped one cannot be, and read along with it (the shipped entry wins on a name).

Checked in the container on a seven-component workspace: the components are registered, the file lands in the state volume, the session opens. Tests added; the suite passes.

…pped

In a container the registry is part of the image and the session's user
cannot write it. Opening SPEAR on a tree the image does not know offered to
register its sub-trees, then died on the write.

What a session adds now goes to projects.json in the state directory, which
is read along with the shipped registry; the shipped entry wins on a name.
An install whose state directory is the install itself behaves as before.
The test asserts what happens when nothing can be written. With a state
directory there is now somewhere to write, and the shared test state kept
the corpus for the tests that followed.
@daniel-rossier
daniel-rossier merged commit 0b92f34 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