Skip to content

filesystem: bounded-walk 100000-entry test times out on slow Windows runners (vitest's 5 s default) #5328

Closed

Description

@cliffhall

src/filesystem/__tests__/bounded-walk.test.ts › search_files › "stops with an error after visiting 100000 entries" (added by #5326 for #4162) runs on vitest's default 5000 ms test timeout, but it walks MAX_WALK_ENTRIES + 1 mocked entries through the real search_files path, so its cost scales with the runner's speed.

Observed on the Windows runner (Test filesystem (Windows)):

Run Duration
v2/main 858cfff 2638 ms (pass)
PR #5317 2845 ms (pass)
PR #5322 head 7b9cac1 (job) 5047 ms → Test timed out in 5000ms

The failure has nothing to do with the PR it failed on. The test passes about 2× under the limit on a normal run, so a slow runner pushes it over.

Expected: the test passes whatever the runner load, since its cost comes from the bound it checks and not from a bug.

Fix: give that one test an explicit timeout (for example it(name, fn, 30_000)) with a comment saying why: it walks 100,001 entries on purpose. Don't add a retry, which AGENTS.md forbids, and don't lower MAX_WALK_ENTRIES for the test, which would stop it testing the real bound. This is the same pattern as #5314, which covers the HFS+ disk-image test.

Activity

  1. added this to the v2.3.0 milestone on Oct 27, 2026
  2. added
    bugSomething isn't working
    server-filesystemReference implementation for the Filesystem MCP server - src/filesystem
    on Oct 27, 2026
  3. FelixFangX commented on Oct 27, 2026

    @FelixFangX

    Ready fix on a fork branch (this repository currently limits opening PRs to collaborators):

    https://github.com/FelixFangX/servers/tree/fix/filesystem-bounded-walk-timeout

    Compare: v2/main...FelixFangX:fix/filesystem-bounded-walk-timeout

    Gives the search_files / directory_tree 100000-entry tests an explicit 30s timeout (same idea as #5314).

    Happy for a maintainer to cherry-pick or open from the branch if external PRs stay restricted.

  4. self-assigned this
    on Oct 28, 2026
  5. modified the milestones: v2.3.0, v2.2.0 on Oct 28, 2026
  6. added a commit that references this issue on Oct 28, 2026
    2b6dc3b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystemv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions