Skip to content

feat(mcp): CLI mirror for loopover_draft_pr_body#6974

Merged
loopover-orb[bot] merged 3 commits into
JSONbored:mainfrom
RealDiligent:feat/draft-pr-body-cli-6741-v2
Jul 17, 2026
Merged

feat(mcp): CLI mirror for loopover_draft_pr_body#6974
loopover-orb[bot] merged 3 commits into
JSONbored:mainfrom
RealDiligent:feat/draft-pr-body-cli-6741-v2

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Move buildPublicPrBodyDraft into @loopover/engine (host re-exports from engine source so Codecov patch coverage attributes correctly).
  • Register loopover_draft_pr_body stdio tool with optional format=markdown.
  • Bump stdio tool-count pin 76 → 77; CLI parity tests + fixture enrichment.

Closes #6741.

Supersedes #6972 (closed on codecov/patch after a dist-vs-source re-export miss).

Test plan

  • CI validate-code / unit tests green
  • codecov/patch ≥ 99%
  • Tool count 77; draft markdown matches engine buildPublicPrBodyDraft

RealDiligent and others added 2 commits July 18, 2026 00:50
Move buildPublicPrBodyDraft into @loopover/engine and register the stdio tool with optional format=markdown.

Closes JSONbored#6741.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ility

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

Copy link
Copy Markdown
Contributor

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

… patch

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 93.71%. Comparing base (4966070) to head (acbbb80).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6974   +/-   ##
=======================================
  Coverage   93.71%   93.71%           
=======================================
  Files         686      686           
  Lines       68392    68399    +7     
  Branches    18730    18735    +5     
=======================================
+ Hits        64093    64100    +7     
  Misses       3302     3302           
  Partials      997      997           
Flag Coverage Δ
shard-1 43.75% <8.69%> (-0.01%) ⬇️
shard-2 36.94% <100.00%> (+<0.01%) ⬆️
shard-3 32.90% <8.69%> (+0.09%) ⬆️
shard-4 33.94% <72.46%> (+0.08%) ⬆️
shard-5 32.14% <76.81%> (+<0.01%) ⬆️
shard-6 45.77% <76.81%> (+<0.01%) ⬆️

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

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

@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

Tip

✅ LoopOver review result - approve/merge recommended

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

7 files · 1 AI reviewer · no blockers · readiness 77/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR moves buildPublicPrBodyDraft from src/services/pr-body-draft.ts into @​loopover/engine's source (not dist), re-exports it from the old path for backward compatibility, and wires a new loopover_draft_pr_body stdio tool with an optional format=markdown mode. It closes #6741 and correctly follows the stated pattern of importing engine source (not dist) so Codecov patch coverage attributes properly — the same fix that made the superseded #6972 fail. The moved code is a verbatim relocation (diff shows identical logic, just re-typed against a structural PrBodyDraftSource instead of Pick<LocalBranchAnalysis,...>), tool-count pin and CLI parity test are updated consistently, and the new stdio handler mirrors the existing prepare_pr_packet fetch-then-transform pattern.

Nits — 5 non-blocking
  • packages/loopover-engine/src/pr-body-draft.ts defines PrBodyDraftSource as a hand-written structural type instead of Pick<>-ing from LocalBranchAnalysis like the old src/services version did — worth confirming a future field rename in LocalBranchAnalysis won't silently drift from this duplicated shape.
  • The external brief's magic-number flags (3, 3, 8) are pre-existing slice/limit constants carried over unchanged from the original file, not new — not worth a named constant refactor in this PR.
  • src/services/pr-body-draft.ts re-export comment claims parity with src/rules/predicted-gate.ts's pattern; worth a quick sanity check that pattern is still accurate for future readers.
  • Consider exporting PrBodyDraftSource's individual nested types (e.g. prPacket, baseFreshness shapes) if other engine consumers will need to construct partial analyses, to avoid re-deriving the same structural shape elsewhere.
  • packages/loopover-mcp/bin/loopover-mcp.js's draftPrBodyShape spreads currentBranchShape then adds format — same shape pattern used by other CLI mirrors, good consistency to keep.

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 #6741
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: 402 registered-repo PR(s), 201 merged, 34 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 402 PR(s), 34 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR moves buildPublicPrBodyDraft into @​loopover/engine's source (re-exported from src for Codecov attribution) and registers a new loopover_draft_pr_body stdio tool with a format=markdown option, mirroring the loopover_prepare_pr_packet precedent exactly as requested, plus adds parity/unit tests and updates the tool-count pin.

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: Python, JavaScript, Ruby, Svelte, TypeScript, Markdown, MDX
  • Official Gittensor activity: 402 PR(s), 34 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (issue #6744, issue #6741)
  • Related work: Titles/paths share 7 meaningful terms. (issue #6743, issue #6741)
  • Related work: Titles/paths share 7 meaningful terms. (issue #6747, issue #6741)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 3 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 13bd48b into JSONbored:main Jul 17, 2026
16 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 17, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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_draft_pr_body

1 participant