Repository navigation
build: prepare MCP v2 dependency foundation - #175254
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. |
|
|
Codex review: needs maintainer review before merge. What this changesAdds four pinned MCP v2 dependencies and ownership records while retaining the existing v1 SDK. Example: An existing MCP server connection uses @modelcontextprotocol/sdk 1.32.1.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a coherent dependency foundation without changing MCP runtime behavior; no actionable patch defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe root manifest and lockfile supply SDK packages to OpenClaw builds; MCP clients and servers continue consuming the existing v1 imports. flowchart TD
A[Root dependency manifest] --> B[Workspace lockfile]
B --> C[Existing v1 SDK]
B --> D[Added v2 packages]
C --> E[MCP clients and servers]
D --> F[Future runtime migration]
Technical reviewBest possible solution: Land the dependency foundation after existing gates complete, then migrate runtime owners through separately validated changes. Do we have a high-confidence way to reproduce the issue? No defect reproduction applies: this is dependency preparation, and source inspection confirms existing MCP callers remain on v1. Is this the best way to solve the issue? The staged approach keeps dependency resolution separate from protocol and public-type changes, with no competing runtime implementation introduced. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fb8d6eded985. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceConfig +4, Other +55. Total +59 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel 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 Reviewed October 17, 2026, 2:58 AM ET / 06:58 UTC. |
|
Merged via squash.
|
The worktree read-pool, plugin cleanup and Solid UI cutovers left 11 unused exports/types or imports that Knip could not follow. Keep live read-operation maps in the same lazy parallel loader, make in-module helpers private, and remove unused forwarding exports and metadata type. Model the existing validator generator in the production Knip graph. Production cleanup moved to clearPluginRunContext in #174872. Remove its unused wrapper and exercise the owner directly; retain namespace isolation and all four scheduler cases. Drop only callback-result forwarding proof for that deleted wrapper. Live cleanup and handler maps are unchanged. Keep the seven diagnostic test seams retained by #175223 and the staged MCP dependencies from #175254; do not add ignores. Proof: 176 focused tests with --maxWorkers=1 passed in 434.17s; core, UI, scripts and affected test type lanes, targeted type-aware/boundary lint, formatting, and validator generation check passed. Production findings drop from 18 to seven intentional test seams; three unrelated full-tree test-support exports and staged dependencies remain.
Mistral bundling keeps its runtime transitives external, but Knip cannot follow the SDK code inside the built AI package. Project the existing externalization policy into the root and AI manifest import graphs. Keep optional peers optional and preserve all manifests and lockfiles. Prove the required schema dependency loads during packaged streaming and the semantic conventions load when optional telemetry peers are present. The original no-peer streaming and SDK-bundling assertions remain intact. Validation: focused package test passed in 11.72s wall time; targeted tsgo, typed lint, boundary lint and format passed; P2 review found no actionable findings. Dependency scan clears all four Mistral entries and retains only the four MCP packages and seven diagnostic hooks explicitly kept by #175254 and #175223. The unused-files audit is clean.
Remove unused API surfaces after the canonical-owner cutovers in #175577, #175069, #175517 and #175538. Current Add deletion admission, credential authority, provider sanitization, reserved-key filtering, workspace exclusion and package lease checks stay at their live owners. Register the two live Gateway benchmark subprocess fixtures. Make internal dependency-evidence helpers and provenance types private; remove obsolete test-only surfaces while preserving explicit probe, warning-cache and 2000-character compaction assertions. Proof: 504 distinct focused cases validated with --maxWorkers=1. The migrated auth-reader fixture initially failed while its synchronous close was still draining; await the existing async close owner, then rerun only its two cases successfully. Core/scripts and five owning type graphs, scoped lint, format and final P2 review pass. Full-tree/script export and unused-file scans pass. Production deadcode still reports only the seven diagnostic hooks retained by #175223 and @modelcontextprotocol/client retained by #175254. No ignores or baseline increases. The all-graph selector reports existing root-count budgets; explicit owning compiler graphs passed without changing that budget.
The worktree read-pool, plugin cleanup and Solid UI cutovers left 11 unused exports/types or imports that Knip could not follow. Keep live read-operation maps in the same lazy parallel loader, make in-module helpers private, and remove unused forwarding exports and metadata type. Model the existing validator generator in the production Knip graph. Production cleanup moved to clearPluginRunContext in openclaw#174872. Remove its unused wrapper and exercise the owner directly; retain namespace isolation and all four scheduler cases. Drop only callback-result forwarding proof for that deleted wrapper. Live cleanup and handler maps are unchanged. Keep the seven diagnostic test seams retained by openclaw#175223 and the staged MCP dependencies from openclaw#175254; do not add ignores. Proof: 176 focused tests with --maxWorkers=1 passed in 434.17s; core, UI, scripts and affected test type lanes, targeted type-aware/boundary lint, formatting, and validator generation check passed. Production findings drop from 18 to seven intentional test seams; three unrelated full-tree test-support exports and staged dependencies remain.
) Mistral bundling keeps its runtime transitives external, but Knip cannot follow the SDK code inside the built AI package. Project the existing externalization policy into the root and AI manifest import graphs. Keep optional peers optional and preserve all manifests and lockfiles. Prove the required schema dependency loads during packaged streaming and the semantic conventions load when optional telemetry peers are present. The original no-peer streaming and SDK-bundling assertions remain intact. Validation: focused package test passed in 11.72s wall time; targeted tsgo, typed lint, boundary lint and format passed; P2 review found no actionable findings. Dependency scan clears all four Mistral entries and retains only the four MCP packages and seven diagnostic hooks explicitly kept by openclaw#175254 and openclaw#175223. The unused-files audit is clean.
…aw#175673) Remove unused API surfaces after the canonical-owner cutovers in openclaw#175577, openclaw#175069, openclaw#175517 and openclaw#175538. Current Add deletion admission, credential authority, provider sanitization, reserved-key filtering, workspace exclusion and package lease checks stay at their live owners. Register the two live Gateway benchmark subprocess fixtures. Make internal dependency-evidence helpers and provenance types private; remove obsolete test-only surfaces while preserving explicit probe, warning-cache and 2000-character compaction assertions. Proof: 504 distinct focused cases validated with --maxWorkers=1. The migrated auth-reader fixture initially failed while its synchronous close was still draining; await the existing async close owner, then rerun only its two cases successfully. Core/scripts and five owning type graphs, scoped lint, format and final P2 review pass. Full-tree/script export and unused-file scans pass. Production deadcode still reports only the seven diagnostic hooks retained by openclaw#175223 and @modelcontextprotocol/client retained by openclaw#175254. No ignores or baseline increases. The all-graph selector reports existing root-count budgets; explicit owning compiler graphs passed without changing that budget.
What Problem This Solves
Prepare the dependency graph for migrating MCP clients and servers to the maintained v2 SDK in separate, reviewable changes.
User Impact
No user-visible behavior or public API changes. Existing MCP clients and servers continue to use v1.
Landing is approved on exact-head CI evidence: 165 jobs passed, including package and pack checks, and the required security gate is green. The local package validator timed out at its unchanged 300-second limit while host load was approximately 85; this is a local host-load observation, not a passing validator result.
Why This Change Was Made
Pin the v2 client, server, and core packages at 2.3.1 and the official Node adapter at 2.1.1, alongside v1, and record core MCP ownership. Browser and QA plugin dependencies stay on v1 until their production callers migrate; adding unused v2 dependencies now violates the existing plugin dependency contract.
No release-age exemption is needed. The lockfile retains the workspace's existing Hono override and resolves the Node adapter's server peer. Npm-format lock mirrors remain transient validation artifacts under repository policy.
Release-note context: internal dependency preparation only; runtime migration follows separately.
Evidence
pnpm buildpassed on the exact PR head in 22m 44s, including CLI bootstrap checks and UI size budgets. The initial pre-commit build also passed in 11m 14s. The canonical packer produced an installable tarball, but its full validator timed out at 300 seconds after tar extraction, npm pack inventory, and dist import graph validation. No timeout was raised and no validator gate was bypassed.The ownership-surface audit reports three existing missing records for
@resvg/resvg-js,htmlparser2, andpg; the same errors reproduce with base-commit manifests and lockfile. This change adds ownership records for all four new root packages.Public-consumer census: no independent references to the affected MCP types/helpers were observed. Registry coverage is incomplete (2,029 complete, 379 partial, and one failed artifact out of 2,409), so the later public-type migration still needs an explicit compatibility decision.
Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/39010926946 (success: 165 jobs passed, 23 policy-skipped, zero failures). Required security check: https://github.com/openclaw/openclaw/actions/runs/39011730453 (success). The full local package validator remains incomplete; no timeout increase or successful local-validator claim is made.