Skip to content

JSON report: expose skipped checks per rule and page #518

Description

@deniskern

v0.0.105 changed content/hidden-text and content/dev-leakage to skip a page that hits their scan limits instead of passing it. That fixes the dashboard, but the JSON report gives external consumers no way to see the skip: packages/report/src/grouping.ts keeps only fail/warn checks, and output/json.ts exports summary.passed/warnings/failed only.

A consumer that resolves its own findings from the JSON (we recheck a finding by re-auditing the page and close it when the rule no longer reports it) still reads "no issue" as clean and closes a finding on a page the rule skipped, the same false "fixed" the release notes describe.

Request: list skipped checks in the JSON report, per rule and page (for example a skipped entry per rule with the affected page URLs, or a summary.skipped count plus per-check status). That lets consumers keep those pages out of their coverage.

Version: squirrel 0.0.105, squirrel report --format json.

Acceptance Criteria

  • squirrel audit --format json and squirrel report --format json include a new top-level list of skipped checks, each with rule id, check name, skip reason and the affected page URLs
  • The first version covers evaluation gaps only (checks skipped because a scan limit was hit, reason scan-truncated). The entry shape carries the reason so other reasons can be added later
  • summary gains a skipped count; passed, warnings, failed and every existing key keep their names and values
  • A page where content/hidden-text or content/dev-leakage hit their scan limit appears as skipped for that rule, including when the skip was folded into a multi-page aggregate
  • Skipped checks never appear under issues
  • Loading a saved JSON with squirrel report renders the same issues as before
  • A report with no skips keeps today's top-level keys apart from summary.skipped being 0
  • docs/configuration/output.mdx documents the real JSON shape (top-level keys meta, status, score, summary, issues, plus the new skipped data). The documented project, health and pages shape that does not exist is corrected
  • Test: new packages/report/tests/json-skipped.test.ts, a per-page scan-truncated skip appears with its rule id and page URL
  • Test: same file, a folded skip carrying pages[] lists every page
  • Test: same file, negative control: a report with no skips has summary.skipped 0 and the same top-level keys as before
  • Test: packages/report/tests/json-status.test.ts updated deliberately for the new key
  • The PR description names the squirrelscan agent skill's JSON output notes as needing an update, and a follow-up is filed against squirrelscan/skills (cloud runners cannot push there)

Activity

  1. added
    enhancement
    size: M
    documentation
    P3
    on Oct 7, 2026
  2. nc9 commented on Oct 7, 2026

    @nc9
    Contributor

    Triage notes (maintainer review):

    • The gap is real: the report drops every check that is not a fail or a warn, so a page where content/hidden-text or content/dev-leakage hit their scan limit reads as clean in JSON. The skip itself is recorded by the rules; only the JSON renderer discards it.
    • "Skipped" is broad (about a hundred rules emit it, including noindex, soft-404 and not-applicable). Listing every skip per page could be very large, so version one lists only evaluation gaps (scan-limit skips) and the entries carry a reason field so others can be added.
    • The new data goes under a new top-level key, not inside issues, because the CLI rebuilds those entries as checks and consumers treat every issue as a finding. It is additive, and the dashboard and API do not use this renderer.
    • Also found: docs/configuration/output.mdx documents a JSON shape that does not match the real output. The docs criterion includes correcting it.
    • Labels added: enhancement, documentation, P3, size M. Acceptance criteria rewritten with the unit tests split out.
  3. added a commit that references this issue on Oct 8, 2026
    711c8c1
  4. nc9 commented on Oct 8, 2026

    @nc9
    Contributor

    Acceptance check against main: 11 of 13 criteria verified and ticked (packages/report/tests/json-skipped.test.ts and json-status.test.ts: 9 pass, 0 fail). Two are left open:

    • "squirrel audit --format json and squirrel report --format json include a new top-level list of skipped checks": met for squirrel audit and for squirrel report built from the project database, but not for squirrel report --input <saved.json> --format json. convertSlimReport in apps/cli/src/controllers/report.ts (around line 187) rebuilds only issues from a saved JSON report, so skippedChecks is dropped. A round trip through renderJson, then loadReport, then renderJson again goes from skippedChecks with summary.skipped: 3 to no skippedChecks and summary.skipped: 0. The re-exported report then looks clean, the same false "no issue" signal this issue describes. The merged PR lists this under "Notes for review", but no test or doc covers it, and docs/configuration/output.mdx does not mention the limitation.
    • "a follow-up is filed against squirrelscan/skills": the PR body names the skill's JSON output notes as needing an update and includes proposed issue text, but says the issue still needs filing there. I found no evidence that it was filed.

    Reopening, because the first item is core behaviour: a saved JSON report re-exported with squirrel report loses its skip data.

  5. reopened this on Oct 8, 2026
  6. nc9 commented on Oct 8, 2026

    @nc9
    Contributor

    Re-checked against main 47fb5ac:

    • Top-level skipped list in squirrel audit and squirrel report JSON: still not met for squirrel report --input <saved.json> --format json. convertSlimReport in apps/cli/src/controllers/report.ts has not changed since the last check, and it rebuilds only issues from a saved JSON report, so the re-export drops skippedChecks and reports summary.skipped: 0. The audit path and the database-backed report path include the list. The issue stays open for this.
    • Skills follow-up: the PR body names the skill's JSON output notes as needing an update, and the maintainer has filed the follow-up. It is tracked outside this repository, so it cannot be confirmed from here. The box stays unticked.
  7. nc9 commented on Oct 10, 2026

    @nc9
    Contributor

    Quick status: the JSON report has listed scan-limit skips since v0.0.106 (#554), and the skills follow-up is filed, so I ticked that box. One gap keeps this open: re-exporting a saved report with squirrel report --input saved.json --format json still drops skippedChecks and reports summary.skipped: 0 (convertSlimReport in apps/cli/src/controllers/report.ts does not read them back).

  8. nc9 commented on Oct 11, 2026

    @nc9
    Contributor

    Checked against current main (ad95fb2): the open criterion is STILL TRUE, and the code now marks it as deliberate. The slim report type in apps/cli/src/controllers/report.ts:156-160 says skippedChecks is "Not read back: skipped checks are not findings, so they are never rebuilt into ruleResults". So squirrel report --input saved.json --format json still writes no skippedChecks and reports summary.skipped: 0. Closing the gap means changing that decision, not finding a missed line.

    A related evaluation gap I hit while trying to produce a scan-truncated skip on 0.0.108. On a heavily loaded machine, a local page with 21,000 elements (past content/hidden-text's 20,000-element cap) did not skip. The rule hit its 1000 ms time budget instead and reported content/hidden-text-error (fail, timedOut: true), with summary.skipped: 0 and no skippedChecks. A page a rule abandoned on time is just as unevaluated as one it cut short, but skippedChecks only lists scan-truncated. Version one says other reasons can come later, and timeouts look like the next one.

  9. nc9 commented on Oct 11, 2026

    @nc9
    Contributor

    From the repro run: a rule that hits its time budget (for example content/hidden-text under load) is not listed in skippedChecks, so a timeout is invisible in the report. Worth adding to the scope here as an unlisted gap.

  10. added theissue type on Oct 28, 2026
  11. nc9 commented on Oct 30, 2026

    @nc9
    Contributor

    Checked against main (23a34c1, v0.0.144). Ticked what holds. Gap in criterion 1: squirrel report --input saved.json --format json drops skippedChecks and reports summary.skipped: 0, because the slim JSON reader deliberately does not read them back (apps/cli/src/controllers/report.ts), and the docs do not say so. Either read them back or document the limit. The skills follow-up (last criterion) is not checkable from the repo.

    nik

  12. nc9 commented on Oct 31, 2026

    @nc9
    Contributor

    Re-checked against main after v0.0.147 (squirrel report --input now reads skippedChecks back). Every behavioural criterion is met and tested. The one open box is the agent skill follow-up, which is not checkable from this repo. Leaving this open for that.

    nik

  13. nc9 commented on Nov 4, 2026

    @nc9
    Contributor

    Acceptance check against main 7c31d5b (first released in v0.0.147, included in v0.0.161):

    # Criterion Result Evidence
    1 audit --format json and report --format json include a top-level skipped list PASS packages/report/tests/json-skipped.test.ts (6 pass) covers the renderer; apps/cli/tests/reports/report-input-skipped-518.test.ts (10 pass) covers squirrel report --input: "re-exporting a loaded report keeps skippedChecks and summary.skipped identical", "skipped checks never become issues", "a report with no skips has none after the round trip", plus hostile-entry cases; docs/configuration/output.mdx documents skippedChecks
    2 to 13 the rest PASS already ticked; json-status.test.ts 3 pass on this main

    The gap noted earlier (a saved report re-exported with --input dropped skippedChecks) was closed by commit 961b6c2, hardened by 8c77760 and documented in 286628e. Timed-out rules are also listed (reason rule-timed-out, commit 57c9d85).

    Ticked criterion 1 and closing. The agent skill follow-up is tracked outside this repository, so I could not confirm it from here; the box was already ticked by the maintainer.

    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

    P3documentationenhancementsize: M

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions