Interim merge note (spec trace workflow startup_failure on all branches since 22:45Z): branch updated to current main (69c5c6bd); go test (linux) and process-level tests (real binaries) passed on 69c5c6bd; spec-trace-check.sh and public-text-check.sh run locally with the base branch's scripts against this head and body: both pass (Model line now also cites FormatGate.Report for core/host/master/services.go, mapped since the PR was accepted). Code review ACCEPT on e1ed5073; the 1 TiB loaded first-cut measurement on current main passed on both volume formats.
Interim merge note (spec trace workflow startup_failure on all branches since 22:45Z): go test (linux) and process-level tests (real binaries) passed on cc3a8a6c (run 46997615891); spec-trace-check.sh and public-text-check.sh run locally with the base branch's scripts against this head and body: both pass. Code review ACCEPT 6161155789; model review ACCEPT 6161515202 (per-call read/trace follow-up recorded there).
Interim merge note (spec trace workflow startup_failure on all branches since 22:45Z): go test (linux) and process-level tests passed on 7ae34a7e; spec-trace-check.sh and public-text-check.sh run locally against this PR's body and diff on main af07f8be: both pass.
At format level 1 and above, each server holding a volume whose process
for it reads below the level gets a volume condition (reason
binary_too_old, with the server and its report level): its holder only
sees no assignment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The finalize is refused only while a live report of a process holding a
volume reads below level 1. A held volume with no report, a host with no
report and an old process holding no volume are listed in the answer
(FinalizeFormatResponse.unconfirmed, and unconfirmed.<id> metadata on a
refusal) and in --json as listed; they do not block. The durable last
level and its marks are dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The holder's maintenance now consumes a published delete intent, so a
delete behind an earlier one resumes once its intent is consumed. The
model-code trace keeps both sides' new rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes. When the --json answer cannot be written, retire-host and
finalize-format exit 1 instead of 0. A retire whose record removal failed
answers Internal (the CLI's failed, exit 1), not FailedPrecondition (refused,
exit 2); the node store's test hook can fail a removal for the control.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--gen 0 names no incarnation and is refused before any read or write,
on a version-0 and a version-1 HEAD alike; it is not the unpinned
delete. INV-SNAP-DELETE-HOLDER-RESUME-001 states and traces the
holder's resume of its own operation behind an unconsumed intent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
retire-host follows finalize-format's contract: exit 0 retired, 2 refused,
75 the master could not be reached, 1 any other failure or usage error, and
--json prints result, reason, server, volumes and message for every outcome.
The master's HOST_HOLDS_WORK refusal names each held volume in its typed
metadata. The forced-move preview answers the typed reason the move itself
would carry (reason_code, e.g. BINARY_TOO_OLD), and force-move --dry-run
--json shows it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An idle host (no placement, no lease) is judged by the level it last
reported, kept in memory and on its node record across restarts: 1 passes,
0 blocks, a host that never reported does not count. A re-registration at
start keeps the level. Hosts that hold work still need live reports per
volume. Two tests now expect the served volume's own diagnostic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One shared predicate routes a delete by name on the HEAD's version at
either format level: on a version-0 HEAD the default call is v1.0's
name-only delete, and an explicit --request-id or --gen is refused
typed with nothing written until the volume adopts v1.1; on a version-1
HEAD it is an operation delete. The holder runs its HEAD writes at its
assigned level (DurableProvider.FormatLevel). Controls pin the holder's
version-0 route at both levels, its one resumed operation and terminal
receipt, every operation-tree write on an absent HEAD, and the
receipt behind the CLI's printed id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With one process per volume, a registered spare host never reports, so the
finalize could only pass after retiring every spare host. It now counts
every host that holds a placement, a lease or an assignment, and every host
that has reported a read level; an idle host with neither does not block it.
If such a host later runs an old binary, the grant gate refuses it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v1.0-HEAD decode check keeps both v1.1 fields it refuses: #950's
reserved producer list cursors and this branch's operation bindings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CLI's and the holder's delete routes read HEAD to choose the route,
and the shared resolver reads it for admission; each absent-HEAD
behaviour is pinned by a probe (an absent volume's delete by name, the
holder's delete with no HEAD).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a version-1 HEAD the holder's control route runs an operation delete
of the incarnation the name holds now, under an id made per request (a
new request is a new intent). A run that finds the previous delete's
intent unconsumed or HEAD moved kicks the cleaning and resumes the same
operation, bounded, so no request leaves its operation stalled. The CLI
and the holder share one admission resolver. The volume tests' holder
projection carries format level 1, a new cluster's, so their v1.1
creates pass the attach-level guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The delete prints the incarnation it resolved (name@gen) with its
request id, and the no-wait answer carries it; --gen deletes only that
incarnation and is refused typed when the name holds another. Retries
inside one invocation keep the id and the incarnation; a new invocation
resolves the name again, and a recreated name is what it deletes. The
name-only primitive (an old client's) still refuses a v1.1 HEAD. The
snapshot operation commit passes the shared format guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At cluster format level 0 a delete by name of a version-0 HEAD's
snapshot is v1.0's name-only delete, chosen before any operation record
is written. On a version-1 HEAD, or at level 1, it is an operation
delete under --request-id or an id made once per invocation and printed
for resume. The level is the master's answer (--master), 0 without one
or when it cannot be read, and every HEAD write runs at it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts resolved to main: runTransition runs the format guard, then
the generation stamp, then checkWrite, and the receipt guard follows.
The duplicate strict decode is dropped: a version-1 HEAD with a gen-0
entry reads tolerantly and is stamped on write; the write check refuses
it. Its two tests are rewritten to those semantics. A bound snapshot's
publishing gen must equal its operation's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both sides: #939's finalize-format exit codes and JSON answer
beside the format-level read in sw-block cluster_format.go, and #939's
typed move refusal (text plus reason) with the move target refused only
on a known-old report (placementTooOld), whose reason is binary_too_old.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A flag bound to the same variable let a partial parse overwrite the mode:
--json --bogus --json=false answered in JSON and the reverse did not. The
flag is now declared for parsing and help only; the mode is the arguments'
last --json, read before parsing. Both orders are pinned, with no RPC.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A v1.1 store with no unknown chunk and no rebuilt page starts no upgrade
compare pass and holds no cut, cursor or not: a fresh volume's chunks are
absent, so a new cluster's first snapshot runs at once (the process-level
procedures were refused in_progress). A heartbeat is accepted and its read
level recorded whatever it reads; an old binary is refused at the grant.
Test fakes that stand for v1.1 hosts in other packages report reads_level 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JSON mode is read before flag parsing, so finalize-format and
ops workspace move answer in JSON (and send nothing) when a malformed or
unknown option comes before --json. force-move --json gets its own controls:
the typed reason from the refusal's detail, and none for a refusal whose
message only contains the reason's text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The startup inactivity window renewed only on replay, scan, map and attach
work. A new store's prezero and the WAL fence wrote and synced whole
regions with no report, so on a slow disk the window could end inside one
silent step; and the chunk layer's wait for master authority, a wait the
master bounds, ran out the same window.
- storage: phases RecoveryCreate and RecoveryFence; syncedSlices runs a
sized step 4 MiB at a time and reports a slice only after its sync;
prezeroNewStore uses it, and recovery reports the fence's synced bytes.
- durable: create passes RecoveryProgress; AuthorityWait tells the host
when the authority wait starts and ends; Chunk.AuthorityGap names the
projection fields that withhold authority.
- host: recovery_timeout becomes recovery_stalled; waits are counted, the
window pauses while any runs and restarts when the last ends, a stall
latched before stays latched; /status RecoveryWait=awaiting_authority.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LifecycleService.FormatLevel answers the cluster's format level (a
viewer's read; sw-block cluster format-level). A master that finds no
prior authority state writes the level-1 envelope before it serves;
existing state keeps its level, so only a cluster holding v1.0 data
needs the finalize. Above level 0 a node that has not reported its read
level is refused new work typed and retryable (AWAITING_FIRST_REPORT),
and the cluster status shows it awaiting report. The master tests' fake
hosts report reads_level 1 as a v1.1 host does; the FormatGate upgrade
tests start from a store in v1.0.x's form.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A script must not parse message text. finalize-format now exits 0 for
finalized or already finalized, 2 for a refusal, 75 when the master cannot
be reached, and 1 for any other failure (a failed write of the format
record included); --json prints result, reason, hosts, format_level and
message for every outcome. The master's refusal carries each refused host
in its ErrorInfo metadata, and a failed attestation write is Internal, not
Unavailable.
A move onto a host whose binary reported a read level below the cluster's
carries the typed reason BINARY_TOO_OLD; ops workspace move and force-move
show it in --json.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in core/frontend/nvme/session.go: main added the rate-limited
write-failure log before the completion status; this branch computes the
status through the session (negotiated retry delay). Both kept: the log,
then s.completionStatus(res).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
P1: f1WaitAdopted took any log line containing "address already in use"
as a taken port. It now passes the attempt's four drawn addresses to
bindTakenOn, which accepts only Go's listener error ending a line,
"listen tcp <addr>: bind: address already in use", with <addr> one of
them; a different port or host, a dial, a quoted copy, text after it, udp
or the bare words are not a taken port, so the start fails as before.
P2: the retry starts as blockvolume-<key>-attempt2, so the first attempt's
log is not truncated, and startWithBindRetry returns the first attempt's
error, which the test logs (address and log path) before the retry's
answer.
Red: TestBindTakenOnOnlyThisAttemptsListener fails with the previous
substring rule; TestStartWithBindRetry checks attempt numbers and the
kept first error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
handoffAddress drew from [10000, 20000) whatever the host's ephemeral range;
it now cuts the range at the host's ip_local_port_range low end
(handoffRange), as the weed port pairs already do. F1's holder start
(f1Up) answers errBindTaken when the holder exits before adopting with
"address already in use"; startWithBindRetry then draws the holder's four
ports again and starts it once more (v1, whose ports the cluster spec
names, is not retried). Any other failure, or a second taken port, fails
the test as before.
Red first: TestHandoffRangeStaysBelowTheEphemeralRange (a host whose
ephemeral range starts at 15000 must get [10000, 15000)) and
TestStartWithBindRetry (a taken port, then ok: one retry with fresh
ports) fail with the previous behaviour and pass here.
Refs #927.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>