Skip to main content

Module journal

Module journal 

Source
Expand description

Session tree journal placeholder (issue #5262).

The journal is append-only with an in-memory tree projection. Every non-header entry carries id + parentId; the active position is a leafId; appending creates a child of the leaf; branching only moves the leaf — it never rewrites history. This file lands the entry shape that #5262’s tree operations (/tree, /branch, /fork, /resume) and the deferred compaction/branch-summary entry kinds hang off of. The strategies themselves are deferred, but the shape must be stable now so no migration is needed later.

Structs§

Journal
Append-only journal with a leafId cursor. The tree projection is derived root→leaf; moving leaf_id branches without rewriting history.
JournalEntry
One journal entry. All entries except the root header have id + parent_id.