Review fold. The check ran the tool with go run, which takes the .go
arguments as more source files, so in CI every DOCS PR touching Go would
have been refused; the self-test hid it by building the tool itself. The
check now builds the tool into a temporary directory, the self-test runs
that same path, and a build or tool failure exits 2 (the check did not
run) instead of reporting changed tokens. In a file that uses cgo every
comment counts (the grouped import ("C") form dropped the preamble).
The template says DOCS may still change contract text, with the reviewer
as the gate; the script header names the go:embed limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fold. The line-multiset comparison let reordered statements,
directive comments (//go:build, //go:linkname, the cgo preamble), a //
inside a string after a rune quote, a line inside a multi-line raw
string and spacing inside a string all pass as comment-only. A small Go
program (sametokens.go, go/scanner) now requires the old and new token
sequences of each changed non-test Go file to be identical, comments
dropped except directives and the cgo preamble; gofmt realignment passes
by construction. The workflow passes old/new blobs instead of a diff.
DOCS no longer covers docs/spec (the models); CI no longer covers
scripts/, which holds shipped install and deploy scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A PR that changes no behaviour names one of three kinds instead of
IMPL, FIX or CHANGE. TEST may touch only tests, testdata and test
helpers; CI only .github/ and scripts/; DOCS docs, tests and Go whose
hunks change only comments. For DOCS the workflow passes the diff of the
non-test Go files, and the check compares removed and added lines with
line comments (outside strings) and spacing dropped; every changed Go
file must appear in that diff. Ten self-test cases added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A closing read of HEAD that finds no HEAD, or one that does not decode,
leaves the final view without a HEAD root and the result incomplete
(head_absent, head_invalid); it no longer keeps the earlier view. A
manifest segment is checked once per owner and key with one outcome, like
a chunk; a root whose reference does not match the content gets one
mismatch, and segment findings follow the one-per-key-and-class rule
under the first root that names the key.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The re-own candidates join through captureCandidates (addOwnCandidatesLocked)
and the HEAD-equal skip is a predicate (unchangedFromHead) in chunk_own.go:
captureLocked gains no branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The driver walks (64 MiB/s, BackgroundFill), cuts bounded batches (64 chunks)
until no foreign ref is left, then writes RESTORE-INDEPENDENT
(M6.Restore Restoring>Hydrating>Owning>Owning>Independent). It decides only
from the target's VOLUME, HEAD and marker, so a rerun resumes from the remote
state and a deleted source is a normal state. POST /chunk/restore starts or
joins one background run per volume and returns its status; GET (or
statusOnly) reports it; sw-block ops chunk restore calls it. Docs: M6 restore
rows, INV-RESTORE-OWN-BATCH-001 and INV-RESTORE-DRIVER-001, the restore
quantities, the workspace design diagram.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OwnBatch(n, foreign) runs one ordinary cut whose candidates include up to n
local chunks whose HEAD keys name another volume; streamCutPayloads uploads
each under a new own key even when its bytes equal HEAD's, and the cut's one
intent and HEAD CAS publish them (M6.Restore.Owning>Owning). An absent chunk is
never fetched by a batch; with nothing to own no cut runs. HydrateAllAt paces
the walker to a byte rate before admission (HydrateAll = unpaced).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pass kept three kinds of state: a chunk (unseen, queued, settled with
one outcome, never re-checked), the HEAD view (replaced by each refresh)
and each selected snapshot's view. Settling a chunk records its outcome
and reports nothing. The pass closes on a read of HEAD and of the
snapshots' state that names no unseen key; that same read is the final
view. Findings are computed once, from the outcomes and the final view:
at most one per chunk key and class, under the first root that names the
key; a bad chunk that no root names is counted, not reported. A key the
pass saw named, then not named, then named again is reported. If the
closing rounds run out the result is incomplete, never clean.
This replaces the reporting done as reads settled and as refreshes
arrived, together with the late-reference list and the per-finding
rechecks.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A fork or restore no longer claims its parent snapshot, and neither
DeleteSnapshot nor retention reads a claim: a deadline-exceeded fork or a
failed restore can no longer make its parent (and so its volume) undeletable.
Safety now rests on time: a fork takes its deadline start before it reads the
parent, every attempt (a retry included) reads it again, and it publishes its
HEAD only before start + operation deadline; GC keeps a deleted attempt rooted
for its grace, and NewCollector now requires
grace >= operation deadline + clock skew + CAS apply bound (new GCConfig
field, default: the operation deadline). An unknown publish keeps the fork
intent, which roots the keys until the target is resolved.
Removed: claimForkParent/dropForkClaim/removeForkClaim (replaced by
readForkParent), the claim branch of markDeleting, liveClaims, claimedErr and
snapshot_claimed, retention's ForkHeld outcome and the fork_parent keep
(forkParentsNeeded). A claims xattr written by an older version is ignored.
Tests: three new tests (fork retry after delete re-reads the parent; delete
during a fork in flight; unknown publish keeps the keys while its intent
exists), each red on the base with snapshot_claimed; the construction check
with its boundary; claim-mechanics tests removed, the others rewritten to the
new rule. Docs: invariants.md M6 rows, INV-SNAP-DELETE-ANY-ORDER-001 (new),
INV-SNAP-EXPLICIT-DELETE-001 and INV-GC-GRACE-DEADLINE-001 restated,
INV-RESTORE-PARENT-HOLD-001 archived; workspace design section 6.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub-hosted jobs in this org can queue for a long time; the test
workflow already sends same-repository PRs to the self-hosted runners and
forks to a hosted one. The spec-trace job does the same. It runs no PR
code on either.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts kept both sides: agent-workspace-design.md (restore diagram, then
attached-volume scheduling); invariants.md B.6 (the INV-MAINT-* rows, then the
INV-GC-REACHABLE-001 row with restore owner rooting). Part B summary recounted
from the tables: 131 rows, 112 ACTIVE, 17 STUB, 2 ARCHIVED, 116 new.
RestoreIndependence is now exhausted (breadth-first, complete graph): the spec
README row and the invariant rows drop the simulation tags.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A miss or a read error was reported against the references known when the
chunk was queued. A reference added by a HEAD refresh, before or after the
read ended, is now given the same outcome under the usual recheck, without
reading the chunk again. Tests that hold a call open get an independent
bound so a broken implementation fails instead of hanging.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>