feat(mcp): deliver a completed loop iteration as a customer results payload - #5797
Conversation
…ayload Implements JSONbored#4801: once a loop iteration completes, package its result for the customer instead of leaving it unassembled. Closes the Rent-a-Loop path's delivery end (JSONbored#4778), mirroring the intake bridge (JSONbored#4798) at the other end. - new buildResultsPayload(result) in packages/loopover-engine/src/results-payload.ts (pure): formats a completed iteration's already-computed metadata into a PR link, a plain-language one-sentence summary, and a bounded diff preview (capped at MAX_DIFF_PREVIEW_FILES; totals still count every file). No IO, no GitHub calls -- it formats the result, it does not fetch, open, or deliver anything. Handles the no-PR-opened case (null link + honest summary) and defaults missing per-file line counts / status. - new loopover_build_results_payload MCP tool (src/mcp/server.ts) exposing it; src/results-payload.ts is a thin re-export shim over the engine module. - tests cover the completed-PR, no-PR, omitted-changes, zero-line-count, singular/plural, and preview-cap paths at the engine level and end-to-end through the MCP tool. Closes JSONbored#4801
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5797 +/- ##
=======================================
Coverage 95.10% 95.10%
=======================================
Files 583 584 +1
Lines 46419 46440 +21
Branches 14841 14849 +8
=======================================
+ Hits 44148 44169 +21
Misses 1515 1515
Partials 756 756
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-14 17:22:39 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 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.
|
Summary
Implements #4801 — once a loop iteration completes, package its result for the customer instead of leaving it unassembled. This closes the Rent-a-Loop path's delivery end (#4778), mirroring the intake bridge (#4798) at the other end.
buildResultsPayload(result)inpackages/loopover-engine/src/results-payload.ts(pure): formats a completed iteration's already-computed metadata into a PR link, a plain-language one-sentence summary, and a bounded diff preview (capped atMAX_DIFF_PREVIEW_FILES;totalsstill count every file). No IO, no GitHub calls — it formats the result, it does not fetch, open, or deliver anything. Handles the no-PR-opened case (null link + honest summary) and defaults missing per-file line counts / status.loopover_build_results_payloadMCP tool (src/mcp/server.ts) exposing it;src/results-payload.tsis a thin re-export shim over the engine module.Acceptance (#4801): a completed iteration produces a correct, readable result payload without manual assembly — tested at the engine level and end-to-end through the MCP tool.
Closes #4801
Scope
feat(mcp): …).CONTRIBUTING.md; nosite//CNAME/VitePress.Closes #4801.Validation
git diff --checknpm run typecheckclean;npm --workspace @loopover/engine run build+npm run build:mcpcleannpm run test:coverageon the changed code:results-payload.ts100% lines & branches (18/18); the newsrc/mcp/server.tshandler + schema + registration are fully covered (every changed line, both branch sides — verified against the diff).mcp-output-schemas"outputSchema on EVERY tool" + "schema-valid structured content").If any required check was skipped, explain why:
test:cinot run end-to-end locally (Linux-only shell/self-host steps on Windows); the change-relevant gates above were validated directly.Safety