Skip to content

feat(engine): IdeaTarget existing|provision union for idea intake (#7635)#7652

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:feat/idea-target-union-7635
Closed

feat(engine): IdeaTarget existing|provision union for idea intake (#7635)#7652
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:feat/idea-target-union-7635

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

Validation

  • npm run build --workspace @loopover/engine
  • npm run build --workspace @loopover/mcp
  • Full CI green (validate-code, validate-tests, codecov/patch)

Closes #7635

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 21, 2026 06:35
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.50%. Comparing base (3629080) to head (59126e7).

Files with missing lines Patch % Lines
packages/loopover-mcp/bin/loopover-mcp.js 0.00% 4 Missing ⚠️
packages/loopover-engine/src/idea-intake.ts 86.36% 2 Missing and 1 partial ⚠️
packages/loopover-mcp/bin/loopover-mcp.ts 0.00% 3 Missing ⚠️
src/mcp/server.ts 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7652      +/-   ##
==========================================
- Coverage   88.51%   88.50%   -0.02%     
==========================================
  Files         724      724              
  Lines       76020    76049      +29     
  Branches    22629    22634       +5     
==========================================
+ Hits        67291    67306      +15     
- Misses       7681     7689       +8     
- Partials     1048     1054       +6     
Flag Coverage Δ
shard-1 35.71% <36.11%> (-0.01%) ⬇️
shard-2 32.97% <27.77%> (-0.01%) ⬇️
shard-3 28.63% <2.77%> (-0.01%) ⬇️
shard-4 40.61% <22.22%> (-0.02%) ⬇️
shard-5 34.01% <52.77%> (+0.01%) ⬆️
shard-6 35.97% <33.33%> (-0.05%) ⬇️

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

Files with missing lines Coverage Δ
src/api/routes.ts 95.09% <100.00%> (+<0.01%) ⬆️
src/mcp/server.ts 96.26% <50.00%> (-0.20%) ⬇️
packages/loopover-engine/src/idea-intake.ts 96.55% <86.36%> (-3.45%) ⬇️
packages/loopover-mcp/bin/loopover-mcp.ts 0.00% <0.00%> (ø)
packages/loopover-mcp/bin/loopover-mcp.js 0.00% <0.00%> (ø)

... and 1 file 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 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-21 06:54:43 UTC

12 files · 1 AI reviewer · 1 blocker · CI failing · unstable

🛑 Suggested Action - Reject/Close

Review summary
This PR replaces the flat `targetRepo: string` on `IdeaSubmission` with an `IdeaTarget` discriminated union (`existing|provision`), adds a `parseIdeaTarget` validator and `existingTargetRepo` accessor, and threads the change through every claim-plan call site (REST, MCP server, both stdio MCP mirrors) with a consistent `target_repo_required` guard when the target is `provision`. The plumbing is correct and consistently wired across all four call sites I can see, and tests were updated in lockstep across the engine and each surface. The description states 'type + validation + plumbing only — no provisioning logic,' which matches the diff — no `provision` handling beyond validation is added anywhere.

Nits — 6 non-blocking
  • packages/loopover-engine/src/idea-intake.ts:107 nests to depth 5 in `parseIdeaTarget`; an early-return restructure (e.g. extract the `existing` branch into its own helper) would flatten it and match the file's otherwise flat style.
  • codecov/patch is at 66.66% (target 99%) — the `provision`-kind and malformed-object branches of `parseIdeaTarget` look covered by the new tests, but confirm the `target_repo_malformed` path for a non-'existing'/'provision' `kind` string is actually exercised, not just the `other` object case already in idea-intake-bridge.test.ts.
  • src/api/routes.ts:3718 (per the external brief) hardcodes the `400` status inline for the new `target_repo_required` branch — consistent with existing sibling branches in this file, so not worth a constant here, but flag if the file later centralizes status codes.
  • Add a router-mirror test that hits `target_repo_required` via a `provision` target on at least one MCP stdio surface (loopover-mcp.js or .ts) if not already covered, to keep parity with the REST/`server.ts` tests added in routes-plan-idea-claims.test.ts and mcp-cli-plan-idea-claims-tool.test.ts.
  • Pull request duplicates other open work — Check for an existing pull request or issue covering this change and coordinate or consolidate before continuing.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

Why this is blocked

  • Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.

CI checks failing

  • codecov/patch — 66.66% of diff hit (target 99.00%)

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7635
Related work ⚠️ Same linked issue: #7646 Another open PR references the same linked issue.
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: 377 registered-repo PR(s), 170 merged, 36 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 377 PR(s), 36 issue(s).
Improvement ✅ Minor risk: low · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds the exact IdeaTarget union specified, retypes IdeaSubmission.targetRepo, updates validation logic to branch on .kind while keeping the module pure, and updates the idea-intake test file plus downstream consumers/tests to match the new shape.

Review context
Contributor next steps
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 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch); Linked issue overlaps another open PR; duplicate of open PR #7646). 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

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.

Add existing-vs-provision target discriminated union to IdeaSubmission.targetRepo

1 participant