Repair TLA+ ordered serialisability invariant - #8134
Repair TLA+ ordered serialisability invariant#8134Amaury Chamayou (achamayou) wants to merge 11 commits into
Conversation
Add a dedicated expected-counterexample configuration and explain why the filtered committed-response property is false. Stop checking its composite invariant in normal multi-node models and cover the witness in CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Yes, this invariant is too strong. It should be relaxed instead of removed |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Heidi Howard (@heidihoward) updated the PR to be a fix instead |
There was a problem hiding this comment.
Pull request overview
This PR fixes the TLA+ invariant CommittedRwOrderedSerializableInv so it correctly handles traces where committed RW responses (filtered by explicitly observed committed statuses) are not adjacent in the underlying ledger history due to intervening writes without corresponding response/status events. It also adds a dedicated single-node TLC CI regression run that reaches the minimal seven-event trace and would have failed under the previous invariant definition.
Changes:
- Update
CommittedRwOrderedSerializableInvto require that each later committed RW response’sobservedsequence strictly extends the earlier one as a proper prefix and ends with its own write. - Add a new TLC config (
HistoryLimit = 7) to model-check only the repaired invariant on the single-node spec. - Extend CI verification to run TLC with
--workers 1and the new config to cover the previously failing minimal trace.
Custom instructions used:
- None (no additional repository instruction files were loaded from
.github/copilot-instructions.mdor.github/instructions/during this review).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tla/consistency/MCSingleNodeOrderedSerializable.cfg |
New TLC config to specifically check CommittedRwOrderedSerializableInv under HistoryLimit = 7. |
tla/consistency/ExternalHistoryInvars.tla |
Repairs CommittedRwOrderedSerializableInv to use strict prefix-extension semantics and ensure each later observation ends with its own write. |
.github/workflows/ci-verification.yml |
Adds a CI TLC run using the new config (single worker) to regress the minimal seven-event trace. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
CommittedRwOrderedSerializableInv: the old equality treated adjacency after filtering for explicitly observed committed statuses as ledger adjacency, but the minimal seven-event trace contains an intervening write with no response or status event.HistoryLimit = 7positive CI regression. It reaches the minimal trace and would fail with the old equality.CommittedRwOrderedSpecLinearizableInvenabled in the normalMCMultiNodeandMCMultiNodeReadsconfigurations.Validation
cd tla && ./tlc.py --workers 1 --config consistency/MCSingleNodeOrderedSerializable.cfg mc consistency/MCSingleNode.tla: no errors; 88,557 generated states, 63,449 distinct states, depth 15.HistoryLimit = 7run also passed with 21,586,197 distinct states.