qwen-code/packages/core
tanzhenxin 0f8e8db9ae
fix(core): limit skill watcher depth to prevent FD exhaustion (#3320)
* fix(core): limit skill watcher depth to prevent FD exhaustion (#3289)

The chokidar file watcher in SkillManager.updateWatchersFromCache() had
no depth limit or ignored paths. When skill directories contained heavy
subtrees like node_modules, chokidar recursively watched every file,
exhausting file descriptors and breaking child-process I/O (node-pty
onData/onExit callbacks silently stop firing).

Fix: set depth to 2 (skills use a fixed <skill-name>/SKILL.md layout)
and add an ignored function that filters out special file types (sockets,
FIFOs, devices) and .git directories.

Made-with: Cursor

* fix(core): use path.join in watcher test for Windows compat

The watcherIgnored test used hardcoded forward-slash paths which don't
split correctly on Windows where path.sep is backslash.

Made-with: Cursor
2026-04-17 15:28:46 +08:00
..
scripts Fix: Improve ripgrep binary detection and cross-platform compatibility (#1060) 2025-11-18 19:38:30 +08:00
src fix(core): limit skill watcher depth to prevent FD exhaustion (#3320) 2026-04-17 15:28:46 +08:00
vendor feat test tool permissions 2026-03-10 16:30:22 +08:00
index.ts fix: Remove remaining ClearcutLogger export from packages/core/index.ts 2026-02-01 14:52:14 +08:00
package.json chore(release): bump version to 0.14.5 (#3298) 2026-04-15 22:43:29 +08:00
test-setup.ts feat(memory): managed auto-memory and auto-dream system (#3087) 2026-04-16 20:05:45 +08:00
tsconfig.json fix: upgrade @lydell/node-pty to 1.2.0-beta.10 to fix PTY FD leak 2026-04-01 07:55:56 +08:00
vitest.config.ts Sync upstream Gemini-CLI v0.8.2 (#838) 2025-10-23 09:27:04 +08:00