Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
84b98ed to
a16076a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84b98eddf5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
A spool reader that has written the whole declared Content-Length still waits for the fill to finish, which includes committing the cache write. Clients usually close the connection as soon as they have the body, so the wait is cancelled and Serve returns context.Canceled for a response that was delivered in full. Callers then log it as a failed response. Serve now returns success when the request ends after the full declared body was written and flushed. A client that leaves before the body is complete still gets the context error, and a failed flush is returned instead of being ignored. Signed-off-by: Ravi Agarwal <ravi@perplexity.ai> Co-authored-by: Perplexity <noreply@perplexity.ai>
a16076a to
a483383
Compare
Signed-off-by: Ravi Agarwal <ravi@perplexity.ai> Co-authored-by: Perplexity <noreply@perplexity.ai>
|
@codex review Created with Perplexity |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3196189f25
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Ravi Agarwal <ravi@perplexity.ai> Co-authored-by: Perplexity <noreply@perplexity.ai>
|
@codex review Created with Perplexity |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
When a spool reader has written the full declared
Content-Lengthto its client,Servestill waits for the fill to finish, including the cache commit, before it returns. Clients usually hang up as soon as they have the body, which cancels the request during that wait, soServereturnscontext.Canceledfor a response that was delivered in full. As a result:Failed to serve shared responseat error level;Failed to serve snapshot via spool, records the follower wait asread_error, and skips the snapshot serve metric.Change
Servereturns success when the request ends after the full declared body was written and flushed, and the request was still live when the last flush returned.http.ResponseController, and a flush error is returned instead of ignored.ResponseWriterwith onlyhttp.Flusher, such as otelhttp, which hides flush errors. On HTTP/1.1,net/httpcancels the request context as soon as a write to the connection fails.Content-Lengthbehave as before, and fill failures seen while the client is connected are still reported.Testing
TestClientHangupAfterFullBodyIsCompleteserves a 4-byte body to a recorder. A request cancelled after half of it getscontext.Canceled, and one cancelled after all of it gets success. It runs in asynctestbubble, so the hangup always lands afterServehas settled.TestClientHangupAfterFailedSocketWriteIsIncompleteuses a realhttptest.Serverwhose connection fails its second write, once with the server'sResponseWriterand once behind anhttp.Flusher-only wrapper. Both must report an error. Without the liveness check, the wrapped case reports success.http.Clientthat reads the body and closes the connection while the fill is still committing, through anhttp.Flusher-only wrapper. 500 of 500 requests are reported as successes.Created with Perplexity