format gate tests: comments say what each test does

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pingqiuandClaude Opus 5.5 committed 2026-12-01 21:11:01 -08:00
1 parent 6d24db415c
commit 49f7d3fe29
2 files changed
+7 -7

No files matched your search

@@ -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
@@ -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)