Merge pull request 'mesh-delivery-gate: judge a refused follow-ends by what it wrote, not by the history's last line' (#760) from fix/47-H2-gate-test-map-order into main

This commit was merged in pull request #760.
This commit is contained in:
2026-11-26 19:01:55 +00:00
@@ -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