- A test-only hook right before the capture barrier's Lock request; the
pause tests hold the barrier shared for 300 ms after that handshake (not
after admission plus a sleep), so the cut provably waited at its Lock and
pre-barrier time is excluded.
- The helper releases the shared hold on every path (also on a failed
assertion) and joins the cut within a bound.
- Design docs: barrierPauseNs runs from the Lock request and includes
lockWaitNs.
Mutants (declared, 4/4): pause timed after the Lock, lock wait unset, body
drops the field, the hook fired after the Lock (no handshake).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Tests: the copier's HEAD fill (after it released the entry) is
cancelled by an aborted cut and the window drains; a held fill is
bounded by ReadMissTimeout and aborts the cut; a lazily-absent saved
chunk that spills keeps its missing list and the image is exact.
- C3 waits for an actual writer-entry handshake (the writer parked on the
copy entry) instead of a 200 ms non-completion window.
- Comments: the happens-before of e.missing (published by finish), and
the lazy-HEAD saver test describes the local-only save.
Mutants (declared): fill ignores the window's end, fill without
ReadMissTimeout, missing list kept only for in-memory saves; the earlier
five now also turn the new fill/spill tests red where they should.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BarrierPauseNs started after captureMu.Lock returned, so the wait for
writers already holding the capture barrier shared (e.g. parked in WAL
admission) was not counted, although a pending Lock already blocks new
writers: the reported guest pause understated it.
The pause is now timed from the Lock request, and LockWaitNs reports the
wait for the shared holders on its own (also in the /chunk/cut body).
Tests: a cut whose barrier is held shared for 300 ms reports a pause that
includes the wait (red on main: about 24 ms) and a LockWaitNs of about the
hold, inside the pause before the sync. Three declared mutants (pause timed
after the Lock, lock wait unset, body drops the field) each turn exactly
their declared tests red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A cut candidate chunk that is lazily absent but has local writes stays a
candidate. Its first writer inside the copy window saved the chunk
synchronously through Read, so every non-local block became a remote fetch
bounded only by ReadMissTimeout (30 s), and every writer queued behind that
chunk waited on it; an abort did not cancel the fetch. The in-window copier
had the same shape: writers to a chunk it was copying waited on its fetch.
The COW save and the in-window copy now read LOCAL blocks only (dirty
map/WAL, the extent of present or locally written blocks, zeros for a chunk
HEAD stores as ZERO) and never call the miss hook. A lazily-absent block's
image at H is HEAD's by definition: it is listed as missing, and the copier
fills it from the cut's base HEAD after it has released the entry, off the
write path (bounded by ReadMissTimeout and the window's end).
Tests: the lazy-HEAD saver test now holds every remote fetch once the window
is open and requires the saving write to finish without one (it asserted the
blocking fetch before); C3 holds the in-window local copy instead of a fetch
and requires the write to complete with the remote held, the copier's HEAD
fetch coming afterwards. Five declared mutants (blocking read, absent block
read as local, no fill, saver drops the missing list, fill under the entry)
each turn exactly their declared tests red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix H and candidates under the short barrier; save pending chunks before mutation.
Drain owners and waiters before cleanup, recovery, reset and close. Preserve
intent/CAS and local durability contracts. Include native caller controls,
existing model correspondence and a real-mount rehearsal note.
TestWALStoreV3StaleLapBytesAtTheWrapAreNotReplayed replays the forged
replay reproduction (docs/spec/README.md, open item 2) end to end on a
mapped v3 WALStore: a guest batch in lap 1 carries a well-formed record
bound to the volume's own nonce at its lap-1 cursor (LSN 999, LBA 7); the
WAL wraps so one newer record overwrites only the batch's start and the
lap-2 scan resumes exactly at the embedded record. The cursor binding
stops the scan there; after a crash and reopen the frontier is the newest
real LSN and LBA 7 is never the forged data. With the lap dropped from the
cursor check the scan admits the record and the test fails.
README: open items 1 (corrupted synced records) and 2 (forged replay) move
to "resolved in v3 (code)", citing the v3 tests. Still open: the mode C
newest-batch residual (silent truncation until an idle refresh or
SetWMode(A)) and the TLA model, which has no nonce/cursor/lap binding
(S3v1_root_lww_I1 and S3f_* rerun on cc5cf09a with TLC 2.19: unchanged).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At RF=1 every local write logged 'replication: OnLocalWrite volume=...
lba=... lsn=... peers=0'; under sustained writes one volume's log grew to
162 MB in 13 minutes and the useful lines were buried. The counters (Stats:
WriteOps, WriteFanoutNanos) keep the per-write evidence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All 27 W4_*/RED_* configurations re-run against the model at 7dd83eb6
(TLC 2.19, BFS): existing passes still pass, the new horizon
configurations pass with failing extension writes and a restart,
RED_hz_noclamp violates HostWithinHorizon as expected, the existing REDs
and witnesses keep their verdicts, the two large and the two "both"
configurations reached their time limits with no violation, and the two
open findings (W4_drift, W4_forced_exact) are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lease.exp is now the published horizon, dhz the horizon on disk and
deadline the latest grant. A renewal of a live lease writes nothing:
grant = min(now + TTL, horizon), refused while uncertain or without
validity, and it may trigger an extension. The extension (MasterExtend)
is an ordinary serialized writer that raises the horizon to
trigger + TTL + HSlack; with ExtFail its write may fail without landing or
after landing, and either way latches uncertain. Revocation, ACK and move
writes are refused while uncertain; a restart reloads the disk horizon and
clears uncertainty. The revoking drain reply is clamped to
min(horizon, deadline). Nondecreasing time is stated as a model assumption.
New invariants HostWithinHorizon and DiskCoversMemory; witnesses
W_NoExtension, W_NoExtLanded, W_NoUncertain. New cfgs W4_hz_* (failing
extensions, clean/forced/both, one restart) and RED_hz_noclamp (no clamp:
EXPECTED to violate HostWithinHorizon) with the control
RED_hz_noclamp_safety (no clamp, split-brain invariants: expected to pass,
the restart rule covers grants). Existing cfgs gain Clamp = TRUE and
ExtFail = FALSE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review folds, tests and docs only:
- The combined concurrency control now requires its schedule: a bounded
handshake holds the first horizon-extension write inside the store
while renewals keep succeeding and the writers and Close are in flight
behind it, then releases it. It counts successful grants per eligible
volume and extension writes classified by content (a raised horizon at
the same epoch, not an ordinary writer's record) and requires both.
- It adds the forced-move arm next to the clean move: the forced volume
is granted at an earlier injected time, so its horizon + skew barrier
has passed when the writers run; the clock only moves forward.
- Held-write controls install their release cleanup before the hold is
triggered, bound every admission and completion wait, and on any
failure release, settle workers with bounded joins and only then close
fixtures.
- Docs: an uncertain volume refuses renewals that would issue a new or
extended grant; a Revoking lease still gets its bounded drain reply,
min(horizon, deadline), never extended, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If another writer created the lease after the renewal read the view, the
first-grant path now returns a retryable error instead of re-entering the
memory path. The host has no deadline before its first grant, so a failed
first renewal does not fence it; its retry takes the memory path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>