Versions retention: time-based retention, pruning vs retention rules, versions from limited devices and quota #924

Closed
opened 2026-10-15 21:22:20 +00:00 by Cordy · 4 comments
Owner

Follow-ups from batch A (#908 decision 908-4 and spec §13).

  1. Time-based retention: versions are pruned only by count (default 10). 11 quick overwrites remove every clean version. NCSC principle 3 asks for time-based retention.
  2. Pruning vs retention rules: pruning at save time ignores retention windows.
  3. Limited devices and quota: versions don't count against quota. Should versions made by limited devices count?

Research first, as usual: market, standards, pitfalls.

Follow-ups from batch A (#908 decision 908-4 and spec §13). 1. **Time-based retention:** versions are pruned only by count (default 10). 11 quick overwrites remove every clean version. NCSC principle 3 asks for time-based retention. 2. **Pruning vs retention rules:** pruning at save time ignores retention windows. 3. **Limited devices and quota:** versions don't count against quota. Should versions made by limited devices count? Research first, as usual: market, standards, pitfalls.
Author
Owner

Priority raised (v0.7 feature-gap research, 2026-11-04). Time-based retention is what ownCloud 10, Nextcloud and Seafile buyers expect, and versions growing without limit is OpenCloud's loudest complaint (opencloud issue #1419). Work it together with #1110 (name/pin a version, delete one version) and the version-limits part of #1046. Source: scratch/b7e/backlog/gap-v07/research-v07-gaps.md.

**Priority raised (v0.7 feature-gap research, 2026-11-04).** Time-based retention is what ownCloud 10, Nextcloud and Seafile buyers expect, and versions growing without limit is OpenCloud's loudest complaint (opencloud issue #1419). Work it together with #1110 (name/pin a version, delete one version) and the version-limits part of #1046. Source: `scratch/b7e/backlog/gap-v07/research-v07-gaps.md`.
Author
Owner

Research done with #1110 (scratch/b7e/backlog/research-1110-924.md). Correction: Cairn already expires by age (90 days default) as well as count (10); a version under an hour old is never removed by the count limit (versions.go:919), but 11 saves more than an hour apart still drop the clean one. NCSC principle 3 (Nov 2024) asks for "a fixed time period, rather than a fixed number"; principle 5 asks for an alert when retention is lowered. Expired versions are only hidden until the file's next save (bytes stay for untouched files). Recommended: "keep every version for at least N days" with a per-file ceiling (1,000) that never drops the oldest version inside the period; versions never count against quota (cap kept versions per file instead); background sweep under a lease for untouched files; bell to admins when limits are lowered; a File versions tab under Retention & holds. Decisions follow.

Research done with #1110 (`scratch/b7e/backlog/research-1110-924.md`). Correction: Cairn already expires by age (90 days default) as well as count (10); a version under an hour old is never removed by the count limit (`versions.go:919`), but 11 saves more than an hour apart still drop the clean one. NCSC principle 3 (Nov 2024) asks for "a fixed time period, rather than a fixed number"; principle 5 asks for an alert when retention is lowered. Expired versions are only hidden until the file's next save (bytes stay for untouched files). Recommended: "keep every version for at least N days" with a per-file ceiling (1,000) that never drops the oldest version inside the period; versions never count against quota (cap kept versions per file instead); background sweep under a lease for untouched files; bell to admins when limits are lowered; a File versions tab under Retention & holds. Decisions follow.
Author
Owner

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

  • "Keep every version for at least N days", default 7 days on new and upgraded instances, with a per-file ceiling of 1,000 that never drops the oldest version inside the period (NCSC principle 3).
  • Versions never count against quota (also not those from limited devices); kept versions capped at 20 per file.
  • Retention rules get an opt-in "also keep versions" switch (off by default).
  • A background sweep (one instance, coord lease, can be switched off) deletes expired versions of files nobody saves again.
  • Deleting a version inside the minimum period is blocked (admins can shorten the period); legal holds block everything.
  • A bell to admins when version limits are lowered (NCSC principle 5).
    Next: whole-page mockup.
**Decided by Nikola 2026-11-09** (with #1110): - "Keep every version for at least N days", default **7 days on new and upgraded instances**, with a per-file ceiling of 1,000 that never drops the oldest version inside the period (NCSC principle 3). - Versions never count against quota (also not those from limited devices); kept versions capped at 20 per file. - Retention rules get an opt-in "also keep versions" switch (off by default). - A background sweep (one instance, coord lease, can be switched off) deletes expired versions of files nobody saves again. - Deleting a version inside the minimum period is blocked (admins can shorten the period); legal holds block everything. - A bell to admins when version limits are lowered (NCSC principle 5). Next: whole-page mockup.
Author
Owner

Shipped in v0.6.405 (PR #1154), live on both dogfoods.

What shipped: "Keep every version for at least N days" (default 7 on new and upgraded instances; upgraded instances get one admin bell), a per-file ceiling (default 1,000, admin field 100 to 100,000) that never drops the oldest version inside the period, prune markers (pruned_<unix>.pm, the "history not kept" signal #1104 uses), a nightly sweep at 02:30 under the coord lease versions-sweep that really deletes expired versions of untouched files (switchable), retention rules with an opt-in "also keep versions" switch, a bell to administrators when any version limit is lowered (NCSC principle 5), and Administration › Retention & holds › File versions showing all limits (#1046 part 2). Versions never count against quota (also not those of limited devices); kept versions are capped per file instead. Note from the final review, now in the docs: the minimum period does not survive a file's Delete forever, deletes with Deleted files off, the editor-save merge window, or ceiling thinning.

Follow-ups: #1155.

Shipped in **v0.6.405** (PR #1154), live on both dogfoods. What shipped: "Keep every version for at least N days" (default 7 on new and upgraded instances; upgraded instances get one admin bell), a per-file ceiling (default 1,000, admin field 100 to 100,000) that never drops the oldest version inside the period, prune markers (`pruned_<unix>.pm`, the "history not kept" signal #1104 uses), a nightly sweep at 02:30 under the coord lease `versions-sweep` that really deletes expired versions of untouched files (switchable), retention rules with an opt-in "also keep versions" switch, a bell to administrators when any version limit is lowered (NCSC principle 5), and Administration › Retention & holds › File versions showing all limits (#1046 part 2). Versions never count against quota (also not those of limited devices); kept versions are capped per file instead. Note from the final review, now in the docs: the minimum period does not survive a file's Delete forever, deletes with Deleted files off, the editor-save merge window, or ceiling thinning. Follow-ups: #1155.
Cordy closed this issue 2026-11-10 03:15:25 +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#924
No description provided.