[Quality audit] Simplify MCP coordinator and tool surface
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- devtools
Hướng nghiên cứu
Start with CODE_QUALITY_FINDINGS.md and the cited files under electron/mcp/**, especially coordinator.ts, server.ts, and validation.ts; inspect the existing config builder and related tests before choosing a finding. Run the MCP coordinator, validation, and tool-list tests, including the listed token-rotation, hydration, Docker path, prompt, idle, and cleanup cases. Done means the scoped duplications and unreachable validation branch are addressed and all acceptance checks pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Derived from the local audit report CODE_QUALITY_FINDINGS.md created on 2026-05-30.
Scope
This issue tracks complexity and duplication in electron/mcp/**.
Findings
- Finding 9: tested MCP config builder is bypassed.
- Evidence:
buildCoordinatorMCPConfigis defined and tested, butStartMCPServermanually rebuilds the same object. - Fix direction: call
buildCoordinatorMCPConfiginStartMCPServer.
- Evidence:
- Finding 10: sub-task MCP config construction is duplicated.
- Evidence: duplicated
mcpServers["parallel-code"]construction in restart rewrite, task creation, and hydration. - Fix direction: extract
buildSubTaskMcpConfig,writeSubTaskMcpConfig, andisAllowedSubTaskMcpConfigPath; confirmmcpServerInfo.tokencontract.
- Evidence: duplicated
- Finding 15: agent output monitoring is copied in MCP coordinator.
- Evidence: duplicated base64 decode, tail buffering, ANSI stripping, prompt detection, idle transitions, and resolver flushing.
- Fix direction: extract
createAgentOutputMonitor(task)andhandlePromptDetected(task).
- Finding 16: task teardown cleanup repeats in MCP coordinator.
- Evidence:
removeCoordinatedTask,cleanupTask, andderegisterCoordinatorrepeat lifecycle cleanup with subtle behavior differences. - Fix direction: extract narrow helpers for subscriptions, idle waiters, config cleanup, and control-state clearing.
- Evidence:
- Finding 17: MCP
createTaskhas too many responsibilities.- Evidence:
electron/mcp/coordinator.ts:398-740. - Fix direction: move preamble write/restore logic into
preamble.tsand use small queued file mutation helpers.
- Evidence:
- Finding 18: MCP tool diff formatting and truncation is duplicated.
- Evidence:
electron/mcp/server.tsandelectron/mcp/coordinator.tsboth format/truncate diffs. - Fix direction: centralize
formatDiffForTool(result, mergeInfo?)and oneMAX_DIFF_BYTES.
- Evidence:
- Finding 19: deprecated
review_and_merge_taskis still advertised.- Evidence:
electron/mcp/mcp-tool-list.ts,electron/mcp/server.ts,electron/mcp/client.ts. - Fix direction: keep compatibility handler if needed but remove the tool from advertised tools.
- Evidence:
- Finding 35: validation has an unreachable specific branch and duplicate tests.
- Evidence:
electron/mcp/validation.ts, duplicated validation coverage in coordinator tests. - Fix direction: move the
@{check before the generic invalid-character regex, or remove the branch; keep validation tests invalidation.test.ts.
- Evidence:
Acceptance checks
- MCP coordinator test suite
- MCP validation tests
- MCP tool-list tests
- token-rotation, hydration, Docker path, prompt, idle, and cleanup cases
- Ngôn ngữ chính
- TypeScript
- Star
- 1k
- Fork
- 144
- Merge trung bình
- 4 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 28
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của johannesjo/parallel-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johannesjo/parallel-code#385 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Option to show usage as used instead of left, and potential further customization ideasCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
johannesjo/parallel-code#353 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johannesjo/parallel-code#163 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
johannesjo/parallel-code#375 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Package as a PlatpakĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
johannesjo/parallel-code#374 ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của johannesjo/parallel-code
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ci
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/clickhouse-js#1248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltĐang mởtechnik
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
AhmedNAgy25/analysor#25 ·
Maintainer thường phản hồi trong vòng 1 ngày