Skip to content

Remove the CLI's unreachable legacy crawl modules (apps/cli/src/crawl/sitemaps, robots, index) #700

Closed

Description

@nc9

apps/cli/src/crawl/sitemaps.ts, robots.ts and index.ts (and possibly csr-detect.ts) are not imported by any CLI source file. Only src/crawl/hybrid-fetcher.ts is reachable, from src/controllers/audit.ts. Sitemap and robots fetching for audits lives in packages/crawler. The dead modules are still imported by tests (tests/tools/request-deadline.test.ts, tests/crawler/fetch-deadline.test.ts).

They matter because they look live. crawl/sitemaps.ts fetches a site URL with a plain fetch() and an unbounded response.text(), the compression-bomb shape that #699 removed from every live path. A review of #699 flagged it as a remaining gap. A later change could wire it back in without noticing.

Acceptance Criteria

  • No file under apps/cli/src/crawl/ exists that nothing in apps/cli/src imports (check with a grep for the module path and ./<name> imports).
  • Tests that only exercised the removed modules are removed, or point at the packages/crawler equivalents. The remaining CLI tests pass.
  • bun run build in apps/cli still produces a working squirrel audit against a local site.

Activity

  1. added
    P3
    size: S
    on Oct 12, 2026
  2. nc9 commented on Oct 15, 2026

    @nc9
    ContributorAuthor

    Status after #782 (#756): sitemaps.ts, robots.ts and index.ts are gone from apps/cli/src/crawl/, and their tests moved to the crawler and utils packages. Still open for criterion 1: apps/cli/src/crawl/csr-detect.ts is a re-export of @squirrelscan/fetchers that only apps/cli/tests/crawler/csr-detect.test.ts imports. Point that test at @squirrelscan/fetchers and delete the shim. Criterion 3 (bun run build produces a working squirrel audit) is not yet re-verified.

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

    P3choresize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions