Repository navigation
lean: Prove KV model deadlock freedom - #8798
Merged
Heidi Howard (heidihoward) merged 4 commits intoNov 18, 2026
Merged
Heidi Howard (heidihoward) merged 4 commits into
Heidi Howard (heidihoward) merged 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the standalone KV deadlock-freedom proof.
No open issues 🎉
What changed in this PR
Adds a machine-checked deadlock-freedom proof for the standalone KV model established in #8762, without changing model transitions or runtime behavior.
Changes:
- Proves an enabled action exists by creating store 0 when absent or compacting it when present.
- Exposes the theorem and reachable-state witness through the properties catalogue and package imports.
- Clarifies that enabled stutters are permitted; fairness and eventual transaction commits are not guaranteed.
Custom instructions used
Applied the CCF repository guidance supplied in the review context; no additional instruction files were loaded.
| File | Description |
|---|---|
lean/kv/README.md |
Documents deadlock freedom and its limitations. |
lean/kv/Kv/Properties.lean |
Exposes the theorem and reachable-state witness. |
lean/kv/Kv/Proofs/Deadlock.lean |
Implements the proof independently of trace validation. |
lean/kv/Kv.lean |
Includes the proof module in the package import root. |
Review effort: Balanced
cjen1-msft
approved these changes
Nov 18, 2026
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The deadlock-freedom section and its witness precede the safety catalogue instead of appearing at the end of Properties.lean as required by the guidance added in this PR.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
cjen1-msft
approved these changes
Nov 18, 2026
Heidi Howard (heidihoward)
deleted the
agents/add-deadlock-free-kv-model
branch
November 18, 2026 16:12
7 tasks
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.

Summary
Builds on #8762, now merged.
Kv.Properties.deadlock_freeusing the sharedCCF.TransitionSystem.DeadlockFreedefinition, with an adjacent reachable-state witness.Properties.lean.The proof creates store 0 when absent, or compacts it when present. No model transitions or runtime behavior change.
Validation
Passed locally from
lean/kv:lake build --wfail --fail-fast(including replay self-tests)lake check --inadvisably-no-sandbox(kernel accepted; onlypropext,Quot.sound, andClassical.choice)lake exe check-importslake build CCFlake lintlake exe runLinter --no-build CCF Kv replayer.Main./replayer/check-fixtures.sh(72/72 fixtures)Lean and Markdown formatting, ASCII policy, documentation prose, copyright, disallowed-comment, and whitespace checks passed.
Full
scripts/ci-checks.shwas not run becauseuv/uvxand CMake are unavailable.The follow-up agent-guidance change is documentation-only; Markdown formatting, prose, ASCII, and whitespace checks passed.