You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp): REST route + CLI mirror for loopover_get_eligibility_plan (#6692)
loopover_get_eligibility_plan existed only on the remote MCP server — the one
tool in the preview/breakdown/eligibility trio with no REST route or local
CLI mirror. This adds both, following loopover_explain_score_breakdown's
established pair exactly.
- POST /v1/scoring/eligibility-plan (src/api/routes.ts), placed after
explain-breakdown and structured identically: same scorePreviewSchema, same
repo/snapshot/evidence fetch, same buildScorePreview. It returns
deriveEligibilityPlan(preview) (reused as-is from services/eligibility-plan)
and — like /v1/scoring/preview, and matching the tool's own handler — treats
contributorLogin as optional rather than unconditionally required.
- loopover_get_eligibility_plan stdio tool + a STDIO_TOOL_DESCRIPTORS entry
(category discovery, matching the server's MCP_TOOL_CATEGORIES). The local
branch-metadata-to-request-body assembly it shares with
loopover_explain_score_breakdown is factored into buildLocalScoreRequestBody
so the two never drift; only the apiPost path differs.
Tests: route-level coverage for an authorized plan (contributorLogin present),
the anonymous/optional-login path, an invalid body (400), and the
contributor-gate 403 (routes-errors.test.ts, mirroring victimScorePreview).
CLI registration + descriptor + category are covered by the existing
mcp-cli-tools stdio-server tests.
Closes#6621
description: "Explain a private score preview multiplier-by-multiplier with plain-English levers and the highest-impact improvement.",
903
903
},
904
+
{
905
+
name: "loopover_get_eligibility_plan",
906
+
category: "discovery",
907
+
description: "Derive a structured eligibility plan from local score-preview metadata: whether the branch/PR is eligible now, public-safe blockers, and cleanup paths. Advisory dry-run only — no GitHub writes.",
908
+
},
904
909
{
905
910
name: "loopover_get_decision_pack",
906
911
category: "discovery",
@@ -1542,6 +1547,46 @@ registerStdioTool(
1542
1547
async(input)=>toolResult("LoopOver private local PR scoring preview.",awaitpreviewLocalScore(awaitwithClientWorkspaceRoots(input))),
1543
1548
);
1544
1549
1550
+
// Shared by loopover_explain_score_breakdown and loopover_get_eligibility_plan (#6621): both resolve the same
1551
+
// local branch/diff metadata into the /v1/scoring request body — only the endpoint they POST it to differs, so
1552
+
// the assembly lives here once rather than in two drifting copies.
0 commit comments