Context
Several backends now retain per-file versions and support version-pinned reads through the observer (revision_for):
But pinning is only reachable through snapshot time-travel. There is no user-facing surface for versions, and the semantics of operating while pinned to a specific version are undefined.
Questions to settle
- Browsing: how does an agent list a file's versions? A
versions <path> builtin? A synthetic view (e.g. .versions/ folder)? Must work uniformly across backends whose version tokens differ (VersionId string vs ObjectId vs Drive revision id).
- Addressing: how is a specific version spelled in a command?
cat file@<rev>? A flag? Interaction with globbing and PathSpec.
- Semantics while pinned: if a session/mount is resolved to specific versioned files (restored snapshot):
- what does a write do — branch from the pinned version, fail read-only, or write-latest with a warning?
- what do ls/find/stat show — the pinned version's size/mtime or latest?
- what does rm mean — currently GridFS/S3 delete all versions, which breaks other snapshots pinned to them
- Retention: GridFS now accumulates revisions on every write with no pruning knob. Do we want a per-resource retention policy (keep N / keep for T / keep all), and should
rm's delete-all-revisions behavior be configurable to a soft delete (delete-marker style, like S3 versioned buckets)?
- Non-versioned backends: what do the same surfaces do on backends without version retention (disk, redis, hf buckets are non-versioned by design) — error, empty list, or emulation?
Related
Context
Several backends now retain per-file versions and support version-pinned reads through the observer (
revision_for):VersionId; every read recordsfingerprint/revision(ETag/VersionId)_id;mvmoves the whole revision historyBut pinning is only reachable through snapshot time-travel. There is no user-facing surface for versions, and the semantics of operating while pinned to a specific version are undefined.
Questions to settle
versions <path>builtin? A synthetic view (e.g..versions/folder)? Must work uniformly across backends whose version tokens differ (VersionId string vs ObjectId vs Drive revision id).cat file@<rev>? A flag? Interaction with globbing and PathSpec.rm's delete-all-revisions behavior be configurable to a soft delete (delete-marker style, like S3 versioned buckets)?Related
find -mtimeno-op / dir-mtime design discussion from Fix latent type-safety and lifecycle bugs #528 follow-ups