The move of the ship order to the store keyed on the listener role, which
a primary fence sets before the move runs. A refused move followed by a
replay of the same line skipped it, and so did a genuine primary after the
excluded-replica path had fenced the listener as primary only to close
ingress. The host now records 'ship order prepared' itself: cleared when
it takes a replica role, set only after a successful move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An initial replica replaced during the wait (a new replica id) is no
longer waited for: the count is over the current replica slots, and the
wait is cleared for good the first time every current replica has a
recorded store, so a later replacement never closes the volume again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A host whose replication slot does not count peers by recorded store
counts no peer ack, so the creation wait does not close its frontend.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The frontier-0 store barriers run in parallel after UpdateReplicaSet
releases v.mu. A replica refused for an unrecorded store stays Healthy with
its learned store, so the next attestation records it with no operator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test's gate fake fenced its survivors without saying their evidence
was read, so since a fenced answer counts only on a read, valid table, it
had no survivor and the failover it asserts never came.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A replica applies entries through replication, so its store's next LSN
moves while the write observer's ship cursor stays where the observer was
installed. Promoted, its first local write waited in the LSN resequencer
for an entry that never comes as a local write, and every write after a
failover failed at its deadline. On a transition into the primary role
(listener fenced as primary, frontend not serving yet) the host moves the
ship cursor to the store's next LSN.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A peer counts toward write ACKs only while its barrier store equals the
store the master recorded for it from a primary's attestation, carried in
the replica descriptor; empty never matches, and the peer's own word never
changes it. A record change re-sends the assignment at the same
generation and the primary updates expected stores in place.
A volume's first bind records its initial replicas: until each has an
attested store the fact carries the awaited count, the primary serves no
frontend I/O and reports "creating: waiting for replica attestations
(n of N)"; the primary learns new peers' stores with a barrier at LSN 0.
Replica rows show store_attested/store_id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An unacknowledged replica's ack does not complete a sync_quorum flush
(it does once its store is acknowledged). The first-heartbeat window's
defect is pinned by a skipped red test: a fresh primary with healthy
replicas must fail no flush before its first acknowledged heartbeat.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Where the primary attests its write-ACK stores (every heartbeat of a
volume host), a Healthy peer counts toward write ACKs only once the
master has acknowledged the attestation naming its current store. A peer
rebuilt onto a new store still answers barriers (that is how its store
is learned) but does not count until that store is acked, so it can
never be the only holder of an acknowledged write that a promotion
cannot verify. The host passes an acknowledged attestation to the
replication volume after each successful heartbeat.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An answer whose epoch table is absent, or whose evidence could not be
read, reported no table and so was never marked invalid: it counted
toward N-K+1 with end 0 and could let a lower end become the target.
A fenced answer (and the heal's own answer) now counts only when its
evidence was read on a present, valid table, from the attested store.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A read-only durable root does not stop root from writing the floor record,
so the test skipped as root and a root-run gate could never pass it. The
fault now moves the root aside and puts a regular file at its path: a new
file under it fails with ENOTDIR for any user, while the files the replica
already holds open keep working. The rejoin removes the file and moves the
root back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
transport: the persist interrupted at each step (write, rename, dirsync)
makes no promise and a restart loads the old floor or the fence epoch,
never anything else; a drain timeout makes no promise; concurrent rounds
never lower the floor.
volume, on a real listener and floor record: after the answer at e+1 the
old primary's ships at e and below are refused, also after a restart, and
the line re-issued at e+1 is admitted; a superseded round answers its
higher floor and lowers nothing; a crash before the persist answers
nothing and binds no restart; a crash after the persist binds the restart
and the re-asked round answers at the same floor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RF3 sync_quorum from a cluster spec: a survivor that cannot persist its
floor leaves the fencing round one short; the stopped primary is healed at
the next epoch once it answers, serves a new write, and reads back both.
The last step (the survivor rejoining after its disk recovers) is red:
a failed replica role call is not retried.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The heal of a failed fencing round reassigns the current replica at its
own endpoints, which the product tick and the publication admission both
dropped as already current. A reassign with a fenced epoch skips that
check: the mint takes it only at that epoch, so it cannot advance twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host finds its fencer through the self fence, which in the binary is
the replication ingress; it had no FenceFloor/DurableFloor, so a replica
answered a fencing round without raising its floor and the master counted
no survivor. The ingress now forwards both to its listener.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A scenario under testops/scenarios/*.yaml is a test definition, so a PR that
changes only scenarios (and tests) passes as kind TEST. Production Go next to
a scenario still fails TEST, as do a script beside the scenarios and a yaml
outside testops/scenarios.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An attestation is merged into the volume's record: each replica it names
gets that store as its reference, and a replica it does not name keeps
its last one, since it may be the only holder of an acknowledged write.
A new attestation after a rebuild replaces it; a wiped store has another
id and is still not a survivor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A listener in the primary role refuses FenceFloor (ErrFencePrimary),
checked under the lock that raises the floor, and keeps its floor at the
epoch it serves; the caller sends no answer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a probe round with a fence epoch naming its store, the replica raises
its epoch floor in memory (new frames below it are refused at once),
waits for every mutation admitted before to finish, persists the floor,
and only then reads its evidence and answers with the durable floor. A
failed fence is not answered; a round naming another store raises
nothing; a plain round reports the floor. The floor never goes down, and
the line re-issued to the same primary at the fenced epoch is admitted
as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A table trimmed at its row cap may no longer reach the probed LSN, so a
replay has no row to compare. It then rests on the store id and the
durable end; a first promotion still needs the row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A rebalance moves the primary while it is alive, so it is a planned move,
yet it needed only the gate's promotion evidence. Under RF3 sync_quorum
the old primary can be acknowledged by the other replica alone while the
target adopts. The gate now marks a slot PlannedMoveAllowed from the same
plannedMoveAllowed(profile, replicas) a failback uses, and the controller
publishes a rebalance only to such a slot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A line at an epoch the store already holds rows at was adopted as a
replay before any check, so a same-epoch promotion naming another store,
no store, or an end this store does not hold was admitted. A promotion
now runs its checks on every delivery; a genuine replay still matches,
since the row noted at the new epoch starts past the probed LSN.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LocalPrimaryEvidence synced after reading the table, so a row appended in
between was paired with a newer end. Sync first, then read the table.
The workload-plan HTTP provider has no production caller since the probe
round; it moves to a test file so the round is the one way to evidence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The primary attests, in its heartbeat, the store id (superblock UUID) of
each replica counted toward its write ACKs. A probe round answer carries
the replica's store id; a candidate is ready only when that id is the one
its primary attested (a replaced or never-attested store is not a
survivor). The promotion line carries the probed store id, and the target
refuses a promotion whose store id is missing or is not its own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A line names how it made its primary the primary: BOOTSTRAP (the volume's
first primary), PROMOTION (with the gate's evidence: the target's durable
LSN and its epoch-table row there) or FORCED. The one mint refuses a
reassign without a kind, the kind and evidence are kept on the durable
authority record so a replayed line carries them, and AssignmentFact
carries them to the target.
The target adopts the primary role of a replicated volume only if its own
store still shows what was probed: a replay of an epoch it adopted needs a
valid epoch table; BOOTSTRAP needs no data; PROMOTION needs a valid table,
a durable end at or above the probed LSN and the probed row at that LSN
(a tail beyond it is its own log); FORCED adopts. A line without a kind to
a node holding data is refused, except a store from before the epoch
table replaying the line of its own durable floor (the upgrade). A
refusal latches the role admission failure (the slot becomes ineligible),
and the next round shows the store's real end and row. A single-replica
workspace move keeps its own start check.
Red: the promotion adoption trace (a store replaced between the line and
its adoption, an acknowledged block lost) fails on main and passes; one
row per guard of the adoption check; the mint refuses a kind-less reassign.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The promotion gate (one function: the probe round's answers -> the allowed
replica and its evidence) now covers every replicated volume, RF2
included: on main RF2 and every observation-fed failover promoted on
heartbeat readiness with no evidence of the candidate's data. The gate
puts its evidence on the slot it allows; the controller's failover and
rebalance carry it and publish nothing without it. The legacy PolicyOwner
(no production caller) is deleted. Failback is the operator's planned move
through the gate: the target is probed by the round, and the move is
allowed only when the target is in every acknowledgement set (sync_all at
any replica count, sync_quorum with RF2); RF3 sync_quorum (needs a seal)
and best_effort (forced only) are refused with typed errors.
About forty tests encoded the evidence-free decision. Their subjects are
unchanged; each now gets the candidate's evidence the way the gate gives
it (the controller's candidate helper, the convergence snapshots, a
stand-in gate sink for the observation-fed routes, a static round answer
for the RF2 and failback tests). None is skipped or loosened. New: ready
replicas without the gate's evidence promote nothing; RF2 promotes on a
ready answer and not without one; the planned-move guard, one row per ack
profile and replica count.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When blockmaster decides a promotion it mints a fresh round id and sends a
ProbeRound to the node of each replica it asks, over that node's
authenticated round stream (SubscribeProbeRounds); each replica answers
from its store as it is now: durable end, the epoch-table row there,
whether the table is present and valid, and its role (AnswerProbe). Only
an answer with this round's id, from the node asked, for the replica
asked, counts; reports, old answers and answers from another node never
do. The round replaces the /status probe, which mutual TLS keeps on
loopback, and is installed at startup for every deployment (it was
launcher-only). Both methods are node-only.
Regenerated with the pinned protoc-gen-go v1.27.1 and protoc-gen-go-grpc
v1.3.0 (the gRPC file's header now names protoc v7.34.1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>