Skip to content

fix(lab-ops-hub): fetch timeout for the Worker-fallback crawler (#500) - #501

Merged
dezren39 merged 1 commit into
mainfrom
creator/500-crawl-fallback-timeout
Oct 21, 2026
Merged

dezren39 merged 1 commit into
mainfrom
creator/500-crawl-fallback-timeout

Conversation

@dezren39

@dezren39 dezren39 commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Fixes #500.

crawlFallback's injected fetcher passed no signal, so a validated public server that accepts the connection and then stalls — or slow-drips a body under the 2 MB byte cap (#481 caps bytes, not time) — hung the crawl until platform limits killed it. Both sibling paths already protect against this: the container crawler uses _OPENER.open(timeout=20) (app.py:205) and the container dispatch uses AbortSignal.timeout(120_000) (index.ts).

Change: every fallback hop now fetches with signal: AbortSignal.timeout(20_000), mirroring the container's 20 s. The signal stays attached to the response, so it also bounds the readResponseTextCapped body read that follows.

Verification:

  • Existing TS suite: npm run test:ts — 18/18 pass.
  • Behaviour probe (same fetch shape, 300 ms stand-in timeout, local servers): a never-responding server aborts with TimeoutError at ~305 ms; a slow-drip body read aborts at ~301 ms; the same fetch without the signal is still pending after 400 ms.
  • Parse-checked with bun build.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

)

crawlFallback's fetcher passed no AbortSignal, so a validated public
server that stalls, or slow-drips a body under the 2 MB cap, hung the
crawl indefinitely. The container crawler times out at 20s
(app.py _OPENER.open(timeout=20)) and the container dispatch already
uses AbortSignal.timeout(120s); the fallback now mirrors the
container's 20s per hop. The signal stays attached to the response,
so it also bounds the readResponseTextCapped body read.
@dezren39
dezren39 requested a review from a team as a code owner October 21, 2026 20:05
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 04140b58-b8ac-4db5-9619-568898bedfb5
📥 Commits

Reviewing files that changed from the base of the PR and between 1f269a8 and e919d66.

📒 Files selected for processing: 1
  • pkgs/lab-ops-hub/src/index.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T20:09:35.530578Z e919d66 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.

@dezren39
dezren39 merged commit 1c692fd into main Oct 21, 2026
5 checks passed
@dezren39
dezren39 deleted the creator/500-crawl-fallback-timeout branch October 21, 2026 20:07
dezren39 added a commit that referenced this pull request Oct 25, 2026
The aggregator UI (session K, pm/aggregator-ui) consumes a swappable
Source behind one interface. Lands the read model (repo-qualified
issue/PR refs, the comment projection with PR-interior entries), the
pure derivations (execution strip, roadmap timeline lanes, unified
comment stream), and a fixture source shaped like the live readers,
with the real Grist seed rows and the design record's known refs
(#752/#754/#762/#763, nix #501-508, opencode #365).
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.

lab-ops-hub: Worker-fallback crawler has no fetch timeout — a slow target hangs the crawl indefinitely

1 participant