Repository navigation
living memory: atomic persistence, one-transaction lessons, checked replay - #5127
Merged
Merged
Conversation
ashhart
force-pushed
the
lead/living-memory-hardening
branch
from
November 26, 2026 00:21
33991a8 to
ad4f487
Compare
This was referenced Nov 26, 2026
Saves and journal appends stage through unique exclusive files that never follow links, and a committed frame is never appended twice after a later sync error. Clearing, consolidation and lesson publication run as one transaction that restores live state on any failure before commit. Loading checks every size product, offset, count and cast before it allocates or indexes, refuses an oversized base or journal before reading it whole, and reports a malformed record instead of skipping it.
The engine's publish request carries the parent id, the ids it replaces and the id it supersedes, and the controller commits them as one lesson transaction.
…w open returns as the file
ashhart
force-pushed
the
lead/living-memory-hardening
branch
from
November 26, 2026 03:17
be600c9 to
895961d
Compare
ashhart
added a commit
that referenced
this pull request
Nov 26, 2026
ashhart
added a commit
that referenced
this pull request
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Robustness work on folded memory's saved state (opt-in,
--slide). Default serving does not touch any of this.Writes:
Transactions: clearing, consolidation and lesson publication each run as one transaction. Any failure before commit restores the live state. The engine's publish request now carries the replaced and superseded ids, so a lesson and its tombstones commit in one engine call.
Reads: loading checks every size product, offset, count and cast before it allocates or indexes. An oversized base or journal is refused before it is read whole, and a malformed record is reported instead of skipped.
No output changes: with folded memory off, nothing here runs, and with it on the same lessons give the same units.
Checks: each new regression test fails on main and passes here (on main: 10 failures, 4 crashes, 2 leaks across the new living-memory tests).
test-living-memory-host,test-living-host,test-responses-owner-hostandtest-lane-api-hostpass on Linux.test-qwen27-memory-host,test-living-hostandtest-living-memory-hostpass on an M3 Ultra. fmt is clean and lean is unchanged.