feat(api): REST + CLI mirror for loopover_intake_idea - #6916
Conversation
The loopover_intake_idea MCP tool (src/mcp/server.ts) is explicitly described as deterministic and source-free and is rate-limit-only gated, but had neither a REST route nor a CLI mirror -- unlike its same-tier sibling loopover_check_slop_risk, which has both. Add POST /v1/loop/intake-idea and register the matching in-process loopover_intake_idea stdio tool, so idea intake is available over REST/CLI and works fully offline. Both reproduce the tool's handler exactly: validate the submission, then assemble the task-graph from the optional caller-supplied decomposition (else the single-issue baseline), delegating to the same pure validateIdeaSubmission/buildTaskGraph and adding no logic of their own. A malformed or empty submission returns the engine's actionable error list rather than a silent failure, mirroring the existing find-opportunities route's semantic-validation shape. Both surfaces mirror intakeIdeaShape verbatim, including its deliberate looseness, so the engine -- not the schema -- keeps owning the real bounds and error list. Closes JSONbored#6755
|
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 #6916 +/- ##
=======================================
Coverage 93.70% 93.70%
=======================================
Files 685 685
Lines 68331 68340 +9
Branches 18723 18725 +2
=======================================
+ Hits 64032 64041 +9
Misses 3302 3302
Partials 997 997
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-17 13:12:38 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
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.
|
The
loopover_intake_ideaMCP tool (src/mcp/server.ts) is explicitly described as "deterministic and source-free" and is rate-limit-only gated, but has neither a REST route nor a CLI mirror — unlike its same-tier siblingloopover_check_slop_risk(/v1/lint/slop-risk+ stdio tool), which has both.Changes
POST /v1/loop/intake-idea— reproduces the tool's handler exactly: validate the submission, then assemble the task-graph from the optional caller-supplieddecomposition(else the single-issue baseline), delegating to the same purevalidateIdeaSubmission/buildTaskGraphand adding no logic of its own. Placed alongside its source-free/v1/loop/*and/v1/lint/*siblings.loopover_intake_ideastdio tool — computed in-process from@loopover/engine, so idea intake works fully offline with no API round-trip (same posture as thecheck_slop_risklocal mirror).intakeIdeaShapeverbatim, including its deliberate looseness, so the engine — not the schema — keeps owning the real bounds and error list. An out-of-rangepriorityis still a string, so it reaches the engine and comes back aspriority_invalid, exactly as on the tool.Tests
test/unit/routes-intake-idea.test.ts— pins the ROUTE contract across all three arms: a valid submission returns the scored graph (single-issue baseline, or the supplied decomposition preserved in order); every engine-rejected shape (id_required,title_required,body_required,target_repo_required,target_repo_malformed,title_too_long,priority_invalid) returns the actionable list, with an empty submission reporting every missing field at once; schema-invalid and unparseable bodies are rejected before reaching the engine. Also asserts the maintainer-onlygittensor:prioritylabel is never emitted.test/unit/mcp-cli-intake-idea-tool.test.ts— cross-surface PARITY: the stdio tool returns exactly what the pure bridge returns for identical input, proven offline against a black-holed API URL, including the error-list arm.Closes #6755