[core] MultiAtrunc core implementation - #84
williamwutq wants to merge 3 commits into
Conversation
|
Original PLANNED.md entry In Section Note that compact repeat is also folded in New journal mode:
|
williamwutq
left a comment
There was a problem hiding this comment.
Discussions needed; additionally, the new format may want to support direct moves
Address review feedback on the MultiAtrunc journal: - Move the `MA_LITERAL`/`MA_REPEAT` block-kind tags up to the file-level constants block, alongside `HEADER_SIZE`/`ATOMIC_BLOCK`/`MOVE_CHUNK`. - `MaBlock::Repeat` now carries a logical `pattern_logical` (HEADER_SIZE added only at the I/O boundary), matching `Literal`'s `src_logical` and the rest of the module; no on-disk change. - Add an `MA_CYCLE` block kind so a cyclic multi-region rotation lands as a block inside the list rather than a separate wip mode. Any number of cycles may share one commit; each is self-contained (disjoint regions) and carries its own resumable progress counter in the tail, so recovery resumes a cycle from its counter instead of restarting it — which is what makes the single-region snapshot re-run-safe. Blocks are 8-padded (base rounded to `align8(S)`) so the counter update is a non-tearing 8-byte write. Writer input generalised to `&[MaSpec]` (`Write` | `Cycle`); the recovery walk, `replay_cycle`, `align8`, and `MA_CYCLE` are ungated so a cycle armed by a feature-enabled build recovers under any build. Document the Cycle tail layout, protocol, and recovery in algos/WIP.md. Cover the writer and recovery (fresh, mid-cycle resume, and corrupt-tail rollback) with tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4b480ad to
fc78a2c
Compare
Description: Adding multi-atrunc functionality to
BStackapi, implemented with a WIP journaling with a newwip_aux.New Feature: Yes
Important Feature: No
Type: Core - Atomic
Feature Flags: set + atomic
Breaking change: No
New Types: None
Rust Only: No
Fuzz: Not needed
Safety Review: Needed: Crash Safety, Invariants, Concurrency