Repository navigation
feat(engine): count a shared chrome component once in the issue-density penalty #2256 - #2288
Merged
Merged
Conversation
…ty penalty #2256 Signed-off-by: Nik Cubrilovic <[email protected]>
…er it #2256 Signed-off-by: Nik Cubrilovic <[email protected]>
…, pin it with a test #2256 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
boat/score-chrome-density-2256
branch
from
November 24, 2026 02:39
7ee8712 to
3788eb4
Compare
nc9
marked this pull request as ready for review
November 24, 2026 03:02
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The issue-density penalty now caps what findings marked as ONE shared component (observed, groupable component evidence) can weigh: pooled, at most
ISSUE_PENALTY_SHARED_CAP(2.0, one failing element). Same defect on 2 pages or 25 moves the overall equally. Per-page findings and uncertain/page-scoped evidence still scale. Chosen approach is the cap option of criterion 1 (the tally is additive and streamed per page, so exact cross-page keys cannot be carried).Closes #2256
Acceptance criteria
calculateIssueDensityPenaltyinpackages/audit-engine/src/scoring.ts, constant inpackages/utils/src/constants.ts, docs indocs/reports.mdx. Shared units rideIssueTally.sharedWarnUnits/sharedFailUnitsandCheckTally(so the cloud rescore fromcheckTalliessees them too).shared-component-density-2256.test.ts"a shared finding moves the density penalty the same on 2 pages as on 25" (exact equality); "still scales with page count" for non-shared and for uncertain evidence.healthScore.debug.sharedComponentUnitsandissueDensityShared; the report adjustment line adds it (score-adjustment-3915.test.ts).Verification
format:check, lint, typecheck clean in audit-engine, report, core-contracts, utils. CI suites via
scripts/test-suites.ts: report 1426 pass 0 fail; audit-engine 2447 pass 3 skip 0 fail; rest 3962 pass 0 fail.bun scripts/changelog.ts checkOK.make validatein docs/ not run (docs change is one prose paragraph).Limits
componentOccurrences(today a11y/link-text, content/stale-copyright) are covered. aria-command-name and label-content-name-mismatch from the issue emit no evidence yet: follow-up needed.repeated-subtreegroups are not counted as shared.Agent skill: no change needed. Scores move for audits with repeated chrome findings (changelog entry added).