Skip to content

feat(mcp): add CLI mirror for loopover_explain_gate_disposition - #6935

Closed
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:feat/cli-explain-gate-disposition-6740
Closed

feat(mcp): add CLI mirror for loopover_explain_gate_disposition#6935
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:feat/cli-explain-gate-disposition-6740

Conversation

@bohdansolovie

@bohdansolovie bohdansolovie commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Moves buildGateDispositions / GateDisposition into @loopover/engine (predicted-gate.ts) and re-exports them for the MCP server.
  • Adds registerStdioTool("loopover_explain_gate_disposition") that proxies /v1/local/branch-analysis like loopover_predict_gate, then reshapes predictedGate locally.
  • Covers registration, disposition mapping, API failure, zod rejection, and predict/explain parity in unit tests.

Closes #6740

Scope

  • Engine export + MCP stdio CLI mirror only
  • No gate policy / scoring / economics changes

Validation

  • npm run build --workspace @loopover/engine
  • npm run test -- test/unit/mcp-explain-gate-disposition.test.ts test/unit/mcp-cli-plan-scorer-tools.test.ts
  • CI on this PR

Safety

  • Read-only metadata prediction path
  • Same public .loopover.yml boundary as loopover_predict_gate

Export buildGateDispositions from @loopover/engine and register the
stdio tool as a metadata-only /v1/local/branch-analysis proxy that
reshapes predictedGate into per-rule dispositions, matching the remote MCP tool.

Closes JSONbored#6740

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 17, 2026 14:26
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 17, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-17 14:34:14 UTC

5 files · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

  • AI review already in progress for this PR head: Another LoopOver pass is already running the AI review for this exact PR head. This pass is skipping to avoid a duplicate LLM call.

Review summary
AI review is already running for this PR head in another LoopOver pass. LoopOver is holding this PR for manual review until that pass completes.

Nits — 1 non-blocking
  • AI review already in progress for this PR head — The gate is held for a human reviewer rather than passed automatically; it re-evaluates once the in-flight review completes or on the next update.

CI checks failing

  • validate
  • validate-tests (3)
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review

Decision drivers

  • ✅ Code review — No blockers (No AI review summary)
  • ⚠️ Gate result — Not blocking (Advisory; not blocking this PR.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #6740
Related work ⚠️ 3 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: 85 registered-repo PR(s), 30 merged, 6 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 85 PR(s), 6 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The PR moves buildGateDispositions/GateDisposition into @​loopover/engine and re-exports them, adds registerStdioTool("loopover_explain_gate_disposition") mirroring loopover_predict_gate's /v1/local/branch-analysis call and reshaping predictedGate locally, and includes unit tests covering registration, mapping, API failure, zod validation, and predict/explain parity as required.

Review context
  • Author: bohdansolovie
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, C++, JavaScript
  • Official Gittensor activity: 85 PR(s), 6 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (issue #6740, issue #6747)
  • Related work: Titles/paths share 7 meaningful terms. (issue #6740, issue #6741)
  • Related work: Items reference the same linked issue REST + CLI mirror for loopover_propose_action #6744. (issue #6744, PR #6939)
  • Additional title-only matches omitted; title-only overlap does not block.
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

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.41%. Comparing base (363a8b5) to head (c855079).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6935      +/-   ##
==========================================
- Coverage   93.71%   89.41%   -4.30%     
==========================================
  Files         685      685              
  Lines       68358    68358              
  Branches    18726    18726              
==========================================
- Hits        64059    61121    -2938     
- Misses       3302     5485    +2183     
- Partials      997     1752     +755     
Flag Coverage Δ
shard-1 43.69% <0.00%> (ø)
shard-2 36.84% <0.00%> (ø)
shard-3 ?
shard-4 34.84% <0.00%> (-0.01%) ⬇️
shard-5 31.32% <0.00%> (ø)
shard-6 45.75% <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/predicted-gate.ts 98.61% <100.00%> (-1.39%) ⬇️
src/mcp/server.ts 94.23% <ø> (-2.08%) ⬇️

... and 100 files with indirect coverage changes

@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (3))). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

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

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI mirror for loopover_explain_gate_disposition

1 participant