Daemon + manual fetch/shelve concurrency — won't fix (v1) #20
Labels
No labels
agent
blocked
agent
new
agent
review
agent
working
complexity
high
complexity
low
priority
high
priority
low
priority
medium
risk
high
risk
low
risk
medium
type
bug
type
chore
type
feature
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tfks/dropbear#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
dropbear fetch and dropbear shelve register paths as in-flight on a per-root shelve.Set held by the daemon. When both are running against the same root simultaneously, the daemon's watcher can see a mid-operation file state and fire a spurious re-upload.
We've decided not to build the IPC layer (HTTP /v1/inflight endpoint or lock-file polling) needed to coordinate this in v1. The constraint is: don't run fetch/shelve while the daemon is active on the same root. Stop the daemon first, or manage roots either via daemon or manually — not both at once.
The worst case if the constraint is violated is a spurious re-upload of a just-materialized file. This is wasteful but not data-corrupting; state transitions are serialized by the SQLite transaction.
If this becomes a real pain point (e.g., users want to fetch before going offline without stopping the daemon), the preferred fix is Option A: a small loopback HTTP endpoint POST /v1/inflight/{add,remove} on the existing status API, protected by the bearer token. Option B (polling .dropbear/inflight/.lock files) is the fallback if Option A requires too much new status-API surface.