Fix review posting timeouts.

This commit is contained in:
Greyson Parrelli committed 2026-10-29 09:22:32 -04:00
1 parent 3475ca95c0
commit baa2907391
3 files changed
+32 -11

No files matched your search

+10 -5
View File
@@ -28,11 +28,16 @@ curl -s --max-time 30 "$BASE/api/repo"
tab's** review, so there is nothing to choose and no way to leave your review on
someone else's branch.
Give every call a deadline — `--max-time 30`. The server runs `git` for some of
these, and a repository being built in another pane can make that slow; a curl
with no deadline turns that into a tool timeout that says nothing about what
went wrong. If one does trip, say so and try once more rather than treating it
as a missing review: the answer was late, not absent.
Give every call a deadline — `--max-time 30` — so a hung request comes back as
a curl error rather than a tool timeout that says nothing about what went wrong.
Every call should answer in well under a second; one that hits the deadline
means something is wrong, not that the server is busy.
Send every POST with a body, even an empty one (`-d ''`). Without one curl sends
no `Content-Length`, and older playpen builds wait for a body that never comes:
the change is applied, but the response never arrives. If a write does time
out, re-read the comments before retrying: it has probably already landed, and
posting it again leaves a duplicate.
- `{"open":true,…}` with a `context` object — good, go to step 2.
- `{"open":false}` or a 409 — this tab has no review pane. Tell the user to open