Checkpoint writer: stop discarding edit history #38
Labels
No labels
area:docs
area:identity
area:ops
area:plugin
area:server
channel:community
channel:direct
channel:owned
channel:press
channel:social
e2ee-constrained
gate:at-ga
gate:pre-ga
marketing
parity
relay:absent
relay:planned
relay:requested
relay:supported
risk:additive
risk:contract
risk:none
usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda#38
Loading…
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?
Part of #37.
What Relay does
Edit history is the single item on Relay's Planned list (roadmap, read 21 Sep
2026) — committed but unshipped. Their closest shipped substitute is
relay-git-sync, a Premium-tier Docker service that writes timestamped Gitcommits.
What we do today
We retain nothing.
packages/server/src/doc-store.ts:190, insideputSnapshot:and
doc_snapshotskeeps exactly one row per document(
ON CONFLICT(doc_name) DO UPDATE). Compaction fires atCOMPACT_AFTER_UPDATES = 500(ws-server.ts:926), so once a document passesthat threshold its history is gone irreversibly.
Why this is urgent rather than merely wanted
The plugin is live in the community store and accumulating downloads. Every
day it runs without this, real users' edit history is discarded and cannot be
recovered later.
CLAUDE.md's central principle — a user's writing is the onlything here that cannot be reconstructed — makes this closer to a defect than a
feature gap.
Ship this first, and alone if anything slips.
What changes
Client-written checkpoints into a new
doc_checkpointstable that compactionnever touches.
MessageType19 is the next free number(
packages/shared/src/index.ts; 18 is highest in use, and 2 is retired with acomment explaining that numbers are never reused).
Checkpoints rather than retaining every update: storage is bounded, and "restore
this note to how it was yesterday" is what people actually want. Retaining
everything grows with edit volume, which is exactly what quotas meter, and would
need a terms clause.
Split deliberately: this issue is the writer only. The version browser is a
separate issue in Phase 19 — a checkpoint not written today cannot be browsed in
June, which is the whole argument for doing the writer now and the UI later.
Risk
risk:additive. A new table and a new message type; older clients neither sendnor read them. No wire-format break.
Verification
CLAUDE.md): invert the retention rule andconfirm the test fails.
Moved to the Vikunja board as NEC-15: https://projectron.nerchure.com/tasks/15