SIGN IN SIGN UP

fix: prevent Actor log-streaming thread from crashing on stream timeout (#944)

## Summary

After a successful `ActorClient.call()`, the background log-streaming
thread could crash with an uncaught `impit.TimeoutException`, printing a
traceback even though the run finished fine.

## Issue

Closes: #945

## Root cause

The log stream was requested with a bounded 30s timeout. impit applies
`timeout` to the *whole* request, including the streamed body, so any
run streaming logs longer than that tripped `impit.TimeoutException`
mid-stream — unhandled in the sync thread, and a spurious `ERROR` +
traceback in the async twin. Raising the value wouldn't help: every tier
is capped at `DEFAULT_TIMEOUT_MAX` (360s).

## Fix

- Request the stream with `no_timeout` (impit's ~24h ceiling), so it
runs until the server closes it with EOF at run finish. Matches the JS
client.
- Catch `impit.TimeoutException` in both paths and log a `WARNING`
instead of crashing / error-logging; other failures still error-log.
- Run the sync streaming thread as a daemon so a stalled read can't
block interpreter shutdown.

## Known limitation

A parked sync `iter_bytes()` read can't be interrupted from another
thread, so with `no_timeout` a manual `StreamedLog.stop()` on a
momentarily silent stream waits for the next chunk or EOF rather than
the old 30s bound. The `ActorClient.call()` path is unaffected (run
finish sends EOF). Matches the JS client.
V
Vlada Dusek committed
24dd614bd083a93735a12dccb4b7b1588e87f3ec
Parent: 106afff
Committed by GitHub <noreply@github.com> on 7/13/2026, 10:34:01 AM