Repository navigation
fix: correct MCP URI schema resolution with patched fast-uri - #133572
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 6:31 PM ET / 22:31 UTC. ClawSweeper reviewWhat this changesThe PR updates patched fast-uri versions in the product and locked Vercel release-tool dependency graphs, with MCP output-schema regression tests for URI reference resolution. Merge readinessKeep open for normal maintainer handling: the branch is a coherent, focused dependency repair with no introduced correctness finding, but it updates the global Ajv URI resolver policy and exact-head CI is still incomplete. Priority: P2 Review scores
Verification
How this fits togetherMCP tool schemas are compiled into validators before structured tool results reach the agent runtime. The MCP SDK uses Ajv, whose URI/schema-reference resolver uses fast-uri; the Vercel release workflow separately installs its fully locked CLI dependency graph. flowchart LR
A[MCP server tool schemas] --> B[OpenClaw MCP catalog]
B --> C[MCP SDK schema validator]
C --> D[Ajv URI resolution]
D --> E[Compiled tool validator]
E --> F[Validated structured tool result]
G[Locked Vercel CLI] --> H[Release materialization]
Decision needed
Why: The change is intentionally broader than the MCP regression cases because the workspace override governs resolved Ajv consumers, and the PR carries the protected maintainer label. Before merge
Agent review detailsSecurityNone. PR surfaceTests +56, Config 0, Other 0. Total +56 across 5 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the upstream resolver patch once a maintainer confirms the global Ajv compatibility scope and the exact current head has completed green required CI. Do we have a high-confidence way to reproduce the issue? No high-confidence local execution was possible because this read-only worktree has no node_modules; source inspection nevertheless maps the linked scenarios to the shared MCP SDK/Ajv validation boundary. Is this the best way to solve the issue? Yes, subject to the global compatibility decision: updating Ajv's maintained URI resolver is more maintainable than adding an OpenClaw-specific URI parser or workaround. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7504a3b3c453. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Land-ready proof and maintainer dependency-scope confirmation for head Exact-head CI is green: run 33339075561, 170 successful jobs / 16 skipped, with the required openclaw/ci-gate successful. The earlier run 33337397564 failed the docs-navigation expectation, not the fast-uri tests. After the release-navigation fix landed on main, a conflict-free rebase and new CI run resolved that blocker. The fast-uri diff is byte-identical with the same patch ID; all five reviewed file blobs are unchanged. The existing product override change to fast-uri 4.1.3 was explicitly approved before implementation, and landing was separately requested. I accept the shared Ajv resolver scope: this is the upstream-owned repair, not a product-specific downstream guard. The separately locked Vercel consumer stays on 3.1.6 within its existing I read the latest ClawSweeper review (22:31 UTC) and its earlier 21:54 UTC cycle, including both Rank-up moves lists. Both request the shared resolver compatibility confirmation and green exact-head CI; both are addressed here. The latest review's missing-node_modules/GitHub-DNS limitation is resolved by the independent direct upstream-source, installed-dependency and behavioral checks below. No earlier rank-up request remains unaddressed; a redundant re-review is not needed for this patch-identical refresh. Direct contract proof covers the four linked upstream advisory ranges and the actual published patched code: v4.1.3 resolution and post-inheritance host canonicalization, scheme validation, complete IPv6 validation, and single-level hostname decoding. The v3.1.6 resolver follows the same patched flow; only existing v4-specific mailto component fields differ in its index module. Actual tarball SHA-512 values and publication times were verified from fresh registry metadata. Consumer coverage is broader than the new MCP tests: both session and node-host MCP callers use the same catalog/schema owner; the actual installed Lobster Local proof completed:
Commands include: node scripts/run-vitest.mjs src/agents/mcp-tool-metadata.test.ts src/agents/agent-bundle-mcp-runtime.test.ts src/shared/json-schema-defaults.test.ts packages/gateway-protocol/src/index.test.ts packages/gateway-protocol/src/openclaw.schema.test.ts test/scripts/vercel-container-registry-publish.test.ts --reporter=verbosenode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.agents-root.jsonnode scripts/run-oxlint.mjs --tsconfig test/tsconfig/tsconfig.core.test.agents-root.json src/agents/mcp-tool-metadata.test.tspnpm buildThe dependency graph comparison is exact: only the two fast-uri identities change, with zero net non-test LOC. Fresh npm reports no findings, but also omits these advisories for the vulnerable versions; direct upstream evidence, not npm-green, establishes clearance of the four listed ranges. A separate follow-up is recorded for that feed-coverage gap. No OpenClaw SSRF exploitability is claimed. |
29f322c to
3b4c60f
Compare
|
Merged via squash.
|
…cked-delivery * origin/main: fix(ui): wait for restored draft before clearing (openclaw#133575) fix(deps): update fast-uri security patches (openclaw#133572) test: reduce workflow sanity fixture cleanup time (openclaw#133588) fix(media): normalize detected Matroska MIME (openclaw#133383) refactor(docker): retire ClawDock shell helpers (openclaw#133594) perf(browser): reuse snapshot refs and screenshot metadata (openclaw#133598) perf: load web chat history in larger, faster batches (openclaw#133565) fix(plugins): keep bundled plugins bundled when selected by plugins.load.paths (openclaw#133584) test: isolate shared /tmp session-store paths in runner and health suites (openclaw#133568) fix(cron): avoid no-op schedule repair writes (openclaw#133552)
Closes #133558 — MCP output schemas misresolve URI identifiers with affected fast-uri pins.
What Problem This Solves
Resolves a problem where MCP output schemas using IDN references fail to compile and nested hostname escapes collide with a different schema identifier. Malformed URI references also pass through the older resolver. The product and independently locked Vercel release tooling retain fast-uri versions affected by four published upstream high-severity advisories:
This is confirmed schema-resolution behavior and affected-version evidence, not a claim of demonstrated OpenClaw SSRF exploitability. The observed consumer is Ajv's URI/schema-reference resolver.
Why This Change Was Made
Use the maintained upstream patches instead of adding a downstream URI workaround: update the existing product override from 4.1.2 to 4.1.3, and resolve Vercel's transitive dependency from 3.1.5 to 3.1.6 within its existing Ajv
^3.0.1range. The product override change was explicitly approved. No new override or cooldown exception is added.Both locks were regenerated with their owning package managers under a seven-day floor. Registry publication times are 2026-08-23T01:34:36.066Z and 2026-08-23T01:42:00.349Z, earlier than the frozen 2026-08-23T21:20:35.163Z cutoff. Downloaded tarball bytes match fresh registry integrity metadata.
Preserve Vercel 59.3.0, direct Sandbox 4.0.0, all nine scoped release-tool overrides, the separately pinned Vercel integrity, lifecycle-script-disabled materialization, and the direct Sandbox executable. Only the complete Vercel lock hash changes to bind the regenerated lock. No changes to the separately owned SDK update are included.
User Impact
MCP schema identifiers resolve consistently without changing ordinary relative references, local fragments, or reserved path escapes. Malformed references are rejected at the upstream resolver rather than rewritten into another identity. Product and Vercel tooling no longer select versions affected by the four listed advisories.
No new configuration, public API, custom parser, gateway restart, live operator-state change, Vercel deployment, or publication is involved. Release note: fix MCP URI/schema-reference normalization and refresh the corresponding product and release-tool security dependencies.
Evidence
Before/after: the new real MCP/Ajv boundary cases fail against the old product dependency (5 failures, 6 passes) for the intended reasons: unresolved IDN, nested-host ID collision, and malformed scheme/IPv6/percent references accepted. With 4.1.3, the focused suite passes 227 tests across MCP metadata, the real MCP runtime, shared JSON Schema handling, gateway protocol validation, and Vercel release-tool contracts.
Independent checks against the actually installed Ajv 8.20.0 / fast-uri 4.1.3 product pair and Ajv 8.18.0 / fast-uri 3.1.6 release-tool pair pass absolute and scheme-relative IDN references, relative references, local fragments, reserved path escapes, distinct nested hostname escapes, malformed-reference rejection, and the four upstream advisory contracts. The draft-2020-12 TypeBox sibling remains covered by the existing MCP runtime tests.
Release-tool proof: a real isolated installation using empty HOME/XDG directories, separate empty npm config files, no credentials, and
npm ci --ignore-scriptssucceeded. The resultingvercel --versionand directsandbox --versionreport 59.3.0 and 4.0.0. Tampered-lock and existing-destination checks fail before a stub npm is invoked. Existing mocked registry-command tests pass; no production Vercel publication or deployment was run. An initial proof-harness attempt used the same/dev/nullpath for both npm configs; npm rejected duplicate config loading. Retrying with separate empty files fixed the harness without changing product code.Graph preservation: semantic comparison proves every other product and release-tool package/edge unchanged, including all 174 workspace importers, the standalone pnpm toolchain document, Vercel's direct manifest, scoped overrides and Sandbox, and the separate ClawHub lock. The Vercel lock changes only fast-uri's version, URL, and integrity. New lock SHA-256:
baa314f7f353aa4146efc0c2ab1b31f37a3941ed2f8aacaf50ba0ed248ac8e7f.Advisory caveat: fresh full-graph npm checks report no findings across three separately audited locks, but a focused bulk request also returns
{}for the old vulnerable versions. npm-green is therefore not used as advisory clearance; the four upstream affected ranges and patched releases were checked directly. Existing unrelated dependency-age exceptions are unchanged; the age claim here is about the two changed fast-uri identities.Production/config/tooling LOC: +2/-2 (net 0). Tests: +56/-0. Generated locks: +8/-8. No production workaround or new test-only seam.
Completed local gates: full
pnpm build(10m 25s; no ineffective-dynamic-import warning), focused core-test typecheck, focused oxlint, dependency pin guard, formatting andgit diff --check. The 227-test suite passed on both Node 26.8.1 and Node 24.20.0. Secretless real materialization, tamper rejection, CLI versions, and both installed Ajv URI contracts also passed independently on Node 24.20.0 / npm 11.19.0. The earlier Node 26 install's engine warning came from unchanged@renovatebot/pep440; Node 24 parity is now proven.Fresh Codex autoreview of all five changed files completed scoped-clean, no accepted/actionable P0 findings. The broad root-lock
check:changedplan was inspected; local proof is the full build plus focused owner checks above, not a claim of running the aggregate full suite. Exact-head required CI will be recorded before landing.