mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 08:02:38 +00:00
Running out of stream attempts freed the composer while the flow kept going, so the next turn wrote the same agent memory — the thing the retry was added to prevent, only deferred. The turn goes to `pollJobResult` instead, which keeps the chat busy until the run reaches a terminal state and settles it on the rows; `waitJob` cancels the run rather than waiting forever if the API stays down. The budget is counted since the last attempt that delivered something, so a long turn that blips once an hour is not treated like an endpoint that has gone. An abort is checked inside the consumer loop: the SSE reader drains the frames it has already buffered, and `endTurn` has by then reset the transcript state they would be applied to. The give-up toast truncates what it quotes — a 502 body is often a whole HTML error page. Drops the `flow_stream_job_id` scaffolding from the re-attach test: `followJob` never surfaces that id, so the assertion could not fail for the reason its comment claimed. Stop cancelling the flow rather than the streaming step is verified against a running backend instead. Also drops the EventSource stub the test no longer needs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>