feat(signals): add deterministic copycat containment engine (#1969) - #5973
feat(signals): add deterministic copycat containment engine (#1969)#5973andriypolanski wants to merge 1 commit into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5973 +/- ##
=======================================
Coverage 95.16% 95.17%
=======================================
Files 589 590 +1
Lines 46783 46846 +63
Branches 14938 14966 +28
=======================================
+ Hits 44521 44584 +63
Misses 1511 1511
Partials 751 751
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-15 05:23:52 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (Linked issue #1969 is assigned to the maintainer (@JSONbored) — that work is reserved for the maintainer, so this PR cannot be auto-accepted.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Closes #1969
Summary
Phase 1 of #1969 (design from folded #1409): a deterministic, pure copycat/plagiarism containment engine. The
gate.copycat.mode/minScorescaffold (#4140) stays call-site-inert — this PR supplies the detection primitive it was threaded for.Resubmits the approach of closed #5129 with the maintainer-requested multiset fix: candidate shingles are scored as a list (occurrences), prior art as a
Set(lookup).Behavior
candidate_copiedcan act. Missing / unparseable / tied timestamps →ambiguous→ never act.off, score ≥ threshold (default 85), distinct authors, enough added lines (default 10), and direction is unambiguouslycandidate_copied.warn→info,label→warning,block→critical. Public-safe text: score + threshold + optional prior PR number only.Scope / non-goals
src/signals/copycat.ts+test/unit/copycat.test.ts; doc-comment updates on the already-scaffolded config fields.copycatlabel / close / strikes, cross-repo candidate search. Design-spec issue #5746 still covers longer-term algorithm/FPR sign-off for those later slices.Tests
npx vitest run test/unit/copycat.test.ts --coverage --coverage.include=src/signals/copycat.ts→ 23 pass, 100% statements/branches/functions/lines.Links