You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
audit-engine: untouched-carried aggregate drops shared-component units, so a partial re-audit can score differently from a full audit #2301
Since #2288 (shared-component issue density, #2256), a full audit scales down the issue-density penalty for findings that repeat across pages as one shared component (sharedWarnUnits / sharedFailUnits on CheckTally, used in scoring.ts ~L881-891). The untouched-carried aggregate path drops those units, so a partial re-audit can score differently from a full audit of the same site.
aggregateUntouchedCarried (packages/audit-engine/src/complete-store-fold.ts ~L1331) calls addChecksToTally (~L1389), which fills sharedWarnUnits / sharedFailUnits (scoring.ts ~L698, ~L707; carried checks keep componentOccurrences via carriedFindingToCheck), but copies only failed, failUnits, warnings, warnUnits into the per-rule totals (~L1394-1397). UntouchedRuleTotals (~L213-235) has no shared fields.
addUntouched (~L569-577) therefore adds no shared units to the fold tally, while the streamed carried path (~L560) goes through addChecksToTally and keeps them.
Effect: when an untouched page carries observed, groupable component findings and the aggregate route is taken, the shared-chrome scaling is not applied to the carried part. The density penalty stays unscaled, so the partial re-audit's score can come out LOWER than a full audit of the same site.
The private cloud's SQL twin of the aggregate mirrors the same four fields, so it inherits the gap; it needs a matching change after this one.
Found from code reading (file:line above); not yet reproduced by a run.
Acceptance Criteria
UntouchedRuleTotals carries optional sharedWarnUnits and sharedFailUnits, and aggregateUntouchedCarried sums them (zero omitted)
addUntouched adds them to the fold tally, dropping the warn half for advisory rules the same way it does for warnUnits
A test builds the same site two ways (untouched carried pages through the aggregate, and streamed in full) and gets identical overall and debug.sharedComponentUnits
A test with no component findings shows scores unchanged from before this fix
Activity
docs(changelog): changelog.d entry for #2301 as a Markdown bullet
fix(audit-engine): untouched-carried aggregate keeps shared-component…
fix(cli): a quoted header value followed by a folded line keeps redac…