Skip to content

Design: uniform per-file version access and semantics across versioned backends (S3 VersionId, GridFS revisions, Drive/OneDrive) #567

Description

@zechengz

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

  1. 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).
  2. Addressing: how is a specific version spelled in a command? cat file@<rev>? A flag? Interaction with globbing and PathSpec.
  3. 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
  4. 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)?
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdesignDesign discussion / architecture decision

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions