Skip to content

Crawler rule: 10 s fetch, 30 s render, slow/broken sources flagged 30 days - #274

Merged
ralyodio merged 2 commits into
mainfrom
crawl-10s-30s-30d
Nov 8, 2026
Merged

ralyodio merged 2 commits into
mainfrom
crawl-10s-30s-30d

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Fleet crawler rule (2026-11-08).

  • packages/core/src/crawl.js: CRAWL_FETCH_TIMEOUT_MS 10 s, CRAWL_BROWSER_TIMEOUT_MS 30 s, BULK_DOWNLOAD_TIMEOUT_MS 1 h, FLAG_DAYS 30, failureClass(err) (timeout = slow; DNS/TLS/connect/5xx = broken; 4xx, parse, EAI_AGAIN and our own Postgres errors = null).
  • http.js: request default 30 s -> 10 s; download keeps the hour; errors marked upstream, HTTP errors carry status. Adapters that pass an explicit longer budget for a big document keep it.
  • opensite.js TIMEOUT_MS 15 s -> 10 s. storefront/buyvps/statuspage/openvuln page and API reads use the default.
  • renderWithObscura: one 30 s budget, waitUntil: 'load' + bounded settle (<= 2 s) instead of networkidle 60 s; a timeout rejects; the tab is always closed.
  • Ingest: a slow/broken failure sets next_run_at 30 days out and sources.flag/flagged_at (migration 0044, nullable columns); any other outcome clears them. Boot's rescheduleFailedSources skips flagged rows.
  • Tests: test/crawl-rule.test.js. (installmap + news-directories fail on main already.)

🤖 Generated with Claude Code

ralyodio and others added 2 commits November 8, 2026 17:17
… days

- core/crawl.js: CRAWL_FETCH_TIMEOUT_MS 10 s, CRAWL_BROWSER_TIMEOUT_MS 30 s,
  BULK_DOWNLOAD_TIMEOUT_MS 1 h, FLAG_DAYS 30, failureClass()
- http.request default 30 s -> 10 s; download keeps an hour; thrown errors
  marked upstream, HTTP errors carry status
- opensite TIMEOUT_MS 15 s -> 10 s; storefront/buyvps/statuspage/openvuln page
  and API reads drop their 15-30 s literals for the default
- renderWithObscura: one 30 s budget, waitUntil load + bounded settle instead
  of networkidle 60 s, rejects on timeout, always closes the tab
- ingest: a timeout, DNS/TLS/connect error or 5xx sets next_run_at 30 days
  out with sources.flag/flagged_at (migration 0044); boot's
  rescheduleFailedSources skips flagged rows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 223eb37 into main Nov 8, 2026
3 checks passed
ralyodio added a commit that referenced this pull request Nov 8, 2026
…ces (#275)

The deploy of #274 never applied 0044: ALTER TABLE sources needs ACCESS
EXCLUSIVE, and the web's long collection queries hold ACCESS SHARE on sources
for minutes, so the migration hit its 10 s lock_timeout on every retry and the
health check rolled the deploy back (the old container kept serving). A new
table takes no lock on sources. 0044 never applied anywhere, so the file is
rewritten in place.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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