feat(signals): slop signal — duplicate-cluster membership (#563) - #945
Merged
JSONbored merged 1 commit intoJun 20, 2026
Merged
Conversation
) Adds the duplicate-cluster-membership deterministic slop signal (epic JSONbored#530). Fires when a PR sits in a HIGH-risk collision cluster that holds 2+ open pull requests — genuine overlapping/duplicate work. - The cluster determination lives in engine.ts as a pure, exported helper `isPullRequestInDuplicateCluster(collisions, pullNumber)` — next to the collision types it reads. slop.ts only takes a precomputed `inDuplicateCluster` boolean, so it needs no collision-type import. - The gate reuses the collision report it already builds — no extra DB load or compute on the hot gate path. - High-precision: the 2+-pull-request bar excludes a healthy issue↔its-own-PR pair (also high-risk), keeping this blocking signal false-positive-averse. - Weighted 15 (a secondary signal); static, public-safe text. Inert on the local lint surfaces (no repo collision context). Tests: the helper (signals.test.ts, typed CollisionReport fixtures — all branches) and the slop finding (slop.test.ts — flagged/not-flagged + the combined-weight band). Full test:coverage green (branches 97.03%). Closes JSONbored#563 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
reviewbot — ⏳ Waiting for CI to finish before the gate review. |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
JSONbored
approved these changes
Jun 20, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #945 +/- ##
=======================================
Coverage 96.62% 96.62%
=======================================
Files 110 110
Lines 14997 15006 +9
Branches 5419 5423 +4
=======================================
+ Hits 14491 14500 +9
Misses 104 104
Partials 402 402 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes #563 (epic #530). Resubmit of #944 with the review concern structurally removed.
What
Adds the duplicate-cluster-membership slop signal: fires when a PR sits in a high-risk collision cluster holding 2+ open pull requests (genuine overlapping/duplicate work).
Change since #944 — addresses the review note at the root
The prior PR was closed on Reviewer A's concern that slop.ts's
CollisionReporttype import "might break compilation" and that a test import was "unused" (both were false — CI was green). To remove the trigger entirely rather than argue it:isPullRequestInDuplicateCluster(collisions, pullNumber), beside the collision types it reads.CollisionReport— it takes a precomputedinDuplicateCluster: boolean.signals.test.tswith a typedCollisionReportfixture (compile-checked, so a shape mismatch is impossible).How (precise, zero added gate cost)
Tests
Helper branches (high+2PR+member → true; 1-PR / non-high / non-member / empty → false) in
signals.test.ts; the slop finding (flagged/not-flagged + combined-weight band →elevated) inslop.test.ts. Fullnpm run test:coveragegreen (branches 97.03%); new lines fully covered.🤖 Generated with Claude Code