Model storage fencing and crash durability with StreamData - #36
Open
jeregrine wants to merge 1 commit into
Open
Conversation
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
Example-based tests cover selected durability and ownership scenarios, but do not explore varied sequences of updates, crashes, restarts, and historical-token mutations. A useful generated test needs an independent correctness model: an unsynced update is not a durable acknowledgement, and an old ETag must not become valid again after deletion and recreation.
Fix
Add StreamData as a test-only dependency and two sequential command models against real single-node EKV:
Every generated input and shrink attempt gets fresh storage and a supervision tree. Teardown keeps EKV alive until DurableServer stops, then removes the sample's directory. A dedicated cleanup regression deliberately fails one sample and checks that the next starts empty. Fixed registered names are reused only in synchronous properties, avoiding per-input atom allocation.
The properties join the default suite with a budget of 100 sequences each.
DURABLE_PROPERTY_RUNScontrols longer campaigns; the README explains seed replay, shrinking, resource ownership, and scope.Supporting information
These models verify sequential, per-key behavior. They do not establish distributed linearizability, external-side-effect fencing, deterministic scheduling, lease-boundary behavior, or recovery from commit-success/response-loss faults. Cordon/delete lifecycle workflows, eventual discovery, resource bounds, and mirror phases need additional models and fault controls.
The models themselves require neither LocalStack nor cloud credentials. Main's global test helper still contacts LocalStack even when selecting only properties; #33 or the alternative isolation implementation in #34 removes that unrelated dependency. This branch does not include either competing fixture-isolation change.
No production behavior changes. StreamData is the only dependency added; existing dependency versions remain unchanged.