Repository navigation
Conversation
This was referenced Oct 21, 2026
Owner
|
Race is fixed, 0 of 60 rounds with 8 processes, nice. One thing left: a lock whose pid got reused (common after a reboot) or a leftover sessions.lock.break never clears now, so every write throws "busy" forever, and vibe __wrap exits 1 with no endcard. Treating a live pid as stale once the lock is over 10 minutes old, and removing a break dir older than LOCK_STALE_MS, fixed both for me and your tests still pass. |
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.
Session history could disappear after a killed hook left a stale lock, concurrent writers shared one temporary file, or a damaged database was reset to empty. This groups #123 with the additional partial-record recovery found locally.
sessions.lock.breakand recheck the holder after taking that gate, so two removers cannot delete a replacement live lock..corruptbackup; a failed backup stops the write.Validation: the complete local suite passes 161/161. Storage regressions cover stale/live locks, timeout, concurrent writers preserving all records, truncation/splicing and backup preservation, plus a held breaker gate, deterministic replacement of the dead holder before the gated recheck, and eight synchronized writers recovering one dead lock. The new gate/recheck regressions fail against the previous PR head.
Recovery cannot reconstruct incomplete records; their original bytes remain in the backup. Breaker gates are held only during synchronous lock repair; contention fails closed.
Combined validation: all three revised branches merge cleanly in the order below and pass 192/192 local tests together.
Merge order: 1. #127 (this PR) → 2. #129 (delivery) → 3. #128 (ZCode). This replaces the closed #123. No migration or data rewrite is performed on healthy reads.