Title: lab-ops-hub: the #500 crawl-timeout fix has no regression test — crawlFallback's fetcher is inline in the untestable Worker entry · Issue #524 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: the #500 crawl-timeout fix has no regression test — crawlFallback's fetcher is inline in the untestable Worker entry · Issue #524 · developing-today/code
X Title: lab-ops-hub: the #500 crawl-timeout fix has no regression test — crawlFallback's fetcher is inline in the untestable Worker entry · Issue #524 · developing-today/code
Description: Problem The #500 fix — a per-hop AbortSignal.timeout(20_000) on the Worker-fallback crawler — has no committed regression test. If the signal line is dropped, renamed, or the timeout raised, every test in the repo still passes. Evidence ...
Open Graph Description: Problem The #500 fix — a per-hop AbortSignal.timeout(20_000) on the Worker-fallback crawler — has no committed regression test. If the signal line is dropped, renamed, or the timeout raised, every ...
X Description: Problem The #500 fix — a per-hop AbortSignal.timeout(20_000) on the Worker-fallback crawler — has no committed regression test. If the signal line is dropped, renamed, or the timeout raised, every ...
Opengraph URL: https://github.com/developing-today/code/issues/524
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: the #500 crawl-timeout fix has no regression test — crawlFallback's fetcher is inline in the untestable Worker entry","articleBody":"## Problem\n\nThe #500 fix — a per-hop `AbortSignal.timeout(20_000)` on the Worker-fallback crawler — has **no committed regression test**. If the signal line is dropped, renamed, or the timeout raised, every test in the repo still passes.\n\n## Evidence (verified this run, main `1d0de449`)\n\n- The timeout lives inline in the fetcher passed to `fetchFollowingValidatedRedirects` inside the **unexported** `crawlFallback` in `pkgs/lab-ops-hub/src/index.ts:170-176` (`signal: AbortSignal.timeout(20_000)` at :174).\n- `src/index.ts` is the Worker entry point (`wrangler.jsonc:4` `\"main\": \"src/index.ts\"`, imports Cloudflare bindings at module scope) and **no test imports it**.\n- The only TS suite, `test/lib.test.ts`, imports exclusively from `src/lib.ts` (`computeBudget`, `fetchFollowingValidatedRedirects`, `readResponseTextCapped`, `validateCrawlUrl`, …) — the pure-helper pattern the sibling crawl fixes (#460/#481) deliberately used precisely so the behaviour is testable with plain Node.\n- PR #501's verification was a manual behaviour probe only (stall aborts ~305 ms, slow-drip body read aborts ~301 ms at a 300 ms stand-in timeout) — sound, but nothing in `npm test` (TS 20/20 + Python 16/16, re-run green this run) pins it.\n\n## Why it matters\n\n#500 was a real hang: a validated public target that accepts the connection and stalls (or slow-drips a body under the 2 MB cap) hung the fallback crawl until platform limits killed it. The one line that prevents it is exactly the kind of line a future refactor of `crawlFallback` can silently lose — the fetcher is an anonymous inline arrow, so nothing about its shape signals \"this signal is load-bearing\".\n\n## Acceptance criteria\n\n- [ ] Extract a testable fetcher factory in `src/lib.ts` (e.g. `crawlFetcher(timeoutMs, fetchImpl?)` returning the `(u) => fetch(u, { redirect: \"manual\", headers, signal })` function), and have `crawlFallback` in `src/index.ts` use it — same 20 s default, same headers, same manual-redirect mode.\n- [ ] New tests in `test/lib.test.ts` pin: (a) every call receives an `AbortSignal`; (b) a fetch whose response stalls rejects when the signal fires (short stand-in timeout); (c) a slow-drip body read through the returned response rejects on abort.\n- [ ] Ablation: the new tests fail if the factory stops attaching the signal.\n- [ ] `npm test` in `pkgs/lab-ops-hub` stays green (TS + Python suites).\n\nSingle-repo: `lab-ops-hub` / `crawlFallback` exist only in this repo (grep-verified against the opencode, openchamber and nix clones). Filed by new-issue-creator from the pr-diff-review REVIEW-FINDING recorded against PR #501 on 2026-10-21.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T02:57:38Z","url":"https://github.com/developing-today/code/issues/524"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d8331ec1-0aec-294f-f932-f10fa209b6e5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1D2:33EB8:9AA0E8:C73311:6B0631C5 |
| html-safe-nonce | 3cb146425e9a745938716e2b20b933b4df1ec26333566553919979f7061405cd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUQyOjMzRUI4OjlBQTBFODpDNzMzMTE6NkIwNjMxQzUiLCJ2aXNpdG9yX2lkIjoiNzM1MTMzNjE0OTU2MDIwOTg2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | adc778dbfe192652af54492c8a10f3edfe76b78e8830765c4f1450ad6e2707fe |
| hovercard-subject-tag | issue:5972209543 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/524/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e9cecd5930ac66784703bb73bc1bfb8c7fd7c710d2b3359837721552d05353c4/developing-today/code/issues/524 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e9cecd5930ac66784703bb73bc1bfb8c7fd7c710d2b3359837721552d05353c4/developing-today/code/issues/524 |
| og:image:alt | Problem The #500 fix — a per-hop AbortSignal.timeout(20_000) on the Worker-fallback crawler — has no committed regression test. If the signal line is dropped, renamed, or the timeout raised, every ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width