Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
The fix works. I ran the reproduction from #55367 from source. On the base, a SKILL.md symlinked to a file at the top level of a 5,051-folder fake store makes the server watch the whole store recursively: 5,065 inotify watches. With this PR it adds a single file watch on the target, and the server holds 15 watches. The skill tests pass (11 of 11), and the new store test fails against the base code, so it does catch the bug. typecheck passes in packages/core.
Retargeted links are still followed: a file watch is a non-recursive watch on the target's folder, filtered to the file's name, and the skills root is still watched recursively, so it picks up the link being replaced. A skill folder that is itself a symlink to a folder still gets a directory watch, which stays limited to that folder.
Public API: unchanged.
No blocking concerns. This touches the same loop in skill.ts as #55234, which still uses watch(path.dirname(resolved), "directory"). Whichever of the two lands second will need a rebase so this fix isn't lost.
Related: #52776
Issue for this PR
Closes #55367
Type of change
What does this PR do?
An individually symlinked
SKILL.mdcan resolve directly into/nix/store. Watching its parent recursively then watches the entire store. Use the existing non-recursive file watcher for that target; keep directory watches when the skill lives inside a symlinked directory so new skills are still discovered.How did you verify your code works?
bun typecheck, root lint and SDK documentation checks pass. Full typecheck fails in unrelated changelog configuration because@tsconfig/node22/tsconfig.jsonis missing.Screenshots / recordings
Not applicable.
Checklist
Added by the opencode bot (AI-generated).
Related: #52776