Skip to content

audit-engine: carried paths never count a multi-item shared-component check as shared (sibling rows have no occurrences) #2304

Description

@nc9

Follow-up to #2288 (shared-component issue density) and #2301. flattenChecks (packages/audit-engine/src/merge-core.ts ~L795-850) stamps componentOccurrences on ONE row per check; the other item rows of the same check carry componentEvidence: { reason: "sibling-row" } and no occurrences. Carried paths replay findings per ROW (carriedFindingToCheck, scoring.ts ~L252; the streamed carried union; aggregateUntouchedCarried), so addChecksToTally puts every sibling row in unsharedKeys and a MULTI-ITEM shared-component check is never counted as shared on a carried path. A fresh full audit builds one check with the evidence, so there it IS shared. Result: a site whose shared header has a multi-item finding (for example three icons missing labels) scores differently on a partial re-audit than on a full audit. The existing #2302 tests pass because their shared checks are single-item or built row by row by hand.

Acceptance Criteria

  • In addChecksToTally, a check with no occurrences whose componentEvidence.reason === "sibling-row" is neutral: it goes into neither the shared nor the unshared set for its key
  • A payload-limit marker (owner evidence never fit) stays unshared, and a key whose rows are all siblings (owner row lost) is not shared
  • A test builds rows with the real flattenChecks from a multi-item shared check, plus a key that mixes shared and non-shared rows, and shows the fresh full audit, the carried streamed path and aggregateUntouchedCarried give byte-identical overall and debug
  • A no-component control is byte-identical to before

Activity

  1. added
    bug
    size: S
    in-progress
    on Nov 24, 2026
  2. self-assigned this
    on Nov 24, 2026
  3. added theissue type on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugin-progresssize: S

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions