Skip to content

fix(audit-engine): untouched-carried aggregate keeps shared-component units #2301 - #2302

Merged
nc9 merged 2 commits into
mainfrom
fix/untouched-shared-units-2301
Nov 24, 2026
Merged

nc9 merged 2 commits into
mainfrom
fix/untouched-shared-units-2301

Conversation

@nc9

@nc9 nc9 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Closes #2301.

UntouchedRuleTotals gains optional sharedWarnUnits/sharedFailUnits (zero omitted). aggregateUntouchedCarried sums them from addChecksToTally; addUntouched adds them to the fold tally, dropping the warn half for advisory rules as it does for warnUnits. Other consumers: smart-audits.ts only re-exports the type; merge-promise.ts passes the aggregate to addUntouched.

Pairs with a private SQL-twin change on squirrelscan/repo#5336 and is planning-gated.

Acceptance criteria

  • Optional shared fields summed, zero omitted: tests/untouched-shared-units-2301.test.ts (no-component test asserts fields absent)
  • addUntouched adds them, advisory warn half dropped: 'advisory rule' test
  • Aggregate vs streamed give identical overall, sharedComponentUnits, issueDensityShared (full score JSON byte-identical): first test; fails on origin/main (2 of 3 fail), passes now
  • No-component control byte-identical: third test

Gates

audit-engine format:check, lint, typecheck clean. Full suite via scripts/test-suites.ts --run audit-engine: 2461 pass, 3 skip, 0 fail.

Docs: none needed (internal scoring parity). Agent skill: no change. Changelog entry added.

@nc9
nc9 merged commit de99f48 into main Nov 24, 2026
10 checks passed
@nc9
nc9 deleted the fix/untouched-shared-units-2301 branch November 24, 2026 10:44
KoHaRxnP pushed a commit to KoHaRxnP/squirrelscan that referenced this pull request Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

audit-engine: untouched-carried aggregate drops shared-component units, so a partial re-audit can score differently from a full audit

1 participant