Skip to content

web: a download still arriving is not cut off at 30 s (board #143) - #382

Merged
SSFSKIM merged 1 commit into
mainfrom
web-download-stall
Oct 25, 2026
Merged

SSFSKIM merged 1 commit into
mainfrom
web-download-stall

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Board #143: the web plugin's clipper gave a page's whole response 30 s, body included, so a large file still downloading was cut off. In the hard eval's final round this hit the IEA's 17.6 MB World Energy Outlook PDF on a loaded machine. It was the round's only tool-caused error.

What changes

The page's fetch (the main fetch and its 406 and markdown-stub retries) now has two limits in place of the 30 s total, both inside the call's 150 s deadline:

Limit Value Its failure
Time to the response's headers (every hop's lookup, connection, headers) 30 s no response within 30 s
No body bytes arriving 20 s stalled: no data for 20 s after 28 bytes of 1.0 MB
The whole request (the deadline's time left) up to 150 s timed out after 150 s with 12.3 of 17.6 MB received
Size 50 MB (unchanged) too large: over 50 MB
  • Images keep their 20 s total each, and Defuddle's site extractors keep their 15 s.
  • When pdftotext is killed by its time, the note now says no text extracted: pdftotext did not finish within <s> s instead of pdftotext failed (Command failed: …). A long download can leave it only seconds.
  • If an https-first download uses up the deadline, its own failure is reported. The http fallback is not tried, since it would have no time and could only say timed out after 0 s.
  • The Decision Log entry records the rejected alternatives: a longer total, a minimum rate or projected finish, and time reserved for pdftotext.
  • web 0.3.1.

Verified

  • Before and after on the real file: the IEA PDF, served from a local server at 400 KB/s (44 s):
    • 0.3.0 failed with {"ok":false,…,"error":"timed out after 30 s"} after 30 s;
    • 0.3.1 saved it byte-identical (cmp), with its pdftotext text (156,557 words), in 46 s.
  • Live: node web/bin/clip.mjs fetch <IEA URL> returned ok (17,635,742 bytes, with text) in 20 s at load averages of 24 to 32.
  • New tests:
    • http.test.ts covers each limit at small values: a body running past the headers limit, headers that never come, a body that stops, a body still arriving when the whole time runs out, and no headers limit given.
    • clip.test.ts runs at the real limits: a page arriving steadily for 33 s is fetched, while one that stops fails at 20 s with the stall message. It also covers pdftotext cut short, and https-first when no time is left.
  • bash web/tests/run.sh passed on this Mac with Chromium: 152 clipper tests (none skipped), the bundle check, 55 mod tests and 91 eval-script tests.
  • ci-gate was GREEN on b3a736d: shell-lint, repo-checks, mods-types and web (https://github.com/SSFSKIM/doperpowers/actions/runs/40246237903).
  • Review: doperpowers:reviewer-medium found nothing material, so it converged in one round.

Not verified

  • A live fetch did not reproduce the original failure in either direction. 0.3.0 also fetched the live PDF here at load 177, because the network was fast enough then. The before-and-after evidence is the throttled local copy.

Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)

The page's fetch had one 30 s limit, body included, so a large file still
arriving ran out of it: the hard eval's 17.6 MB IEA PDF, on a loaded
machine. It now has 30 s to the response's headers, then the body for as
long as bytes keep arriving, failing when none arrive for 20 s, the whole
within the call's 150 s deadline. Images (20 s each) and Defuddle's site
extractors (15 s) keep their totals.

Each limit says what ended it and how much had arrived: `no response
within 30 s`, `stalled: no data for 20 s after <received> [of <length>]`,
`timed out after <s> s with <received> [of <length>] received`. pdftotext
cut short by the time left says so, and an https-first download that spent
the deadline stands instead of an http fallback with no time.

The same PDF served locally at 400 KB/s (44 s) fails `timed out after 30 s`
on 0.3.0 and is saved with its text now. web 0.3.1.

Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T23:53:33.038548Z b3a736d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 040ac43 into main Oct 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant