Stable publications are committed: some stable publication execution reaches the commit
ProvedOpenSearchProgress.publication_possibleFor every payload type V, cluster parameters P with P.InitCompatible and P.strategy = ElectionStrategy.DEFAULT_INSTANCE, every cluster W with Reachable P W, every node c, term t and list Q of cluster-manager-eligible node ids, such that c has won the election and is in term t, every cluster state s, term pt and version pv with W.sent (.publishRequest c s pt pv), s.term = t and s.version = (W.node c).lastPublishedVersion, such that
Qis a quorum of(W.node c).lastCommittedConfiguration,(W.node c).lastAcceptedConfiguration,s.lastCommittedConfigurationands.lastAcceptedConfiguration;- every member of
Qis in a term at mostt:(W.node q).currentTerm ≤ tfor everyq ∈ Q;
there is a cluster W' with PublicationExec P c t Q W W' and Committed W' t s.version. Unlike publication_committed, c may already have counted acknowledgements at W.
The theorem asserts only that such an execution exists; if the publication is already committed at W, the empty execution is one. In the proof's witness, each node of Q below term t handles a start-join from c for t, each node of Q accepts s and acknowledges it unless it already has, and c counts the acknowledgements, handling one of them a second time at the end; the stable period allows each such step.
import Definitions.Def_OpenSearchProgress open OpenSearchCoordination OpenSearchSafety OpenSearchProgress
theorem OpenSearchProgress.publication_possible {V : Type} (P : Params) (hP : P.InitCompatible)
(hes : P.strategy = ElectionStrategy.DEFAULT_INSTANCE) (W : Cluster V) (hW : Reachable P W)
(c : NodeId) (t : Nat) (Q : List NodeId) (hQ : ∀ q ∈ Q, P.eligible q = true)
(hwon : (W.node c).electionWon = true) (hct : (W.node c).currentTerm = t)
(s : ClusterState V) (pt : Nat) (pv : Int) (hs : W.sent (.publishRequest c s pt pv)) (hst : s.term = t)
(hsv : s.version = (W.node c).lastPublishedVersion)
(hquorum : (W.node c).lastCommittedConfiguration.hasQuorum Q = true ∧
(W.node c).lastAcceptedConfiguration.hasQuorum Q = true ∧
s.lastCommittedConfiguration.hasQuorum Q = true ∧ s.lastAcceptedConfiguration.hasQuorum Q = true)
(hterm : ∀ q ∈ Q, (W.node q).currentTerm ≤ t) :
∃ W', PublicationExec P c t Q W W' ∧ Committed W' t s.version := by sorryRead-back
What the Lean code literally says, in plain math · claude-opus-5-5 (independent sub-agent, blind: Lean code + auditor instructions only)
Read-back: OpenSearchProgress.publication_possible
Notions used
The full expansions are in readback_Def_OpenSearchProgress.md.
Node-state notation. For a node state :
- is the current term;
- and are the configurations of its accepted state;
- is
electionWon; - is
lastPublishedVersion.
For a cluster state , and are its two configurations. means that strictly more than half of the ids of configuration occur in the list .
The publication period. is a finite, possibly empty, sequence of Steps. Compared with arbitrary steps, it imposes exactly three restrictions:
- no start-join at or at a member of to a term above ;
- no new publication by ;
- no
restartof .
Everything else is allowed. That includes start-joins at members of to terms , on a request from any eligible node. A start-join requires no message: it is a spontaneous step of the model.
The handlers involved.
handlePublishRequestaccepts at a node in term , unless the node has already accepted a state of the same term with version . The acceptance is answered by a publish response to the publisher.handlePublishResponseat an elected node, for its current term and its last published version, adds the responder's vote. It sends an apply-commit request when the votes are a quorum of the node's last committed and last published configurations.
Committed. means some apply-commit request , from any source , has been sent in .
1. Declaration
The universally quantified variables and hypotheses, in order:
| Name | Type / statement |
|---|---|
V (implicit) | Type |
P | Params |
hP | |
hes | |
W | Cluster V |
hW | |
c | node id (the cluster-manager) |
t | |
Q | list of node ids (acknowledging nodes) |
hQ | |
hwon | |
hct | |
s | ClusterState V |
pt | |
pv | |
hs | |
hst | |
hsv | |
hquorum | |
hterm |
Conclusion.
In words: from there is at least one stable publication period at whose end a commit for has been sent.
2. What is not constrained
- Existence only. The theorem asserts that some stable publication period ends with the commit sent. It does not say that every period does, or that one must. It also does not bound or describe the steps.
- Trivial witness. If already holds, the empty execution is a witness, and the theorem is trivial for that .
- No
hpv. Unlikepublication_committed, there is no hypothesis about 's publish votes at . htermallows members of at term . They may be exactly in term , possibly having already accepted or acknowledged , or below . Members above are excluded, and they could never acknowledge . Members below can be moved into by a start-join, on a request from any eligible node; the period allows for them.- Model-relative. The existential ranges over executions of the model. The model's start-joins need no
StartJoinRequestmessage, and theCoordinator's own guards are not modelled. So a member of may move to term "spontaneously". In OpenSearch this corresponds to joining on receipt of its message. - 's eligibility. It is not assumed. It follows from
hwonin a reachable cluster, because only eligible nodes receive joins. - Four configurations.
hquorumcovers 's two configurations at and 's two configurations. It forces . - Other nodes. The theorem says nothing about nodes outside . They may be in higher terms, elected, or publishing, both at and along the witness.
- Vacuity. The hypotheses are satisfiable. Use the single-node example of the
publication_committedread-back:- node 1 bootstraps with configuration , wins term 1, and publishes (term 1, version 1);
- take right after the publication, with , , ;
- a witness period: node 1 accepts its own publication, then counts its own acknowledgement, which sends the commit.
3. Plain-language summary
Suppose that, in a reachable cluster under the default strategy:
- has won term and has sent as its latest publication;
- is a set of eligible nodes, none above term , forming a majority of 's configurations and of 's configurations.
Then the model has a stable publication period, in which no node of moves above and neither publishes again nor restarts, at the end of which a commit for has been sent. It is an existence result. Together with publication_acks_accepted and publication_committed it describes possible progress; it does not claim that progress is inevitable.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.