Skip to content

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

Closed
oktofeesh1 wants to merge 2 commits into
JSONbored:mainfrom
oktofeesh1:feat/issue-563-duplicate-cluster-slop
Closed

feat(signals): slop signal — duplicate-cluster membership (#563)#942
oktofeesh1 wants to merge 2 commits into
JSONbored:mainfrom
oktofeesh1:feat/issue-563-duplicate-cluster-slop

Conversation

@oktofeesh1

Copy link
Copy Markdown
Contributor

Closes #563 (epic #530 deterministic slop signals).

What

Adds the duplicate-cluster-membership slop signal: it fires when a PR sits in a high-risk collision cluster that holds 2+ open pull requests — i.e. genuine overlapping/duplicate work.

How (precise, zero added gate cost)

  • Reuses buildCollisionReport — specifically the collision report the gate already builds for queue health, passed into the slop input. No extra DB load or O(n²) compute on the hot gate path.
  • False-positive-averse (this score can gate): the 2+-pull-request bar deliberately excludes a healthy issue↔its-own-linking-PR pair, which buildCollisionReport also marks high-risk (the feat(api): maintainer quality-dashboard service + endpoint #557 lesson). Only genuine duplicate-PR overlap trips it.
  • Weighted 15 (a secondary signal, like empty-description); static, public-safe detail text. Inert on the local lint surfaces (they have no repo collision context).

Tests

test/unit/slop.test.ts: fires for a high-risk 2-PR cluster containing the PR; no fire for missing context, an issue+PR pair, a non-high-risk cluster, or a cluster the PR isn't in. Full npm run test:coverage green (branches 97.03%); new lines fully covered (slop.ts + the 2 reused-context lines in the gate); output stays public-safe.

Files: src/signals/slop.ts (signal), src/queue/processors.ts (2 lines: pass the already-built collisions + PR number), slop test.

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

- Reuses the collision report the gate already builds (buildCollisionReport,
  reused via the slop input — no extra DB load or compute on the hot gate path).
- High-precision: the 2+-pull-request bar deliberately excludes a healthy
  issue↔its-own-linking-PR pair, which buildCollisionReport also marks high-risk
  (the JSONbored#557 lesson) — so this blocking signal stays false-positive-averse.
- Weighted 15 (a secondary signal, like empty-description); static, public-safe
  detail text. Inert on the local lint surfaces (no repo collision context).

Tests in slop.test.ts cover: fires for a high-risk 2-PR cluster containing the
PR; no fire for missing context, an issue+PR pair, a non-high-risk cluster, or a
cluster the PR isn't a member of. 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 16:37
@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

Note

Gittensory Gate skipped

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

Signal Result Evidence Action
Gate result ⚠️ Skipped #942 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
@ghost

ghost commented Jun 20, 2026

Copy link
Copy Markdown

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

⛔ Maintainer review — Blockers found

Reviewed 3 changed file(s) — two independent AI reviewers, synthesized.

ℹ️ This PR conflicts with main and can't be merged as-is. Conflicting file(s): src/queue/processors.ts, src/signals/slop.ts, test/unit/slop.test.ts. Resolve the conflict(s) and open a fresh PR.

Merge readiness: ❌ CI is red — approval withheld until it's green. Failing: see the checks tab.

Summary

The new duplicate‑cluster slop signal is correctly integrated into the slop assessment and the queue processor, and the tests cover its behavior. However, the function buildDuplicateClusterFinding is not exported, yet the test suite imports it, causing a TypeScript compile error. This is a concrete blocker.

🛑 Hard blockers — must fix before merge

  • buildDuplicateClusterFinding is defined without an export, but the test file imports it, leading to a build failure.

💡 Nits — non-blocking, optional

  • Add the export keyword to the buildDuplicateClusterFinding function definition so it can be imported by the test suite.
  • Verify that the CollisionReport type is exported from ./engine (if not, export it there).
  • Consider adding a comment explaining the purpose of the collisions and pullNumber fields in SlopAssessmentInput.
  • Ensure that the collisionReport function is well-documented and its usage is clear in the tests.

This repo uses one-shot review: a rejected PR is closed, not iterated in place. Address the above and open a new focused PR.

@ghost ghost added the reviewbot-review label Jun 20, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@superagent-security

superagent-security Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

⚠️ Contributor trust inconclusive. Click here for more info: Superagent Dashboard

@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 (a54cbb3).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #942   +/-   ##
=======================================
  Coverage   96.62%   96.62%           
=======================================
  Files         110      110           
  Lines       14997    15008   +11     
  Branches     5419     5424    +5     
=======================================
+ Hits        14491    14502   +11     
  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.

@ghost ghost closed this Jun 20, 2026
@ghost ghost removed reviewbot-review labels Jun 20, 2026
@JSONbored JSONbored reopened this Jun 21, 2026
@ghost ghost closed this Jun 21, 2026
@JSONbored JSONbored reopened this Jun 21, 2026
@ghost ghost closed this Jun 21, 2026
@JSONbored JSONbored reopened this Jun 21, 2026
@ghost ghost closed this Jun 21, 2026
@JSONbored JSONbored reopened this Jun 21, 2026
@ghost ghost closed this Jun 21, 2026
@JSONbored JSONbored reopened this Jun 21, 2026
@ghost ghost closed this Jun 21, 2026
This pull request was closed.
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