Skip to content

build: prepare MCP v2 dependency foundation - #175254

Merged
steipete merged 1 commit into
mainfrom
build/mcp-v2-sdk-foundation
Oct 17, 2026
Merged

steipete merged 1 commit into
mainfrom
build/mcp-v2-sdk-foundation

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Frozen workspace install; exact-version pin guard (751 specs, zero violations); transient root/browser/QA npm-lock validation.
  • Existing plugin dependency contract: 511 passing tests (14.78 seconds test duration; 18.83 seconds harness wall time). Adding unused plugin v2 dependencies initially produced two failures; removing those premature declarations fixed them without changing tests.
  • Node 26.12.0 and Bun 1.4.3 on macOS 27.0.1 arm64: the installed tarball resolves nine MCP module paths through ESM/CommonJS on the main thread and in real workers (72 checks), plus both public SDK entrypoints (four checks). Both isolated packaged CLI version checks passed with the exact PR commit. Seven-process cold-import samples recorded; no comparative performance claim.
  • SDK export registry unchanged; all 155 public subpaths and the declaration-size ratchet passed during build. pnpm build passed 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.
  • Autoreview: clean through P2. Simplification kept only root dependency/ownership metadata and the lockfile; no production or test code added.

The ownership-surface audit reports three existing missing records for @resvg/resvg-js, htmlparser2, and pg; 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.

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T06:44:53.911440Z 67e01ee PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 67e01ee7263adce7eddc13c336cd093a5609bb12
  • Maintainer: @steipete
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • package.json

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds 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.

  • Before: The connection runs through the v1 SDK.
  • After: The connection still runs through v1, with v2 packages available for subsequent migration.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent; validation supports dependency preparation but does not exercise a migrated MCP runtime.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored dependency-only PR is outside the ordinary contributor proof gate; reported module-loading validation and successful build-artifact checks support preparation without proving runtime migration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Remaining MCP runtime migration needs a reviewed dependency foundation.
Reason: The maintainer-authored direction is established, and the patch stays within its explicitly limited preparation scope.

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
Reviewed head: 67e01ee7263adce7eddc13c336cd093a5609bb12

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • MCP ext-apps lockfile peer resolution keeps the original intent (09fbd7b: The earlier dependency refresh updated compatible pins under the seven-day cutoff; the current ext-apps package already declares an optional v2 server peer.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 8fe50a2 adds scripts/lib/dependency-ownership.json:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8fe50a213620; files: scripts/lib/dependency-ownership.json)

PR surface

Config +4, Other +55. Total +59 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 1 4 0 +4
Generated 0 0 0 0
Other 2 57 2 +55
Total 3 61 2 +59

Labels

Label changes:

  • add P3: Internal dependency preparation leaves existing user-facing MCP behavior intact.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Internal dependency preparation leaves existing user-facing MCP behavior intact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 17, 2026, 2:58 AM ET / 06:58 UTC.

@steipete
steipete merged commit 5d2dc71 into main Oct 17, 2026
255 checks passed
@steipete
steipete deleted the build/mcp-v2-sdk-foundation branch October 17, 2026 07:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 17, 2026
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.
steipete added a commit that referenced this pull request Oct 17, 2026
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.
steipete added a commit that referenced this pull request Oct 17, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
)

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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-changed PR changes dependency-related files scripts Repository scripts size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant