test(aibridge): soften SSE-event assertion in agentic_all_keys_fail to a FLAKE log

This commit is contained in:
Susana Cardoso Ferreira
2026-06-01 14:54:58 +00:00
parent 81288656cd
commit aa525637c0
2 changed files with 9 additions and 0 deletions
@@ -121,6 +121,7 @@ func (s *EventStream) Start(w http.ResponseWriter, r *http.Request) {
return
}
time.Sleep(100 * time.Millisecond)
// Initiate the stream on first event (if not already initiated).
s.InitiateStream(w)
case <-s.tick.C:
+8
View File
@@ -483,6 +483,14 @@ newStream:
// Causes a new stream to be run with updated messages.
isFirst = false
// Commit to SSE format before the next iteration: if
// it fails (e.g. all keys exhausted), the error must
// be relayed as an SSE event since we already streamed
// the first iteration's events. Setting initiated here
// closes the race window in EventStream.IsStreaming()
// where Start may not yet have processed buffered
// events from this iteration.
events.InitiateStream(w)
continue newStream
}