Version snapshots: automatic and named versions #41
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#41
Loading…
Reference in New Issue
Block a user
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?
Context
Version history is a core kickoff decision (ADR 0013); snapshots are created at session end, on interval, and on demand.
Scope
Implement
page_versionswrites: automatic snapshot on last-participant disconnect (if changed) and every 30 active-editing minutes;POST /pages/:id/versionsfor named versions (label, requires write permission); contributor ids derived from Yjs update metadata since the previous version;pre_restoretrigger type reserved for #42. Dailyversion-thinningjob (keep all 90 days, then daily) per ADR 0013.Acceptance criteria
Technical notes
page_versions).Dependencies
Depends on #35, #40.
Size: ~1.5 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Done in
6fb6f6f(schema base landed a commit early in3583a04). Version history via self-contained Yjs snapshots (ADR 0013).page_versions(full snapshot, trigger auto/manual/pre_restore, label, created_by, contributor_ids) +page_pending_contributorsaccumulator.PostgresVersionStore): tracks contributors per open doc (onChange), flushes them to the shared accumulator on store, and writes an automatic snapshot on last-participant disconnect (only if something changed) and every 30 active-editing minutes. Snapshot + contributors are consumed atomically.POST /pages/:id/versionscreates a named version (write permission, label + creator, contributor set consumed). Dailyversion-thinningjob keeps all versions for 90 days, then the newest auto snapshot per day; manual/pre_restore never thinned.pre_restorereserved for #42.AC:
Pipeline green (CI+CD, Test+Int). Live on Test: api
VersionsModuleinitialized, collab healthy on this image.