Skip to content

feat(cli): report --diff decides fixed from the rule having run over the same scope (#1741 part 3) #1748

Description

@nc9

Part 3 of #1741. Depends on #1741 (check linkage) and on part 2 (per-rule ran status and scope).

squirrel report --diff (apps/cli/src/reports/diff) reports a finding as removed when its fingerprint is absent from the current report. It does not ask whether the rule ran in the current audit or covered the same pages, so a rule that did not run, or a page that was not crawled, reads as fixed.

A finding should count as fixed when the rule ran over the same scope in both audits and no longer reports it, using the declared linkage between the problem check and the clean check. Anything else is "not compared".

The cloud equivalent is tracked in the private repo (#3993, #3997).

Acceptance Criteria

  • squirrel report --diff marks a finding fixed only when the rule ran in both reports over the same scope and the current report no longer has the finding.
  • A finding whose rule did not run, timed out or was skipped in the current report, or whose page was not crawled, is listed under a separate "not compared" group and not counted as fixed.
  • The declared problem-to-clean linkage is used: a clean check that supersedes the problem check counts as evidence of the fix.
  • The text and JSON diff output include the not-compared group; the summary counts do not include it in removed.
  • Tests cover fixed, still present, rule did not run, page not crawled, and different scope.
  • docs/ describes the diff semantics and make validate passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementsize: M

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions