w4FreePortPair checked a pair free and weed bound it later; a pair inside
ip_local_port_range could be taken in between by any outgoing connection's
source port (seen: a filer's gRPC port 43775 inside a host's 43255-47350,
"bind: address already in use", with extra volumes adding connections).
handoffAddress already stays below that range for the same reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit a54fcdde5ea81b1d23396c45ace385038288553a)
A snapshot delete is one conditional update of HEAD, and the holder's
cleaning kicked by the previous delete also updates HEAD; D4's second
delete lost that race once (status 500, "HEAD generation moved"). The
helper retries exactly that answer, within 30 s, as the CLI reports it
retryable; every other answer is returned unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A read fetches its chunk only when the block read is not local; the
helper read each chunk's first block, which the ladder images write, so a
chunk whose first block the guest wrote was never filled (two chunks of
C3-kill stayed absent). It now reads each chunk's last block, which no
ladder image writes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A chunk made local is recorded in the store at its next checkpoint, so a
kill shortly after a fill may leave that chunk absent again; it is fetched
again on its next read and no data is lost. The test no longer requires
fill progress to survive the kill (it logs it) and keeps every data check:
no partly filled chunk is served, and every acknowledged write survives.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each round's restore target was listed with size_bytes, so blockmaster
created it as an ordinary volume and the restore into it was refused
(target_exists: bound to another restore request). Targets now carry their
placement only and their restore creates them; sources are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v1-limit note on INV-WS-DELETE-NO-LIVE-HOLDER-001 moves to the
documentation change: a test-only change touches tests and testdata only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 5 holds the first start of a fresh volume before the attach commit
retires the fresh state, kills it there, and must see the store still
fresh. It looked for a <volume>.chunkfresh sidecar, which the cutover to
the content-named store removed: the fresh state is now in the store's
descriptor (WALStore.SetLayoutIdentity / LayoutIdentity). Every try
therefore read "marker always gone" although the product held at the
right boundary.
kzFreshAtStop opens the killed store (under its <volume>-<id8> layout
directory, or under the root without one) and requires LayoutIdentity()
set and fresh; markers_at_stop records the store read and what it held.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A never-started line that holds a lease (a first start stopped at the
grant, a clean-move target that never started) is refused by the delete's
reservation while that lease may be live, and completes when the same
delete is rerun past the horizon the refusal names (nobody renews it).
The three tests now assert that, through deleteAfterTheHorizon: any
other refusal still fails them, and every fencing assertion stays (a late
start after the delete is still refused, the claimed control is
unchanged). The immediate delete of such a line is the 1.0.1 fix.
INV-WS-DELETE-NO-LIVE-HOLDER-001 states the v1 limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its stop runs once, from the test or at cleanup, so a failure before the
explicit stop (awaitFill, awaitAbsent) still ends and joins the reader.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- KZ: each restore target is listed with its placement only (no
size_bytes), and the test requires that the master has no record of it
before its restore. Sources and crash volumes are still created.
- C3: a restore from the restored volume's own snapshot is refused
(not_admitted, naming another volume's chunks); filling makes bytes local
but leaves the source's chunks named. The restored volume's image is
read directly; the source's snapshot still restores unchanged.
- C3 kill: the second kill waits for a running fill: the reader has
completed a read without error and is still reading, and the absent
count fell since it started. fillWitness has controls for a reader that
never starts, fails, finishes, or makes no progress.
- Invocation guard: each call runs in a child process killed at its
deadline; the master resolves every name and the filer dial and restore
RPC answer a sentinel only reachable after every argument check. A call
still running at the deadline fails. Controls: snapshots or
snapshot-delete without --chunk-filer, and restore without --master, are
refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The source's snapshot cannot be deleted while restore targets depend on
it: the blast-radius test now requires snapshot_has_dependents while v2 is
refused and v3 serves, deletes both targets through the page's steps (v2
on a root with room), and then requires the snapshot delete and the
source's delete to complete. B1's restore from a restore target's snapshot
requires what the CLI prints: not_admitted, naming another volume's chunks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
volume-delete answers {"volume":"<name>-<id8>","state":"deleted"}; the
test decoded a completed field the command no longer prints.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ops chunk snapshots prints a JSON array of {name, root, dependents} in
name order, and a listed snapshot is published; the list carries no state
or cut position. The ladders now decode that array and check identity by
name and root: three snapshots with roots of their own, s4 listed only
once published and then unchanged, a retried snapshot keeping its root.
Contents stay checked by the restores that follow. A snapshot of a restore
target that is not fully local is now taken, and a restore from it is
refused with restore_source_not_own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FIXTURE: the procedure helpers decoded ops chunk show into the retired storage HEAD. The CLI emits layout.Head: live state is empty, committed position is Position, and the detached HEAD itself is the stop proof. Port each procedure HEAD reader plus the shared seal and successor checks; preserve holder, epoch, image, position and generation assertions. No product deadlines or expected exit codes change.
The real layout.Head JSON passed to the legacy decoder reproduces position zero and nil DetachedBy. Current checks and captured-output controls pass 10x; the Linux subprocess/chunkstore_integration test binary compiles. Full real-binary procedure rerun remains pending.
The fixture read <chunk-path>/<name>/HEAD and counted top-level segments
in it, and counted <name>/keys: names the layout no longer writes (a 404,
or a silent 0). It now resolves the store directory <name>-<id8> from
blockmaster's record, decodes HEAD, counts the segments of its current
root, and counts the volume's pool objects.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
startHandoffEnvWith imported each target as an ordinary volume record, so
the first restore into it was refused as target_exists (bound to another
restore request). Targets now carry placement only and their restore
creates them; startHandoffEnvVolumes keeps the old form for the tests that
start their extra volumes without a restore. Assertions are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
record() rebuilt a volume's store record from a new attestation and
carried Initial and AwaitingFirstReady over but not DeleteWithoutAck, so
a late attestation of the last store erased the mark and ended the frozen
wait. The mark is now carried like the other one-way fields and compared
in sameAttestation. TestTheDeleteMarkFreezesTheStoreWait (an attestation
of every store after the mark, then a restart) is the red control.
A source census pins the rules: a record is built only in open and in
record, record carries the mark over, and only markDeleteWithoutAck
writes it (true); its controls break each rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The delete without the holder's acknowledgement was admitted whenever the
end of creation was not recorded. That includes a volume that is serving
acknowledged writes whose end the master could not read (after a master
restart or a partition): the reservation stopped its grants, the proof
then found a write and refused, and the volume could neither serve, fail
over nor be deleted.
It is now admitted only in stage 1, while the master's record still
awaits a replica store (the primary serves nothing until every store is
recorded). The mark is written durably first, in the lock that ends the
wait, and freezes the record in stage 1: stores attested after it never
end the wait, so the primary never starts serving. Past stage 1 the
live-lease refusal stays; a broken creating primary's lease ends by
itself and the ordinary delete then applies. The survivor proof at the
HEAD update is no longer needed and is removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ops chunk show and snapshots built as argument slices get --master;
the guard now also checks []string{"ops", ...} literals.
- A returning old host after a forced move exits 78 with reason=moved
(the master's typed MOVED refusal), as the product documents.
- TestProcedureStartTooEarlyExitsAndARestartServes is retired: a start
before the barrier now waits through it and is re-granted, which
TestProcedureStartInsideTheBarrierWaitIsReGranted covers.
- ops chunk gc is gone: D4 deletes through the holder, whose cleaning
pass removes exactly the deleted snapshot's chunks from the pool; the
headroom test asserts the source snapshot of a waiting restore target
cannot be deleted and keeps its chunks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test's volume host has no replication slot, so it never attests
stores and the volume stayed in its creation phase. The fixture now sends
r1's heartbeat with its store attestation through the master's own
ReportHeartbeat RPC, as a replicated primary does after its peers'
barriers: no test hook, no hand-written record.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The never-created delete was admitted for any creation-hold reason,
including a volume whose primary had acknowledged writes before the
master recorded anything. Now:
- it is admitted only while creation has not ended, and the master's
record is marked durably first, in the lock that ends creation, so
creation never ends after the admission (the delete reads the record as
it was admitted, also after a restart);
- deleting HEAD waits out the holder's lease horizon as before, and then
requires proof that the volume is empty, read after the horizon: stage 1
(not every store attested: the primary served nothing), or N-K+1
survivors that answered on valid tables at end 0. A survivor holding a
write, a silent survivor or an unknown ack profile refuses;
- a volume whose creation ended keeps the live-lease refusal.
Part A (M2) and the ledger row INV-WS-DELETE-WITHOUT-ACK-001 name the rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Through the production binaries: an RF3 sync-quorum primary serves and
acknowledges a write after its stores are attested and is killed before
the next product tick (30 s loop); the survivors' write ends creation, the
gate fails the volume over and the write reads back on the new primary.
The test checks that the window really occurred.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A volume's creation phase ended only at the primary's first ready answer,
read by a gate tick. A primary that served right after its stores were
attested and died before the next tick left a volume that had acknowledged
writes held as creating for good: no gate, no operator failover.
Creation now ends, durably and for good, at the first of:
- the line's primary answering ready, or
- a survivor answering DurableLSN > 0 at the current line (its epoch-table
row at the current epoch, or none): under the quorum ack every
acknowledged write is on a survivor.
A failed write of the end of the store wait keeps the volume held (it is
reported as one store awaited) instead of releasing it with no record of
its next stage.
Tests: the gap through the operator's failover, the first-of rule and its
one-way record across a restart, the failed stage write under both gates,
the operator's move and a restart, and the primary's awaiting answer alone
holding an established volume on both gates and the fenced operator path
(each red with its guard removed).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A restored volume takes no scheduled snapshot until its device has been
read once; a manual one names the source's chunks and cannot be
restored. ops chunk release is a repair step. The lifecycle rules name
one blockmaster per cluster, no restore of its directory from an older
copy, and that a deleted volume's name cannot be created again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore is created with --master and fills on access (no restore driver,
no background copy); its source snapshot stays a dependent for the
target's life. Fork and template retirement are not in this release.
The documented show, snapshots and snapshot-delete commands get the
required --master.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v1 has no background fill: hydrate reads one block of every chunk, then
requires none absent, and the killed-mid-fill test drives its fill with
a background reader. The guard also checks the harness's run calls, and
the show and snapshot-delete calls it found get --master.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>