feat(signals): slop signal — duplicate-cluster membership (#563) - #944
feat(signals): slop signal — duplicate-cluster membership (#563)#944oktofeesh1 wants to merge 1 commit into
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. - 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; and the combined-weight band (duplicate-cluster + missing-test-evidence → elevated). Full test:coverage green (branches 97.03%). Closes JSONbored#563 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 ⛔ Maintainer review — Not mergedReviewed 3 changed file(s) — two independent AI reviewers, synthesized.
Merge readiness: ✅ Mergeable ( Summary The change correctly adds a duplicate‑cluster slop signal, updates the assessment input type, weights, rubric, and integrates the new finding into the risk calculation. All new code is type‑safe, uses static public‑safe text, and does not introduce security or privacy issues. Tests cover the new behavior and all CI checks pass. 💡 Nits — non-blocking, optional
This repo uses one-shot review: a rejected PR is closed, not iterated in place. Address the above and open a new focused 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. |
|
|
|
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 #944 +/- ##
=======================================
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. 🚀 New features to boost your workflow:
|
Closes #563 (epic #530). Resubmit of the closed #942 with the review note addressed.
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)
buildCollisionReportalso marks high-risk (the feat(api): maintainer quality-dashboard service + endpoint #557 lesson).Change since #942
Both reviewers found the implementation correct; the only actionable note (Reviewer A) was to add a test for the combined slopRisk band when the duplicate-cluster weight stacks with other weights. Done — added one test: duplicate-cluster + missing-test-evidence →
slopRisk45 →elevatedband, both findings present. No implementation change.Tests
test/unit/slop.test.ts: fires for a high-risk 2-PR cluster containing the PR; no fire for missing context / issue+PR pair / non-high-risk / non-member; combined-weight band. Fullnpm run test:coveragegreen (branches 97.03%); new lines fully covered.Files:
src/signals/slop.ts,src/queue/processors.ts(2 lines reusing the existing collisions), slop test.🤖 Generated with Claude Code