Review follow-up:
- INV-WAL-SYNC-FRONTIER-001: Sync never reports an uncovered write durable;
it returns the global synced frontier, at or above the caller's own write,
covered by a completed fsync (TestWALGenerationFirstCallerReturnOrdering).
- INV-AUTH-PERSIST-BEFORE-PUBLISH-001 and the M2 row: store-backed only; a
failed write publishes nothing but its outcome may be unknown, and the
workspace path latches that uncertainty.
- INV-FE-LINEAGE-GATE-001: the volume-ID facet is marked as code reading.
- INV-CUT-READMISS-001, the M4 row and agent-workspace-design.md: a HEAD
fill never overwrites a newer local extent version; a WAL-only write wins
on reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each gap noted in docs/design/invariants.md is now confirmed by a red test
and tracked as an open issue: #181 (RF=3 promotion admitted with required
LSN zero), #182 (Invalidate bypasses the NeedsRebuild terminal state) and
#183 (a genesis Bind for a second slot of a bound volume).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/design/invariants.md lists the six state machines Seaweed Block
implements (walstore, authority, replica role and peer, workspace HEAD
holder and takeover, the cut pipeline, the chunk lifecycle) with each
transition's guard and enforcing function, and a 71-row invariant ledger
(69 ACTIVE, 2 STUB): statement, machine and transition, enforcement, tests,
TLA+ property and status. AGENTS.md gets a 'Protocol contract' section, and
the three design docs and the README link the new doc.
Documentation only; no code changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blockNodes is a top-level list and frontendNetworkClass is a per-node
field; the snippet nested blockNodes under network and put
frontendNetworkClass beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nvme-rdma-capability-boundary.md and nvme-tcp-supported-lab.md recorded the
lab's private addresses. Replace them with documentation addresses
(192.0.2.12 internal, 198.51.100.11/12 frontend, matching the chart's
example nodes) and say so at the top of each record. Host names stay
anonymized as 'lab host A/B'; meaning is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chart README carried a full values example with lab node names and
addresses, and values.yaml defaulted blockNodes to a lab host name.
- charts/seaweed-block/examples/values-3node.yaml: the README's values
example as a file, with nodes node-a/node-b/node-c and RFC 5737
documentation addresses (192.0.2.x internal, 198.51.100.x frontend).
- README: links the example instead of inlining it; the NVMe/RDMA snippet
uses the same placeholder node and addresses.
- values.yaml: the default block node is the placeholder block-node-1
(internalIP stays 127.0.0.1) with a pointer to the example.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Delete the stale roadmap and eight wiki planning pages (git history keeps
them); move the only unique content (Phase 166-170 write-path experiment
results) into docs/releases/nvme-tcp-supported-lab.md.
- Simplify the remaining user docs; duplicated non-claim lists link to
docs/kubernetes-status.md; lab host names and local paths are removed.
- Split docs/design/block-design.md into core, agent-workspace-design.md and
kubernetes-block-design.md; add four SVG diagrams of the on-disk and remote
structures and new mermaid diagrams.
- mkdocs.yml nav and README links follow the new layout; the two gate
scripts drop the one check each that read a deleted file.
Docs only; no product code changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README is rewritten to about 230 lines. Detail that used to live in the
README moves to linked documents:
- docs/standalone-deployment.md: running blockmaster and blockvolume
without Kubernetes, with a read-only first-volume check and a separate
write test for scratch hosts.
- docs/kubernetes-status.md: the Kubernetes alpha feature status and
non-claims.
- docs/workspace-measurements.md: the agent workspace measurements.
- deploy/config and deploy/systemd: env files, a topology example and
systemd units for blockmaster and blockvolume (plus a ublk variant).
docs/quickstart-kubernetes.md and docs/design/block-design.md are updated
to match current main (auto durable-impl default, fuzz targets, the
concurrent filer CAS test, the CI workflow, the TLA+ specs in docs/spec),
and docs/assets/seaweed-block-hero.svg is refreshed.
Docs and example configuration only; no code changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of b264c233 (test P2): when startWorker's bounded join timed out it
reported an error and then let the store's Close run under the still-live
worker, which could block on the worker's locks. On a join timeout it now
fails the test with every goroutine's stack and marks the store leaked;
heldStore's cleanup then leaves that store open instead of closing it.
TestWALStoreStartWorkerReportsAWorkerThatNeverSettles drives startWorker
through a recorder with a short join bound and a worker that never
returns: the cleanup ends within the bound with one error carrying the
goroutine dump, and the store is marked leaked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 1af91e6a (two test P2):
- Every worker goroutine of the held-caller tests runs through
startWorker, whose cleanup (ordered before the store's Close) opens the
test's gates and joins the worker within a bound, so a test that stops
early never closes the store under a live flush or Sync.
TestWALStoreHeldWorkersSettleOnAFailurePath stops a test while a flush
is held inside the store and checks the worker finished before the store
was closed.
- The serialization oracle waits until the competing flusher reaches
syncFile (testBeforeFileSync, a nil-by-default hook just before
fileSyncMu) before checking that its extent fsync does not run while the
WAL fsync is in flight.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- FuzzDecodeManifestJSON: never panics; an accepted document decodes to
what encoding/json alone decodes.
- FuzzDecodeHeadDocument: never panics; a rejected document yields the
zero head; an accepted head re-encodes (headEntry) and decodes back,
also through decodeHead with the entry's extended attributes.
Known gap, pinned by a test: a segmented root rejected by validateRoot is
returned half-built with the error (no caller reads it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- smartwal: decode never panics, a rejected slot is the zero record, an
accepted slot round-trips; slots with non-zero reserved bytes (covered by
the CRC but ignored) are pinned as a known gap.
- parallelwal: an accepted record re-encodes to exactly its bytes; every
encoded record decodes back; a CRC-valid header slot built from fuzz bytes
is rejected as the zero header or survives an encode/decode round trip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Go native fuzz targets (seed corpus runs as unit tests):
- FuzzDecodeWALEntry: arbitrary bytes never panic; an error returns the
zero entry; an accepted record is self-consistent and re-encodes to
exactly its bytes.
- FuzzDecodeWALEntryFields: records with a valid CRC and EntrySize but
arbitrary fields, so the fuzzer reaches the decoder's acceptance rules.
- FuzzWALEntryRoundTrip: every entry the encoder accepts decodes back.
Shapes the decoder accepts but the encoder never writes (empty write,
batch shape, barrier with a Length, unknown type) and entries the encoder
accepts that do not decode back (unknown type, inconsistent padding) are
pinned as known gaps (knownWALDecodeGap, knownWALEncodeGap); any other
shape fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A workspace that moved A -> B -> A reattached A's surviving local root as
an existing volume without claiming HEAD: it served A's stale image and its
next (hash-mode) cut overwrote B's acknowledged, synced and published
writes. A non-fresh attach now reads HEAD first; if another holder
published it (Gen != 0, Holder != this holder), the attach fails closed
with ErrChunkStaleLocalRoot wrapping storage.ErrChunkLayerFenced: the
volume is not served and the attach is not retried. One log line and the
status evidence name the volume, the local root, HEAD's holder, generation
and epoch, and say to remove or quarantine the root; the next attach then
starts fresh from HEAD. The deferred (authority-wait) attach records the
same evidence. Recreating the root automatically is a follow-up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move-back tests for the chunk provider. The existing local root of a
workspace that moved A -> B -> A must not attach: no reads or writes, no
cut, HEAD unchanged, a typed ErrChunkStaleLocalRoot (fenced) and status
evidence that says to remove or quarantine the root, also when the attach
is deferred until the assignment arrives. After the root is removed the
fresh path serves B's image. Controls that pass today: a same-holder
reattach at a newer epoch, an existing root with no HEAD, and a holder whose
HEAD a newer epoch took over never cuts over it.
ErrChunkStaleLocalRoot is declared so the tests build; nothing returns it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A workspace moves A -> B -> A and A's old durable root is still on disk.
A attaches it as an existing (non-fresh) volume, so it never claims HEAD:
it serves its own stale image instead of B's published writes, and its
next cut (hash mode) overwrites B's acknowledged, synced and published
data in HEAD.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
walstore-chunk volumes share walstore's on-disk format (SWBK), and on a
fresh host their published bytes may exist only in the remote HEAD. Opened
by auto as plain walstore, such a root would skip chunk recovery, install no
read-miss or fencing hooks and serve the local, absent extent.
Auto now refuses any volume whose root carries chunk metadata
(<volume>.chunk*: fresh marker, dirty bitmap and deltas, presence map),
on both the open and the create path, with ErrImplKindMismatch naming the
files and asking for --durable-impl=walstore-chunk with its remote
configuration. Nothing is deleted or converted.
Tests: a lazy fresh-host chunk root (block published on host A, host B
attached and closed before fetching it) is refused by auto and read
exactly by the explicit walstore-chunk selector; any chunk root is
refused; a stray fresh marker without a volume file is refused and left
in place. autoProvider registers its cleanup (review P3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two controls that each isolate one part of the fix:
- TestWALStoreExtentFsyncFaultAfterThePublicationCheck: a direct-frontier
Sync is in its metadata barrier, past every earlier check, when the
flusher's extent fsync fails; only the fault check at the publication's
own superblock fsync (syncFile) refuses it.
- TestWALStoreFsyncsOfTheFileAreSerialized: an extent fsync waits for a
WAL fsync of the same file in flight (fileSyncMu).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fault check under the store lock did not share a boundary with the
latching: the flusher's extent fsync (and a WAL fsync) latch without the
store lock, so a publication could pass the check, wait in its metadata
barrier, and still publish after another path's fsync failed.
Every fsync of the store's file (WAL batch, flusher extent, checkpoint,
recovered bounds, direct frontier, frontier seed) now runs through
syncFile under one leaf mutex, fileSyncMu: it is refused if a fault is
latched, and a failure latches the fault before the mutex is released.
Superblock publications run their pwrite and fsync together under it, so
a refused publication does not even dirty the superblock; a pwrite
failure still returns without latching. Nothing is acquired under
fileSyncMu (callers may hold the store lock), so it adds no lock-order
edge beyond store lock -> fileSyncMu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 45efc13c: the fault check under the store lock is not a boundary
shared with fault latching, so a fault from another path can land after a
publication passed it.
- An extent fsync held by the flusher fails while a direct-frontier Sync is
in its metadata barrier: the Sync still publishes the frontier.
- A WAL fsync fails while the flusher's checkpoint is in its metadata
barrier: the checkpoint is still published.
The held-caller tests now release their gates and bound every wait before
the store closes, and each queued writer path is its own subtest that
acknowledges, through a test hook placed after the entry checks and before
the append lock (testAfterAdmit, nil in production), that it was admitted
before the fault. The reopened seed handle closes on a failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Match blockvolume's auto default (new volumes are walstore, an existing
volume opens with its on-disk format): §1.3 lists smartwal's open issues
and says it is not a default; the open-items entry no longer says the
standalone default is smartwal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--durable-impl now defaults to empty (auto). A new volume is created as
walstore. An existing volume opens with the implementation its on-disk
superblock names, so volumes created under the old smartwal default keep
opening (no ImplKindMismatch on upgrade). An explicit selector keeps the
exact ErrImplKindMismatch refusal, and an unrecognized on-disk format is
still refused.
- core/frontend/durable: ImplAuto (the zero value) is resolved per volume
in openOrCreate; openExisting/createFresh take the resolved
implementation, and each volume handle records it, so DurableStatuses
reports the on-disk implementation. ImplSmartWAL is documented as
experimental; the 'production default' comments are removed.
- cmd/blockvolume: --durable-impl default '' with help text 'auto';
smartwal (experimental). The walstore-only options still require an
explicit --durable-impl=walstore.
- README: smartwal listed under 'Not claimed yet' with its open issues.
Tests: auto creates walstore; auto opens existing smartwal, walstore and
parallel-walstore volumes by their on-disk format; auto refuses an
unrecognized file; the flag default is empty; explicit values accepted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>