Skip to content

Decide whether version history and the journal read in one order #472

Open

Description

@cuibonobo

Problem

A Record's two history reads come back in opposite orders:

  • getVersions(id, { beforeVersion?, limit? }) returns snapshots newest first and pages backwards with beforeVersion.
  • getJournal(id, { afterSeq?, limit? }) returns entries oldest first and pages forwards with afterSeq.

Each may be deliberate: version history reads like "recent changes", and the journal reads like a log to replay. But nothing in the spec states either order as a choice, so a reader handling both has to remember which is which. #470 avoided depending on it: importRecord() takes RecordHistory as two sets keyed by version and seq, so input order never matters.

Questions

  • Is the split principled? If so, state the rule (and the reason) in versioning.md and journal.md, so it reads as a decision rather than an accident.
  • If not, which order should both use, and which paging cursor goes with it? Changing either one changes the wire (GET /records/:id/versions, GET /records/:id/journal) and its conformance fixtures.

Actions

  • Decide, and either document both orders as a rule or align them.
  • If aligned: spec, wire, fixtures and every adapter in the same change, plus a changeset.

Related

#426, #470.

Activity

  1. added theissue type on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions