From 433bdcb7c1d9606a27a0f8b0f264eba0a74fc274 Mon Sep 17 00:00:00 2001 From: Benjamen Keroack Date: Tue, 6 Oct 2026 14:10:43 -0600 Subject: [PATCH] e2e: wait for the confirmed match before cutting the loader test's stream TestE2EWatchSetLoaderRebuildsFromTruthOnReconnect failed most runs (7 of 10 locally, and in 11 of the 18 failed CI runs since 2026-09-24). Its priming loop stopped at the first ScriptMatched for its payment, which is usually the mempool match, and an unconfirmed match carries no cursor. The test then cut the transport, often before the confirmed match from the block payTo mines had reached the pump. The watch was left with no resume cursor, so the reconnect sent no SetCursor and the wait for CursorAccepted saw only heartbeats until its deadline. Every failing run had a nil ResumeCursor at the cut; every passing run had one. Wait for the confirmed match, as primeRW already does for the same reason. 30 of 30 local runs pass. Co-Authored-By: Claude Opus 5.5 (1M context) --- clients/go/e2e/resilientwatch_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clients/go/e2e/resilientwatch_test.go b/clients/go/e2e/resilientwatch_test.go index 21bc8ed7c..068fb3024 100644 --- a/clients/go/e2e/resilientwatch_test.go +++ b/clients/go/e2e/resilientwatch_test.go @@ -227,7 +227,12 @@ func TestE2EWatchSetLoaderRebuildsFromTruthOnReconnect(t *testing.T) { if err != nil { break } - if m, ok := ev.(*satdevents.ScriptMatched); ok && satdevents.DisplayHex(m.Txid) == txid { + // Wait for the CONFIRMED match, as primeRW does: only it carries + // a cursor. Stopping at the mempool match cut the transport, most + // runs, before the confirmed one reached the pump. The reconnect + // then had no resume cursor, sent no SetCursor, and the wait for + // CursorAccepted below saw only heartbeats until it timed out. + if m, ok := ev.(*satdevents.ScriptMatched); ok && m.Confirmed && satdevents.DisplayHex(m.Txid) == txid { registered = true break }