Retain useful command output context - #111
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
35c17ca to
4724ce4
Compare
ba4c860 to
977fb6b
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
bf59894 to
0cde887
Compare
bd20c64 to
ac39548
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac395481bb
ℹ️ 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".
0cde887 to
d30a5dd
Compare
ac39548 to
cec7cbc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41ec296f3f
ℹ️ 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".
| while ( | ||
| start < buffer.byteLength && | ||
| (buffer[start]! & 0b1100_0000) === 0b1000_0000 | ||
| ) { | ||
| start += 1; |
There was a problem hiding this comment.
Preserve malformed bytes in the retained tail
When output exceeds the limit and its rolling tail begins with invalid UTF-8 continuation bytes (for example, a binary command emitting repeated 0x80), this loop skips every such byte rather than decoding them as replacement characters. If the entire tail has this form, the returned result contains only part of the head and leaves most of the 12 KiB budget unused, contrary to the promised rolling-tail behavior; discard only bytes that belong to a boundary-split valid character while retaining malformed tail diagnostics.
Useful? React with 👍 / 👎.
| if (budget <= 0 || stream.totalBytes === 0) { | ||
| return { content: "", truncated: stream.totalBytes > 0 }; |
There was a problem hiding this comment.
Don't report partial UTF-8 as truncated
For a running command whose latest chunk ends partway through a multibyte UTF-8 character, retainedBytes omits the pending bytes and can allocate a zero or smaller decoded budget, causing this branch to set stdoutTruncated or stderrTruncated even though the stream is well below the result limit. The flag can then revert to false when the remaining bytes arrive, and clients may incorrectly conclude that output was permanently omitted; pending decoder bytes should not count as budget truncation.
Useful? React with 👍 / 👎.
Summary
Verification