The lost-reply tests now run through the executor's registered callbacks:
a proxy forwards every frame to the replica (which admits and acts on it)
and discards its replies, so the fence and the catch-up really fail at
the sender; the failure is forwarded and the healthy verdict that
follows heals the peer, and live traffic is acknowledged. A behind peer
(R < H) is not healed by the healthy verdict, heals only through a
catch-up's registered close (every block equal to the primary's), and
then takes live traffic. The census now covers every reference to the
session order in the adapter's production source (constructor binding
and each draw by case), with helper, alias and outside-a-case controls.
Each control is red against its mutant: no afterFence wiring, no
afterSessionClose wiring, no re-draw on failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The replica takes a session's lineage when it admits it; the sender saw
only the exchange's result. A fence the replica admitted whose reply was
lost, or a recovery session whose close failed, left the replica above
the live session with no re-draw. The fence-complete and session-close
callbacks now re-draw the live session above the session on any outcome
(a completed recovery still advances the cursor and heals). A guard test
over the adapter's draw switch lists every command kind that draws a
session and what re-draws after it; the refresh's log line names the
session and the reason instead of 'after recovery='.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fence mints its own session from the peer's one session order; once
the replica acknowledges it, the replica holds the fence's lineage, above
the peer's earlier live session, and refuses every later barrier or ship
on that live session as stale. A rejoining replica already at the
primary's end (no recovery session, so no post-recovery refresh) was
never healed. The fence-complete callback now calls the same
RefreshLiveShipSessionAfter the recovery close uses, after the fence's
barrier was acknowledged and before the engine publishes healthy.
The replica's stale-refusal log lines now name their cause (a primary
listener, an epoch below the floor, no role yet, below the held lineage,
or the same lineage with another frontier hint).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A replica already at the primary's end is fenced at the peer's epoch with
a session the fence mints, above the live session drawn at the peer's
creation; the replica then holds the fence's lineage, and the engine's
healthy verdict, a barrier on the live session, is refused as stale:
the peer stays degraded. A second test fixes the order: a live session
re-drawn before the fence is acknowledged makes the replica refuse the
fence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The classification moves into .github/scripts/docs-only-scope.sh: it
writes git's NUL-delimited list to a file and reads it to the end, so no
pipe stops early and a writer's error cannot read as "no other file". A
failed git diff exits nonzero, and the step then runs the tests.
docs-only-scope-test.sh runs first in the step, against real commits:
docs only, docs and a test file, no file, a docs-like prefix, README, a
move out of docs, a docs deletion, 20000 docs files with one other file
last, an unknown revision (an error), and that test.yml applies the check
only to a pull request's process suite and gates all four process steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pull request whose changed files are all under docs/ runs no product
code the process-level tests could exercise, yet waited about 55 minutes
for them. The process job now compares the merge commit with its base
parent; when every changed file is under docs/ it prints "skipped: docs
only (N files under docs/)" and skips the SeaweedFS fetch, the builds and
the named tests, so the required check still reports success. Pushes to
main always run them, as does any pull request with another changed file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Against the real master: a volume-delete refused with
snapshot_has_dependents has already reserved the volume, so workspace
show answers "workspace: volume is being deleted" (exit 1) and HEAD with
its snapshots is unchanged. The control, a delete refused before any
reservation (an established volume under a live lease), leaves show
answering the volume normally. The volume-lifecycle row cites it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A holder keeps serving for the rest of its lease during an outage, and
the restart barrier is a lower bound, so the outage paragraph states the
known lower bound of the guest's wait and that an outage longer than
ctrl-loss-tmo less the barrier can fail guest I/O, without a threshold
number.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A run with exactly --ctrl-loss-tmo=180 --reconnect-delay=2 (no
fast_io_fail_tmo): the holder killed and started again 5 s later, a
pending write completed after 6.1 s with no error; the holder kept away,
the write failed with EIO after 181.5 s. The table is no longer marked
derived, not yet run. The failover time stays derived.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The ctrl-loss-tmo derivation shows its sum (re-grant, the start's grant
wait, the unit restart: about 100 s) and the table is marked derived,
not yet run.
- reconnect-delay is a retry interval.
- The blockmaster-outage sum: 20 s + the outage + 50 s, so more than about
110 s outlasts 180 s; the link names the restart text.
- After a failover the options do not redirect the controller: a
standalone guest reaches only its own host's loopback target, so it must
run on the new primary's host and connect there (how to tell which host).
- The standalone connect command carries the same options.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The operator guide gains "Host connect settings": the nvme connect
options ctrl-loss-tmo, reconnect-delay and fast_io_fail_tmo, values
derived from the longest wait for a target to serve again (the re-grant
barrier, 65 s with default flags), what the guest sees with these values,
with the kernel defaults (up to 10 minutes) and with values too short
(I/O errors reach the filesystem), how a long blockmaster outage relates,
and that the CSI node connects with the kernel defaults, so a pod whose
holder does not return is recovered by recreating it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The extent-writer census also inspects declaration initializers and keys
each site by its receiver-qualified owner, with negative controls for a
package-level method-expression alias, a package-level closure and a
same-named method on another receiver. The paused-cycle test bounds its
entry and completion waits, and releases and joins the cycle (bounded)
on any failure before the store's cleanup; under an injected failure
while the cycle is paused it ends at once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A flusher cycle that started before the owner armed the hold (the flusher
runs from open) could pass the entry check, pause, and then drain the
dirty map Recover filled after the hold. The hold is now checked under
store.mu with the dirty-map snapshot: Recover takes store.mu after the
hold is set, so such a cycle sees it (red locally without this: the
paused cycle advances the checkpoint 1 -> 2 before attach).
writeExtentUnlocked refuses while held and no layer is attached, so a
writer the census misses fails loudly. The census counts every reference
(calls, aliases, method expressions) per site, with negative controls.
Tests: the provider holds on create and open (walstore-chunk only); the
post-attach drain advances the checkpoint and a fetch of the chunk keeps
the now-local block. block-design.md's WAL lifecycle shows the hold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a crash, Recover replays a synced write into the dirty map; the
flusher drained it to the extent before the chunk layer attached, so the
block was not marked local and the next fetch of its absent chunk
installed the snapshot's block over the acknowledged write.
The durable provider now holds the drain on a walstore-chunk store before
Recover (HoldExtentDrainUntilChunkLayer); every flusher drain, the stop's
included, does nothing while held; the replayed write stays in the WAL
and is served from the dirty map; attach releases the hold, so the first
drain marks it local. A held store takes no BASE. Writers of the extent
are enumerated by a guard test; INV-CHUNK-LOCAL-BEFORE-FETCH-001.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A volume-delete refused with snapshot_has_dependents has already
reserved the volume: it does not serve again; delete or release the
restored volume, then rerun with the same request id.
- A sync-quorum volume gets its new primary about 30 to 35 s after its
host is lost with default flags (freshness window, then two probe
rounds of at most 2 s each).
- The ack profile change order: stop the replicated volumes, change both
flags, restart blockmaster, start the volumes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A synced write into an absent chunk, a crash, a reopen: the flusher
drains the replayed write to the extent before the chunk layer attaches,
so the block is not marked local and the next fetch of its chunk installs
the snapshot's block over it (reads 0x89, want 0xE9). Adds the owner's
hold call (HoldExtentDrainUntilChunkLayer, a no-op here) and the test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A volume at the snapshot limit refuses every scheduled snapshot before
its cut, so the schedule would no longer publish the image. The scheduled
pass now runs its ordinary cut after a snapshot_limit refusal and still
records the refusal (status lastFailure snapshot_limit, then
snapshot_overdue).
Tests read the committed image back: after the refusals and the next cut,
and after the scheduled pass at the limit, the distinctive block written
while refused is in the image HEAD names. INV-SNAPK-HEAD-BOUND-001 names
the pre-check, the mapping, the scheduled cut and their tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- best-effort volumes and an ack-profile mismatch are held, not failed
over by themselves (best_effort_no_automatic_failover,
ack_profile_mismatch); blockmaster refuses an unknown
--launcher-replication-ack.
- Change the ack profile only with the replicated volumes stopped; a
primary assigned under another profile does not serve and says so.
- A volume created at run time and not in the cluster spec is served only
with the lifecycle loop on.
- volume-lifecycle: a delete under a live lease answers not_admitted
("deletion refused before persistence"); ordinary snapshots never refuse
a delete, a snapshot with dependents does (snapshot_has_dependents);
blockmaster has no same-host refusal for a forced move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A snapshot request on a volume already holding the maximum number of
snapshots ran its cut first and met the limit only at the commit. With new
data, the cut committed unnamed; with none, the cut's session stayed open
on HEAD. Either way HEAD moved, and the answer was 500 internal because
the HTTP mapping had no case for the limit or for a taken name.
SnapshotVolume now checks the count under the volume's snapshot lock,
before it names the cut or opens a session, so the refusal writes
nothing. The holder answers 409 snapshot_limit (new code) and 409
snapshot_exists, neither retryable. The in-commit check stays as the
backstop.
Tests: the snapshot past the limit through the real provider, chunk
control and HTTP route answers 409 snapshot_limit with HEAD unchanged
(generation, activity, root, position), with nothing new and with new data
waiting; the provider test changes from "the cut commits unnamed" to the
same; a volume-delete under a live lease against the real master answers
not_admitted with "deletion refused before persistence".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
restartedHolderRefresh decides only when the line it reads is this
replica's at exactly the ask's addresses, and builds ExpectCurrent from
that read, so a move between the tick's address check and this read
yields no refresh rather than one expecting the moved line.
The controller's same-ask dedupe compares the expected line: a refresh
refused because an earlier refresh moved the line is asked again against
the new line instead of being suppressed as a duplicate (red locally
without this: TestControllerReasksARefreshRefusedAfterTheLineMoved times
out waiting for the re-ask).
The host-level stale-refresh test now waits for the publication path's
own refusal of that ask (bounded), instead of a sleep. block-design.md's
authority diagram shows the conditional refresh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tick read the line twice: its address check, then the refresh, which
built its expectation from the second read while writing the ask's
(source) addresses. With a move between the reads the expectation names
the moved line and the publisher accepts it. After a real clean move, the
source's refresh must not be decided at all.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The publisher refuses an endpoint refresh whose ExpectCurrent (replica,
epoch, and the addresses read) is no longer the volume's line, under its
lock, as it does for a conditional reassign. Both refresh producers name
the line they read: the topology controller's refreshAsk and the product
loop's restartedHolderRefresh. invariants.md: the Bound -> Bound refresh
guard and INV-AUTH-RESTART-REISSUE-001's sites and tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A restarted source holder's refresh, built before the operator's clean
move to another host and applied after it, must not rewrite the moved
line (same replica, next epoch, target addresses) back to the source.
Adds ExpectedLine's addresses and the refresh's decided-against line as
fields, with tests at the publisher (the refresh is refused with
ErrExpectedLineMoved; one decided against the current line applies), the
controller (its refresh names the line it read), and the host (the stale
refresh through the normal publication path after a real clean move).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The control minted its line before the holder started, then ran one
product tick after the start. When the holder had already reported its
process by that tick, the unbound placement went through the controller,
which re-issued the line for that process, and the control passed. The
control now waits for the early line, checks that it names no process,
and runs no tick after the holder starts (the order the fixture used
before), so the holder refuses the line on every run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
INV-WS-REVOKE-ACK-RETRY-001 was inserted inside Part A's M4 table; it
now sits in Part B beside INV-WS-REVOKE-ACK-001, and M4 Fenced ->
Drained, Acked states the retry guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A real guard and the real master: the first ACK gets no answer, either
because its answer is lost after the master committed it, or because the
master's first HEAD read outlasts the guard's 5 s bound. The guard asks
again, its drain ends without error (exit 0, not 75), and the master
holds one ACK with the holder's identity, the stopped generation and the
HEAD position. On the parent commit (one attempt) both end with
DeadlineExceeded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the direct path finds the line current by address but the slot's
reported incarnation is not the line's (a restarted holder, or a move
target whose line names no process), it submits the existing endpoint
refresh (IntentRefreshEndpoint with that incarnation), as the topology
controller does for a static volume (endpointStale, refreshAsk).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A CreateVolume RF1 workspace volume is served only by the product loop's
direct path, which treats a line at the same addresses as current. A
holder restarted there (a new incarnation), or a move's target started
after the move minted a line naming no process, refuses that line and is
never re-issued one. The tests expect the next tick to re-issue the line
for the reporting process (EV+1 naming it), and nothing for the same
report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A primary line is issued for the process at its endpoints and blockvolume
refuses a line that names no process. For a workspace-bound RF1 volume the
product loop's direct path never re-issues a line whose addresses already
match, so a line minted from a hand-ingested observation before the holder
started was never replaced, loop or not. Both tests now start the holder,
wait until blockmaster observes its slot with its process incarnation, and
only then run the product tick that binds, as production orders it.
SWBLOCK_TEST_EARLY_LINE=1 is the control: the line is minted from a
hand-ingested observation before the holder starts, with no product loop,
as before. Native: lease PASS, control FAIL at "unleased host did not adopt
assignment"; move control FAIL at "source did not serve" with the
empty-process refusal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The refusal is read once and named first, since it is also why the
durable backend refuses. invariants.md M1 Recovering -> Serving and the
Kubernetes failover diagram carry the primary's profile check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the durable backend wired as the status source (as blockvolume
does), status reports the backend's generic stale-primary reason, not the
profile mismatch naming both profiles.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestBinaryWorkspaceLeaseOptInOwnsCLEANShutdown minted its line from a
hand-ingested observation before the holder started, like the layout move
test, so the holder refused the line that named no process. Both tests now
share runProductLoop (the lifecycle product loop every 100 ms, as
blockmaster runs it) and blockvolumeUnderTest (the gate's prebuilt binary
when SWBLOCK_TEST_BINS is set). The control is now
SWBLOCK_TEST_NO_PRODUCT_LOOP=1, for both tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A line is issued for the process at its endpoints, and a holder refuses a
line that names another process. The test minted the initial line from a
hand-ingested observation before the source started, so it named no
process and the source refused it ("issued for process <empty>"; source did
not serve). The test now runs the lifecycle product loop as blockmaster
does, which re-issues a line once the process reports itself (the initial
line, and a move's target). LAYOUT_MOVE_NO_PRODUCT_LOOP=1 leaves the loop
off and reproduces the refusal (the control). With SWBLOCK_TEST_BINS set
(a gate run) the test uses that prebuilt blockvolume instead of building a
race-enabled one, so the binary it runs is the one the gate hashed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
INV-WS-REVOKE-ACK-RETRY-001: asked again only after no answer
(DeadlineExceeded, Unavailable), within the lease deadline and the 19 s
closeout; the master answers a repeat of a recorded ACK as recorded while
the line is revoking.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every assignment names blockmaster's ack profile; a primary of a
replicated line whose own --replication-ack is another one is not Healthy
(its status names both), so a lost primary that cannot answer
acknowledged under the master's profile. fencedDecision also holds on
the fencing round's own ProfileMismatch, the evidence it counts.
invariants.md: the M3 promotion-candidate row, the MATCH row's fencing
round, and the new INV-PRIMARY-ACK-PROFILE-001; the Kubernetes design
no longer says best_effort is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The survivors' answers cannot show the profile the lost primary
acknowledged under. Adds AssignmentFact.ack_profile (blockmaster's
profile) with tests: an assignment names the master's profile; a primary
of a replicated line in another profile (or under a master that names
none) does not serve and says why, while its own profile or an RF1 line
serves; and a fencing round answered in another profile publishes
nothing, on both gates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
INV-PROMOTE-FRONTIER-BEST-EFFORT-001 now states the hold (it said the
gate promoted the highest-durable candidate) and names the renamed
product-loop test; INV-PROMOTE-ACK-PROFILE-MATCH-001 is new.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The volume answers each promotion probe with its own --replication-ack;
the probe round names every answer whose profile is missing or differs
from blockmaster's (or an unknown master profile), and both gates hold
such a volume before any fencing round (ack_profile_mismatch), as they
hold a best_effort one. One helper (automaticFailoverHold) decides both,
called before the unsupported gate reads its candidates, so a held volume
always shows why. blockmaster refuses an unknown --launcher-replication-ack.
The best_effort product-loop test now expects the hold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An ACK call that got no answer (DeadlineExceeded, Unavailable) is made
again until the lease deadline; the master answers a repeat of a recorded
ACK as recorded, so a busy master no longer turns a clean stop into exit
75. The closeout wait becomes 19 s: the units' TimeoutStopSec=30s less
the 5 s drain, the 5 s exit wait and 1 s margin. blockmaster logs each
AckWorkspaceRevoked step's time (lock, HEAD read, recorded, answered).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>