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".
seratch
left a comment
There was a problem hiding this comment.
Can you fix all the review comments?
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08dd6d052c
ℹ️ 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".
| if task is None and not allow_new_read: | ||
| return b"" |
There was a problem hiding this comment.
Keep polling iterator-backed streams in the final probe
When the last regular poll consumes one ready async-iterator chunk, _read_modal_stream clears its task before the deadline check; if another chunk is already buffered, the final probe reaches this branch with task is None and skips it, so that output is still deferred until a later pty_write_stdin call. Keep blocking read() fallbacks disabled, but allow the final probe to start and zero-timeout-poll one __anext__() task for an existing iterator.
Useful? React with 👍 / 👎.
Summary
Testing
python -m compileall -qon changed source and test fileshttpx2was unavailable; dependency sync was blocked by package-index DNS failures