Repository navigation
refactor: migrate MCP servers and peripheral clients to v2 - #175366
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b91da432c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs changes before merge. What this changesThis PR migrates standalone MCP servers and browser/QA clients to the split v2 SDK while preserving legacy protocol behavior. Example: A browser MCP server returns list_pages on its first catalog page and a nextCursor.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains This PR is useful maintainer-approved maintenance, and both prior findings are fixed, but removing a shutdown-test mock leaves a stale baseline entry that blocks CI. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherMCP adapters connect external clients, browser subprocesses, and QA probes to OpenClaw tools and Gateway-backed conversations, returning protocol results while preserving cancellation and resource cleanup. flowchart LR
A[MCP clients] --> B[Standalone MCP servers]
B --> C[Tool and channel owners]
C --> D[Gateway and plugin resources]
E[Browser and QA clients] --> F[MCP subprocesses]
Technical reviewBest possible solution: Keep the coordinated migration and prune the obsolete mock-baseline tuple without restoring the incomplete mock or expanding allowances. Do we have a high-confidence way to reproduce the issue? The stale tuple and checker's removed-entry failure branch establish the CI defect directly, supported by the exact-head mock-exports failure; no target code or tests were executed. Is this the best way to solve the issue? The coordinated SDK migration preserves existing owners and legacy behavior; removing the deleted mock's ledger entry is the smallest complete repair. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b46ec6167975. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +396, Tests +289, Config +2, Other +5. Total +692 across 38 files. Added test files: 3. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 17, 2026, 5:22 AM ET / 09:22 UTC (Revision 2). |
|
The interoperability peers now live inside their owning plugins, with v1 declared only as a development dependency. Their pagination, output-validation, and cleanup tests pass on Node and Bun. The Windows lifecycle wrapper now uses native Job ownership and explicitly checks the termination receipt; all seven updated cases pass locally, with Windows confirmation running against the current head. The stale call-shape assertions and baseline ratchet failures are also corrected. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review The final source head is a137c0f. Final CI and the exact-source Windows replay passed. The body now includes the real Claude baseline/candidate tool-turn evidence and the inherited macOS helper-cleanup limitation. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…175366) * refactor: migrate MCP servers and peripheral clients to v2 * test: harden MCP migration interoperability coverage * test: fix MCP fixture loading on Windows
What Problem This Solves
Moves the standalone MCP servers and browser/QA clients onto the maintained v2 SDK as the next step in removing the v1 runtime dependency.
User Impact
No intended user-visible behavior change. Serving and client negotiation remain legacy, Claude configuration is unchanged, and no public plugin SDK API is added.
Why This Change Was Made
Migrate channel, tool, supervision, and skill servers together with their cancellation and cleanup behavior. Migrate browser/QA clients with their transports and typed errors. These callers explicitly retain v1's single-page tool listing and use those tool definitions for output validation instead of adopting v2's automatic pagination. Each plugin owns its v1 interoperability fixture and declares the SDK as a test-only dependency. The registration fixture retains its v1 client while targeting its shutdown fault injection at the new server transport.
Release-note context: internal MCP SDK migration preserving existing behavior.
Evidence
a137c0f7610a11f316b82dc96a4d99bbeea96ad4, unchanged dependencies, Node 24.21.0, and the ordered test files. Test time: 97.29 seconds; runner command: 100.86 seconds. Actions teardown owns its retained generic test namespace.Real Claude turn and cleanup limitation
After the one-minute load fell below 30, real Claude Code 2.1.277 completed both baseline and candidate Node turns through isolated Gateways and a synthetic provider. Each turn advertised and called the configured standalone plugin MCP server, negotiated legacy
2025-11-25, returned the independently generated tool nonce, and completed the Gateway response. No modern discovery occurred. Baseline elapsed 85.40 seconds; candidate 60.28 seconds. The readiness deadline remained 180 seconds.Both overall harness runs failed their final process census: one detached macOS directory-watch helper was still observable immediately after the Gateway exited. That helper's owner is byte-identical in baseline, candidate, and current main, outside this migration. Each reported PID was force-cleaned and verified absent. This is an inherited cleanup gap, not a claim of clean end-to-end teardown. The dedicated MCP and browser process-cleanup proofs passed. Bun full Gateway turns were not run after host load rose above the start threshold again.
An earlier baseline fixture attempt could not load a workspace alias because the external source snapshot lacked its ESM package declaration; that setup was corrected before the successful tool round-trip above. Earlier local browser/QA, registration, and extension-lint preparation attempts hit unchanged time limits on the loaded host and are not counted as passing proof. The local Windows lease did not finish source transfer and was fully released.
Earlier PR revisions exposed obsolete browser call-shape expectations, baseline shrinkage, an incomplete shutdown schema mock, and Windows fixture-launch assumptions. These were repaired without changing assertions or budgets; final-head CI and Windows replay are green.
New real-process tests deliberately cover boundaries that mocks cannot prove. Loaded-host local times were 105–158 seconds for the seven-case lifecycle matrix and 26–36 seconds for three-case peripheral peer files. Final CI summed case times were 5.48 seconds for lifecycle, 5.60 seconds for registration, 0.78 seconds for browser peer, and 0.32 seconds for QA peer.