Skip to content

fix(engine): stop the collision report using unscoped issue.linkedPrs for risk escalation - #6470

Merged
JSONbored merged 1 commit into
mainfrom
fix/collision-report-unscoped-linked-prs
Jul 16, 2026
Merged

fix(engine): stop the collision report using unscoped issue.linkedPrs for risk escalation#6470
JSONbored merged 1 commit into
mainfrom
fix/collision-report-unscoped-linked-prs

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Fixes 1 confirmed adversarial-audit finding(s) in packages/loopover-engine/src/signals/engine.ts:

  • buildCollisionReport upgrades a single-real-PR issue cluster to 'high' risk using the same unscoped issue.linkedPrs text-mention field (packages/loopover-engine/src/signals/engine.ts)

Each fix follows the audit's own verified failure scenario and root-cause analysis (2-independent-skeptic adversarial verification pass, both had to vote "confirmed").

Closes #6419

Test plan

  • Regression test(s) reproducing the audited failure scenario for each finding
  • Full local gate (npm run test:ci) green

buildCollisionReport's issue-cluster risk escalation ORed in the raw,
unverified issue.linkedPrs field (parsed from contributor-controlled issue
body text mentions) alongside the genuinely-scoped linkedPrs (real open PRs
whose body actually closes the issue). An issue with exactly one real
competing PR but multiple unrelated "PR #N" mentions in its body text was
incorrectly escalated to high risk, producing a false-positive
duplicate-overlap warning annotation on the PR and inflating the reported
high-risk-collision count. Risk now derives only from the scoped linkedPrs
list.

Add a regression test covering the exact scenario: a single real linked PR
plus a multi-entry issue.linkedPrs text-mention field, asserting the
cluster stays medium risk.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored JSONbored self-assigned this Jul 16, 2026
@JSONbored
JSONbored merged commit d95d4a6 into main Jul 16, 2026
14 checks passed
@JSONbored
JSONbored deleted the fix/collision-report-unscoped-linked-prs branch July 16, 2026 09:32
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.59%. Comparing base (b09f262) to head (38fec26).
⚠️ Report is 32 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6470   +/-   ##
=======================================
  Coverage   95.59%   95.59%           
=======================================
  Files         589      589           
  Lines       47025    47025           
  Branches    14951    14951           
=======================================
  Hits        44952    44952           
  Misses       1291     1291           
  Partials      782      782           
Flag Coverage Δ
shard-1 44.15% <100.00%> (-0.11%) ⬇️
shard-2 36.85% <100.00%> (+0.20%) ⬆️
shard-3 32.51% <100.00%> (+0.14%) ⬆️
shard-4 34.68% <100.00%> (-0.62%) ⬇️
shard-5 31.01% <0.00%> (ø)
shard-6 45.42% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-engine/src/signals/engine.ts 97.60% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

buildCollisionReport upgrades a single-real-PR issue cluster to 'high' risk using the same unscoped issue.linkedPrs text-mention field

1 participant