Skip to content

feat(api): REST + stdio mirror for loopover_plan_idea_claims#6952

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/plan-idea-claims-rest-cli-6756
Jul 17, 2026
Merged

feat(api): REST + stdio mirror for loopover_plan_idea_claims#6952
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/plan-idea-claims-rest-cli-6756

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Add POST /v1/loop/plan-idea-claims reproducing the MCP handler (validateIdeaSubmissionbuildTaskGraphbuildClaimPlan).
  • Register in-process stdio tool loopover_plan_idea_claims (same offline parity pattern as #6753 / #6755).
  • Unit tests assert REST/stdio parity; bump MCP discovery pin to 73 (covers #6756 plus #6942's unpinned get_maintainer_lane).

Closes #6756

Test plan

  • Valid idea → claim plan with disposition buckets
  • Route/stdio match pure handler for accepted shapes
  • Engine validation failures → 400 { ok:false, errors }
  • Zod-invalid body → 400 invalid_plan_idea_claims_request
  • registerStdioTool count verified at 73 locally before open
  • CI green including codecov/patch

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 17, 2026 15:12
@superagent-security

Copy link
Copy Markdown
Contributor

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

Add POST /v1/loop/plan-idea-claims and an in-process stdio tool that both
reproduce the MCP handler (validate → task-graph → buildClaimPlan).
Bump the MCP discovery pin 71→73 (JSONbored#6942 left the count one behind).

Closes JSONbored#6756

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 (3ade2dd) to head (97032dc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6952      +/-   ##
==========================================
+ Coverage   84.41%   93.71%   +9.29%     
==========================================
  Files         685      685              
  Lines       68364    68373       +9     
  Branches    18727    18729       +2     
==========================================
+ Hits        57712    64074    +6362     
+ Misses       8163     3302    -4861     
+ Partials     2489      997    -1492     
Flag Coverage Δ
shard-1 43.75% <100.00%> (+0.12%) ⬆️
shard-2 36.79% <11.11%> (-0.02%) ⬇️
shard-3 32.75% <11.11%> (?)
shard-4 34.61% <11.11%> (?)
shard-5 32.13% <11.11%> (-0.01%) ⬇️
shard-6 45.75% <11.11%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
src/api/routes.ts 94.80% <100.00%> (+18.70%) ⬆️

... and 193 files with indirect coverage changes

@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 15:22:28 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds a REST endpoint and stdio tool mirror for loopover_plan_idea_claims, both thin wrappers around the existing pure functions validateIdeaSubmission → buildTaskGraph → buildClaimPlan, following the same offline-parity pattern as prior PRs (#6753/#6755). The route and stdio handler are consistent with each other and with the sibling intake-idea endpoint, error handling (400 for validation/schema failures) is correctly wired, and tests assert REST/stdio parity plus the pure handler contract. The MCP discovery pin bump to 73 is justified and explained (72 from unpinned #6942 + 1 new tool), and the diff is closely scoped to the linked issue #6756.

Nits — 3 non-blocking
  • src/api/routes.ts:3404-3406 — the external brief flags the literal `400` status codes as magic numbers, but this matches the existing convention used throughout the file (e.g. /v1/loop/intake-idea), so it's a non-issue; no action needed.
  • The long-file size flags on loopover-mcp.js and routes.ts are pre-existing file sizes, not something introduced by this diff's small additive changes.
  • Consider extracting the shared `expectedPayload` helper duplicated across the two new test files (routes-plan-idea-claims.test.ts and mcp-cli-plan-idea-claims-tool.test.ts) into a shared test util if this pattern keeps repeating for future mirrored endpoints.

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

Addressed
The PR adds the POST /v1/loop/plan-idea-claims route delegating to validateIdeaSubmission/buildTaskGraph/buildClaimPlan, registers a stdio CLI tool with the same handler, and includes unit tests asserting REST/stdio output parity for identical inputs, matching all stated deliverables.

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: 389 PR(s), 33 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (issue #6744, issue #6756)
  • Related work: Titles/paths share 8 meaningful terms. (issue #6747, issue #6756)
  • Related work: Titles/paths share 8 meaningful terms. (issue #6746, issue #6756)
  • 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

@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 8fa47d1 into JSONbored:main Jul 17, 2026
16 checks passed
This was referenced Jul 17, 2026
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.

REST + CLI mirror for loopover_plan_idea_claims

1 participant