Skip to content

Fix: walkMd lacks symlink cycle detection causing infinite recursion - #2890

Open
asmit25805 wants to merge 1 commit into
garrytan:mainfrom
asmit25805:fix/lib-context-bill.ts-1789628892
Open

asmit25805 wants to merge 1 commit into
garrytan:mainfrom
asmit25805:fix/lib-context-bill.ts-1789628892

Conversation

@asmit25805

Copy link
Copy Markdown

Adds symlink cycle detection to walkMd by tracking realpaths in a visited Set, mirroring the existing guard in findSkillDirs. Symlinks to directories are resolved via realpathSync before recursing, and already-visited directories are skipped to prevent infinite recursion.

Kept the change minimal — just what's needed for the fix, nothing else touched.

Closes #203

@trunk-io

trunk-io Bot commented Sep 17, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

上下文瞬间打满

1 participant