@@ -273,7 +273,9 @@ async def describe_run(name: str, seq: int):
273273 # For logs-after-completion test apps, complete quickly to test log draining
274274 # Use 1 second so CLI has time to start streaming before completion
275275 completion_threshold = (
276- 1.0 if "logs-after-completion" in name or "logs-warning" in name else 5.0
276+ 1.0
277+ if "logs-after-completion" in name or "logs-warning" in name
278+ else 5.0
277279 )
278280
279281 if elapsed > completion_threshold :
@@ -492,6 +494,7 @@ def make_log_data(seq: int, line_num: int, content: str, timestamp: str):
492494def make_log_event (seq : int , line_num : int , content : str , timestamp : str ):
493495 return f"event: log\n data: { json .dumps (make_log_data (seq , line_num , content , timestamp ))} \n \n "
494496
497+
495498def make_warning_event (content : str , timestamp : str ):
496499 data = {"data" : {"content" : content , "reported_at" : timestamp }, "event" : "warning" }
497500 return f"event: warning\n data: { json .dumps (data )} \n \n "
@@ -524,6 +527,7 @@ async def generate_logs_after_completion_test_stream(seq: int):
524527 seq , 2 , "Second log after run completes" , "2025-08-22T12:00:01Z"
525528 )
526529
530+
527531async def generate_warning_log_stream (seq : int ):
528532 """Stream a warning and a couple of logs, then finish."""
529533 yield make_warning_event ("Rate limit approaching" , "2025-08-22T12:00:00Z" )
0 commit comments