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 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>
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>
The chart sees Secret names, not roles: rendering fails when
tls.clientSecrets.csiNode or .operatorStatus names the CSI controller's,
the failback executor's or blockmaster's own Secret. A test renders the
chart with each such override and expects the refusal. The operator
guide says the CSI node's certificate must have the viewer role in the
role file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The launcher and the alpha certificate helper both refuse a server id
whose Secret name has an empty or malformed DNS label (a..b, a.-b, a
label over 63 characters). The helper reissues a leaf that no longer
verifies against its CA (the CA was regenerated), and keeps the server
ids issued by earlier runs in the role file and the applied Secrets.
Node certificates are client-only, so they carry no subjectAltName. The
operator guide says how to upgrade a blockmaster started with
--insecure-external-bind.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lane start without the LSN it starts after took the mark unconditionally;
it is now refused (nothing is released on this wire). A live entry passed
its note and could be held while a recovery took the mark and installed a
base, then land as a stray block under a table later made valid: live
applies now hold the apply fence shared and run only while the table is
valid, so a recovery's Invalidate drains them. Every lane start sender
states its from-LSN (EncodeRecoveryLaneStart).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CSI node and the status operator mount viewer certificates; the CSI
controller (it deletes volumes) and the failback executor mount admin
ones. The alpha certificate helper issues one certificate, role-file line
and Secret per client, and the chart takes one Secret per client
(tls.clientSecrets). A chart-render test fails when a client mounts a
Secret other than its own, when an admin Secret appears outside the CSI
controller and the failback executor, or when the role file gives a
client more than its role. A node's refused reattach event is one log
line and is not retried.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the promotion-loss regression PR, with the epoch tables production
keeps beside each store (both wrote LSN 1 at epoch 1; the new primary
wrote LSN 2 at epoch 2; the rejoining replica's LSN 2 is the old primary's
epoch-1 tail, or in the control the new primary's entry). It fails on main
(a conflicting same-length tail acknowledged at LSN 2) and the conflicting
tail is refused with the epoch-table reconciliation; the control still
acknowledges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An apply admitted under recovery A's mark could land after recovery B took
the mark and completed: its entry lay under B's valid table, labelled B's
epoch. Every recovery-data apply (both lanes, dual lane through the gate)
now runs under the table's apply fence, shared, and only while its token
owns the mark; Invalidate, CompleteRecovery and Replace take the fence
exclusive, so a change of owner waits for in-flight applies to settle and
the old owner's later applies are refused. A catch-up may complete only if
the table was valid when it took the mark (one persisted bit); after any
overlap only a rebuild makes it valid. A catch-up states the LSN it starts
after, and the replica takes the mark only if its durable end matches. A
live entry of a new epoch is accepted only at the store's next LSN.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blockmaster refuses --insecure-external-bind (a non-loopback --listen needs
mutual TLS; the runtime HTTP listener stays on loopback), and
--launcher-master-tls-secret-prefix makes each generated volume mount its
server's node certificate Secret and dial with it. The chart, the launcher
renderer, the alpha/g15b/g15d manifests and gate scripts mount the Secrets
and pass the TLS flags; network.externalStatus and the frontend runtime
HTTP option fail the render. scripts/k8s-alpha-certs.sh issues development
certificates and the role file. The systemd startup gate runs its
off-loopback master with mutual TLS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dual-lane path held the invalid mark under a sentinel no completion
presented, so a replica recovered through it reported no history for ever
and was rebuilt again. Its session now takes a tokened mark at
SessionStart, before any data frame (the per-frame invalidation is gone),
the primary's sender carries its epoch rows on the final barrier, and the
receiver completes under its token once the data is synced, before the
barrier is answered. Replace, the one unconditional writer, is pinned to
the primary role's adoption, after which the listener refuses every
inbound recovery frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two overlapping recoveries: A synced its data and paused, B started and
imported newer bytes (the table already invalid), then A's replace made the
table valid over B's data. Invalidate now draws a fresh random token,
persists it as the mark's owner and returns it; a later recovery takes the
mark over. A recovery completes only under its own token, checked and
written under one lock; any other completion is refused and not acked, and
a dead recovery's token is never presented again, so after a reload the
table stays invalid until a new recovery completes. Dual-lane sessions hold
the mark under a sentinel no completion presents. A promotion over an
invalid table clears the owner. The block design gains the epoch table's
state diagram.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>