Skip to content

feat(connectors): crawl a website by its links when it has no sitemap, keeping robots.txt Crawl-delay - #10553

Open
waleedlatif1 wants to merge 3 commits into
stagingfrom
feat/website-links-mode
Open

waleedlatif1 wants to merge 3 commits into
stagingfrom
feat/website-links-mode

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Built on the hardened website connector (#10556): its keyset listing cursor, holdListing, sitemap discovery, guarded fetches and robots parsing are reused unchanged.

  • New Page Discovery setting: auto (default; the sitemap, or following links when the site has none), sitemap, or links. Sites without a sitemap, such as published Google Sites, can now be synced
  • Following links: a breadth-first crawl from the website URL that returns a WebsiteDiscovery like sitemap discovery does, so listing, keyset paging, reconciliation and getDocument are the same code. Each in-scope page is read once (four at a time), up to Max Link Depth (default 3, max 10) and Max Pages, within a two-minute crawl deadline. Links come from the whole page, navigation included; rel="nofollow" links and nofollow/none pages are not followed; every link passes the same host, path, include/exclude and robots.txt scope
  • A crawl cut by the page cap or its deadline is truncated (listingCapped), and one where a page could not be read is incomplete (reconciliationUnsafe), so neither removes unlisted pages. Pages that are gone, not HTML, empty or opt out of indexing (meta or X-Robots-Tag) are not listed, though their links are still followed
  • Crawled pages are listed under the hash of the text the crawl read, which getDocument reproduces, so an unchanged page is not fetched again on later syncs
  • robots.txt Crawl-delay (of the applied group, capped at 10s) spaces every page request of a sync, crawl and getDocument alike
  • Validation for link discovery reads the first page through the same crawl the sync uses

Type of Change

  • New feature

Testing

  • connectors/website/website.integration.ts (32 tests, real HTTP servers through the guarded fetch), new: breadth-first crawl within scope, robots.txt, nofollow and depth with each page read once; crawl listing hash matches getDocument; auto fallback and validation when there is no sitemap; cap sets listingCapped; an unreadable page sets reconciliationUnsafe; Crawl-delay spacing; a crawl whose first page is gone fails the sync
  • robots.test.ts: Crawl-delay parsing, group selection and cap
  • Every new guard shown red by reverting it
  • bun run lint, bun run generate (no drift), check:comment-hygiene, check:test-patterns, check:utils, check:explicit-any, check:organization-egress; full type-check and audits left to CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Dec 1, 2026 9:14am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5 · Fix the link-validation timeout before merging; HTTP header follow restrictions also need attention.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect website connector discovery and page-fetch pacing.

Fix the link-validation timeout before merging; HTTP header follow restrictions also need attention.

Findings

  1. P1 Link validation outlasts its deadline ▶
  2. P2 Header follow restrictions are ignored ▶

Summary

Adds website discovery by following links, with sitemap fallback, depth and page limits, and shared pacing.

  • Website syncs can follow page links when discovering pages.
  • Website page reads now keep the robots.txt Crawl-delay.

Previous threads were unnumbered, so no numbered classifications are required. The redirect, base-URL, and unreadable-parent findings are addressed. waleedlatif1 accepted redirect and retry hops within one paced page read because per-hop pacing would require another guarded-fetch hook; Greptile withdrew that finding. waleedlatif1 also explicitly accepted bounded, truncated discovery in place of continuing crawl state across listing calls.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Open website session] --> B{Discovery setting}
  B -->|links| D[Crawl scoped links]
  B -->|auto or sitemap| C[Read sitemaps]
  C --> E{Auto and no pages found?}
  E -->|yes, no read failures| D
  E -->|no| F[Hold sorted listing]
  D --> F
  F --> G[List documents with content hashes]
  G --> H[Read changed documents]
Loading

Reviews (3) · Last reviewed commit: "fix(connectors): resolve crawled links w..." · Reviewed by Greptile

Comment thread apps/sim/connectors/website/website.ts Resolved
Comment thread apps/sim/connectors/website/crawl.ts Resolved
Comment thread apps/sim/connectors/website/crawl.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/website.ts Resolved
Comment thread apps/sim/connectors/website/page.ts Resolved
Comment thread apps/sim/connectors/website/crawl.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved
Comment thread apps/sim/connectors/website/page.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/connectors/website/website.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/crawl.ts Resolved
Comment thread apps/sim/connectors/website/page.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved
Comment thread apps/sim/connectors/website/crawl.ts Resolved
…ow in X-Robots-Tag

Page reads and Crawl-delay waits take the crawl's signal, so a stalled page cannot hold a sync or validation past its deadline. X-Robots-Tag nofollow/none stops link following, robots directives are parsed as tokens so valued directives such as max-image-preview:none are not read as none, and a start URL outside the include paths is read for its links without being listed.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

This branch was previously deployed

1 inactive deployment
Preview — 6769a58d Deployed Dec 1, 2026 by vercel[bot]
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