chore(engine): remove dead isDuplicateClusterWinner (#6172) - #6434
Conversation
isDuplicateClusterWinner (PR-number election) was @deprecated in favor of isDuplicateClusterWinnerByClaim, retained "only for legacy compatibility callers that do not have claim timestamps." A fresh repo-wide search confirms those callers don't exist: every real caller uses isDuplicateClusterWinnerByClaim; the bare function had only re-exports, wrapper-only tests, and {@link} mentions. Remove the function and its three re-exports (engine index.ts, both signals/duplicate-winner.ts shims), the tests that existed only to exercise it, and refresh the now-stale {@link}/prose references in duplicate-detection.ts, maintainer-activation.ts, and predicted-gate.ts. isDuplicateClusterWinnerByClaim and resolveDuplicateClusterWinnerNumber are untouched. Closes JSONbored#6172
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
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 #6434 +/- ##
=======================================
Coverage 95.61% 95.61%
=======================================
Files 600 600
Lines 47346 47351 +5
Branches 15067 15067
=======================================
+ Hits 45268 45273 +5
Misses 1291 1291
Partials 787 787
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-16 08:21:07 UTC
Review summary Nits — 5 non-blocking
Flagged checks (non-blocking)
Decision drivers
Context & advisory signals — never blocks the verdict
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://loopover.ai/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.
|
Summary
packages/loopover-engine/src/duplicate-winner.ts'sisDuplicateClusterWinner(PR-number election) was JSDoc-@deprecatedin favor ofisDuplicateClusterWinnerByClaim, "retained only for legacy compatibility callers that do not have claim timestamps." A fresh repo-wide search confirms those legacy callers do not exist: every real caller (e.g.advisory/gate-advisory.ts) usesisDuplicateClusterWinnerByClaim; the bare function had only re-exports, tests, and{@link}mentions.isDuplicateClusterWinnerand its three re-exports (packages/loopover-engine/src/index.ts,packages/loopover-engine/src/signals/duplicate-winner.ts,src/signals/duplicate-winner.ts).isDuplicateClusterWinnerByClaimandresolveDuplicateClusterWinnerNumberare untouched.packages/loopover-engine/test/duplicate-winner.test.ts, the shim-identity assertion induplicate-winner-signals-shim.test.ts, the root cases intest/unit/duplicate-winner.test.ts, and the two lines intest/unit/predicted-gate-engine-coverage.test.ts); every test for the remaining exports stays.{@link isDuplicateClusterWinner}/ prose mentions insrc/queue/duplicate-detection.ts,src/services/maintainer-activation.ts, andpackages/loopover-engine/src/predicted-gate.tsto reference the surviving election function (or describe it generically) so no comment points at a function that no longer exists.Closes #6172
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6172).Validation
git diff --checknpm run actionlint(vianpm run test:ci)npm run typechecknpm run test:coverage— this PR only DELETES source lines (no added source lines forcodecov/patchto fall short on); the survivingisDuplicateClusterWinnerByClaim/resolveDuplicateClusterWinnerNumberkeep their full existing test coverage.npm run test:workers(vianpm run test:ci)npm run build:mcp(vianpm run test:ci)npm run test:mcp-pack(vianpm run test:ci)npm run ui:openapi:check(vianpm run test:ci)npm run ui:lint(vianpm run test:ci)npm run ui:typecheck(vianpm run test:ci)npm run ui:build(vianpm run test:ci)npm audit --audit-level=moderate@loopover/enginepackage tests (567 pass) and the root duplicate-winner / predicted-gate-coverage suites pass with the removed cases gone.If any required check was skipped, explain why:
cf-typegen/migration/env-reference regeneration needed — this removes an internal engine helper with no API, binding, schema, or env surface.Safety
UI Evidencesection. — N/A: no visible UI change.Notes
isDuplicateClusterWinnerByClaim, used byadvisory/gate-advisory.tsthrough thesignals/duplicate-winner.jsshim) is unaffected — only the unused PR-number-election variant and its own tests/comments are removed.