HEAD's version followed the manifest size: a v1.1 commit by change over a
HEAD without a recorded size (an upgraded volume's first cut) left it at
version 0, a HEAD a v1.0 binary would read. A v1.1 commit now writes
version 1 whatever it knows of the size (CommitRequest.V11, set by the
layout remote on the v1.1 format), and a version-0 HEAD carrying a v1.1
manifest size is refused like one carrying ext.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under the shipped unit's restart policy, a holder that meets a local store
or a HEAD written by a newer format exits 78 with its reason and is not
started again; the store's bytes and HEAD stay as they were; the control,
a process of the same policy exiting 1, is restarted. Prebuilt binaries
of the same tree can stand in for the build on a host without Go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests that pinned the removed horizon (barrier at the persisted
issue+1.5*TTL, extension writes and their status counters) now use this
process's deadline (or restart floor) plus skew. The golden wm lost range
is the same file: the master restarts half a lease after the issue, so
both versions' barriers are the same instant.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The newer-HEAD-version exit (78 head_newer_version) is chosen before the
master's final reasons, so a startup that also met a final refusal keeps
its exit: moved and deleted stay 78 with their reason, revoked stays 79.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A startup that ends on a HEAD written by a newer version exits 78
head_newer_version instead of the restartable 75 (a restart reads the same
HEAD again), and a fatal open of a store written by a newer format exits 78
store_format_newer instead of 1. The provider latches the newer-version
refusal per recovery, beside the identity refusal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
INV-STORE-FORMAT-NEWER-001: an intact descriptor of a newer store format
is refused typed, and an open refused at slot selection removes no file.
The discard's comment names what it covers: a refusal after the select
(a corrupt map) may still follow it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with STATUS_SCHEMA_UPDATE=1: Chunk.Stats.CutsYielded and
Chunk.CutSchedule.CutYields.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- hostlimit: Config.YieldAfter (S, default 5 min). ShouldYield answers yes
only for a Normal hold at least S old while another cut on the host holds
a live ticket this process has not judged stalled (dead tickets are
reaped on the way); the probe runs only once the hold is old enough and
takes no limiter lock.
- storage: a cut attempt asks at each staging batch boundary and ends with
ErrCutYielded, keeping what it staged; CutsYielded counts it, never as a
failed cut.
- durable: a yielded attempt is retried at the next poll with no backoff,
on a ticket at the back (it was admitted), counted in status (CutYields)
and not logged as a failure.
- blockvolume: --host-limit-yield-after. Invariants: INV-HOST-CUT-YIELD-001;
M7 states the rule. v1.1 notes carry it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seams: Config.YieldAfter (S, default 5 min), Limiter.ShouldYield (never,
for now), storage.ErrCutYielded, storage.BudgetYield, ChunkLayerStats.
CutsYielded and CutScheduleStatus.CutYields.
- TestShouldYieldOnlyAfterSWithALiveWaiter: a Normal hold yields only once
it is S old and another process holds a live ticket; never a lone hold,
never before S, never an urgent hold, not for a ticket judged stalled.
Fails here: no hold ever yields.
- TestCutYieldsAtABatchBoundaryAndKeepsItsStaging: a cut whose budget asks
it to yield ends at the next staging batch boundary with ErrCutYielded,
counted as a yield, not a failure, publishes nothing, and its staged
chunks are kept for the next attempt. Fails here: the cut never yields.
- TestChunkLoop_AYieldIsRetriedAtOnceAndCountedApart: a yielded attempt is
retried at the next poll, never backed off as a failure, and status counts
it apart. Fails here: the retry came 1.1 s later.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The envelope's volumes are checked on the decoded map (a later key of
another case can null it after a key probe), and a v1.0.x file that is
null is read as no attestations, as v1.0.x read it, so its envelope says {}
and the next start reads it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The controller never bound a once-reported static volume on Linux, so the
test now creates and places a volume through the lifecycle, ingests its
holder's heartbeat, settles the observation host (started == done, no
buffered wake, no timer due), runs the product tick (the master runs none
by itself), which binds the volume, and requires a build after that point:
only the line-change hook can take it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A store whose descriptor slots are intact but name a chunk-state format
newer than this binary reads is refused with ErrStoreFormatNewer, told
apart before the slot's byte checks, instead of "neither descriptor slot
is valid"; a half-fence still opens on the known slot. Cut COW side files
are discarded only after a slot is selected, so a refused open leaves the
directory as it was.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An envelope already on disk is fsynced (file and directory) at every start
before the master serves: an earlier start may have renamed it in and
failed its directory fsync. master.New releases the store lock when the
envelope cannot be made durable or the attestations cannot be read. A
format-2 file without an explicit volumes object (missing, null, wrong
type) is refused rather than read as no attestations; v1.0.x files with
volumes named format or volumes are still read as bare maps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before it serves, under the authority store's lock, the master writes
store-attestations.json as {"format":2,"volumes":{...}}. A v1.0.x master
decodes that file as a bare map of volume records and returns the error
from New before it listens or publishes. This master reads the envelope
and v1.0.x's bare map (rewritten as the envelope at start) and refuses a
later format. The authority record's version 2 alone does not stop a
v1.0.x master (its loader skips such a record); the test is renamed to say
it fails the v1.0.x decoder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A renewal's grant stays a time.Time (now+TTL with its monotonic reading)
for the deadline admission compares; only the reply carries wall
nanoseconds. The revoke ACK checks validity against that deadline the same
way. A missing deadline reports expiry 0 (no host validity), and comments
tell the deadline (restart + TTL) from the barrier (deadline + skew).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A renewal grants now+TTL from memory and writes nothing: the persisted
horizon, its clamp, its background extension and its counters are gone.
A forced move, an expired re-grant and a delete's no-live-lease proof wait
for this process's deadline plus skew (its latest grant, or after a
restart the restart floor it already set at load); no lease value an
earlier process wrote is read. An authority record's envelope is now
version 2, which a v1.0.x master refuses (it would trust the record's
stale lease expiry); this master reads versions 1 and 2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The observation host counts the rebuilds it takes (in the step that takes
the wake) and the rebuilds it finishes, and records when its armed deadline
timer fires, all under its lock; BuildsForTest returns them with whether a
wake is buffered. The master test settles on started == done with no
buffered wake and no timer due, records N, ingests one heartbeat (build
N+1, v1 supported and unbound), and after the controller's publication
requires build N+2 to carry the line: only the hook can take it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ObservationHost.BuildsForTest reports the builds completed and whether a
wake is buffered or a build is running. The test settles the host before
the heartbeat, requires the heartbeat's build to be a new one, settles
again after the controller's publication, and then requires the line in a
build after that point (or in the settled last build, which can only have
come after the publication).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test now drains the initial build and the grace's rebuild before the
one heartbeat, whose single wake is consumed by the build showing v1
supported; the controller binds after it, and with no heartbeat, expiry or
GC tick left, the build carrying the line can only come from the hook.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NextDeadline keeps the pending grace's end until ExpireDue reports it,
even once past, so a build taken just before it and submitted just after
it is rebuilt with no heartbeat. The property test now fires the host's
timer only at NextDeadline, so a dropped deadline shows. A master test pins
the line-change wiring: a volume reported once is bound by the controller
and the next build carries the line. Comments that promised a wake on
every ingest now say what wakes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The observation store wakes a rebuild only when an ingest changes what a
snapshot build reads: a new server, a server's facts or freshness, a slot
added, removed or changed but for its timestamps, a slot's expiry state, a
volume two servers report, or a passed deadline. What changes with time is
a deadline: each server's next expiry in a heap, the pending grace's end;
the host wakes at the earliest. A published line wakes the build through
the publisher's line-change hook.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every per-volume read in the package's tests now checks the whole index
against the whole state: every state key indexed, every indexed key in the
state, no empty volume set, and the read equal to the scan. Negative
controls: a stale extra entry, a missing entry, an empty set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The window's timer starts inside Admit; a first admission publishes and
syncs the host configuration, which a loaded runner can stretch to
hundreds of milliseconds. The upper bound is now measured from Admit's
return; the lower bound still from before it. The failure message prints
the admission's duration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The fetch child keeps its release (and so the slot's file) reachable
while it lives, with forced collections before it reports HELD.
- The ended-waits test registers every release at once, and its second
half frees the other slot only once each fetch is already waiting, so
the waiting path's success is what is checked.
- The competing fetches derive from a cancellable context, and cleanup
joins them within a bound.
- Comments: one fetch polls per limiter (blockvolume makes one per
process); a configuration check in progress can add its bounded guard
wait after the context ends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The publisher indexes its lines by volume, kept by the one writer of its
state, so every per-volume read (the workspace line, the authority line,
the bound replica, the published epoch, the promotion basis) costs the
volume's replicas, not every line. A register, ACK or move reconciles the
bindings of its own volume and of any volume whose reconcile failed before;
the start still reconciles every volume.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A limiter's first fetch checks the host configuration under
configuration.lock, publishing it when absent (configGuard, now shared
with cut admission): a fetch-only process with other flags gets ErrConfig.
- No blocking lock: with every slot held, one fetch per process polls
every slot each 20 ms (the others wait for its turn, within their
context). An ended wait leaves no lock request, descriptor or goroutine;
lockBlocking is removed.
- The waiting is unordered and bounded by the caller's context alone; the
docs say so instead of promising a kernel queue.
- A slot taken when the context has already ended is given back, with the
context's error.
- INV-HOST-FETCH-CAP-001, M7 and the v1.1 note state the contract.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A fetch-only start must publish and check the host configuration: a
child process with FetchSlots 2 fetches first, and a FetchSlots 1 fetch
must answer ErrConfig (fails: no configuration is published).
- Waits that end at their deadline, or by taking another slot, must leave
no goroutine or descriptor behind while their slot stays held (fails: 40
blocked lock waits remain).
- A context that ends as a slot is taken must get its error, slot given
back (fails: the slot is handed over). Seam: testFetchLocked.
- Controls: a killed child's slot is freed; a waiter passed by others ends
by its deadline (the waiting is unordered, bounded by the context).
- The same-process cap test is renamed AcrossLimiters; holdAsync joins and
releases its wait in cleanup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- hostlimit: Config.FetchSlots (default 64, files fetch-0..N-1 in the pool).
HoldFetch takes a free slot without waiting, from the key's hash slot;
with every slot held it blocks on its hash slot (the kernel queues the
waiters) and tries the other slots every 20 ms, using whichever lock comes
first and releasing the other; its context bounds the wait, and a lock got
after that is released at once. lockBlocking on Unix and Windows.
- storage: BudgetFetch; fillOnce holds one slot across its remote read only
(a read miss and a hydrate-all fill alike); a context error on the wait is
the hydration path's pending, as before.
- blockvolume: --host-limit-fetch-slots. Invariants: INV-HOST-FETCH-CAP-001;
M7 states it. v1.1 notes carry it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seams: Config.FetchSlots (default 64), fetchSlot (a key's hash slot),
Limiter.HoldFetch (no cap yet) and storage.BudgetFetch.
- TestHoldFetchCapHoldsAcrossProcesses: with every slot held by other
processes, a fetch waits until one is released, then takes it. Fails here.
- TestHoldFetchAWaiterThatGivesUpLeavesNoSlotHeld: a waiter past its context
returns the context's error, and a slot it gets after is released at once.
Fails here.
- TestHoldFetchTakesAnotherSlotThatFreesFirst: a waiter behind a slow holder
of its own hash slot takes another slot within one retry interval of its
release. Fails here.
- TestHoldFetchTakesAFreeSlotAtOnce: a fetch with a free slot does not wait
(holds here, must keep holding).
- TestChunkFetchHoldsAHostSlotAroundItsRemoteRead: a chunk fetch holds one
slot exactly across its remote read. Fails here: none is held.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The draft v1.1 format tag is now separate from the 256 GiB cap lift, so
the lab-tag step builds and tests swblock_lab_bigvol, swblock_v11_format
and both, and runs the format-tag test under each.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>