feat: explained similarity across active plugin generations #27
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
h-dv/code-index#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rank 6 of the 2026-07-20 index-data brainstorm (
_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md).What: one fingerprint mechanism (ordered ref-sequence per symbol) powering three products: exact clone clusters (consolidation worklist), drift_clones (near-clones that have diverged — "copy 2 already differs, here's the behavioral delta"), and a pre-write
find_similarpoint query ("does this helper already exist?") that prevents future duplication.Why — it found a real bug:
relative_pathhad drifted between index.rs and watcher.rs (Jaccard 0.82) — the watcher copy lackedParentDirand single-file-root handling; fixed in v0.5.19 by consolidation. Scale: 58 clone clusters / 193 duplicate symbols / ~1,402 redundant lines (theparse()test helper copied 10x;workspace_rootcopied 6x despitetests/common/mod.rsexisting).setup_loggingdrift (J=0.93) triaged as intentional (--log-json). The existingoutline_hashcolumn finds the m0016–m0019 migration template family for free.Cost: small for exact clusters + find_similar (pure SQL); medium for drift pairs (Jaccard, name-blocked); no new data.
Runtime-plugin architecture expansion
Fingerprints are generation- and language-profile scoped. The same source parsed by a different package/extractor may legitimately produce different fact sequences; never compare raw ids or silently combine pending/active contributions.
Each result carries:
The full-language migration in #80 can use exact/near similarity diagnostically, but parity is determined by canonical fact comparison, not a similarity score.
Order remains: find_similar point query/engine, exact clusters, then measured drift clones. Consume it through #35/#34 first; add a top-level surface only if #51 demonstrates value.
buildagent referenced this issue2026-07-20 22:45:36 +02:00
Triage: P2 — split by agent value
Implement in this order:
find_similar(symbol|span)point query — prevents agents from creating another implementation.The first capability should be consumable by
context_pack(#35), not required for its v1. Repository-wide clone inventories are secondary to the pre-write question “does this already exist?”. Every similarity result needs the compared evidence/features; avoid an unexplained scalar score.feat: duplication family — find_duplicates + drift_clones + find_similarto feat: explained similarity across active plugin generations