fix(buzz-agent): follow symlinks when discovering skill directories#1295
Merged
Conversation
DirEntry::file_type() returns FileType::Symlink for symlink entries — is_dir() returns false even when the symlink target is a directory. This silently dropped all symlinked skill dirs from discovery, which is how ai-rules installs its skills (symlinks under ~/.agents/skills/). Replace the file_type() calls in scan_skill_dir and collect_supporting_files_impl with std::fs::metadata() which follows symlinks, so both real directories and symlinked directories are included. Adds a regression test: symlinked_skill_dir_is_discovered. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
cargo fmt expanded the metadata filter closure to multi-line (line length exceeded rustfmt's limit). Gate the symlinked_skill_dir_is_discovered integration test with #[cfg(unix)] — std::os::unix::fs::symlink does not exist on Windows, causing a compile error in the Windows Clippy shard. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
tellaho
pushed a commit
that referenced
this pull request
Jun 25, 2026
…ebar * origin/main: fix(sidebar): non-selectable channel names + copy/leave context menu actions (#1260) fix(runtime): sweep node wrapper processes hosting managed agent shims (#1296) fix(buzz-agent): follow symlinks when discovering skill directories (#1295) chore: add grab-emoji.sh to register Slack emoji in Buzz (#1292) Fix cross-pod membership notification fanout (#1291) fix(buzz-acp): strengthen agent communication rules in base prompt (#1293) chore(release): release Buzz Desktop version 0.3.34 (#1289) feat(desktop): refresh Agents tab live on inbound relay sync (#1256) fix(buzz-acp): inject Codex network allowlist for relay hostname at spawn time (#1287) Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com> # Conflicts: # desktop/src-tauri/src/commands/agent_models.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
scan_skill_dirusesDirEntry::file_type()to check whether an entry is a directory. On Unix,file_type()returnsFileType::Symlinkfor symlink entries —is_dir()returnsfalseeven when the symlink target is a directory. This silently dropped every symlinked skill directory from discovery.ai-rulesinstalls its skills as symlinks under~/.agents/skills/(e.g.~/.agents/skills/handoff -> ...ai_rules/config/skills/handoff). All 15 of those skills were invisible to the agent because of this filter.Fix
Replace
DirEntry::file_type()withstd::fs::metadata(path)in two places:scan_skill_dir— the top-level filter that decides which entries in a skills dir are skill subdirectoriescollect_supporting_files_impl— the recursive walker that collects non-SKILL.md files within a skill directorystd::fs::metadata()follows symlinks, so both real directories and symlinked directories pass theis_dir()check.Test
Adds
symlinked_skill_dir_is_discoveredtohints_integration.rs: creates a real skill directory, symlinks it into.agents/skills/, and asserts the skill name appears in the system prompt.