feat(signals): slop signal — duplicate-cluster membership (#563) - #942
feat(signals): slop signal — duplicate-cluster membership (#563)#942oktofeesh1 wants to merge 2 commits 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. Full test:coverage green (branches 97.03%). Closes JSONbored#563 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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. |
|
🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 ⛔ Maintainer review — Blockers foundReviewed 3 changed file(s) — two independent AI reviewers, synthesized.
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
💡 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. |
|
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 #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. 🚀 New features to boost your workflow:
|
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)
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.buildCollisionReportalso marks high-risk (the feat(api): maintainer quality-dashboard service + endpoint #557 lesson). Only genuine duplicate-PR overlap trips it.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. Fullnpm run test:coveragegreen (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