Skip to content

filesystem: bounded-walk's search_files cap test takes 13–30 s since #5817 (stubs realpath, entries no longer resolve through it) #5824

Backlog

Description

@cliffhall

The search_files case of __tests__/bounded-walk.test.ts ("stops with an error after visiting 100000 entries") has slowed from about 2 s to 13–30 s since #5817, and timed out at its 30 s WALK_CAP timeout on the Windows leg of the v2.7.0 CalVer PR's dispatched CI (run 47497514740). It passed on re-run. The directory_tree case beside it still takes about 0.5 s.

v2/main at Linux, Node 26 Windows
v2.6.0 (b502fd9f) 2.1 s 8.3 s
#5816 (96b8c576) 2.3 s –
#5817 (f9112339) 12.9 s 19.6 s
#5818 (83313f1c) 19.1 s 25.1 s
CalVer PR #5823 (55eba5da) 8.5 s 30.0 s (timeout)

Why. The test lists 100,001 names that do not exist on disk and stubs fs.realpath so that "each entry costs a string check rather than a real lookup". Since #5817, search_files no longer resolves an entry through realpath, so the stub no longer short-circuits it: each listed name now reaches the real filesystem and misses. The test pays for 100,001 real misses, which entries that exist never would. Its cost now measures that, not the cap.

Expected. The test measures the 100,000-entry cap at about the cost it had (a few seconds), well inside WALK_CAP, on every leg. Restore the stub's intent so a listed name is cheap to resolve, rather than raising the timeout again (#5328 already did that once) or adding a retry, which AGENTS.md rules out.

The real-tree slowdown in search_files is a separate issue: #5825.

Activity

  1. added this to the v2.8.0 milestone on Dec 5, 2026
  2. added
    server-filesystem
    chore
    on Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreserver-filesystemv2

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions