From 49f7d3fe293490740ee78caa0c56b601ab27d82d Mon Sep 17 00:00:00 2001 From: pingqiu Date: Tue, 1 Dec 2026 21:11:01 -0800 Subject: [PATCH] format gate tests: comments say what each test does Co-Authored-By: Claude Opus 5.5 --- .../core/authority/workspace_format_level_test.go | 2 +- seaweed-block/core/host/master/format_gate_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/seaweed-block/core/authority/workspace_format_level_test.go b/seaweed-block/core/authority/workspace_format_level_test.go index 9ed9208a0c..7c4dde6c5f 100644 --- a/seaweed-block/core/authority/workspace_format_level_test.go +++ b/seaweed-block/core/authority/workspace_format_level_test.go @@ -170,7 +170,7 @@ func TestTheForcedBarrierFollowsTheFormatLevel(t *testing.T) { // A clamped level-0 grant raises the deadline with this process's monotonic // reading, so the level-1 barrier after a finalize (with no renewal after -// it) cannot be moved by a wall-clock step (codex01's AMEND P1 1). +// it) cannot be moved by a wall-clock step. func TestAClampedLevel0GrantKeepsTheMonotonicReading(t *testing.T) { disk, _ := newTempStore(t) base := time.Now() // monotonic diff --git a/seaweed-block/core/host/master/format_gate_test.go b/seaweed-block/core/host/master/format_gate_test.go index a990667606..4a9d57fc0f 100644 --- a/seaweed-block/core/host/master/format_gate_test.go +++ b/seaweed-block/core/host/master/format_gate_test.go @@ -301,7 +301,7 @@ func (r *isolationRig) fgProcessHeartbeat(server, incarnation, vol string, reads // process's later level 1. The finalize is refused naming the old process; // at level 1 the server takes no new work while the old process is live, // and the new process's own heartbeat is taken (FormatGate: a host is a -// process; codex01's AMEND P1 3). +// process). func TestAServerReadsTheLowestLevelOfItsProcesses(t *testing.T) { r := newIsolationRig(t, false, t.TempDir(), t.TempDir()) if err := r.fgHeartbeat("node-a", 1); err != nil { @@ -354,7 +354,7 @@ func TestAServerKeepsASilentProcessThatStillHoldsItsVolume(t *testing.T) { } } -// codex01's schedule: an old process holds a placed volume, a new sibling +// An old process holds a placed volume, a new sibling // keeps reporting, the old one falls silent past the freshness window. The // finalize stays refused naming the old process, and at level 1 a placement // onto the server stays refused by the format check. @@ -396,8 +396,8 @@ func TestASilentOldHolderKeepsTheFinalizeAndNewWorkRefused(t *testing.T) { // The publication boundary judges the server's level when the ask is // published: an ask whose server reads below the cluster's level is refused -// there and its publish never runs; the control publishes (codex01's AMEND -// P2: the admission itself, called with a recording publish). +// there and its publish never runs; the control publishes (the admission +// itself, called with a recording publish). func TestThePublicationBoundaryRefusesAnAskForAnOldServer(t *testing.T) { for _, old := range []bool{true, false} { t.Run(map[bool]string{true: "old-process", false: "control"}[old], func(t *testing.T) { @@ -428,7 +428,7 @@ func TestThePublicationBoundaryRefusesAnAskForAnOldServer(t *testing.T) { // A heartbeat that reports several volumes records the level for each: an // old process reporting [va, vb] is kept for vb, still placed on its // server, after va stops being served and the report ages past the -// window (codex01's AMEND 6144739831 P1). +// window. func TestEveryVolumeOfAHeartbeatKeepsItsLevel(t *testing.T) { r := newIsolationRig(t, false, t.TempDir(), t.TempDir()) now := time.Now() @@ -458,7 +458,7 @@ func TestEveryVolumeOfAHeartbeatKeepsItsLevel(t *testing.T) { } } -// The queued-ask schedule (codex01's AMEND 6144739831 P2): a bind is +// The queued-ask schedule: a bind is // decided and reaches its publication admission while node-b's only process // reads level 1; it is held there; another node-b process then reports level // 0; released, the same ask is refused by the format check (binary_too_old)