Give the webhook handler a timeout (closes #38)
check / check (push) Successful in 38s
check / check (pull_request) Successful in 54s

The webhook handler's client had no timeout, and slog calls the handler
inside the log call, so a server that accepted the connection and never
answered stopped that log call for good, and every later one. A request
still running after 5 seconds now fails with a timeout error. The
handler also reads the answer to the end before closing it, so the
connection is reused for the next record.

A new test points the handler at a server that never answers and checks
that Handle returns a timeout error. The README states the timeout.

Model: opus-5-5
This commit is contained in:
2026-10-06 07:44:25 +00:00
committed by sneak
parent 8e53530434
commit d054848547
4 changed files with 56 additions and 3 deletions
+3
View File
@@ -24,6 +24,9 @@ files it depends on: .golangci.yml, REPO_POLICIES.md, .editorconfig,
# Completed Steps
* 2026-10-06: a webhook request now times out after 5 seconds, so a
server that never answers no longer stops every log call; the webhook
handler also reads each answer to the end so its connection is reused
* 2026-10-06: the linter runs only in Docker: `script/lint` builds the
`lint` stage of the `Dockerfile`, every `docker build` in `script/`
runs without the build cache, and `script/bootstrap` no longer