From 1be74c87cf5396d6f0a4b1c05bbfec94749fcdc4 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 26 Nov 2026 19:54:55 +0100 Subject: [PATCH] mesh-delivery-gate: judge a refused follow-ends by what it wrote, not by the history's last line The subtest of gate_records_follow_ends read the ledger history's last line to see that nothing was written when the hand-act log refused. The setup ends three entries in a loop over a map, so in about one run in six that last line already read " end" and the check failed though nothing new was written: main.539's integration step of mesh-delivery-gate failed this way. The check now holds that the history does not grow across the refused call, whatever order the setup used. No test is added or removed (the gate is over its test budget). Builds: no design line; a test-only fix under issue 1984 (H2's delivery). The behaviour the subtest holds, H-A-634 (7), is unchanged. --- .../mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go index bdfb449c3..c50583c5f 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go @@ -1101,8 +1101,9 @@ func TestTheRecordsToolsReadThemAndEndOneByHand(t *testing.T) { if _, err := rs.FollowEnds("", log); err == nil { t.Fatal("followed with no reason") } - if _, err := rs.FollowEnds("the indexes were rebuilt", log); err == nil || len(l.history) == 0 || strings.HasSuffix(l.history[len(l.history)-1], moverX+" end") { - t.Fatalf("followed though the hand-act log refused it: %v", err) + before := len(l.history) + if _, err := rs.FollowEnds("the indexes were rebuilt", log); err == nil || len(l.history) != before { + t.Fatalf("followed though the hand-act log refused it: %v (wrote %v)", err, l.history[before:]) } endedOf := func(inst string) any { var st map[string]any