Skip to content

crawler: seed order should key on the typed start URL only (deep-start follow-up to #1385) #1405

Closed

Description

@nc9

Follow-up from the review of #1385 (deep start URL, #1369).

prioritizeSeed in packages/crawler/src/core/crawler.ts is hasDeepPath(typed) || hasDeepPath(destination). An origin-only start (https://example.com/) that redirects to a deep page (/en/) therefore still enqueues the seed ahead of the sitemap. That changes frontier ownership (the seed, not the sitemap copy, owns the entry) and the sitemapPendingCount baseline in a narrow quick-mode edge: with disableLinkDiscovery and a sitemap that lists only the destination, the sitemap no longer counts as pending and link discovery is switched back on. Origin-only starts are documented as unchanged.

Separately, the optional-keys list in docs/configuration/output.mdx ("appear when they apply") does not name meta.requestedUrl.

Acceptance Criteria

  • An origin-only start URL that redirects to a deep page keeps the root-start frontier order: the sitemap copy of the destination owns its entry, as before deep starts were prioritised
  • A seed that is also a sitemap URL still counts toward sitemapPendingCount, so quick mode with a sitemap that lists only the seed keeps link discovery off
  • A crawler test through the real crawler.start() covers a typed root that redirects to a deep page, with the destination also in the sitemap
  • docs/configuration/output.mdx names meta.requestedUrl in the optional-keys list

Activity

  1. added
    enhancement
    size: XS
    on Oct 31, 2026
  2. added theissue type on Oct 31, 2026
  3. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.151 (e3dc86e4), verified against main: every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.151

    nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementsize: XS

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions