Versions: name or pin a version, delete a single version (with #924) #1110

Closed
opened 2026-11-04 03:11:44 +00:00 by Cordy · 4 comments
Owner

Gap (v0.7 feature-gap research, 2026-11-04, decided by Nikola). A person cannot name or pin a version so pruning keeps it, or delete one version (for example one that holds something that must go). Bundle with #924 (time-based retention) and the version-limits part of #1046 (show the limits in Administration).

Competitors. Nextcloud names versions and keeps named ones from expiry, and deletes single versions; OpenCloud's loudest file-server complaint is versions growing without limit (issue #1419), which Cairn already avoids, so showing the limits in the admin UI turns a hidden strength into a visible one.

To research and decide when worked on. Pinned versions vs count and time limits, quota, legal holds, who may delete a version (owner, space members, admins), audit, multi-instance prune (#742, #945).

Refs: scratch/b7e/backlog/gap-v07/research-v07-gaps.md A12, #924, #1046.

**Gap (v0.7 feature-gap research, 2026-11-04, decided by Nikola).** A person cannot name or pin a version so pruning keeps it, or delete one version (for example one that holds something that must go). Bundle with #924 (time-based retention) and the version-limits part of #1046 (show the limits in Administration). **Competitors.** Nextcloud names versions and keeps named ones from expiry, and deletes single versions; OpenCloud's loudest file-server complaint is versions growing without limit (issue #1419), which Cairn already avoids, so showing the limits in the admin UI turns a hidden strength into a visible one. **To research and decide when worked on.** Pinned versions vs count and time limits, quota, legal holds, who may delete a version (owner, space members, admins), audit, multi-instance prune (#742, #945). Refs: `scratch/b7e/backlog/gap-v07/research-v07-gaps.md` A12, #924, #1046.
Author
Owner

Research done together with #924 (scratch/b7e/backlog/research-1110-924.md). Key points: every competitor's "keep" (Nextcloud named versions, ownCloud major versions, Google "Keep forever", capped at 200/file) only stops automatic expiry, never survives deleting the file; Nextcloud's two expiry paths disagreed on "named" (server#45707), so Cairn needs one "kept" check everywhere versions are removed; a full quota must never evict versions (an attack path in Nextcloud/ownCloud). Cairn has no keep/name/delete routes today (internal/api/api.go:368-371). Recommended: one Keep action with optional name stored as a kept mark in the version key plus an encrypted name file (atomic rename, multi-instance safe); single-version delete for home owner and space owner/managers from a browser session only, into Deleted files. Decisions follow.

Research done together with #924 (`scratch/b7e/backlog/research-1110-924.md`). Key points: every competitor's "keep" (Nextcloud named versions, ownCloud major versions, Google "Keep forever", capped at 200/file) only stops automatic expiry, never survives deleting the file; Nextcloud's two expiry paths disagreed on "named" (server#45707), so Cairn needs one "kept" check everywhere versions are removed; a full quota must never evict versions (an attack path in Nextcloud/ownCloud). Cairn has no keep/name/delete routes today (`internal/api/api.go:368-371`). Recommended: one Keep action with optional name stored as a kept mark in the version key plus an encrypted name file (atomic rename, multi-instance safe); single-version delete for home owner and space owner/managers from a browser session only, into Deleted files. Decisions follow.
Author
Owner

Decided by Nikola 2026-11-09 (with #924):

  • One "Keep this version" action with an optional name; a named version is always kept; at most 20 kept per file (Nextcloud model; stored so Name and Keep can be split later for #1046 approvals without migration).
  • Single-version delete: home owner, space owner and managers, browser sign-in only (device/app passwords refused, purge-refused audited); the version goes to Deleted files as its own entry; blocked inside the minimum keep period and by legal holds.
  • Versions never count against quota; a "File versions" tab under Retention & holds shows the limits.
    Next: whole-page mockup.
**Decided by Nikola 2026-11-09** (with #924): - One "Keep this version" action with an optional name; a named version is always kept; at most 20 kept per file (Nextcloud model; stored so Name and Keep can be split later for #1046 approvals without migration). - Single-version delete: home owner, space owner and managers, browser sign-in only (device/app passwords refused, `purge-refused` audited); the version goes to Deleted files as its own entry; blocked inside the minimum keep period and by legal holds. - Versions never count against quota; a "File versions" tab under Retention & holds shows the limits. Next: whole-page mockup.
Author
Owner

Mockup 1110-924-file-versions-mockup.html approved by Nikola 2026-11-09 with its open points as recommended: keep/rename/don't keep for anyone who may write the file; upgraded instances get 7 days with one admin bell and a release note; a restored deleted version returns to its file's versions, else a copy "{name} (version {date})"; Don't keep with 10 s Undo; names up to 80 characters, encrypted, visible to all who see versions; the 1,000 ceiling is an admin field (100 to 100,000); lowering "kept per file" keeps existing kept versions and refuses new ones; Delete forever of a file says its kept versions go too; no admin single-version delete in v1. Next: spec and plan (batch b5v07, v0.6.405).

Mockup `1110-924-file-versions-mockup.html` approved by Nikola 2026-11-09 with its open points as recommended: keep/rename/don't keep for anyone who may write the file; upgraded instances get 7 days with one admin bell and a release note; a restored deleted version returns to its file's versions, else a copy "{name} (version {date})"; Don't keep with 10 s Undo; names up to 80 characters, encrypted, visible to all who see versions; the 1,000 ceiling is an admin field (100 to 100,000); lowering "kept per file" keeps existing kept versions and refuses new ones; Delete forever of a file says its kept versions go too; no admin single-version delete in v1. Next: spec and plan (batch b5v07, v0.6.405).
Author
Owner

Shipped in v0.6.405 (PR #1154, merge 5e1a4df1), live on both dogfoods (pods ready, 0 restarts, no new WARN/ERROR).

What shipped: "Keep this version" with an optional name (encrypted <stem>.name beside the .kv key; at most 20 kept per file), rename, Don't keep with 10 s Undo; single-version delete for home owners and space owners/managers, browser sign-in only (G4), into Deleted files as its own entry (restores back into the history or as a copy "{name} (version …)"); one removal predicate for every path that removes a version; legal holds show "Held since {date} by {name}" (the note to administrators only); Administration › Deleted files shows version entries as versions. Strings beyond the mockup approved 2026-11-09/10 (verHeldSince, trashPurgeKept1, DE "Ihre").

Follow-ups: #1155. #742 residuals R1-R9 in ARCHITECTURE.md (notably: v0.6.404 running alongside prunes without markers; chains from before v0.6.405 read "history unknown" until first touched).

Shipped in **v0.6.405** (PR #1154, merge 5e1a4df1), live on both dogfoods (pods ready, 0 restarts, no new WARN/ERROR). What shipped: "Keep this version" with an optional name (encrypted `<stem>.name` beside the `.kv` key; at most 20 kept per file), rename, Don't keep with 10 s Undo; single-version delete for home owners and space owners/managers, browser sign-in only (G4), into Deleted files as its own entry (restores back into the history or as a copy "{name} (version …)"); one removal predicate for every path that removes a version; legal holds show "Held since {date} by {name}" (the note to administrators only); Administration › Deleted files shows version entries as versions. Strings beyond the mockup approved 2026-11-09/10 (verHeldSince, trashPurgeKept1, DE "Ihre"). Follow-ups: #1155. #742 residuals R1-R9 in ARCHITECTURE.md (notably: v0.6.404 running alongside prunes without markers; chains from before v0.6.405 read "history unknown" until first touched).
Cordy closed this issue 2026-11-10 03:15:24 +00:00
Sign in to join this conversation.
No labels
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#1110
No description provided.