Skip to content

test(filesystem): explicit timeout on the 100000-entry walk tests - #5331

Merged
cliffhall merged 1 commit into
v2/mainfrom
v2/fix/5328-bounded-walk-test-timeout
Oct 28, 2026
Merged

cliffhall merged 1 commit into
v2/mainfrom
v2/fix/5328-bounded-walk-test-timeout

Conversation

@cliffhall

Copy link
Copy Markdown
Member

Closes #5328

Description

The three bounded-walk.test.ts tests that walk MAX_WALK_ENTRIES + 1 (100,001) mocked entries now carry an explicit 30 s timeout (it(name, { timeout }, fn)), with a comment saying why. Their cost is the bound they check, so it scales with the runner: about 1 s on a Mac, near vitest's 5 s default on a loaded Windows runner. No retry (AGENTS.md forbids them) and the cap is unchanged, so the tests still exercise the real bound.

git diff -w is +20/−5: the rest is Prettier re-indenting the two tests whose long titles push the options argument onto its own line.

Server Details

  • Server: filesystem
  • Changes: tests only (src/filesystem/__tests__/bounded-walk.test.ts)

Motivation and Context

Test filesystem (Windows) failed on v2/main at d1b59ba (search_files › "stops with an error after visiting 100000 entries": 5.96 s, Test timed out in 5000ms). That same failure is the red TypeScript (dispatched) status on the Version Packages PR #5296, so it blocks the v2.2.0 release (#5330).

Credit: @FelixFangX proposed the same fix in #5328.

How Has This Been Tested?

No client-observable surface (tests only), so a targeted probe:

  • With the constant set to 500 ms, the search_files cap test fails with Test timed out in 500ms (it takes ~1050 ms locally). This confirms the per-test option, not the 5 s default, is the one in force. At 30_000: Tests 10 passed (10).
  • npm run local:gate: exit 0.
  • The Windows leg of this PR's CI is the real check.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation (not applicable: no protocol surface changed)
  • My changes follow MCP security best practices (not applicable: tests only)
  • I have updated the server's README accordingly (not applicable: nothing user-facing changed)
  • I have added a changeset if this changes what a TypeScript server publishes (not applicable: tests are not published)
  • I have tested this with an LLM client (not applicable: no server behavior changed; targeted probe above)
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling (not applicable: tests only)
  • I have documented all environment variables and configuration options (not applicable: none added)

🤖 Generated with Claude Code

The bounded-walk cap tests walk MAX_WALK_ENTRIES + 1 mocked entries on
purpose, so their cost scales with the runner. On a loaded Windows
runner the search_files one crossed vitest's 5 s default and turned
v2/main red. Give the three cap tests a 30 s timeout, with the reason
beside it; no retry, and the real bound is still the one tested.

Fixes #5328. Approach also proposed by FelixFangX in that issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
@changeset-bot

changeset-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2b6dc3b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the test-timeout-only change.

No open issues 🎉

What changed in this PR

This tests-only change addresses #5328 by giving the filesystem server’s large bounded-walk tests more time on slow Windows runners, without changing server behavior.

Changes:

  • Applies a shared 30-second timeout to three tests processing 100,001 mocked entries.
  • Documents the timeout rationale while preserving the real entry cap and avoiding retries.
File Description
src/​filesystem/​__tests__/​bounded-walk.test.ts Adds explicit timeouts and explanatory comments for the three large-walk tests.

Review effort: Balanced

@cliffhall

Copy link
Copy Markdown
Member Author

Copilot round 1: clean (no findings). Loop stopped on the first clean round.

@cliffhall
cliffhall merged commit cb3c7fe into v2/main Oct 28, 2026
41 checks passed
@cliffhall
cliffhall deleted the v2/fix/5328-bounded-walk-test-timeout branch October 28, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants