Repository navigation
feat(dupscore): ignore forced adapter overrides and compare call targets - #807
Merged
Merged
Conversation
Hide similarity links between methods that the strict adapter contract forces every adapter to define itself, keep call-target names in normalised token streams so same-layout functions that call different helpers no longer match as renamed clones, and require a 0.9 ratio for near-miss pairs of units under 80 tokens.
…copies List forced contract overrides after the other cluster members, mark them [forced] in text and forced_override in JSON, and leave them out of the duplicated-token estimate that ranks clusters.
…nresolved A base that names a repository module but cannot be resolved to a class (a package re-export or a module-qualified base) might supply the method before the forbidden owner, so the override is no longer treated as forced.
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.
Why
dupscore clonesranked adapter overrides that the strict-adapter contract test forces to exist as its top duplication, and treated different call targets as identical, so the top of the report was mostly noise. The bundled docs also lagged the 0.115.0 docs site, and the SQL test coverage rules page did not describe the shipped empty-input detection.Changes
[[contract_exemption]]: overrides thattest_strict_adapter.pyforces (contract methods that would otherwise be inherited fromBaseAdapter/StrictAdapter) are derived statically from source, marked[forced], listed last and not counted toward ranking. Links are hidden only when both ends are forced, and overrides with unresolved repository ancestors are never exempt.forced_override; the summary reports hidden contract-exempt members.docs/sql-test-coverage-rules.md.Verification
tests/unit/scripts/dupscore(155 passed) andmake check-ci.