Skip to content

merge: a renamed item locator stays open as a carried finding while the page still fails the check #474

Closed

Description

@nc9

Found while fixing #462, #463 and #465. In packages/audit-engine/src/merge-core.ts, an item finding's identity is URL + rule + check + locator, and the locator is the item id (flattenChecks). When a rule changes how it builds item ids, a page that still fails the same check keeps the OLD locator open as a carried finding next to the new one.

Why: in addPrior, a prior item with no fresh match is resolved only when the page is absent from the resolution signal's failingByCheck set for that check. The signal is page-level. A page that still fails the check, for any item, is in the set, so every unmatched prior item on it is carried, and its last-seen stamp is refreshed each run. Carrying unmatched items is deliberate, because a check's items can be capped (slice(0, 10)) and a missing item is not proof it is fixed. But it also means a renamed item never resolves while the page keeps failing.

Concrete cases from this release:

Each one resolves only when the page stops failing that check entirely.

Acceptance Criteria

  • When a check on a page emitted its complete item list this run (no details.additional remainder, no truncation), a prior open item finding on that page and check whose locator is not in the fresh list resolves
  • A check whose items were capped keeps today's carry behaviour for unmatched priors
  • A computeMerge test covers a renamed locator on a still-failing page, with and without the resolution signal
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

    P2bugsize: M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions