Skip to content

fix(engine): align predicted-gate collision risk with live gate#6671

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/critical-issue-collision-risk-parity-6629-v2
Jul 16, 2026
Merged

fix(engine): align predicted-gate collision risk with live gate#6671
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/critical-issue-collision-risk-parity-6629-v2

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Removes the extra issue.linkedPrs.length > 1 clause from predicted-gate buildCollisionReport risk so it matches the canonical live-gate twin in engine.ts.
  • Adds a regression test: a single freshly-linked PR stays medium risk even when the issue's stale linkedPrs field lists multiple PRs.
  • Reopens closed fix(engine): align predicted-gate collision risk with live gate #6665 (closed for exceeding the 2-PR contributor cap; that slot is free again).

Closes #6629

Test plan

Made with Cursor

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 16, 2026 18:14
@superagent-security

Copy link
Copy Markdown
Contributor

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

Closes JSONbored#6629

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 93.65%. Comparing base (34583a2) to head (f6856fa).
⚠️ Report is 12 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6671   +/-   ##
=======================================
  Coverage   93.65%   93.65%           
=======================================
  Files         681      681           
  Lines       68099    68108    +9     
  Branches    18699    18701    +2     
=======================================
+ Hits        63777    63786    +9     
  Misses       3347     3347           
  Partials      975      975           
Flag Coverage Δ
shard-1 43.99% <0.00%> (+0.08%) ⬆️
shard-2 36.88% <0.00%> (-0.07%) ⬇️
shard-3 32.42% <100.00%> (+0.01%) ⬆️
shard-4 34.60% <100.00%> (+0.45%) ⬆️
shard-5 30.93% <100.00%> (-0.47%) ⬇️
shard-6 45.69% <100.00%> (-0.07%) ⬇️

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

Files with missing lines Coverage Δ
...opover-engine/src/signals/predicted-gate-engine.ts 100.00% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
@loopover-orb

loopover-orb Bot commented Jul 16, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-16 18:31:53 UTC

2 files · 1 AI reviewer · no blockers · readiness 86/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR removes the extra `issue.linkedPrs.length > 1` clause from predicted-gate's collision risk computation, making it match the canonical live-gate logic which presumably only checks the freshly-resolved `linkedPrs` count. The fix directly addresses a real bug: a stale `issue.linkedPrs` field (populated at issue creation/update time and not kept in sync) could inflate risk to 'high' even when only one PR currently links to the issue. The added regression test correctly exercises this exact scenario — one fresh linked PR plus a stale 3-entry `issue.linkedPrs` array — and asserts risk stays 'medium', which is a real and reachable path, not fabricated.

Nits — 4 non-blocking

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #6665, #6629
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ❌ 8/20 High review scope from cached public metadata (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 373 registered-repo PR(s), 180 merged, 35 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 373 PR(s), 35 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff removes the extra issue.linkedPrs.length > 1 clause from buildCollisionReport's risk calculation exactly as described, and adds a regression test verifying a single freshly-linked PR stays 'medium' risk despite a stale multi-entry issue.linkedPrs field, directly fulfilling the issue's stated fix and test requirements.

Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 373 PR(s), 35 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • Then work through the remaining 1 step in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 2df475c into JSONbored:main Jul 16, 2026
16 checks passed
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.

fix(engine): predicted-gate-engine's buildCollisionReport risk check has an extra issue.linkedPrs clause its live-gate twin doesn't

1 participant