fix(sandbox): retain PTY output queued at timeout - #4572
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3359bb71c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| stdout_chunk = await self._read_modal_stream(entry=entry, stream_name="stdout") | ||
| stderr_chunk = await self._read_modal_stream(entry=entry, stream_name="stderr") |
There was a problem hiding this comment.
Keep the final Modal reads non-blocking
When a Modal stream lacks __aiter__ and uses the supported read() fallback, each of these calls can wait for the helper's 0.2-second timeout, despite the deadline already having expired. The added stdout/stderr reads can therefore make pty_exec_start or pty_write_stdin return up to roughly 400 ms later than before, even when no output is available; use a deadline-safe/non-blocking fallback for this final probe.
Useful? React with 👍 / 👎.
seratch
left a comment
There was a problem hiding this comment.
Can you fix all the review comments?
Summary
Testing
python -m compileall -qon changed source and test fileshttpx2was unavailable; dependency sync was blocked by package-index DNS failures