fix(mcp-filesystem): reject existing move destinations by dvd233 · Pull Request #1982 · bytedance/UI-TARS-desktop · GitHub
Skip to content

fix(mcp-filesystem): reject existing move destinations - #1982

Open
dvd233 wants to merge 1 commit into
bytedance:mainfrom
dvd233:codex/fix/mcp-filesystem-no-overwrite-1977
Open

dvd233 wants to merge 1 commit into
bytedance:mainfrom
dvd233:codex/fix/mcp-filesystem-no-overwrite-1977

Conversation

@dvd233

@dvd233 dvd233 commented Sep 20, 2026

Copy link
Copy Markdown

Summary

The destination check uses lstat, so existing files, directories, and symlinks are protected. This is a preflight guard for the reported overwrite behavior; it does not claim an atomic cross-platform no-replace rename under a concurrent destination race.

Verification

  • pnpm --filter @agent-infra/mcp-server-filesystem test (5 passed)
  • pnpm exec prettier --check packages/agent-infra/mcp-servers/filesystem/src/server.ts packages/agent-infra/mcp-servers/filesystem/tests/server-in-memory.test.ts
  • pnpm exec eslint packages/agent-infra/mcp-servers/filesystem/src/server.ts packages/agent-infra/mcp-servers/filesystem/tests/server-in-memory.test.ts
  • pnpm exec tsc --noEmit -p packages/agent-infra/mcp-servers/filesystem/tsconfig.json
  • pnpm --filter @agent-infra/logger build
  • pnpm --filter mcp-http-server build
  • pnpm --filter @agent-infra/mcp-server-filesystem build
  • git diff --check

Checklist

  • Added or updated necessary tests.
  • Verified no breaking changes.

@netlify

netlify Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

@netlify

netlify Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tarko canceled.

Name Link
🔨 Latest commit b887975
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/6ab06d5cc68bff000812d511

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report]: filesystem move_file overwrites existing destination files despite its no-overwrite contract

1 participant