* seaweed-block: red: a snapshot delete is published over a page whose data was freed
Two overlapping runs of one snapshot delete write their intent pages under
the same tag. If the first run's stalled page update lands between the
second run's read of a page and its adoption (after a cleaning pass
deleted and the second run re-staged the page), the second run adopts and
publishes an intent whose page data was freed: later snapshot deletes on
the volume are refused and its cleaning stops.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: a snapshot delete re-reads each intent page after adopting it
Publication reads every intent page, adopts it under this run's tag, then
publishes. A stalled update from another run of the same delete can land
between that read and the adoption and put a deleted page's data reference
on the entry. Reading the page again after the adoption, before the
transition publishes, refuses that case: once this run's tag is on the
entry, no such update passes. No persisted change; a run that hits it
stays refused, and a new request id writes new pages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: ledger row for the intent page re-read
INV-SNAPSHOT-DELETE-ADOPT-002 names the re-read after adoption, its test
and the model row it projects (PublishedReadable; the refused run is the
residue a new request id clears).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the intent page re-read: typed refusal, twins and a store witness
Review: the re-read test now separates the guard from weaker ones. A page
that reads but holds other bytes, and a change to only the later of two
pages, are refused as well as a freed page; the refusal is a precondition
that writes nothing to HEAD, keeps the snapshot, and comes after the
adoption; the same schedule with intact bytes publishes. The test is a
consequence-level projection; a store-level witness shows the tag-only
metadata update writing a deleted object's chunk over a re-created one,
which the re-read does not depend on refusing. The ledger row names the
witness and marks the model as checked outside the repository.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the intent page re-read keeps its error's cause
The refusal wrapped the re-read's error with %v, so a caller deadline
that ended the re-read reached the CLI as a precondition ("page changed
during adoption", no_progress) instead of deadline_exceeded, unlike the
same deadline on the chain's first read. Wrap both errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the intent page re-read sees only data the filer already freed
The filer frees a deleted entry's chunks, and the chunks an update drops,
from its deletion queue: polled every 1.123 s, and retried after 5 min
when a volume server does not answer. A stale update that puts such a
reference on an adopted page therefore reads back intact while the
deletion is still queued, and the intent publishes over data that is
freed moments later. The intact-bytes twin publishes for that reason.
State that bound in INV-SNAPSHOT-DELETE-ADOPT-002 and at the guard
instead of "changed or vanished ... refuses the publication".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the delete intent publication row and diagram carry the re-read
Part C rule 2 moves a changed guard's Part A row and diagram with it.
The publication row now names the re-read after adoption and
INV-SNAPSHOT-DELETE-ADOPT-002, and the M9 diagram gains the transition's
idle and snap self-loops, which it lacked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: red: a stale adoption or mark lands on a re-created object
A metadata change writes the looked-up entry back, chunks included,
conditional only on its tags: paused between its lookup and its update, it
lands on an object deleted and created again with the same tags in between,
puts the deleted object's chunk on it, and a cleaner's stale mark then
deletes it. The filer's IF_CHUNKS_EQUAL condition refuses such a write.
This commit adds the plumbing and the tests, not the guard itself:
- the filer protocol subset gains WriteCondition (IF_CHUNKS_EQUAL) on
UpdateEntryRequest; SWFS sends it through UpdateEntryIfChunks, and the
fakes evaluate it (or drop it, as an older filer does);
- a startup probe sends a mismatched conditional update to the disposable
probe HEAD; only a definite refusal turns the guard on for the stores the
catalog opens. The startup log and /status/chunk (metadata_guard) name it.
The two guard tests fail here: changeMeta does not send the condition yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: metadata changes send the filer's chunk condition
With the guard on (the startup probe saw the filer enforce it), an
adoption or mark sends IF_CHUNKS_EQUAL with the looked-up entry's chunk
fids. A re-created object always has a new chunk, so a stale whole-entry
write is refused instead of putting a deleted object's chunk on it; a
cleaner's delete expects its own mark and so follows. Without the guard
the write is unchanged and the intent page re-read stays the check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: ledger rows for the chunk condition and its probe
INV-LAYOUT-META-CHUNKS-001 (adoption and mark under IF_CHUNKS_EQUAL) and
INV-WS-CHUNK-CONDITION-PROBE-001 (the startup probe decides it, the log
and /status/chunk name it); ADOPT-002 names the renamed store test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the chunk probe without a definite refusal leaves the guard off; fallback wording
Review: the existing failure cases stop at the HEAD gate. New cases pass
the gate and then fail only the chunk condition probe (unavailable, lost,
deadline, filer error, vanished entry, failed HEAD read): the catalog, its
stores, the startup log and the usage all stay on page_reread_only.
page_reread_only now reads as enforcement not established, not as a filer
without the condition; INV-SNAPSHOT-DELETE-ADOPT-002 cites MetaABA r2's
delayed-free counterexample, r1 kept as historical scope.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: sw-block metadata writers run the chunk condition probe
sw-block opens its catalog with NewBCatalog, and only DialBCatalog ran
the probe, so a snapshot-delete, retain, release or volume-delete from
the CLI sent its adoptions and marks without the chunk condition even
on a filer that enforces it. bCatalog now runs the same probe
(checkConditionalHead, via ProbeChunkGuard) for a writing command; a
failed probe only leaves the guard off. Read-only commands write
nothing. The volume-delete fakes that stall object deletes let the
probe's own cleanup through.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: ChunkGuard reports only a chunk condition the filer can carry
SetChunkGuard(true) on a store whose filer does not implement
ChunkConditionFiler made ChunkGuard report true while changeMeta sent a
plain UpdateEntry. Both now ask chunkCondition: the guard is on and the
filer can carry the condition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: Part A rows for the chunk condition probe and guard
Part C rule 2: the M4 table gains the startup probe's guard selection
(INV-WS-CHUNK-CONDITION-PROBE-001), and the M9 publication, clean
removal and list page retirement rows and diagram carry the chunk
condition on adoptions and marks (INV-LAYOUT-META-CHUNKS-001), whose
Part B row now names the clean removal as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: sw-block usage leaves out a metadata guard it never probed
The usage command opens a read-only catalog, which runs no chunk
condition probe, so its answer always said page_reread_only even over a
filer every writer sends the condition to. The field is now omitted
there; blockvolume's /status/chunk still reports its probed guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the sw-block chunk condition probe runs within --timeout
A writing command ran the probe on context.Background(), so after a
passing census a stalled disposable HEAD create held it for the probe's
own 10 s whatever --timeout said. The probe now runs within the command's
filer timeout; its cleanup keeps its own 5 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: a stale sw-block adoption is refused through the CLI catalog
The probe test proved only guard selection. This one composes it: through
the store of the catalog bCatalog opens, an adoption paused between its
lookup and its update while the object is deleted and created again is
refused with the re-created chunk intact. An unchanged object is still
adopted, and a catalog that ran no probe lets the stale write through.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the M9 diagram qualifies the chunk condition by the guard
The adoption and mark labels read as always chunk-conditioned, while the
tables beside them say so only with the guard on; guard off, the page
re-read is the only check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: a failed chunk guard probe turns the guard off
ProbeChunkGuard set the guard only when checkConditionalHead got as far
as the chunk probe, so a second call that failed earlier kept the first
call's guard on. It now starts from off. Its comment also says a store
takes the guard when it is opened, so the probe goes before the stores.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: pingqiu <pingqiu@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: preserve unchanged imports and batch durable publication
* seaweed-block: name the rejected entry in a startup import error
The batch import returned the bare validation error, so a bad cluster-spec
node or placement seed stopped startup without saying which entry. The
per-entry RegisterNode/ApplyPlan loop named it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: name the import path in the freshness row and registry guard
Startup now replays nodes through ImportNodes, not RegisterNode; list it
where the freshness invariant and the registry-writer guard name the
writers. Drop a doubled blank line in the operations manual.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: poison a lifecycle store only on a persistence error
A node registration whose SeenAt cannot be encoded failed before any file
I/O, but RegisterNode latched the marshal error and every later mutation
returned ErrLifecycleRecoveryRequired until reopen. Latch only a
RecordPersistenceError, as the volume store already did.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: keep a node's SeenAt when its declaration changes
registrationLocked kept SeenAt only for an unchanged declaration. A
restart that changed a node's declared pools or address stamped the
current time, so a silent node passed the stale-observation check. A
declaration without an observation time now keeps the stored one; a new
node still gets the current time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: use the import syncfs only on filesystems that report its errors
The batch path was chosen from the kernel release alone. On overlayfs,
syncfs checks the overlay superblock's writeback errors, not the upper
file's, and on FUSE it does not send FSYNC to the daemon, so an import
could publish records whose data never became durable. Select syncfs
only when the records directory is on ext4, xfs, btrfs or tmpfs, and keep
per-file fsync elsewhere. The startup line now reports the path for the
lifecycle store, after it exists.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: assert the imported values before the reopen check
The import step control compared the store's snapshot with a reopen, so
an import that synced and renamed but committed the old values passed.
Check the changed and unchanged values before and after reopen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: check both views after a removal retry
present() returned record && snapshot, so a removal that cleared only one
view passed the final check. Report both and require both absent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: assert the one-second fail-stop bound
The blocked-logger control checked only exit status 1 inside a four-second
child timeout, so a longer exit timer still passed. The child now reports
when it triggers the failure, and the parent requires exit within the
one-second deadline plus one second of scheduler tolerance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: add the lifecycle machine's transition table
Every other Part A machine lists its transitions with guard, enforcing
code and Part B rows; the lifecycle record I/O machine had only its
diagram. Also name DeletePlacement and DeleteVolume beside RemoveNode in
the open gap: none of them syncs the directory after removing a record.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: scope the manual's lifecycle exit policy to the stores it covers
Only the node, placement and volume stores have the fail-stop handler.
State that deletion-reservation and workspace-binding write failures
return the error without exiting, and that an uncertain binding store
needs a restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: test the import's syncfs selection through the production selector
TestSyncfsFilesystemGate checked the filesystem predicate directly and
the selector only with an unreadable directory, so a selector that took
syncfs after any successful Statfs passed. A test hook now rewrites the
filesystem type a successful Statfs reports; an import into a readable
directory reported as overlay must sync each file, and its ext4 twin
must issue one syncfs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: report import durability for the node and placement store directories
Startup probed the lifecycle root, but the node and placement imports
select syncfs from their own nodes/ and placements/ directories, so a
subdirectory on a separate mount could report one path and use the
other. Each store now reports the mode its import selects, startup
prints both, and nothing is printed without a lifecycle store.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: list the syncfs selector and per-store mode tests in the ledger
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: pingqiu <pingqiu@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: red: a snapshot delete is published over a page whose data was freed
Two overlapping runs of one snapshot delete write their intent pages under
the same tag. If the first run's stalled page update lands between the
second run's read of a page and its adoption (after a cleaning pass
deleted and the second run re-staged the page), the second run adopts and
publishes an intent whose page data was freed: later snapshot deletes on
the volume are refused and its cleaning stops.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: a snapshot delete re-reads each intent page after adopting it
Publication reads every intent page, adopts it under this run's tag, then
publishes. A stalled update from another run of the same delete can land
between that read and the adoption and put a deleted page's data reference
on the entry. Reading the page again after the adoption, before the
transition publishes, refuses that case: once this run's tag is on the
entry, no such update passes. No persisted change; a run that hits it
stays refused, and a new request id writes new pages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: ledger row for the intent page re-read
INV-SNAPSHOT-DELETE-ADOPT-002 names the re-read after adoption, its test
and the model row it projects (PublishedReadable; the refused run is the
residue a new request id clears).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the intent page re-read: typed refusal, twins and a store witness
Review: the re-read test now separates the guard from weaker ones. A page
that reads but holds other bytes, and a change to only the later of two
pages, are refused as well as a freed page; the refusal is a precondition
that writes nothing to HEAD, keeps the snapshot, and comes after the
adoption; the same schedule with intact bytes publishes. The test is a
consequence-level projection; a store-level witness shows the tag-only
metadata update writing a deleted object's chunk over a re-created one,
which the re-read does not depend on refusing. The ledger row names the
witness and marks the model as checked outside the repository.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the intent page re-read keeps its error's cause
The refusal wrapped the re-read's error with %v, so a caller deadline
that ended the re-read reached the CLI as a precondition ("page changed
during adoption", no_progress) instead of deadline_exceeded, unlike the
same deadline on the chain's first read. Wrap both errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the intent page re-read sees only data the filer already freed
The filer frees a deleted entry's chunks, and the chunks an update drops,
from its deletion queue: polled every 1.123 s, and retried after 5 min
when a volume server does not answer. A stale update that puts such a
reference on an adopted page therefore reads back intact while the
deletion is still queued, and the intent publishes over data that is
freed moments later. The intact-bytes twin publishes for that reason.
State that bound in INV-SNAPSHOT-DELETE-ADOPT-002 and at the guard
instead of "changed or vanished ... refuses the publication".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the delete intent publication row and diagram carry the re-read
Part C rule 2 moves a changed guard's Part A row and diagram with it.
The publication row now names the re-read after adoption and
INV-SNAPSHOT-DELETE-ADOPT-002, and the M9 diagram gains the transition's
idle and snap self-loops, which it lacked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: red: a stale adoption or mark lands on a re-created object
A metadata change writes the looked-up entry back, chunks included,
conditional only on its tags: paused between its lookup and its update, it
lands on an object deleted and created again with the same tags in between,
puts the deleted object's chunk on it, and a cleaner's stale mark then
deletes it. The filer's IF_CHUNKS_EQUAL condition refuses such a write.
This commit adds the plumbing and the tests, not the guard itself:
- the filer protocol subset gains WriteCondition (IF_CHUNKS_EQUAL) on
UpdateEntryRequest; SWFS sends it through UpdateEntryIfChunks, and the
fakes evaluate it (or drop it, as an older filer does);
- a startup probe sends a mismatched conditional update to the disposable
probe HEAD; only a definite refusal turns the guard on for the stores the
catalog opens. The startup log and /status/chunk (metadata_guard) name it.
The two guard tests fail here: changeMeta does not send the condition yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: metadata changes send the filer's chunk condition
With the guard on (the startup probe saw the filer enforce it), an
adoption or mark sends IF_CHUNKS_EQUAL with the looked-up entry's chunk
fids. A re-created object always has a new chunk, so a stale whole-entry
write is refused instead of putting a deleted object's chunk on it; a
cleaner's delete expects its own mark and so follows. Without the guard
the write is unchanged and the intent page re-read stays the check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: ledger rows for the chunk condition and its probe
INV-LAYOUT-META-CHUNKS-001 (adoption and mark under IF_CHUNKS_EQUAL) and
INV-WS-CHUNK-CONDITION-PROBE-001 (the startup probe decides it, the log
and /status/chunk name it); ADOPT-002 names the renamed store test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the chunk probe without a definite refusal leaves the guard off; fallback wording
Review: the existing failure cases stop at the HEAD gate. New cases pass
the gate and then fail only the chunk condition probe (unavailable, lost,
deadline, filer error, vanished entry, failed HEAD read): the catalog, its
stores, the startup log and the usage all stay on page_reread_only.
page_reread_only now reads as enforcement not established, not as a filer
without the condition; INV-SNAPSHOT-DELETE-ADOPT-002 cites MetaABA r2's
delayed-free counterexample, r1 kept as historical scope.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
* seaweed-block: preserve unchanged imports and batch durable publication
* seaweed-block: name the rejected entry in a startup import error
The batch import returned the bare validation error, so a bad cluster-spec
node or placement seed stopped startup without saying which entry. The
per-entry RegisterNode/ApplyPlan loop named it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: name the import path in the freshness row and registry guard
Startup now replays nodes through ImportNodes, not RegisterNode; list it
where the freshness invariant and the registry-writer guard name the
writers. Drop a doubled blank line in the operations manual.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: poison a lifecycle store only on a persistence error
A node registration whose SeenAt cannot be encoded failed before any file
I/O, but RegisterNode latched the marshal error and every later mutation
returned ErrLifecycleRecoveryRequired until reopen. Latch only a
RecordPersistenceError, as the volume store already did.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: keep a node's SeenAt when its declaration changes
registrationLocked kept SeenAt only for an unchanged declaration. A
restart that changed a node's declared pools or address stamped the
current time, so a silent node passed the stale-observation check. A
declaration without an observation time now keeps the stored one; a new
node still gets the current time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: use the import syncfs only on filesystems that report its errors
The batch path was chosen from the kernel release alone. On overlayfs,
syncfs checks the overlay superblock's writeback errors, not the upper
file's, and on FUSE it does not send FSYNC to the daemon, so an import
could publish records whose data never became durable. Select syncfs
only when the records directory is on ext4, xfs, btrfs or tmpfs, and keep
per-file fsync elsewhere. The startup line now reports the path for the
lifecycle store, after it exists.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: assert the imported values before the reopen check
The import step control compared the store's snapshot with a reopen, so
an import that synced and renamed but committed the old values passed.
Check the changed and unchanged values before and after reopen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: check both views after a removal retry
present() returned record && snapshot, so a removal that cleared only one
view passed the final check. Report both and require both absent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: assert the one-second fail-stop bound
The blocked-logger control checked only exit status 1 inside a four-second
child timeout, so a longer exit timer still passed. The child now reports
when it triggers the failure, and the parent requires exit within the
one-second deadline plus one second of scheduler tolerance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: add the lifecycle machine's transition table
Every other Part A machine lists its transitions with guard, enforcing
code and Part B rows; the lifecycle record I/O machine had only its
diagram. Also name DeletePlacement and DeleteVolume beside RemoveNode in
the open gap: none of them syncs the directory after removing a record.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: scope the manual's lifecycle exit policy to the stores it covers
Only the node, placement and volume stores have the fail-stop handler.
State that deletion-reservation and workspace-binding write failures
return the error without exiting, and that an uncertain binding store
needs a restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: pingqiu <pingqiu@users.noreply.github.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: the observation host reads the store clock under its lock
The rebuild loop read the store's clock source without the store lock
while SetNowForTest swaps it under that lock, so a test that swaps the
clock on a running host raced the loop arming its deadline timer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* seaweed-block: test swapping the clock on a running observation host
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Replaces internal identifiers in seaweed-block/ docs, specs and comments with neutral wording. Wording only: no code behaviour, test assertion or spec meaning changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings seaweed-block main (v1.1.1 plus the docs and a test fix after it)
into seaweed-block/ as one commit. Only files under seaweed-block/ change,
and the subtree equals seaweed-block main exactly. The module's full
history stays in the seaweed-block repository.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same change as the module's upstream commit b9ee7f1c (#1011), applied
under seaweed-block/: an oversized StorageClass replicationFactor is
refused as InvalidArgument instead of wrapping on conversion. Ships in
seaweed-block v1.1.1; a later sync carries the identical change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Interim merge note (spec trace workflow startup_failure on all branches since 22:45Z): branch updated to current main (69c5c6bd); go test (linux) and process-level tests (real binaries) passed on 69c5c6bd; spec-trace-check.sh and public-text-check.sh run locally with the base branch's scripts against this head and body: both pass (Model line now also cites FormatGate.Report for core/host/master/services.go, mapped since the PR was accepted). Code review ACCEPT on e1ed5073; the 1 TiB loaded first-cut measurement on current main passed on both volume formats.
Interim merge note (spec trace workflow startup_failure on all branches since 22:45Z): go test (linux) and process-level tests (real binaries) passed on cc3a8a6c (run 46997615891); spec-trace-check.sh and public-text-check.sh run locally with the base branch's scripts against this head and body: both pass. Code review ACCEPT 6161155789; model review ACCEPT 6161515202 (per-call read/trace follow-up recorded there).
The cleanup keeps both worker handles in scope: it ends the admitted
write and releases the hold, then joins the hold worker and, if started,
the held extent-write worker, each bounded with a reported timeout, and
closes stop only after the joins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A cluster-spec import homes a volume both as a placement and as a
topology slot, and a move rewrites neither: the placement branch now
also yields to a line a move minted on another host. The test moves a
volume homed both ways; a control checks the home before any move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gate test runs in a bounded child, sees each side reach the contested
boundary (the hold pending on the gate, the new extent write counted as
waiting) before asserting, and releases and joins on every exit. A new red
holds a capture reader without WAL pressure: the barrier must give the
hold up while that reader is still held and report barrier_busy. A new
control fails the held last pass's own sync (a test-only fault seam) and
requires that error, a released hold and extent draining again; the
cancellation control stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The O_DIRECT descriptor is used only when it is the same file as the
store's descriptor (os.SameFile); a replaced path is never written. The
tests qualify an aligned O_DIRECT write in their directory and fail on
Linux when it is refused, and the flush-fault test registers its cleanup
first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PreSyncRounds, TailBytes, TailOverBound and TailCause join the cut body,
which mirrors the storage cut stats field for field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
volumesServedBy counted a topology volume's home slot whenever its
replica matched the line, also after a move had minted the line on
another host. A moved line now counts only on its owner; the home slot
counts only for a line no move minted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A guest write waiting at the WAL hard mark holds the capture lock's read
side while it waits for the flusher, and the cut's hold stopped the
flusher until after the barrier took that lock: the write failed at its
admission budget. The barrier now only tries for its lock while the hold
is on (5 ms); at the hard mark, or when the try fails, it releases the
hold first and takes the lock normally, and the cut reports TailOverBound
with TailCause. Before the barrier a held extent write also goes through
while a writer waits at the hard mark.
The hold is now a read/write gate around each extent write and its
count: holdExtentWrites returns only after admitted writes have landed,
so the last pass's baseline misses none. A cut whose context ended in an
unheld pass returns before taking the hold.
Tests: two hard-mark reds and a failed-cut release test in bounded
children, a gate test, bounded writer joins, a deterministic unreachable
bound, and proof that a flusher cycle reached the held pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TailBytes now runs from the start of the last pre-barrier pass to the
barrier lock, since the pause flushes all of that. A loaded cut right
after a fill, with the flusher draining, did not converge: a flusher
cycle landing in the last pass left the pause about 4 MiB to flush. The
last pass now runs with new flusher extent writes held until the barrier
is released (one pass and the pause; the cut needs the WAL only up to H),
so the pause flushes the guest's WAL tail alone. The flusher waits
before an extent write, holding no store lock, and stops waiting when it
is stopped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At format level 1 and above, each server holding a volume whose process
for it reads below the level gets a volume condition (reason
binary_too_old, with the server and its report level): its holder only
sees no assignment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each 1 MiB fence slice writes its aligned bytes O_DIRECT (Linux, where
the filesystem allows it) and is fdatasynced before it counts as
recovery progress, so a fence on a shared, capped disk no longer waits
behind other writers' page writeback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A held volume whose process has been silent past the freshness window is
listed by the finalize (stale report); the grant and placement checks
still read the kept entry and refuse an old one. The restart test keeps a
sibling process at level 1 so the grant cannot borrow its report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pre-barrier sync repeats until the store-file bytes dirtied during
its last pass (WAL appends and extent writes) are at most a named bound
(1 MiB), at most 6 passes and while the cut is live; past the last pass
the cut proceeds and reports the tail above the bound. LastCut reports
PreSyncRounds, TailBytes and TailOverBound.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first loaded cut after a fill paid the fill's write-back in its one
pre-barrier sync, and what the guest wrote meanwhile became the pause's
own sync work, growing with the fill. The pre-barrier sync now repeats
while a round takes longer than 10 ms (above one device flush), at most
6 rounds and while the cut is live: the pause then flushes only about one
short round of writes, whatever the fill. Status reports the rounds
(LastCut.PreSyncRounds).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A holder that restarts on an old binary adopts no line issued for its
dead process, and the re-issue for its new incarnation is refused at the
publication boundary (binary_too_old): the line keeps naming the dead
process. The control restarts on a binary that reads the level and gets
the line re-issued.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The finalize is refused only while a live report of a process holding a
volume reads below level 1. A held volume with no report, a host with no
report and an old process holding no volume are listed in the answer
(FinalizeFormatResponse.unconfirmed, and unconfirmed.<id> metadata on a
refusal) and in --json as listed; they do not block. The durable last
level and its marks are dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The holder's maintenance now consumes a published delete intent, so a
delete behind an earlier one resumes once its intent is consumed. The
model-code trace keeps both sides' new rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
node-a's level write failed during the window too, so it stayed unkept and
the final finalize rightly refused it; its next heartbeat now keeps it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sync.Once blocked the second keeper inside the hook too, so a missing keep
lock could still pass; the first caller is now taken with a compare-and-swap
and later ones pass straight through.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes. When the --json answer cannot be written, retire-host and
finalize-format exit 1 instead of 0. A retire whose record removal failed
answers Internal (the CLI's failed, exit 1), not FailedPrecondition (refused,
exit 2); the node store's test hook can fail a removal for the control.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>