Skip to content

fix(crawler): seed order keys on the typed start URL only #1405 - #1443

Closed
nc9 wants to merge 1 commit into
mainfrom
fix/seed-order-typed-url-1405
Closed

nc9 wants to merge 1 commit into
mainfrom
fix/seed-order-typed-url-1405

Conversation

@nc9

@nc9 nc9 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Closes #1405.

prioritizeSeed in packages/crawler/src/core/crawler.ts was hasDeepPath(typed) || hasDeepPath(destination), so an origin-only start that redirects to a deep page (/ to /en/) still enqueued the seed ahead of the sitemap, changing frontier ownership and the sitemapPendingCount baseline.

  • Seed order now keys on the typed URL only (hasDeepPath(userProvidedUrl)). The CLI already passes the typed URL as originalUrl. A deep start that redirects to the root is covered by the typed URL.
  • A seed enqueued early that is also a sitemap URL dedupes against itself and never raised the pending count; it now still counts, so quick mode with a sitemap that lists only the seed keeps link discovery off.
  • Test: packages/crawler/tests/deep-seed-order-1405.test.ts through the real crawler.start() (3 tests, 2 fail on main): deep typed start owns the seed entry, typed root redirecting to a deep page with the destination in the sitemap keeps the sitemap copy, seed-only-in-sitemap keeps quick mode discovery off.
  • The Auditing a deep URL silently audits the site root; the page you named may not be audited #1369 e2e for a root redirect to a deep page asserted the destination was crawled in a one-page budget, which only held because of the old ordering; it now asserts the root-start order (the sitemap's root entry).
  • Docs: docs/cli/audit.mdx sentence, and meta.requestedUrl named in the optional-keys list of docs/configuration/output.mdx. CHANGELOG under Unreleased / Fixed.

Based on the branch scratch/adopt-1385-my-followup (479e066f) but reduced to the crawler change: main's #1385 already carries the typed URL as originalUrl, so the extra requestedUrl plumbing from that branch is not needed.

Local: new test, the #1369 CLI e2e (5), format:check, crawler tsgo, docs make validate. Skill: no change needed.

nik

…t is also a sitemap URL still counts as pending #1405

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9 nc9 mentioned this pull request Oct 31, 2026
@nc9

nc9 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

@nc9 nc9 closed this Oct 31, 2026
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.

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

1 participant