Skip to content

Conversation

@kdcokenny
Copy link
Collaborator

@kdcokenny kdcokenny commented Jan 12, 2026

Summary

Fixes #631 - Glob tool now includes hidden files and follows symlinks by default, aligning with OpenCode's internal behavior.

Changes

  • Add follow?: boolean option to GlobOptions interface
  • Update buildRgArgs to use !== false pattern for --hidden and --follow flags
  • Update buildFindArgs to use === false pattern, add -L for symlink following
  • Update buildPowerShellCommand to use !== false pattern, add -FollowSymlink
  • Export build functions for testing
  • Add comprehensive BDD-style tests (19 tests, 22 assertions)

Breaking Change

Glob tool now defaults to:

  • hidden: true - includes hidden files/directories (e.g., .sisyphus/)
  • follow: true - follows symlinks

Users can opt-out with explicit hidden: false or follow: false.

OpenCode Alignment

This matches OpenCode's internal ripgrep usage:

if (input.follow !== false) args.push("--follow")
if (input.hidden !== false) args.push("--hidden")

Testing

  • 19 new tests with 22 assertions
  • All existing tests pass

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@kdcokenny kdcokenny force-pushed the fix/631-glob-hidden-directories branch from 4ef1466 to 862c99d Compare January 12, 2026 20:09
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Confidence score: 3/5

  • PowerShell backend currently passes -FollowSymlink, which Windows PowerShell 5.1 does not support, so glob runs exit with code 1 and silently fail for those users.
  • This regression directly affects Windows users and is likely to surface immediately when traversing symlinks, making the merge moderately risky.
  • Pay close attention to src/tools/glob/cli.ts – ensure the PowerShell invocation handles unsupported flags or surfaces errors instead of ignoring exit codes.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/tools/glob/cli.ts">

<violation number="1" location="src/tools/glob/cli.ts:37">
P2: PowerShell backend uses `-FollowSymlink`, which is unsupported in Windows PowerShell 5.1, causing silent failures (exit code 1 ignored) on Windows.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- Add follow?: boolean option to GlobOptions interface
- Change buildRgArgs to use !== false pattern for hidden and follow flags
- Change buildFindArgs to use === false pattern, add -L for symlinks
- Change buildPowerShellCommand to use !== false pattern for hidden
- Remove -FollowSymlink from PowerShell (unsupported in PS 5.1)
- Export build functions for testing
- Add comprehensive BDD-style tests (18 tests, 21 assertions)

Note: Symlink following via -FollowSymlink is not supported in Windows
PowerShell 5.1. OpenCode auto-downloads ripgrep which handles symlinks
via --follow flag. PowerShell fallback is a safety net that rarely triggers.

Fixes code-yeongyu#631
@kdcokenny kdcokenny force-pushed the fix/631-glob-hidden-directories branch from 862c99d to 01b01f5 Compare January 12, 2026 20:33
@code-yeongyu code-yeongyu merged commit 2314a0d into code-yeongyu:dev Jan 13, 2026
2 checks passed
@kdcokenny kdcokenny deleted the fix/631-glob-hidden-directories branch January 13, 2026 00:24
kdcokenny added a commit that referenced this pull request Jan 13, 2026
…#720)

- Add follow?: boolean option to GlobOptions interface
- Change buildRgArgs to use !== false pattern for hidden and follow flags
- Change buildFindArgs to use === false pattern, add -L for symlinks
- Change buildPowerShellCommand to use !== false pattern for hidden
- Remove -FollowSymlink from PowerShell (unsupported in PS 5.1)
- Export build functions for testing
- Add comprehensive BDD-style tests (18 tests, 21 assertions)

Note: Symlink following via -FollowSymlink is not supported in Windows
PowerShell 5.1. OpenCode auto-downloads ripgrep which handles symlinks
via --follow flag. PowerShell fallback is a safety net that rarely triggers.

Fixes #631
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.

[Bug]: Glob tool cannot find files in hidden directories (.sisyphus/) - Notepad system broken

2 participants