chore: add standard STATUS markers to worker streams and optimize test polling

This fixes the 'stuck' behavior in concurrent tests by ensuring the tests look for standard completion markers and don't wait for unnecessary timeouts.
This commit is contained in:
2026-05-07 18:37:19 -04:00
parent d4b4312dd2
commit b043d06771
3 changed files with 11 additions and 4 deletions
+4
View File
@@ -599,8 +599,12 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
engine._dirty = True
if "BLOCKED" in response.upper():
ticket.mark_blocked(response)
if event_queue:
_queue_put(event_queue, "response", {"text": f"\n\n[STATUS] BLOCKED: {response}", "stream_id": f"Tier 3 (Worker): {ticket.id}", "status": "done"})
else:
ticket.mark_complete()
if event_queue:
_queue_put(event_queue, "response", {"text": "\n\n[STATUS] COMPLETED", "stream_id": f"Tier 3 (Worker): {ticket.id}", "status": "done"})
if event_queue:
_queue_put(event_queue, "ticket_completed", {"ticket_id": ticket.id, "timestamp": time.time()})