You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moonpool-journal: remove checkpoint batches; the journal is append, read and truncate #306
#302 (landed in PR #305) added checkpoint batches to moonpool-journal: Journal::append_checkpoint, Journal::checkpoint(), Recovery::checkpoint, and a per-slot / per-entry checkpoint entry count in the on-disk format (format v4, FLAG_CHECKPOINT + the count field at offset 56).
That was a layering mistake. It pushed one caller's compaction rule (paros's copy-forward Begin…End brackets) into the journal. A checkpoint is the caller's concern: what state to re-emit, when, and where a replay starts are application decisions, and the caller can already express them with append + truncate_prefix. And nothing uses the API: not paros (its stores bracket their own checkpoints with record kinds and do not call append_checkpoint), not the example sim beyond exercising it, not anything else.
paros's owner decided on 2026-10-06 that:
The journal API is append, read and truncate. Nothing else. moonpool-journal has no checkpoint concept. Its two-copy metadata stays.
Checkpoints and compaction belong to the stateful actors above the journal API.
Remove the checkpoint flag and entry count from the slot and entry records (layout.rs, segment.rs, scan.rs); the count field returns to reserved. The format definition changes, so the format version is bumped (v4 → v5) and a v4 segment is refused rather than misread.
Remove everything that exists only for them: the checkpoint tests in tests/journal.rs, the crate docs' # Checkpoints section, the book's journal chapter section (book/src/part5-building-on-top/08-journal.md), llms.md if it mentions them, and the checkpointing third of the example sim (crates/moonpool-sim-examples/src/journal.rs).
No deprecation, no compatibility shim (AGENTS.md: delete).
The API is append / read / truncate; fmt, clippy (incl. --no-default-features and wasm32), nextest, rustdoc, mdbook build book, the journal crash loops (JOURNAL_CRASH_SEEDS=3000) and cargo xtask sim run journal all green.
This work is done on main (checked at 2d05273). This issue can be closed.
Evidence:
grep -rni checkpoint crates/moonpool-journal crates/moonpool-sim-examples book/src/llms.md finds nothing. There is no append_checkpoint, no Journal::checkpoint, no Recovery::checkpoint, no JournalError::CheckpointTooLarge and no FLAG_CHECKPOINT.
The crate was rewritten as a CLSTORE journal. The files that held the checkpoint fields (layout.rs, scan.rs) do not exist now. The public API of Journal is create, open, peek_meta, read, replay, verify_records and commit of a Batch (put, clear, truncate_prefix, set_meta).
The on-disk format is a new one (format.rs, VERSION = 3), with no checkpoint flag or count.
The book chapter book/src/part5-building-on-top/08-journal.md names checkpoints only to say that there are none: "there is no fold at boot and no checkpoint ... There are no snapshots and no compaction."
The example sim crates/moonpool-sim-examples/src/journal.rs has no checkpoint part.
This work is done. Commit 8874a7a (feat(moonpool-journal)!: rewrite as a position-keyed CLSTORE journal, PR #308) rewrote the journal from zero, and the rewrite has no checkpoint concept.
grep -i checkpoint crates/moonpool-journal crates/moonpool-sim-examples/src/journal* finds nothing. There is no append_checkpoint, no Journal::checkpoint, no Recovery::checkpoint and no CheckpointTooLarge.
The API in crates/moonpool-journal/src/journal.rs is create, open, read, replay and commit of a Batch (write, clear and truncate_prefix).
The on-disk format is new (format.rs, VERSION = 3 of the new layout), with no checkpoint flag or count.
The book chapter (book/src/part5-building-on-top/08-journal.md) says only that the journal stores state, so there is "no fold at boot and no checkpoint".
Activity
PierreZ commentedon Nov 11, 2026
This work is done on
main(checked at2d05273). This issue can be closed.Evidence:
grep -rni checkpoint crates/moonpool-journal crates/moonpool-sim-examples book/src/llms.mdfinds nothing. There is noappend_checkpoint, noJournal::checkpoint, noRecovery::checkpoint, noJournalError::CheckpointTooLargeand noFLAG_CHECKPOINT.layout.rs,scan.rs) do not exist now. The public API ofJournaliscreate,open,peek_meta,read,replay,verify_recordsandcommitof aBatch(put,clear,truncate_prefix,set_meta).format.rs,VERSION = 3), with no checkpoint flag or count.book/src/part5-building-on-top/08-journal.mdnames checkpoints only to say that there are none: "there is no fold at boot and no checkpoint ... There are no snapshots and no compaction."crates/moonpool-sim-examples/src/journal.rshas no checkpoint part.Generated by Claude Code
PierreZ commentedon Nov 11, 2026
This work is done. Commit 8874a7a (feat(moonpool-journal)!: rewrite as a position-keyed CLSTORE journal, PR #308) rewrote the journal from zero, and the rewrite has no checkpoint concept.
I checked main at 2d05273:
grep -i checkpoint crates/moonpool-journal crates/moonpool-sim-examples/src/journal*finds nothing. There is noappend_checkpoint, noJournal::checkpoint, noRecovery::checkpointand noCheckpointTooLarge.crates/moonpool-journal/src/journal.rsis create, open, read, replay and commit of aBatch(write,clearandtruncate_prefix).format.rs,VERSION = 3of the new layout), with no checkpoint flag or count.book/src/part5-building-on-top/08-journal.md) says only that the journal stores state, so there is "no fold at boot and no checkpoint".Closed at Pierre's request.
Generated by Claude Code