Skip to content

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

Merged
waleedlatif1 merged 5 commits into
stagingfrom
feat/website-links-mode
Dec 1, 2026
Merged

waleedlatif1 merged 5 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:41am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no new actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Adds website discovery by following links, with scope checks, page and depth limits, content hashes, and protection against removing pages after an unfinished crawl.

  • Website syncs can find pages by following links from the configured URL.
  • Website page requests now keep the delay named in robots.txt.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Open website session] --> B{Discovery mode}
  B -->|sitemap or auto| C[Read sitemaps]
  B -->|links| D[Follow scoped links]
  C -->|auto finds no pages without failures| D
  C --> E[Hold sorted listing]
  D --> E
  E --> F[Return pages by URL cursor]
  F --> G[Read changed documents]
Loading

Reviews (6) · Last reviewed commit: "fix(connectors): keep Crawl-delay on pag..." · 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.

Comment thread apps/sim/connectors/website/crawl.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 9 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/page.ts Resolved
Comment thread apps/sim/connectors/website/page.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved
… and validate links mode within the configured limits

A traverse-only start page's redirects keep its include exception, validation crawls with the configured depth and page cap and stops at the first page it would list, crawler-named robots directives split on spaces, and rel=nofollow matches only the exact token.
@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/page.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 9 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
@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.

@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 9 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
@waleedlatif1
waleedlatif1 merged commit edbc90b into staging Dec 1, 2026
84 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/website-links-mode branch December 1, 2026 16:54

This branch was previously deployed

1 inactive deployment
Preview — 659ecce4 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