pubMu is held across a page's snapshot and write, and across the header, so
no writer lands an older page after a newer one. A transition into a known
hash needs the hash; a commit needs the hash its cut captured to still be
the chunk's, else it is refused as stale; an ignored event keeps the hash; a
refusal changes nothing. The constructor copies its inputs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reds: a parked page writer lands an older snapshot after a newer one; an
ignored fill replaces the hash, a hash event without a hash makes it known,
a stale captured hash commits; the caller's slices alias the state. The
evict control fails instead of skipping, and the refused edge pins effect,
hash and dirty accounting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every chunk's state in memory, changed only through the kernel. Every event
dirties its page (a write that keeps the state still moves the chunk's store
position); an evict writes its page before Apply returns, so the bytes are
dropped after it. Pages are written on their own schedule (a count of
changed entries or an age), valid through the applied position the shell
raises after each write's Apply; Flush writes the header only when every
page is clean after the page writes. WriteThrough writes the dirty pages
below a chunk, for the upgrade pass. No caller yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A companion of INV-CUT-ERROR-PRECEDENCE-001 (whose statement is at its
length limit): a catalog transition that lost its conditional HEAD write
reports head_conflict, never internal, and decides last. Its tests are the
two delete-race regressions and the typed table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 77fa10070e)
The layout.ErrPrecondition case moves to the last position before default,
so every other cause an error carries decides first, the non-retryable
ones (closed, detached, frozen detach unsupported, an invalid freeze
budget, not a chunk volume) included. Controls: each joined with the
precondition reports its own code; with the case moved back to its
earlier place the closed, detached and frozen-detach rows fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 64eddb3484)
chunkErrorCode maps layout.ErrPrecondition (a catalog transition lost its
conditional HEAD write to another writer, such as a cleaning's begin) to
head_conflict, 409, retryable, as it maps the engine's HEAD precondition.
It answered internal before. The case sits with the HEAD-precondition one,
after every terminal and uncertain cause, so a joined error keeps its
precedence. The operator guide and the v1.0.1 notes say to retry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3a5de69079)
The holder's cleaning begins between a snapshot delete's HEAD read and its
conditional write: the delete fails on the HEAD precondition, nothing of it
applies, and a retry completes. Red: the refusal maps to 500 internal, not
retryable; under a persistent conflict every attempt is internal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 031312357b)
As the model has it: a page found damaged at open is rebuilt and the pass
rewound before Run; Rewind after Run has started is refused. A page found
damaged while the process lives is rewritten from memory, with no cursor
change. A rewind whose cursor cannot be written latches the pass: Rewind,
Run and page writes are refused and Admit refuses until reopen. The page
lock and the walker generation are removed: no rewind can meet a walk.
The random interleaving test, reworked to this design, failed at seed 20
without the latch (a rewind failed at open, then the page was rewritten
from memory as unknown under the old cursor); green with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pageMu is held across a write-through (an outstanding rewind's publication,
the page write, the cursor after it) and across a rewind (the caller's
rebuild in memory, now a callback of Rewind, and its publication), so no
page write is in flight while a rewind is made or unpublished.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The persisted cursor is only ever min(the earliest rewind not yet published,
the last position whose pages were written through), and no page is written
while a rewind below the persisted cursor is unpublished: advance publishes
an outstanding rewind before its write-through. A rebuilt page is written by
the caller only after Rewind returns nil.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A seeded random mix of partial walks, page damage with rewinds, failed page
and cursor writes, and crashes with reopen: every chunk behind the persisted
cursor must be compared and written, or its page still damaged on disk. And
the review's witness: a failed rewind to 20, a walk through 20..29 without a
write-through, then a rewind to 60.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A rewind whose cursor write failed leaves the walk position at its chunk; a
later rewind to a higher chunk writes that position, not its own, so a
reopen never skips the chunks of the failed one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run refuses a second walker. A rewind moves a generation: a compare begun
before it does not move the walk position past the rewound chunk, and a
persist begun before it keeps the lower cursor. Rewind closes admission and
moves the walk position before writing the cursor, so a failed write leaves
the pass refusing and the next Run writes the lower cursor. Work counted
since the last persisted cursor lives on the pass, so a cancelled or failed
Run's count is kept by the next one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reds: a rewind whose cursor write fails leaves admission open; a second Run
walks beside the first and a rewind during a compare is overrun; work
counted but not persisted is lost on a cancel or a failed write. Also a
pause control for the rate limit and the refusal's text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After the upgrade every local chunk's hash is unknown. The pass walks the
chunks with a cursor, persisted only after the pages of every chunk behind
it; a restart continues at the cursor; a rebuilt page moves the cursor back
to its first chunk, persisted. While it runs, a request that needs every
hash known is refused at once with in_progress and the pass's progress, and
a waiting request lifts the pass's pause. No caller yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A workflow_dispatch from a branch would still write :alpha. The publish job
now runs only when the ref is a v* tag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v1.0.1 known limit and the standalone restore steps said fetched chunks
are fetched again after a crash; a restored volume that has only been read
takes no checkpoint, so it fetches all of them again after any restart,
clean included, until a write or its next checkpoint records them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3759fae784)
main now carries the next minor version in development, which will bring a
one-way store format change. Publishing on each push to main would move the
public ':alpha' and 'sha-*' tags to those development builds. Images are
published only for version tags (and manual dispatch) until the image tag
policy for development builds is decided.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The refusal must be an executed line, RUN bash scripts/refuse-lab-binary.sh,
after the recipe's last go build and naming every binary the recipe builds
(go build ... -o /out/NAME); a comment no longer counts. Each recipe and the
publish workflow is read once with a checked read, so a read error fails
instead of reading as no match; failures go to stderr. The controls now
start from copies of the real recipes and publish workflow: the guard
deleted with its comment kept (both recipes), commented out, a built
binary left out, a new binary not refused, the refusal before the build,
and an unreadable recipe (Linux), each refused for its own reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lab build's revision carries LAB BUILD(swblock_lab_bigvol), so -version and
the volume's /status show it. Every image Dockerfile runs
scripts/refuse-lab-binary.sh right after its go build: a binary that is a
lab build, or cannot answer -version, stops the image build, so neither
the publish workflow nor the image scripts can push one. lab-tag-check.sh
now fails closed: an allowlist of the files that may name the tag (git grep;
a scan that cannot run fails), plus the wiring (each Dockerfile refuses
after its last build; the publish workflow builds only from those, with no
go build of its own). Controls cover each contamination and the refusal
script's stand-in binaries. The lab headroom test asserts the warning, and
both invariant rows name the lab exception.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The swblock_lab_bigvol tag lifts the 256 GiB create cap to the format's own
limit (16 TiB - 4 KiB) and turns the local headroom refusal at create into a
warning, so the scale rehearsals can create sparse volumes larger than the
release allows and than the disk. A release build is unchanged and pins
that (TestReleaseBuildKeepsTheCreateCap). CI refuses the tag under deploy/
and in every workflow but test.yml (lab-tag-check.sh, with controls), and
tests the lab build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>