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>
A catch-up or rebuild applies history whose epochs arrive only at its end.
If the data was synced and the replace then failed or the node stopped,
the old rows named the new data, and after a promotion an old survivor
with different entries at those LSNs reconciled as shared. The table is
now durably invalid from the recovery lane's start, a rebuild's first base
byte and every dual-lane session, until the final replace: invalid reads
as no table, which reconciles as diverged, and a live note is refused. A
promotion over an invalid table makes it exactly [(epoch, next LSN)].
A census classifies every peer-apply path as row first or invalid first;
the writer census honours build constraints and fails on any type-check
error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two tables can agree on an epoch number and still describe different
histories: a survivor whose epoch 2 starts at 7 (an old tail 5..6 kept)
read as in sync with a primary whose epoch 2 starts at 5. The reply is
56 bytes (40 from a replica without the table); SharedEnd takes the
replica's (epoch, first LSN, end) and a different first LSN is diverged.
A rebuild whose table replace fails is not acknowledged, and the stale
table reconciles as diverged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A catch-up ships history under the session's epoch, and the replica noted
that epoch for it, so a byte-identical survivor of the older epoch later
reconciled as diverged. The recovery lane notes nothing; the catch-up's
final barrier carries the primary's rows and the replica takes them, cut at
its synced end, before the ack. The writer census type-checks the packages
and finds every call on an *EpochTable whatever the receiver is called
(alias and field controls). The block design's peer-state diagram shows
that every route to Healthy reconciles by (epoch, LSN) and that diverged
history goes to NeedsRebuild.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A primary that adopted an epoch over an unsynced tail, lost the tail in a
crash and adopted the epoch again kept the row's higher first LSN: its new
writes below it were attributed to the previous epoch, so an old primary's
unacknowledged tail in that range reconciled as shared. The ingress now
trims rows above the store's next LSN after recovery, and the next note
appends the row at its real first LSN. Every write keeps the newest 512
rows, so the record always fits the read bound; the rebuild-done list is
bounded the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine's healthy verdict (a probe saw R >= H) and a completed recovery
session set the peer Healthy on length. Both now run a barrier and compare
the peer's (last data epoch, end) with the primary's epoch table: in sync
-> Healthy; diverged -> NeedsRebuild; behind or unanswered -> Degraded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ingress owns the volume's epoch table: the listener notes shipped
entries, the primary's row (epoch, durable end + 1) is made durable before
a primary role is adopted, and the replication volume reads it at the seed
barrier. A survivor whose entries are not the primary's (an equal length at
another epoch, a tail above the frontier, data without a table) needs a
rebuild and is not counted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leader-epoch reconciliation: an entry's identity is (epoch, LSN). The table
answers, for a replica's last data epoch and end LSN, up to where its
entries are the primary's; an equal length at an older epoch is divergent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the degraded-peer probe loop on, a peer the seed barrier degraded for a
divergent tail would otherwise be probed, classified caught up (R >= H) and
fenced back into healthy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Write acknowledgements already count only peers that were healthy; the
sync barrier counted any peer whose reported length covered the target,
so a degraded survivor holding a divergent tail satisfied sync-quorum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Above the promoted primary's frontier a survivor holds entries the primary
never had: an unacknowledged tail of the old epoch. The seed barrier
accepted it as caught up on length, kept the peer healthy and counted its
acks; it is now degraded like a peer below the frontier.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Until a replica has accepted the current epoch it holds only entries of
older epochs, and above the new primary's start position those were never
acknowledged. R above that start pins a rebuild instead of the caught-up
fence-then-healthy path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep main's claim-id and delete-authority rows and add the detached
rows; the delete row starts from live or detached.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>