Sampling r1's epoch and then waiting for that exact epoch failed when a
further round moved it in between. waitRejoinConverged polls until r1 is a
healthy primary at some epoch e >= 2 and r2 and r3 are healthy peers at the
same e, read in one pass, and returns e.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the scratch-cut exemption holds only while the chunk keeps the version
the scratch cut captured; a stale capture grants nothing
- TestMain has no switch that turns the strict findings off
- the raced-fill test bounds every wait and always releases and joins
its reader
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After its 6 s pause the resumed primary can answer the promotion gate's
probe not ready on a loaded host; the gate then runs one more fencing round
and continues r1 at the next epoch. The test waited for healthy peers at
epoch 2 only and failed (run 46515001535: r2 and r3 healthy at 3). It now
waits for both replicas healthy at r1's current epoch (at least 2), checks
that r1 is still the primary and that no replica was promoted, and reads
blocks A and B back; a further round is logged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parent no longer claims, so its claim map stays empty and -count=2
passes; a hold helper keeps the claim until its stdin closes, a try helper
reports taken or refused, and both run under a local deadline and are
reaped. Held: refused to another process; after the holder exits: taken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lock file created by one runner user (0644 under umask 022, never removed)
was opened read-write by the next user and refused with EACCES, locking its
port out for good. flock needs no write access: open read-only, create
0444. Only EWOULDBLOCK means another process holds the port; any other
claim error is reported once, with its path, and the port is left to the
listen probe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two defects that #833 introduced, each shown by a test that fails at
f5926348:
- a format-2 bitmap baseline outlives a discarded WAL suffix
(Recover returns nil with bitmap position 1 while the retained
position is 0);
- the legacy FenceChunkStateUpgrade relabels an initialized format-2
bitmap epoch (7 -> 8).
The fixes exist but are not yet qualified on Linux. Main goes back to
its state before #833; the feature returns as one PR with the fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Heap per chunk after a cut, 262,144 chunks: stated 520 B in total and 56 B
for the shadow's share (measured 481 and 48).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two CI jobs on one host (tp04 runs two runners) each run shards 1 to 4, so
their shard slices of the test port ranges are the same: a port one job
probed free could be bound by the other before its blockvolume did, and
the child exited with status 1 before it was adopted. Every port picker now
also takes a host-wide flock on /tmp/swblock-test-port-claims/<port>.lock,
held for the test process's life (the kernel drops it at exit). A child
that exits, or does not log in time, now fails the test with the tail of
its own log.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the barrier check scans only the engine's candidates; the full scan of
the record is test-only
- a pending proposal's captured chunks are committed in the record at
the settlement that finds it landed (resolvePending, SettleDetach)
- extra record candidates are findings across the whole package's tests
- M5 diagram and table show the foreign-root fence
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chunk record (chunk-kernel/2) runs beside the engine's maps: every
write, fill, cut hash, commit and evict reaches it through the kernel,
and each cut's barrier checks that the record names every chunk the
engine captures. It decides nothing and writes no page yet.
A HEAD that moves the chunk root without superseding this holder now
fences the layer (errChunkForeignRoot).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stable tag moves :alpha only when it is the highest vX.Y.Z tag, so a
later patch on an older line never moves :alpha back. A tag that is not
vX.Y.Z or vX.Y.Z-pre fails the run instead of publishing. The checkout
fetches tags so the comparison sees them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only a stable-line release tag (vX.Y.Z, no pre-release suffix) moves the
public :alpha and sha-* image tags; a release candidate (vX.Y.Z-rc.N)
publishes its version tag alone. The workflow also runs only on version
tags and on a manual run from a version tag, never on a branch push.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
boundedManifest (the attach-fetch HEAD read the cut's settlement uses)
counted no root or segment read: each successful fetch is now counted as
it completes, so a later failed fetch keeps the earlier ones. Controls: a
real GetHead under WithAttachFetch counts 1 root and 3 segments on three
shards, and 1 and 1 when shard 1's fetch fails. The lost-answer test
asserts the disjointness that always holds (ManifestNs + HeadReadbackNs <=
TotalNs; the old sum exceeds it by the re-read's 100 ms) and that the read
counts include the re-read's, instead of a timing bound on the check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each wait is at most 10 s and never past the test's deadline less a reserve;
a cleanup attempts every pending join, then reports the ones that timed out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: ManifestNs summed every manifest span of the attempt, so a HEAD
re-read after a lost answer (inside HeadReadbackNs) was counted twice. It
is now the manifest work measured across the commit check only. The
write counts were whole successful ensures: a store wrapper now counts
each acknowledged create of a root or segment, with its bytes, as it
completes; an object already present sends and counts nothing, and a
failed commit keeps what it sent. Tests: a lost-answer cut keeps the slow
re-read out of ManifestNs (with the old sum it reads 60 ms in both);
three-shard full and by-change commits match byte totals computed from
the layout; a failed root send keeps the segment, and the retry sends only
the root.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failing path that already took a worker's result no longer leaves the
cleanup waiting on an empty channel; the evict-without-lock mutant now
fails at once instead of timing out in cleanup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>