Skip to content

feat(signals): slop signal — duplicate-cluster membership (#563) - #945

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:feat/issue-563-duplicate-cluster-slop-v3
Jun 20, 2026
Merged

feat(signals): slop signal — duplicate-cluster membership (#563)#945
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:feat/issue-563-duplicate-cluster-slop-v3

Conversation

@oktofeesh1

Copy link
Copy Markdown
Contributor

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 CollisionReport type 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:

  • The cluster determination now lives in engine.ts as a pure exported helper isPullRequestInDuplicateCluster(collisions, pullNumber), beside the collision types it reads.
  • slop.ts no longer imports CollisionReport — it takes a precomputed inDuplicateCluster: boolean.
  • The helper is unit-tested in signals.test.ts with a typed CollisionReport fixture (compile-checked, so a shape mismatch is impossible).

How (precise, zero added gate cost)

  • The gate reuses the collision report it already builds for queue health — no extra DB load or O(n²) compute.
  • The 2+-pull-request bar excludes a healthy issue↔its-own-PR pair (also high-risk), keeping this blocking signal false-positive-averse (feat(api): maintainer quality-dashboard service + endpoint #557 lesson).
  • Weighted 15; static public-safe text; inert on the local lint surfaces.

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) in slop.test.ts. Full npm run test:coverage green (branches 97.03%); new lines fully covered.

🤖 Generated with Claude Code

)

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>
@oktofeesh1
oktofeesh1 requested a review from JSONbored as a code owner June 20, 2026 17:01
@dosubot dosubot Bot added the size:M label Jun 20, 2026
@ghost ghost added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 20, 2026
@ghost

ghost commented Jun 20, 2026

Copy link
Copy Markdown

reviewbot — ⏳ Waiting for CI to finish before the gate review.

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@ghost

ghost commented Jun 20, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #945 is no longer open. No action.

💰 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.

@ghost ghost added the gittensory:reviewed label Jun 20, 2026
@dosubot dosubot Bot added the lgtm label Jun 20, 2026
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (9cbdc6a) to head (7b7dc8e).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 64b152d into JSONbored:main Jun 20, 2026
16 checks passed
@ghost ghost removed the reviewbot-review label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(signals): slop signal — duplicate-cluster membership

2 participants