Skip to content

fix(engine): honor no-issue rationale in predicted preflight#6645

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jsdevninja:fix/predicted-gate-no-issue-rationale
Jul 16, 2026
Merged

fix(engine): honor no-issue rationale in predicted preflight#6645
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jsdevninja:fix/predicted-gate-no-issue-rationale

Conversation

@jsdevninja

Copy link
Copy Markdown
Contributor

Summary

  • Add the missing !hasClearNoIssueRationale(...) check to buildPreflightResult in predicted-gate-engine.ts, matching the live gate in engine.ts.
  • Add a regression test asserting docs-only PRs with no linked issue do not produce a spurious missing_linked_issue finding, while unexplained PRs still do.

Closes #6628

Test plan

  • npx vitest run test/unit/predicted-gate-engine-coverage.test.ts -t 6628
  • npx vitest run test/unit/predicted-gate-engine-coverage.test.ts test/unit/predicted-gate-engine-branch-coverage.test.ts --coverage --coverage.include=packages/loopover-engine/src/signals/predicted-gate-engine.ts

Restore predicted/live parity for missing_linked_issue by applying the
same hasClearNoIssueRationale exemption the live gate uses in engine.ts.

Closes JSONbored#6628

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsdevninja
jsdevninja requested a review from JSONbored as a code owner July 16, 2026 16:55
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.64%. Comparing base (a47d1c3) to head (aaa1aa8).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6645   +/-   ##
=======================================
  Coverage   93.64%   93.64%           
=======================================
  Files         680      680           
  Lines       68026    68026           
  Branches    18673    18673           
=======================================
  Hits        63704    63704           
  Misses       3347     3347           
  Partials      975      975           
Flag Coverage Δ
shard-1 43.99% <100.00%> (-0.03%) ⬇️
shard-2 36.86% <100.00%> (+0.08%) ⬆️
shard-3 32.50% <100.00%> (+0.08%) ⬆️
shard-4 34.63% <0.00%> (-0.13%) ⬇️
shard-5 31.72% <100.00%> (+0.75%) ⬆️
shard-6 45.41% <100.00%> (-0.31%) ⬇️

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 17:47:51 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a one-line fix adding a missing `!hasClearNoIssueRationale(...)` guard to `buildPreflightResult` so the predicted preflight matches the live gate's `missing_linked_issue` logic in engine.ts, closing #6628. The diff is minimal, well-targeted, and directly traceable to the described bug — the added regression test exercises both the docs-only (rationale present, no finding) and unexplained (no rationale, finding present) branches. This is exactly the kind of narrow, root-cause fix with matching test coverage this repo wants.

Nits — 2 non-blocking
  • The test only covers a docs-only rationale case; consider also asserting the `issue_discovery` lane short-circuit still works alongside the new rationale check for full branch clarity.
  • Consider a brief comment at predicted-gate-engine.ts:415 noting this must stay in sync with the equivalent check in engine.ts to prevent future drift between the two gates.

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 #6628
Related work ⚠️ 2 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 202 registered-repo PR(s), 129 merged, 42 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jsdevninja; Gittensor profile; 202 PR(s), 42 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff adds the exact `!hasClearNoIssueRationale({ title: input.title, body: input.body })` clause to the `missing_linked_issue` condition in `buildPreflightResult`, matching engine.ts's canonical version, and includes a regression test verifying both the docs-only exemption and that unexplained PRs still trigger the finding.

Review context
  • Author: jsdevninja
  • 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: 202 PR(s), 42 issue(s).
  • Related work: Titles/paths share 9 meaningful terms. (issue #6628, issue #6630)
  • Related work: Titles/paths share 10 meaningful terms. (issue #6628, issue #6629)
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps 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 8b20ad6 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 buildPreflightResult ignores hasClearNoIssueRationale, unlike its live-gate twin in engine.ts

1 participant