chore: drop reviewer names and ruling timestamps from code comments

Comments in source and tests named individual reviewers and carried the
time a decision was taken (for example "(name's ruling, 06:47Z)"). Those
are review bookkeeping, not design rationale. Remove the names and the
dates/timestamps; keep the rationale, issue and PR references (#51, #82,
#83, #142, #159) and spec section references as plain text.

Comment-only: no code, test logic or string literal changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pingqiuandClaude Opus 5.5 committed 2026-11-16 11:39:16 -08:00
1 parent ba3bbfe25b
commit c9273a22be
44 files changed
+80 -81

No files matched your search

@@ -124,7 +124,7 @@ func chunkAttachCheck(cat *chunkstore.Catalog) func(context.Context, string, dur
}
// chunkHolder is how this host names itself in HEAD: <server-id>/<replica-id>
// (B9 W2 appendix, 2026-11-15 14:30Z). The replica id alone is not enough:
// (B9 W2 appendix). The replica id alone is not enough:
// two hosts that both serve replica r1 would look like the same holder
// returning, and the later one would not be fenced.
func chunkHolder(f flags) string { return f.serverID + "/" + f.replicaID }
@@ -110,7 +110,7 @@ func TestChunkAttachCheckAppliesVolumeRules(t *testing.T) {
}
// HEAD names a host as <server-id>/<replica-id>: two servers serving the same
// replica id are different holders (B9 W2 appendix, 2026-11-15 14:30Z).
// replica id are different holders (B9 W2 appendix).
func TestChunkHolderIsServerAndReplica(t *testing.T) {
f, err := parseFlags(append(phase150RequiredBlockvolumeArgs(), "--durable-root=/tmp/sw-block",
"--durable-impl=walstore-chunk", "--chunk-filer=x:1"))
@@ -106,7 +106,7 @@ func TestDurableStartup_Issue51_CorruptNewerSlotIsWALCorrupt(t *testing.T) {
}
}
// claude05's ruling (A), 06:47Z: detection only for smartwal too. A
// Detection only, for smartwal too. A
// corrupted committed slot with later valid records starts as before
// (ready), and the durable status carries the counted warning.
func TestDurableStartup_Issue51_SmartWALHoleIsAWarningNotAnOutage(t *testing.T) {
@@ -148,7 +148,7 @@ func TestDurableStartup_Issue51_SmartWALTornTailRecovers(t *testing.T) {
}
}
// walstore interim (claude05's ruling 06:14Z): the same mid-history
// walstore interim: the same mid-history
// corruption on a walstore volume does not become an outage: startup is
// ready, and the durable status carries the typed warning.
func TestDurableStartup_Issue51_WALStoreHoleIsAWarningNotAnOutage(t *testing.T) {
@@ -21,7 +21,7 @@ func (stubBackend) SetOperational(_ bool, _ string) {}
func (stubBackend) Identity() frontend.Identity { return frontend.Identity{} }
func (stubBackend) Close() error { return nil }
// G5-5C addendum (P0 product fix, architect ruling 2026-04-28):
// G5-5C addendum (P0 product fix):
// frontend volume capacity MUST derive from --durable-blocks ×
// --durable-blocksize, not silently fall back to frontend defaults.
//
+1 -1
View File
@@ -298,7 +298,7 @@ type chunkErrBody struct {
Retryable bool `json:"retryable"`
}
// chunkFail reports a failure (appendix 14:30Z): the error body
// chunkFail reports a failure (B9 W2 appendix): the error body
// {code,message,retryable} on stdout, as the routes answer it, a log line on
// stderr, and the exit code. The message does not repeat the code.
func chunkFail(name string, stdout, stderr io.Writer, exit int, code, message string, retryable bool) int {
@@ -10,7 +10,7 @@ import (
)
// ops chunk show prints a volume's VOLUME entry and HEAD from the filer;
// either is null when it does not exist (B9 W2 appendix, 2026-11-15 14:30Z).
// either is null when it does not exist (B9 W2 appendix).
func TestOpsChunk_Show(t *testing.T) {
ctx := context.Background()
mem := chunkstore.NewMemFiler()
+2 -2
View File
@@ -112,8 +112,8 @@ func chunkErrorOut(t *testing.T, out string) chunkErrBody {
return e
}
// Every failure is the error body on stdout and a non-zero exit (appendix
// 14:30Z): usage, an unreachable blockvolume, a catalog refusal.
// Every failure is the error body on stdout and a non-zero exit (B9 W2
// appendix): usage, an unreachable blockvolume, a catalog refusal.
func TestOpsChunk_ErrorsAreJSONOnStdout(t *testing.T) {
if code, out, _ := runChunk("nope"); code != 2 || chunkErrorOut(t, out).Code != "bad_request" {
t.Fatalf("unknown subcommand: exit %d %q", code, out)
@@ -48,7 +48,7 @@ const (
volumeName = "VOLUME"
snapsDir = "snaps"
// snapNamesDir holds one name record per snapshot name: the request and
// the attempt that own the name (W5 ruling, 2026-11-15 17:30Z).
// the attempt that own the name (W5).
snapNamesDir = "snapnames"
kindSnapName = "chunksnapname"
@@ -542,7 +542,7 @@ func (c *Catalog) EnsureVolume(ctx context.Context, vol string, g Geometry) (Vol
// A snapshot name is owned by a name record snapnames/<name> {request,
// attempt}, created exclusively; the snapshot itself is published by an
// exclusive create at the attempt's own path snaps/<name>/<attempt>, which
// is never removed (W5 ruling, 2026-11-15 17:30Z). A GC sweep settles a
// is never removed (W5). A GC sweep settles a
// dead attempt by claiming its path with an aborted tombstone; a retry of
// the same request publishes to the same attempt path. DeleteSnapshot
// marks the attempt deleting and removes the name record, freeing the name.
@@ -699,8 +699,8 @@ func (c *Catalog) abortedSnapEntry(vol, name, attempt string) (*filerpb.Entry, e
}, nil
}
// AbortSnapshot settles a dead snapshot attempt for a GC sweep (W5 ruling,
// 2026-11-15 17:30Z): it claims the attempt path snaps/<name>/<attempt>
// AbortSnapshot settles a dead snapshot attempt for a GC sweep (W5): it
// claims the attempt path snaps/<name>/<attempt>
// with an exclusive create of an aborted tombstone. claimed is true when
// the path holds a tombstone (this one or an earlier one): the attempt can
// never publish. false: the attempt published, and its keys are reachable
@@ -754,7 +754,7 @@ const (
// publishCtx bounds a publishing create by the operation's deadline
// (catalog clock), so the RPC cannot outlive the deadline its intent
// records (W5 ruling, 2026-11-15 17:06Z).
// records (W5).
func (c *Catalog) publishCtx(ctx context.Context, deadline time.Time) (context.Context, context.CancelFunc) {
return context.WithTimeout(ctx, deadline.Sub(c.now()))
}
@@ -1049,7 +1049,7 @@ func (c *Catalog) ListSnapshots(ctx context.Context, vol string, opts ListOption
}
}
// DeleteSnapshot frees the name (spec §3.4, W5 ruling 2026-11-15 17:30Z):
// DeleteSnapshot frees the name (spec §3.4, W5):
// it marks the attempt deleting (or, when the attempt never published,
// claims its path with an aborted tombstone so a late insert cannot land),
// then removes the name record. The attempt path is never removed. It
@@ -1084,7 +1084,7 @@ func (c *Catalog) DeleteSnapshot(ctx context.Context, vol, name string) (string,
continue // re-read: the path now holds a tombstone or the late snapshot
case ref.info.State == SnapActive:
// The one mark path shared with retention: a live fork claim
// refuses (claude05's ruling, 23:58Z).
// refuses.
m, live, _, err := c.markDeleting(ctx, vol, name, ref.rec.Attempt)
if err != nil {
return "", err
@@ -1427,8 +1427,8 @@ func (c *Catalog) removeForkClaim(ctx context.Context, req ForkRequest, attempt
return false, remoteErr(nil, "claim of %s on %s/%s kept changing", req.Target, req.Source, req.Snapshot)
}
// AbortFork settles a dead fork for a GC sweep (W5 ruling, 2026-11-15
// 17:30Z): it claims the target's HEAD, the fork's publishing entry, with
// AbortFork settles a dead fork for a GC sweep (W5): it claims the
// target's HEAD, the fork's publishing entry, with
// an exclusive create of an aborted HEAD tombstone. claimed is true when
// HEAD is a tombstone (this one or an earlier one): the fork can never
// publish, and the target never attaches. false: the fork published, and
@@ -8,8 +8,8 @@ import (
)
// A snapshot or fork copy intent records its publication deadline, and the
// publishing create runs under a context bounded by that deadline (W5
// ruling, 2026-11-15 17:06Z). Since 17:30Z the deadline is metadata only:
// publishing create runs under a context bounded by that deadline (W5).
// The deadline is now metadata only:
// a sweep settles a dead attempt by a tombstone claim (catalog_tombstone).
func TestCatalog_CopyIntentRecordsItsDeadline(t *testing.T) {
@@ -167,8 +167,8 @@ func TestFork_IncompleteRetryBoundToOriginalImage(t *testing.T) {
t.Fatalf("request id reused for another snapshot: %v, want target_exists", err)
}
// The fork claims s1, so an explicit delete is refused (claude05's
// ruling, 2026-11-15 23:58Z). The image binding below still guards a
// The fork claims s1, so an explicit delete is refused. The image
// binding below still guards a
// fork made before claims existed: drop the claim as such a fork would
// never have written one.
if _, err := c.DeleteSnapshot(ctx, "v1", "s1"); CodeOf(err) != CodeSnapshotClaimed {
@@ -8,8 +8,8 @@ import (
)
// A sweep settles a dead fork by claiming the target's HEAD, the fork's
// publishing entry, with an aborted HEAD tombstone (W5 ruling, 2026-11-15
// 17:30Z): the late HEAD insert fails, a retry is refused, and the volume
// publishing entry, with an aborted HEAD tombstone (W5): the late HEAD
// insert fails, a retry is refused, and the volume
// never attaches.
func TestFork_SweepTombstonesADeadFork(t *testing.T) {
f, _, c, h := catalogFixture(t)
@@ -17,7 +17,7 @@ import (
"github.com/seaweedfs/seaweed-block/core/storage"
)
// Snapshot retention (claude05's rulings, 2026-11-15 22:53Z).
// Snapshot retention.
//
// A snapshot has a class, stored with it:
// - "semantic": an automatic checkpoint (e.g. an agent's per-step
@@ -50,7 +50,7 @@ import (
// record is removed only while it still names that attempt, so a
// same-name replacement made after planning is never touched.
//
// Fork parents (codex01's design, review of #142 round 2). Protection is
// Fork parents (design from the review of #142). Protection is
// one conditional write on the parent attempt's own entry, nothing else:
//
// - Fork, before it reads the parent, adds its claim (target/request)
@@ -86,7 +86,7 @@ const (
CodeInvalidClass = "invalid_class"
CodeInvalidPolicy = "invalid_policy"
// CodeSnapshotClaimed: an explicit delete of a snapshot a fork still
// claims (claude05's ruling, 23:58Z). Not retryable as such: it clears
// claims. Not retryable as such: it clears
// when the fork publishes its HEAD or is aborted.
CodeSnapshotClaimed = "snapshot_claimed"
@@ -229,7 +229,7 @@ func TestIntegration_RetainHeldSchedules(t *testing.T) {
if err != nil || b.attempt != pinnedAttempt || b.State != SnapActive || b.Class != SnapshotClassPinned {
t.Fatalf("pinned replacement: %+v %v (attempt %s, want %s)", b, err, b.attempt, pinnedAttempt)
}
// An explicit delete of a claimed parent is refused (claude05, 23:58Z).
// An explicit delete of a claimed parent is refused.
if _, err := cat.DeleteSnapshot(ctx, "v1", "s01"); CodeOf(err) != CodeSnapshotClaimed {
t.Fatalf("delete of the claimed s01: %v; want snapshot_claimed", err)
}
@@ -356,7 +356,7 @@ func TestCatalog_UsageCountsForkHolders(t *testing.T) {
}
}
// claude05's ruling (23:58Z): an explicit delete of a snapshot an
// An explicit delete of a snapshot an
// incomplete fork claims is refused (snapshot_claimed, not retryable,
// naming the fork); once the fork completes or is aborted the delete goes
// through. Retention and delete share the check (markDeleting).
@@ -13,8 +13,8 @@ import (
"github.com/seaweedfs/seaweed-block/core/storage"
)
// Snapshot retention and space accounting (claude05's rulings
// 2026-11-15 22:53Z): policy edges, dry run, forks, accounting.
// Snapshot retention and space accounting: policy edges, dry run, forks,
// accounting.
var retBase = time.Unix(1_000_000, 0)
@@ -11,7 +11,7 @@ import (
"github.com/seaweedfs/seaweed-block/core/storage"
)
// Space accounting (claude05's rulings, 2026-11-15 22:53Z). Everything is
// Space accounting. Everything is
// computed from manifests and filer listings; segment objects are verified,
// but data chunks are not read.
//
@@ -13,8 +13,7 @@ import (
"github.com/seaweedfs/seaweed-block/core/storage"
)
// Volume delete (claude05's item, 2026-11-16 02:39Z; claude05's 04:08Z
// cut: no snapshot cascade).
// Volume delete (no snapshot cascade).
//
// (a) Admission: the caller's Admission (the CLI's: the blockmaster's
// durable deletion reservation, MarkVolumeDeleting; refused while the
@@ -15,7 +15,7 @@ import (
)
// Volume delete against a real SeaweedFS (CHUNKSTORE_WEED), with a real GC
// (claude05's acceptance, 2026-11-16 02:39Z): fork w2 from S1, delete w2,
// (the acceptance case): fork w2 from S1, delete w2,
// then DeleteSnapshot S1 succeeds and GC reclaims exactly the chunks only
// w2 and S1 reach, while w1 (HEAD, S2) stays intact; deleting an attached
// volume is refused; a deleted id cannot be recreated.
@@ -13,8 +13,8 @@ import (
"github.com/seaweedfs/seaweed-block/core/storage"
)
// Volume delete: one linearization point, no snapshot cascade (claude05,
// 04:08Z). One control per review schedule.
// Volume delete: one linearization point, no snapshot cascade. One
// control per review schedule.
// detachHead publishes vol's HEAD as a clean detach by its holder (what a
// volume server's Detach writes).
@@ -291,7 +291,7 @@ func TestCatalog_DeleteVolumeRefusesWhileSnapshotsExist(t *testing.T) {
}
}
// claude05's test: a snapshot attempt in flight (name taken, publication
// A snapshot attempt in flight (name taken, publication
// held) when the delete marks HEAD: the delete refuses and reverts, and the
// snapshot then publishes cleanly. A snapshot started after the mark
// refuses itself.
@@ -1,6 +1,6 @@
package durable_test
// The attach-time check (B9 W2 §4.2, ruling 2026-11-15): one provider hook
// The attach-time check (B9 W2 §4.2): one provider hook
// that runs before the chunk layer attaches, ahead of any remote read or
// CAS, with the local geometry; its refusal stops the attach.
@@ -148,7 +148,7 @@ func TestRecoveryWatchdog_MasterUnhealthyFailsOverToQualifiedPeer(t *testing.T)
// A running primary that was ready and later reports not ready on the
// same incarnation (no unhealthy reason) follows the normal failover
// rules: no boot grace for that incarnation, so it fails over to the
// qualified peer, and nothing is listed as unhealthy (claude05, 21:24Z).
// qualified peer, and nothing is listed as unhealthy.
func TestRecoveryWatchdog_MasterLaterDegradationFollowsNormalRules(t *testing.T) {
h, svc := watchdogMaster(t)
defer closeTestMaster(t, h)
@@ -46,7 +46,7 @@ type ChunkCutResponse struct {
Noop bool `json:"noop"`
FullHash bool `json:"fullHash"`
// The cut statistics (§3.1) are added when W3 fills them; until then
// the body omits them rather than report zeros (appendix 14:30Z).
// the body omits them rather than report zeros (B9 W2 appendix).
}
// ChunkSnapshotRequest is POST /chunk/snapshot's request (§3.2), without
@@ -159,7 +159,7 @@ func TestStatusServer_ChunkSuccessBodiesUseSpecFields(t *testing.T) {
ctl.deadline < chunkstore.DefaultOpDeadline-time.Minute || ctl.deadline > chunkstore.DefaultOpDeadline {
t.Fatalf("cut with a huge timeoutMs: %d (deadline %v), want OpDeadline", w.Code, ctl.deadline)
}
// The cut statistics are omitted until W3 fills them (appendix 14:30Z).
// The cut statistics are omitted until W3 fills them (B9 W2 appendix).
wantKeys(t, "cut", jsonKeys(t, w.Body.Bytes()), "volumeID", "cutLSN", "headGen", "headEpoch", "holder", "noop", "fullHash")
w = serve(t, s, http.MethodPost, "/chunk/snapshot", `{"volumeID":"v1","name":"s1","requestID":"r","labels":{"agent.step":"x"},"consistency":"app","expiresAtNs":9}`, "")
@@ -13,7 +13,7 @@ import (
"github.com/seaweedfs/seaweed-block/core/storage/memorywal"
)
// G1 admission latch (codex01 R1): a role call on the host's own replica
// G1 admission latch: a role call on the host's own replica
// listener that fails (its floor could not be made durable) must not leave a
// previously healthy frontend serving: the projection turns unhealthy and the
// durable backend refuses writes, until a later role call succeeds.
@@ -163,7 +163,7 @@ func supportingFact(epoch uint64) *control.AssignmentFact {
}
}
// codex01 R1 on #83: after the epoch-3 role call fails, a stale epoch-2 replay
// Review of #83: after the epoch-3 role call fails, a stale epoch-2 replay
// whose role call would succeed must not clear the latch or reopen writes on
// the real StorageBackend; only the current epoch's success reconciles.
func TestG1_StaleReplayDoesNotClearANewerAdmissionFailure(t *testing.T) {
+1 -1
View File
@@ -439,7 +439,7 @@ func (h *Host) RoleAdmissionFailure() (bool, string) {
// The desired role is monotonic in epoch: a call below the current desired
// epoch is a stale fact (master replay) and is refused without replacing the
// desired role or touching the admission latch, so a stale success can never
// reconcile a newer failure (codex01 R1 on #83).
// reconcile a newer failure (review of #83).
func (h *Host) fenceSelf(role selfRole, epoch uint64) error {
return h.fenceSelfWithPeers(role, epoch, true)
}
@@ -13,7 +13,7 @@ import (
// tracks the primary's OWN slot; the registry tracks each PEER. They
// are independent ReplicaState instances.
//
// G5-5C Batch #7 rationale (architect ruling 2026-04-27): without
// G5-5C Batch #7 rationale: without
// per-peer adapter state, engine.checkReplicaID drops probe results
// for peer X as wrong_replica because the host's single adapter
// tracks Identity.ReplicaID = primary's-own-slot. This registry fixes
@@ -145,7 +145,7 @@ func TestRecoveryWatchdog_StatusShowsReasonAndCatchUp(t *testing.T) {
// Once ready in this assignment, a later not-ready on the same
// incarnation is a running primary degrading, not a boot-recovery stall:
// no recovery_timeout, however long it lasts (claude05, 21:24Z).
// no recovery_timeout, however long it lasts.
func TestRecoveryWatchdog_ReadyThenLaterNotReadyReportsNoTimeout(t *testing.T) {
h, clk := watchdogHost(t, 10*time.Second)
h.applyFact(selfPrimaryFact(1))
@@ -17,7 +17,7 @@ func TestStatusServer_StatusCarriesRecoveryWarningsWithoutChangingHealth(t *test
statusWarningsCase(t, NewAdapterProjectionView(stubProjector{}, "v1", "r1", nil), false)
})
t.Run("healthy primary", func(t *testing.T) {
// codex01's advisory: a healthy primary stays healthy with a warning.
// A healthy primary stays healthy with a warning.
p := stubProjector{p: engine.ReplicaProjection{Mode: engine.ModeHealthy, Epoch: 1, EndpointVersion: 1}}
statusWarningsCase(t, NewAdapterProjectionView(p, "v1", "r1", stubProbe{yes: false}), true)
})
@@ -304,7 +304,7 @@ func TestT4a6_BestEffort_DisconnectThenReassign(t *testing.T) {
"all written entries through reassign, OR (b) wiring the test to " +
"observe the engine's rebuild-on-recycled-WAL path. Both are out " +
"of slice-2B scope; tracked in §11.9 follow-ups.")
// §6.3 collapse + Path B (architect ruling 2026-04-30):
// §6.3 collapse + Path B:
//
// Pre-§6.3 this test asserted that a peer degraded mid-stream +
// reassign-to-fresh-replica does NOT silently catch up the
@@ -7,7 +7,7 @@ import (
// Detach publishes its final cut with State = detached and DetachedBy =
// {holder, epoch, the generation that CAS installs} in that one CAS (HEAD
// schema ruling, 2026-11-15). Afterwards the layer refuses every cut; a
// schema). Afterwards the layer refuses every cut; a
// repeated Detach returns the first result.
func TestChunkDetach_OneCASPublishesDetachedFinalCut(t *testing.T) {
s, _ := newChunkTestStore(t)
@@ -6,7 +6,7 @@ import (
"testing"
)
// HEAD's remote_lsn never decreases (B9 W2 appendix, 2026-11-15 14:30Z): a
// HEAD's remote_lsn never decreases (B9 W2 appendix): a
// host whose log is behind HEAD (a fresh or migrated host before W4b carries
// LSN continuity) cannot cut or detach; nothing is uploaded and no CAS is
// sent. Once its log continues from HEAD's remote_lsn, it cuts.
+6 -6
View File
@@ -202,8 +202,8 @@ type chunkDetachedBy struct {
// chunkHeadIsDetached reports whether h is a detached HEAD.
// chunkHeadAborted marks a fork target's HEAD tombstone: a GC sweep claimed
// the HEAD of a dead fork so its late create can never land (W5 ruling,
// 2026-11-15 17:30Z). Such a volume never attaches.
// the HEAD of a dead fork so its late create can never land (W5). Such a
// volume never attaches.
const chunkHeadAborted = "aborted"
// chunkHeadDeleting marks a volume a delete has admitted (chunks kept, so
@@ -265,8 +265,8 @@ type chunkIntent struct {
CreatedNs int64 // assigned by PutIntent
// DeadlineNs (unix ns) is a copy intent's publication deadline, kept as
// metadata: a GC sweep settles a dead copy attempt by claiming its
// publishing entry with a tombstone, never by the deadline alone (W5
// ruling, 2026-11-15 17:30Z). 0 for capture intents.
// publishing entry with a tombstone, never by the deadline alone (W5).
// 0 for capture intents.
DeadlineNs int64
}
@@ -499,8 +499,8 @@ var (
errChunkBaseInstalling = errors.New("storage: chunk BASE install in progress")
errChunkRemoteUnavailable = errors.New("storage: chunk remote unavailable")
// errChunkLSNBehind: this host's log has not reached the HEAD's
// remote_lsn, so a cut would move remote_lsn backwards (B9 W2 appendix,
// 2026-11-15 14:30Z; LSN continuity across hosts is W4b's).
// remote_lsn, so a cut would move remote_lsn backwards (B9 W2 appendix;
// LSN continuity across hosts is W4b's).
errChunkLSNBehind = errors.New("storage: cut LSN is behind the HEAD's remote_lsn")
// errChunkReconciling: the layer is still reconciling its dirty set
// against HEAD (bitmap lost or mismatched, or a BASE install just
+1 -1
View File
@@ -426,7 +426,7 @@ func plausibleEntryHeader(h []byte, minLSN, remaining uint64, blockSize uint32)
}
// detectHole notes a suspected WAL hole at a bad entry (issue #51;
// claude05's ruling 2026-11-16 06:47Z: detection only). An all-zero
// detection only). An all-zero
// header is just the end of what was written. Otherwise, if a valid entry
// with an LSN above minLSN (the highest decoded so far, or the checkpoint)
// follows it, the hole is recorded as the typed warning
@@ -46,7 +46,7 @@ func warnsHole(s *Store) bool {
return false
}
// codex01's r1 P1, under claude05's 06:47Z ruling (detection only): a torn
// Review finding, under the detection-only rule: a torn
// slot accepted by one recovery stays a recoverable warning after a
// frontier jump and a new synced write; nothing infers its generation from
// its position in the ring.
+2 -2
View File
@@ -32,8 +32,8 @@ type walWriter struct {
logicalHead uint64 // monotonic write position
logicalTail uint64 // monotonic flush position
// durableTail is the tail in the last fsynced superblock. The writer
// overwrites only bytes released by it (claude05's S3 ruling,
// 2026-11-16): bytes the on-disk superblock still declares retained
// overwrites only bytes released by it: bytes the on-disk superblock
// still declares retained
// are never reused, so a torn new record cannot land inside the
// persisted [tail, head) and hide a record recovery needs.
// durablePending: the bounds were rebuilt by recovery and are not yet
@@ -6,7 +6,7 @@ import (
"testing"
)
// Issue #51, walstore (claude05's ruling 2026-11-16 06:47Z): pure
// Issue #51, walstore: pure
// detection. A WAL hole followed by valid records is logged, counted and
// reported as the typed warning wal_hole_suspected; nothing about what is
// replayed, where replay stops, or whether the volume opens changes.
@@ -175,7 +175,7 @@ func TestWALStoreRecoverWrappedHoleIsNoOutage(t *testing.T) {
_ = r
}
// codex01's r1 P1: a damaged STALE record in a released range (below the
// Review finding: a damaged STALE record in a released range (below the
// checkpoint, outside the retained window) must not cost retained data.
// Layout: checkpoint 2, persisted tail at S, head at 3S; LSN 1 (released)
// at 0 damaged, LSN 2 checkpointed at S, LSN 3 synced and unflushed at 2S.
@@ -10,8 +10,8 @@ import (
)
// The WAL writer may only overwrite bytes that the PERSISTED superblock tail
// has released (claude05's ruling on the S3 torn-wrap finding, 2026-11-16
// 07:33Z). Otherwise a torn new record can land inside the persisted
// has released (the torn-wrap finding). Otherwise a torn new record can
// land inside the persisted
// [tail, head) and stop recovery's scan before a synced record behind it.
func diskSuperblockForTest(t *testing.T, path string) superblock {
@@ -209,8 +209,8 @@ func TestWALWriterReuseIsBoundedByTheDurableTail(t *testing.T) {
// A full flush persists head == tail (an empty WAL at that position). Sync
// does not persist the head, so synced appends follow it there; recovery must
// scan from the persisted position, not from offset 0 (claude05's S3 trace:
// a torn unsynced record wrapped to 0 must not hide the synced run).
// scan from the persisted position, not from offset 0 (a torn unsynced
// record wrapped to 0 must not hide the synced run).
func TestWALStoreFullFlushThenTornWrapKeepsSyncedRecords(t *testing.T) {
const (
blockSize = 4096
@@ -266,7 +266,7 @@ func TestWALStoreFullFlushThenTornWrapKeepsSyncedRecords(t *testing.T) {
}
}
// codex01 #159 P2-S2: the batch planner (with a padding wrap) counts from the
// Review of #159: the batch planner (with a padding wrap) counts from the
// durable tail too: refused while the release is only in memory or the
// bounds are recovery-pending, accepted once the tail is persisted.
func TestWALWriterBatchReuseIsBoundedByTheDurableTail(t *testing.T) {
@@ -352,7 +352,7 @@ func TestWALWriterBatchReuseIsBoundedByTheDurableTail(t *testing.T) {
})
}
// codex01 #159 P2-S3: when Recover cannot persist the rebuilt bounds (the
// Review of #159: when Recover cannot persist the rebuilt bounds (the
// superblock write or its fsync fails), it fails, admits no append, and a
// same-instance retry persists them; later writes survive a reopen exactly.
func TestWALStoreRecoverBoundsPersistFailureRefusesAppendsUntilRetry(t *testing.T) {
@@ -6,8 +6,8 @@ import (
"testing"
)
// claude05's condition (1) for any prefix-cut recovery rule (2026-11-16
// 07:33Z): an intentional LSN gap must not drop synced entries above it. A
// Condition (1) for any prefix-cut recovery rule: an intentional LSN gap
// must not drop synced entries above it. A
// rebuild installs BASE through WriteExtentDirect (no LSN) and applies
// WAL-lane entries with their real LSNs through ApplyEntry; the frontier
// jump (AdvanceFrontier at MarkBaseComplete) is not persisted before them.
@@ -5,8 +5,8 @@ import (
"testing"
)
// Recovery is last-writer-wins by LSN (claude05's ruling (B), 2026-11-16
// 06:47Z). Two valid versions of one LBA survive in the WAL; the persisted
// Recovery is last-writer-wins by LSN. Two valid versions of one LBA
// survive in the WAL; the persisted
// head/tail predate the wrap, so the range scanned first holds the newer
// version (wrapped to offset 0) and the range scanned later the older one.
// Recovery must still serve the newer bytes.
@@ -117,7 +117,7 @@ func g1Persisted(t *testing.T, path string) uint64 {
}
// TestG1_RestartedReplicaRefusesShipBelowItsAcknowledgedEpoch — the red test,
// revised per the accepted contract (codex01 R3):
// revised per the accepted contract:
//
// (a) admitted at epoch 1, a ship raises it to 2 and a real epoch-2 barrier
// is ACKed; restart on the same floor record;
@@ -186,7 +186,7 @@ func TestG1_BarrierOnlyEpochSurvivesRestart(t *testing.T) {
// A freshly created volume loads its bootstrap floor (epoch 0) at restart,
// stays unassigned and refuses every mutation, and a successful current
// assignment then admits valid traffic (codex01 round 3 positive).
// assignment then admits valid traffic (the positive case).
func TestG1_FreshVolumeRestartBeforeAssignment(t *testing.T) {
store := storage.NewBlockStore(16, 4096)
floor := g1Fresh(t)
@@ -242,7 +242,7 @@ func TestG1_InvalidOrMissingRecordRefusesTheListener(t *testing.T) {
"missing field": `{"schema":"seaweed-block.replica-floor/v1","volume_id":"vol1"}`,
"bad epoch": `{"schema":"seaweed-block.replica-floor/v1","volume_id":"vol1","epoch":-1}`,
"oversized": ok + string(bytes.Repeat([]byte(" "), floorRecordMaxBytes)),
// codex01 R2 on #83: case variants are not the same key.
// Review of #83: case variants are not the same key.
"uppercase keys": `{"SCHEMA":"seaweed-block.replica-floor/v1","VOLUME_ID":"vol1","EPOCH":3}`,
"case-folded duplicate": `{"schema":"seaweed-block.replica-floor/v1","volume_id":"vol1","epoch":7,"EPOCH":0}`,
"case-folded duplicate rev": `{"schema":"seaweed-block.replica-floor/v1","volume_id":"vol1","Epoch":0,"epoch":7}`,
@@ -87,7 +87,7 @@ func TestG2_FloorStaysWhenThePrimaryLaterSupportsAnother(t *testing.T) {
// pausingStore holds ApplyEntry inside the store until released, to put a
// ship frame "past the gate but not yet applied" at the moment of promotion
// (claude03's review control for #82).
// (the review control for #82).
type pausingStore struct {
storage.LogicalStorage
entered chan struct{}
@@ -133,7 +133,7 @@ func g2PausedShip(t *testing.T) (*ReplicaListener, *pausingStore) {
// An epoch-1 ship admitted just before promotion is inside ApplyEntry when
// FenceAsPrimary(2) is called. The fence must not return until that apply has
// finished: nothing from the deposed primary is applied after the host serves
// as primary (claude03 P2-1 on #82; before the fix it was applied ~18 µs after
// as primary (review of #82; before the fix it was applied ~18 µs after
// the fence returned).
func TestG2_FenceWaitsForAShipAlreadyPastTheGate(t *testing.T) {
listener, store := g2PausedShip(t)
@@ -333,7 +333,7 @@ func TestPillar2B_LiveWrites_HighPressure_BarrierIntegrity(t *testing.T) {
t.Fatal("OnSessionStart did not fire within 2s")
}
// §6.3 / Path B (architect ruling 2026-04-30): pushes are
// §6.3 / Path B: pushes are
// SERIALIZED. Pre-§6.3 this test ran 16×8=128 concurrent pushers
// to stress the atomic-seal contract; under §6.3 single drive()
// dispatch, concurrent pushes during session can race against
+1 -1
View File
@@ -330,7 +330,7 @@ func (r *ReplicaListener) handleConn(conn net.Conn) {
// G2: a mutating frame is counted from before its gate check until its
// effect is done, so FenceAsPrimary can wait out every frame that may
// already have passed the gate (claude03 review of #82).
// already have passed the gate (review of #82).
mutating := isMutationMsg(msgType)
if mutating {
r.beginMutationFrame()
+1 -1
View File
@@ -209,7 +209,7 @@ type WalShipperConfig struct {
// DefaultWalShipperConfig returns production defaults.
//
// SLICE-2 (architect ruling 2026-04-30): LegacyOutOfOrderEmit
// SLICE-2: LegacyOutOfOrderEmit
// defaults to FALSE — §6.3 normative tail-gap fail-closed. The
// shipper does NOT silently emit input bytes for a missing-LSN
// case; the engine MUST escalate to rebuild on tail gap.