Skip to content

squirrel report rebuilt from the project database has no scan scope #1050

Closed

Description

@nc9

squirrel report (and squirrel report <id>), which rebuilds an audit from the project database, renders a report with no scanScope. A capped audit then reads like an uncapped one: there is no page limit in the scan line, the HTML coverage notice says "Not every discovered page was crawled" rather than "The crawl reached its page limit of N", and JSON has no meta.maxPages. There is also no scanScope.unfetched (pub#1049), so the discovered count leaves out the URLs the crawl queued but never fetched.

squirrel audit itself, and squirrel report --input <file.json>, both carry the scope. Only the database path (reconstructReport in apps/cli/src/reports/reconstruct.ts, called from apps/cli/src/controllers/report.ts) drops it.

Repro: squirrel audit https://example.com -m 5, then squirrel report -f llm. There is no <scan-scope> element.

Acceptance Criteria

  • squirrel report from the project database renders the same scanScope (origin, maxPages, requestedMaxPages when clamped, pagesCrawled, capped, unfetched) that squirrel audit printed for that crawl
  • A crawl stored before the page limit was recorded still renders, with no scope rather than an invented one
  • A test covers a capped crawl reloaded from the database (scan line, JSON meta.maxPages and meta.unfetched)

Activity

  1. added
    bug
    size: S
    on Oct 23, 2026
  2. WilliamK112 commented on Oct 24, 2026

    @WilliamK112
    Contributor

    I would like to take this. I will trace the persisted crawl/run metadata used by reconstructReport, restore scanScope only when the historical record has enough authoritative fields, and add a capped database-reload regression covering the scan line plus JSON maxPages and unfetched values.

  3. nc9 commented on Oct 26, 2026

    @nc9
    ContributorAuthor

    Fixed in #1118 (main a3d453c): squirrel report keeps the scan scope the audit printed. Ships in v0.0.134.

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

    bugsize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions