Make a failed request say what happened #367

Open
PerishFire wants to merge 1 commit from task/a-curl-that-says-why into main
Owner

The cfworker projection died as plumb ship: curl failed: — a colon, then nothing — after hanging for three minutes.

Three faults produced one useless sentence:

  1. The wrapper piped stdout and left stderr inherited, so output.stderr was always empty and the message it interpolated could never carry anything.
  2. It passed no --max-time, so a request that never answers waits as long as the network allows.
  3. When curl exits without saying why, the code had nothing to report — and reported that.

Requests now cap at two minutes, capture stderr, and name the URL. When curl does exit silently the message says so and carries the exit code:

curl reached https://… with exit 28 and said nothing

which is the difference between something failed and a fact.

This is the class the release itself keeps meeting: a mechanism that reports less than it knows. It cost an hour here, because a three-minute hang with no message is indistinguishable from a hundred other things.

The cfworker projection died as `plumb ship: curl failed:` — a colon, then nothing — after hanging for three minutes. **Three faults produced one useless sentence:** 1. The wrapper piped stdout and left stderr **inherited**, so `output.stderr` was always empty and the message it interpolated could never carry anything. 2. It passed **no `--max-time`**, so a request that never answers waits as long as the network allows. 3. When curl exits without saying why, the code had nothing to report — and reported that. Requests now cap at two minutes, capture stderr, and name the URL. When curl does exit silently the message says so and carries the exit code: ``` curl reached https://… with exit 28 and said nothing ``` which is the difference between *something failed* and a fact. This is the class the release itself keeps meeting: **a mechanism that reports less than it knows.** It cost an hour here, because a three-minute hang with no message is indistinguishable from a hundred other things.
Make a failed request say what happened
All checks were successful
guard / guard (pull_request) Successful in 2m48s
1b82713b9f
The cfworker projection died as `plumb ship: curl failed:` — a colon, then
nothing — after hanging for three minutes. Three separate faults produced one
useless sentence.

The wrapper piped stdout and left stderr inherited, so `output.stderr` was
always empty and the message it interpolated could never carry anything. It
passed no `--max-time`, so a request that never answers waits as long as the
network lets it. And when curl exits without saying why, the code had nothing
left to report and reported that.

Requests now cap at two minutes, capture stderr, and name the URL. When curl
does exit silently the message says so and carries the exit code, which is the
difference between "something failed" and "curl reached <url> with exit 28 and
said nothing".

This is the class the release itself keeps meeting: a mechanism that reports
less than it knows. It cost an hour here, because a three-minute hang with no
message is indistinguishable from a hundred other things.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
All checks were successful
guard / guard (pull_request) Successful in 2m48s
This pull request has changes conflicting with the target branch.
  • plumb.toml
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/a-curl-that-says-why:task/a-curl-that-says-why
git switch task/a-curl-that-says-why
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishLab/plumb!367
No description provided.