v0.6.362: Connected devices "Add files only" (#900) #1028

Merged
Cordy merged 20 commits from r5 into main 2026-10-27 15:36:14 +00:00
Owner

#900: a device limited to adding files, a ransomware-safe backup target.

  • What it can do: create new files and folders, and replace or remove its own new files for a short window (devices.addOnlyWindow, default 60 minutes). It can never change, rename or delete existing files.
  • Enforcement: in the scope layer for WebDAV, TUS and the guard, and checked again at commit time.
  • Widening needs the confirm step: read to add, and add to full.
  • Bell and audit: an alert after 10 refusals within an hour, and an audit entry for each refusal.
  • Admin and rollback: an admin setting for the window, locked when the config sets it. Rollback makes add devices read only, never wider.
  • Mockup: frames A to F of the approved 900 mockup.

Review: backend and UI were each reviewed, with fix rounds, plus a whole-branch review with its fixes applied. Strings were corrected by the review.

Closes #900.

#900: a device limited to adding files, a ransomware-safe backup target. - **What it can do:** create new files and folders, and replace or remove its own new files for a short window (`devices.addOnlyWindow`, default 60 minutes). It can never change, rename or delete existing files. - **Enforcement:** in the scope layer for WebDAV, TUS and the guard, and checked again at commit time. - **Widening needs the confirm step:** read to add, and add to full. - **Bell and audit:** an alert after 10 refusals within an hour, and an audit entry for each refusal. - **Admin and rollback:** an admin setting for the window, locked when the config sets it. Rollback makes add devices read only, never wider. - **Mockup:** frames A to F of the approved 900 mockup. **Review:** backend and UI were each reviewed, with fix rounds, plus a whole-branch review with its fixes applied. Strings were corrected by the review. Closes #900.
test: TestCopiesLeftNotHalfCopy969 no longer flakes: tests wait for the rename's convergence (SpacesAPI.Wait)
All checks were successful
ci / test-and-build (pull_request) Successful in 11m9s
076bb48e44
The rename handler answers before the backend convergence it starts
(go s.convergeBackend) ends. The test returned while that goroutine
still ran SetBackendDir, which wrote spaceids.json and spacekeys.json
into the stack's state directory during its TempDir cleanup: "TempDir
RemoveAll cleanup: directory not empty" in about 1 in 10 runs (traced:
the writes after the test returned came from convergeAs ->
SetBackendDir, created by SpacesAPI.rename).

SpacesAPI counts the convergence work that can run past its request (a
rename's convergence, Finish rename's work) and Wait blocks until it
has ended. newConv931Named registers api.Wait as a cleanup after the
stack's, so it runs before the stack closes; the two #969 tests wait
with it instead of polling BackendDir with sleeps. Production keeps
its behaviour: an interrupted move is resumed by the boot sweep (#771).
TestWaitEndsRenameConvergence covers Wait on posix and s3.
Cordy merged commit 20fe267486 into main 2026-10-27 15:36:14 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1028
No description provided.