Skip to content

feat(mcp): register loopover_close_pr write-tool to match its 8 siblings (#6615)#6713

Closed
shin-core wants to merge 1 commit into
JSONbored:mainfrom
shin-core:feat/mcp-close-pr-tool-6615-v2
Closed

feat(mcp): register loopover_close_pr write-tool to match its 8 siblings (#6615)#6713
shin-core wants to merge 1 commit into
JSONbored:mainfrom
shin-core:feat/mcp-close-pr-tool-6615-v2

Conversation

@shin-core

Copy link
Copy Markdown
Contributor

Summary

  • buildClosePrSpec was the only one of the 9 local-write-tools.ts builders with no MCP tool, despite being fully implemented, tested, and used internally by claim-conflict-resolver.js.
  • Register loopover_close_pr in both surfaces, mirroring the 8 siblings exactly:
    • src/mcp/server.ts: closePrShape, MCP_TOOL_CATEGORIES entry ("agent"), buildClosePrSpec import, and a register(...) handler returning localWriteSpec(buildClosePrSpec(input)).
    • packages/loopover-mcp/bin/loopover-mcp.js: import, closePrShape, STDIO_TOOL_DESCRIPTORS entry, and a registerStdioTool(...) block.
  • No new write path, no auth — a pure spec builder like the others. The generated command matches buildClosePrSpec verbatim (gh pr close <n> --repo '<repo>', optionally && gh pr comment ...).

Closes #6615

Test plan

  • test/unit/mcp-write-tools.test.ts (server) + test/unit/mcp-cli-write-tools.test.ts (CLI) pass, covering both the plain and with-comment loopover_close_pr commands.
  • npm run typecheck clean.
  • codecov/patch green (both new branches — with/without comment — covered).

Notes

  • Bumps the registered-tool count assertion in test/unit/mcp-tool-rename-aliases.test.ts from 62 → 63 (with the standard count-history comment), since adding a tool increments the live registry count that test pins.

…ngs (JSONbored#6615)

buildClosePrSpec was the only one of the 9 local-write-tool builders with no
MCP tool. Register loopover_close_pr in both surfaces (src/mcp/server.ts remote
+ packages/loopover-mcp/bin/loopover-mcp.js stdio CLI) following the exact
pattern of loopover_apply_labels: input shape, category entry, import, and a
handler that returns localWriteSpec(buildClosePrSpec(input)). No new write path
or auth — pure parity. Tests cover both the plain and with-comment commands in
the server + CLI write-tool suites.

Closes JSONbored#6615
@shin-core
shin-core requested a review from JSONbored as a code owner July 16, 2026 20:17
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 16, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

❌ 17 Tests Failed:

Tests completed Failed Passed Skipped
2815 17 2798 0
View the top 3 failed test(s) by shortest run time
test/unit/auth-github-token.test.ts > test/unit/auth-github-token.test.ts
Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/cloudflare-worker-runtime-detection.test.ts > test/unit/cloudflare-worker-runtime-detection.test.ts
Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/mcp-explain-gate-disposition.test.ts > test/unit/mcp-explain-gate-disposition.test.ts
Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/mcp-finding-taxonomy.test.ts > test/unit/mcp-finding-taxonomy.test.ts
Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/mcp-intake-idea.test.ts > test/unit/mcp-intake-idea.test.ts
Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/mcp-pr-reviewability.test.ts > test/unit/mcp-pr-reviewability.test.ts
Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/routes-gate-outcome-breakdown.test.ts > test/unit/routes-gate-outcome-breakdown.test.ts
Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/routes-issue-rag.test.ts > test/unit/routes-issue-rag.test.ts
Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
View the full list of 9 ❄️ flaky test(s)
test/integration/api.test.ts > test/integration/api.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/integration/orb-webhook.test.ts > test/integration/orb-webhook.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/index.test.ts > test/unit/index.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
test/unit/mcp-automation-state.test.ts > test/unit/mcp-automation-state.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/mcp-refresh-repo-docs.test.ts > test/unit/mcp-refresh-repo-docs.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/mcp-write-tools.test.ts > test/unit/mcp-write-tools.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/ops-wire.test.ts > test/unit/ops-wire.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/routes-agent-approval.test.ts > test/unit/routes-agent-approval.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15
test/unit/routes-self-dogfood-registration-pack.test.ts > test/unit/routes-self-dogfood-registration-pack.test.ts

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 0s run time
Error: Transform failed with 2 errors:

[PARSE_ERROR] Identifier `buildFindingTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:10:10 ]
     │
  10 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── `buildFindingTaxonomyDocument` has already been declared here
     │ 
 197 │ import { buildFindingTaxonomyDocument } from "../review/finding-taxonomy";
     │          ──────────────┬─────────────  
     │                        ╰─────────────── It can not be redeclared here
─────╯

[PARSE_ERROR] Identifier `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared
     ╭─[ src/api/routes.ts:11:10 ]
     │
  11 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── `buildEnrichmentAnalyzersTaxonomyDocument` has already been declared here
     │ 
 198 │ import { buildEnrichmentAnalyzersTaxonomyDocument } from "../review/enrichment-analyzers-taxonomy";
     │          ────────────────────┬───────────────────  
     │                              ╰───────────────────── It can not be redeclared here
─────╯

  Plugin: vite:oxc
  File: .../src/api/routes.ts
 ❯ transformWithOxc .../node/chunks/node.js:4017:19
 ❯ TransformPluginContext.transform .../node/chunks/node.js:4088:26
 ❯ EnvironmentPluginContainer.transform .../node/chunks/node.js:30151:51
 ❯ loadAndTransform .../node/chunks/node.js:20098:26
 ❯ fetchModule .../node/chunks/node.js:33534:15

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
@loopover-orb

loopover-orb Bot commented Jul 16, 2026

Copy link
Copy Markdown

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-16 20:28:17 UTC

5 files · 1 AI reviewer · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This PR registers loopover_close_pr as an MCP tool in both the Cloudflare Worker server and the stdio CLI, mirroring the existing 8 write-tool siblings exactly — same shape pattern, same category registration, same test-first update to the tool-count assertion (62→63). buildClosePrSpec already existed, fully implemented and tested at the engine layer, so this is pure wiring with no new logic; the diff is narrow, consistent with sibling tools, and closes the linked issue #6615. The only correction is a stale PR-number reference in the count-history comment (test/unit/mcp-tool-rename-aliases.test.ts:9) that should say #6615 not #6631, though this doesn't affect runtime behavior.

Nits — 3 non-blocking

CI checks failing

  • validate
  • validate-tests (4)
  • validate-tests (6)
  • validate-tests (5)
  • validate-tests (1)
  • validate-tests (2)
  • validate-tests (3)
  • validate-code
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review

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 #6615
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
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: 45 registered-repo PR(s), 23 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor shin-core; Gittensor profile; 45 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff registers loopover_close_pr in both server.ts and the stdio CLI with the required shape, category, import, and handler wired to buildClosePrSpec, and adds matching test cases in both write-tools test files plus updates the tool-count assertion.

Review context
  • Author: shin-core
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 45 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • 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 commented Jul 16, 2026

Copy link
Copy Markdown

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (4), validate-tests (6), validate-tests (5), validate-tests (1), validate-tests (2), validate-tests (3), validate-code)). 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.

@loopover-orb loopover-orb Bot closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP: add loopover_close_pr write-tool to match its 8 registered siblings

1 participant