feat(persistence): add crash-safe versioned conference persistence - #4
Merged
Nixort merged 6 commits intoAug 20, 2026
Merged
Conversation
Owner
|
wtf? My email... |
Author
I'm sorry, I forgot to change |
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.
Problem and scope
Conferencepreviously had no durability boundary: restarting a process lost identity, protocol history, ratchets, replay protection, and pending control output. This PR adds astd-only persistence API and the minimum internal state codecs needed to resume the same conference safely. It does not change the protocol wire format or release metadata.Persistence model
cfr::persistence::PersistentConferencewith explicitcreate,join, andopenpaths;opennever creates missing state.1and snapshot/WAL envelope format1. Unknown versions fail with a typedUnsupportedVersion; no synthetic legacy migrations or format guessing are included.Transactions, inbound idempotency, and outbox
Conferenceoperation is applied to an isolated candidate state.sync_datacompletes before it becomes live or its result is returned.handle_inboundaccepts a transport-providedInboundId. A repeated ID with identical bytes returns a duplicate result without mutation; different bytes returnIdempotencyConflict.OutboundIds and deterministic delivery keys. Acknowledgement is a separate durable, idempotent transaction.Crash recovery and limits
0700/0600.Security boundary and known limitations
Local validation
All available local checks completed with exit code 0:
The persistence integration suites contain 21 real-filesystem restart/recovery tests and no ignored tests. Rust 1.85.0,
cargo-audit0.22.2, andcargo-deny0.20.2 were installed into temporary directories from their official distributions to reproduce the pinned CI checks. The only ignored test in the full workspace output is the pre-existing timing/reference profile test.Commits
d66e5bdfeat(persistence): add bounded protocol state codecsf0e3926feat(persistence): add crash-safe durable conference boundary472f1c4fix(persistence): harden recovery and failed commits6ca65dctest(persistence): cover restart and corruption paths393e9e1fix(crypto): keep attached AEAD no-std compatible1439698docs(persistence): document durability and recovery contractExplicitly unchanged
CI status
All required PR checks passed:
The tagged-release validation job is intentionally skipped because this is a pull request, not a release tag.