The self-hosted runner keeps GOCACHE/GOMODCACHE on disk; the setup-go post
step uploading them (~4 GB) outlasted the 25-minute job timeout after all
tests had passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The extension write is held only when every eligible volume (and the
clean volume) has positive host validity at the frozen instant, read from
its own renewal view; under the hold every renewal started before the
writers must grant (any refusal fails).
- The clock is frozen through the set-up binds (fsync writes could outlast
a TTL and expire the first-bound volume before its renewer started) and
from the hold until the clean volume's revoke ACK (queued behind every
extension write); it then resumes from the frozen instant.
- The clock unit test registers stop + a bounded join before its readers
start, so every exit settles them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fold (codex01, test only): the frozen check, time.Now and the offset
were separate reads, so a reader paused across freeze+release could see the
clock go backwards. leaseTestClock serializes Now/Freeze/Resume/SetOffset
under one mutex and never returns an earlier time than a previous Now.
TestLeaseTestClockMonotonicAcrossFreezeResume runs readers across 50
freeze/resume transitions. The held-entered and under-hold progress waits
get 30 s real-time failure exits (never a pass); the cleanup releases the
hold and joins every worker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestWorkspaceLeaseConcurrentRenewalsWritersExtendersClose hung ~9m40s in a
loaded qual run (goroutine dump: one extender held in the store hook, four
queued on p.mu, renewers looping, the test in the progress loop). Cause: a
test bug. The test's publisher clock was real time with a 2 s TTL; while the
held extension write holds p.mu no horizon can move, so a late test
goroutine let horizons expire, renewals were refused, and the progress
condition (a grant under the hold for every eligible volume) could never
hold. Not a product stall: renewals never waited for the store.
The clock is now frozen while the extension write is held and resumes from
the frozen instant at the release (no jump over a horizon), so extensions
again run in real time alongside the writers and Close. A 3.5 s late test
goroutine after the hold is now part of the test; without the freeze it
fails ('revoke ACK: lease expired').
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fold of the #260 review:
- the target endpoints get the binding endpoint rules before admission
(host:port, numeric port 1..65535, data and ctrl distinct), without
registering anything: a host match alone admitted ':0', ':65536', a
non-numeric or empty port, or identical data and ctrl, and the move
would have issued and cleared the source lease;
- host parts compare in canonical form (equivalent IP spellings);
- the refusal log runs after workspaceMu is released;
- the comment no longer calls the host match a proof; the invariants
ledger gets the move-admission row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A volume without per-volume bindings could move only to the target
node's single registered address pair, which models one slot per node: a
host serving several slots refused every move whose target landed on a
slot other than the registered one (slot 1 while slot 0 is held). The
target now needs both endpoints on the node's registered hosts (literal
host part, any port, no name resolution), and the existing collision
check still refuses endpoints another live assignment or binding owns.
Volumes with per-volume bindings keep the exact binding match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MoveWorkspace refused four different conditions with one message and no
log line: an unknown source, an unregistered target node, a target that
is the source, and target endpoints that are not registered. Each now has
its own FailedPrecondition message, logged with the volume and request.
The endpoint refusal also says what is registered: the node's own pair
for a volume without per-volume bindings, else its live bindings on that
node (a slot-1 target on a node registered at slot 0 shows up here).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fold (codex01 r4 residual P1): the post-rollover check still preceded
w.append's descriptor snapshot, writer lock wait and encoding; a concurrent
Sync's slot write can hold the descriptor lock (without the store lock)
until the command expires. walWriterV3.append now takes the budget and
checks it after those waits and the encoding, before the first physical
write (no cancellation of a write already started). Red test:
TestWALStoreV3WriteBudgetRefusesAfterDescriptorWaitBehindSync (a real Sync
parked at its leader point, released after the write's rollover snapshot,
holding the descriptor lock in its slot write until expiry).
P2: codex03's TestWALStoreV3WriteBudgetRechecksAfterRollover (real pinned
fallback, rollover slot I/O held/faulted; expired/healthy/fault) and
TestWALStoreV3LocalBudgetIncludesWitnessedCaptureWait from his local
amendment evidence; test cleanup joins are bounded; the invariant ledger
names the current tests and the short-lock/writer-budget rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes over codex03's fix/write-command-budget at 2d6d9711.
- P1 (codex01): appendWriteV3 / writeBatchV3Locked take the command budget
and check it after rolloverCheckpointV3Locked (its metadata I/O completes
and stays owned) and before the payload append, so an expired command
never starts new payload WAL I/O. Red test:
TestWALStoreV3WriteBudgetRefusesNewPayloadAfterRollover (single, batch).
- P1 (claude05/codex01): the short locks (s.mu in Write/WriteBatch and the
pressure sampler's s.mu, descMu, writer.mu) are taken blocking again, so
they keep RWMutex writer preference; the budget is checked once they are
held. Only captureMu/lifecycleMu keep the bounded wait. Red test:
TestWALStoreV3WriteKeepsWriterPreferenceUnderReaders. The polling-era
lock tests become TestWALStoreV3ExpiredWriterRefusesAfterShortLockWait.
- P1 (codex01): a batch that returns a committed prefix plus a storage error
keeps that error when a required observer then fails: the classifier sees
both causes (errors.Join), so a physical fault stays terminal. Red test:
TestStorageBackendPartialBatchPhysicalFaultSurvivesObserverDeadline.
- P2: the contextless Write/WriteBatch fallbacks refuse an already-expired
command before a fresh mutation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the conflict in the ProviderConfig comments: keep main's new DetachFreezeTimeout field and the corrected ChunkDirtyThreshold comment.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Fold of the #255 r2 review:
- the lost-range methods are part of AuthorityStore instead of an
optional capability, so no store (and no wrapper embedding one) can
issue a forced move without recording its range;
- a pending forced reservation resumes only with the exact range recorded
before it; a missing one is refused, never recomputed (a new request
records a fresh range);
- fault hooks inside the file store cover a failure before the rename and
one at the directory sync.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fold of the #258 review:
- the probe opens the volume once, locks that descriptor first, then
identifies the same open file as v3: a path replaced between two opens
can no longer yield a false unheld, and a locked file is held whatever
it is;
- locking before reading also fixes Windows, where an owner's byte lock
refused the probe's earlier read (it reported unknown, not held);
- the test reaps its holder process on every path; the CLI test closes
its store unconditionally;
- the usage text adds that the probe is momentary and reserves nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fold of the #255 review: a field in the record changed its checksummed
body, so a binary that predates it skipped the whole record and reloaded
the volume unbound. The record body is now unchanged. The forced move's
lost range (kept HEAD frontier, forced barrier) goes to a per-volume side
file that authority loaders never read, written atomically before the
move record; an entry without a matching issued move is ignored. A failed
range write refuses the move. The admission keeps its two original
predicates; the audit bound is computed separately.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ProbeVolumeUnheld takes and releases the exclusive, nonblocking advisory
lock that every v3 owner holds while its store is open; the kernel drops
it when the owner process exits. nil means no process on this host holds
the volume; ErrVolumeHeld means one does; anything else is unknown (a
non-v3 file is refused: its owner would not take the lock).
`sw-block ops volume-unheld --path P` exits 0 only when unheld (1 held,
2 unknown). The proof is per host and for local filesystems only; host
cleanup must also check that the owner process is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A candidate prepared successfully and then refused because its proof
went stale during the prepare's I/O was left in flight until reopen;
both preparation paths now release it before returning
ErrMapCoverageStale.
A publication whose slot write and fsync succeeded but which a fault
latched meanwhile refuses at its success boundary may still be named by
the slot on disk. It is now recorded as uncertain, so its candidate
stays pinned until reopen instead of being released for reuse.
The map's file-size counter now follows every write and truncation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New map pages and roots go into 4 KiB extents that no live root
references, lowest first, instead of always being appended. Live roots
are the roots named by the two descriptor slots and every prepared
candidate not yet published or superseded. After each publication the
publisher reports both slots; an extent is released only once neither
slot's root references it. New pages and the root are fsynced before a
publication names them. The free tail is truncated when the file
exceeds 4x the live bytes. The on-disk format is unchanged.
WALStore.ChunkMapStatsV3 reports the file bytes, live bytes and
truncations.
Fixes#236.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A forced move abandons the old holder's writes after the HEAD frontier
it keeps (already recorded as RemoteLSN). The record now also carries
LostUntilNS: the forced barrier (lease horizon or restart deadline,
whichever is later, plus skew), the latest master time at which any of
those writes can have been acknowledged. It is journaled with the
record; clean moves leave it unset and keep their encoding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>