Split from #74 (item 5). RunWithApp (internal/cli/app.go) unconditionally acquires a process-wide lock at $XDG_DATA_HOME/vaultik/vaultik.pid for every fx-backed command. Read-only commands (snapshot list, info, snapshot verify, remote info) therefore fail with an "already running" error while a backup is in progress. #74 documented this behavior; this issue proposes scoping the lock so read-only commands are not blocked by a running backup.
Definition of done
Query/read-only commands (snapshot list, snapshot verify, info, remote info) run to completion while a snapshot create holds the lock, instead of failing with "already running". Commands that write the local index or remote store still mutually exclude. The partition of which commands take the lock is made explicitly, and the README locking section is updated to match. Tests cover a read-only command succeeding during a simulated concurrent mutator. make check green.
model: claude-opus-4-8
Split from https://git.eeqj.de/sneak/vaultik/issues/74 (item 5). `RunWithApp` (`internal/cli/app.go`) unconditionally acquires a process-wide lock at `$XDG_DATA_HOME/vaultik/vaultik.pid` for every fx-backed command. Read-only commands (`snapshot list`, `info`, `snapshot verify`, `remote info`) therefore fail with an "already running" error while a backup is in progress. #74 documented this behavior; this issue proposes scoping the lock so read-only commands are not blocked by a running backup.
## Definition of done
Query/read-only commands (`snapshot list`, `snapshot verify`, `info`, `remote info`) run to completion while a `snapshot create` holds the lock, instead of failing with "already running". Commands that write the local index or remote store still mutually exclude. The partition of which commands take the lock is made explicitly, and the README locking section is updated to match. Tests cover a read-only command succeeding during a simulated concurrent mutator. `make check` green.
model: claude-opus-4-8
The process-wide PID lock is now taken only by commands that write the local index or remote store — snapshot create, snapshot purge, snapshot remove, prune, remote nuke — which still exclude each other. Read-only commands — info, snapshot list, snapshot verify, remote info — no longer take the lock and run to completion during a backup. Each command declares its mode at the call site, and the README locking section is updated to match.
Judgement call: snapshot restore is grouped with the read-only commands. It writes only to the target directory you name (and a temporary copy of the snapshot database), never the local index or remote store, so it does not take the lock.
Model: opus-4-8
Implemented in https://git.eeqj.de/sneak/vaultik/pulls/179.
The process-wide PID lock is now taken only by commands that write the local index or remote store — `snapshot create`, `snapshot purge`, `snapshot remove`, `prune`, `remote nuke` — which still exclude each other. Read-only commands — `info`, `snapshot list`, `snapshot verify`, `remote info` — no longer take the lock and run to completion during a backup. Each command declares its mode at the call site, and the README locking section is updated to match.
Judgement call: `snapshot restore` is grouped with the read-only commands. It writes only to the target directory you name (and a temporary copy of the snapshot database), never the local index or remote store, so it does not take the lock.
Model: opus-4-8
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Split from #74 (item 5).
RunWithApp(internal/cli/app.go) unconditionally acquires a process-wide lock at$XDG_DATA_HOME/vaultik/vaultik.pidfor every fx-backed command. Read-only commands (snapshot list,info,snapshot verify,remote info) therefore fail with an "already running" error while a backup is in progress. #74 documented this behavior; this issue proposes scoping the lock so read-only commands are not blocked by a running backup.Definition of done
Query/read-only commands (
snapshot list,snapshot verify,info,remote info) run to completion while asnapshot createholds the lock, instead of failing with "already running". Commands that write the local index or remote store still mutually exclude. The partition of which commands take the lock is made explicitly, and the README locking section is updated to match. Tests cover a read-only command succeeding during a simulated concurrent mutator.make checkgreen.model: claude-opus-4-8
clawbot referenced this issue2026-09-22 09:10:30 +02:00
Implemented in #179.
The process-wide PID lock is now taken only by commands that write the local index or remote store —
snapshot create,snapshot purge,snapshot remove,prune,remote nuke— which still exclude each other. Read-only commands —info,snapshot list,snapshot verify,remote info— no longer take the lock and run to completion during a backup. Each command declares its mode at the call site, and the README locking section is updated to match.Judgement call:
snapshot restoreis grouped with the read-only commands. It writes only to the target directory you name (and a temporary copy of the snapshot database), never the local index or remote store, so it does not take the lock.Model: opus-4-8