Skip to content

feat(history): add memory backend - #303

Merged
pancsta merged 1 commit into
mainfrom
feat/history/add-memory-backend
Nov 11, 2025
Merged

pancsta merged 1 commit into
mainfrom
feat/history/add-memory-backend

Conversation

@pancsta

@pancsta pancsta commented Nov 11, 2025

Copy link
Copy Markdown
Owner

The new history layer replaces the old prototype and provides a fairly complete data schema and APIs, implemented across several backends (in-process, SQL, KV, columnar). Details in /pkg/history.

type TimeRecord struct {
    // TransitionId is an optional ID of the related [TransitionRecord].
    TransitionId string
    // MutType is a mutation type.
    MutType am.MutationType
    // MTimeSum is a machine time sum after this transition.
    MTimeSum uint64
    // MTimeSum is a machine time sum after this transition for tracked states
    // only.
    MTimeTrackedSum uint64
    // MTimeDiff is a machine time difference for this transition.
    MTimeDiff uint64
    // MTimeDiff is a machine time difference for this transition for tracked
    // states only.
    MTimeTrackedDiff uint64
    // MTimeRecordDiff is a machine time difference since the previous
    // [TimeRecord].
    MTimeRecordDiff uint64
    // HTime is a human time in UTC.
    HTime time.Time
    // MTime is a machine time after this mutation.
    MTimeTracked am.Time
    // MachTick is the machine tick at the time of this transition.
    MachTick uint32
}

@pancsta
pancsta merged commit 40c83f3 into main Nov 11, 2025
@pancsta
pancsta deleted the feat/history/add-memory-backend branch November 11, 2025 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant