You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #87, addressing the review findings that landed after merge. Ripgrep resolves --ignore-file patterns relative to its working directory, so a root .boltignore rule like /src/generated/ matched the wrong path whenever grep/glob/find ran from a subdirectory, and the child-to-root argument order gave parent files higher precedence than nearer ones.
.boltignore is now repository-root-only, and when a search starts below the root, rg runs from the root with the walk confined to the requested directory, so root-anchored rules keep their scope:
User globs with a non-trailing slash are re-anchored onto the search directory (slash-less globs match basenames at any depth and need no translation), and output paths are re-based onto the requested cwd, so callers see the same relative paths as before.
In the HTTP file.list handler, a .boltignore read failure no longer silently becomes an empty policy: only NotFound yields an empty policy, anything else dies instead of exposing files the policy should hide. .boltignore rules are also added before .gitignore/.ignore so those keep higher precedence, mirroring rg's lowest-priority --ignore-file semantics.
How did you verify your code works?
Extended packages/core/test/ripgrep.test.ts with a root-anchored /src/generated/ rule checked from both the root and a subdirectory, for find and grep (3/3 pass)
bun typecheck in packages/core and packages/opencode
Screenshots / recordings
Not a UI change.
Checklist
I have tested my changes locally
I have not included unrelated changes in this PR
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.
@DevFlex-AI, you've reached your PR review limit, so we couldn't start this review.
Next review available in:31 minutes
Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).
How can I continue?
After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.
To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.
How do review limits work?
CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.
For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.
We reviewed changes in 036264a...23cbe53 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The reason will be displayed to describe this comment to others. Learn more.
Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable
It is considered a best practice to avoid 'polluting' the global scope with variables that are intended to be local to the script. Global variables created from a script can produce name collisions with global variables created from another script, which will usually lead to runtime errors or unexpected behavior. It is mostly useful for browser scripts.
The reason will be displayed to describe this comment to others. Learn more.
False positive: this is an ES module, so the function declaration is module-scoped, not global. Plain function declarations are the established style in this codebase.
The reason will be displayed to describe this comment to others. Learn more.
Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable
It is considered a best practice to avoid 'polluting' the global scope with variables that are intended to be local to the script. Global variables created from a script can produce name collisions with global variables created from another script, which will usually lead to runtime errors or unexpected behavior. It is mostly useful for browser scripts.
The reason will be displayed to describe this comment to others. Learn more.
Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable
It is considered a best practice to avoid 'polluting' the global scope with variables that are intended to be local to the script. Global variables created from a script can produce name collisions with global variables created from another script, which will usually lead to runtime errors or unexpected behavior. It is mostly useful for browser scripts.
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
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.
Issue for this PR
Closes #93
Type of change
What does this PR do?
Follow-up to #87, addressing the review findings that landed after merge. Ripgrep resolves
--ignore-filepatterns relative to its working directory, so a root.boltignorerule like/src/generated/matched the wrong path whenever grep/glob/find ran from a subdirectory, and the child-to-root argument order gave parent files higher precedence than nearer ones..boltignoreis now repository-root-only, and when a search starts below the root, rg runs from the root with the walk confined to the requested directory, so root-anchored rules keep their scope:User globs with a non-trailing slash are re-anchored onto the search directory (slash-less globs match basenames at any depth and need no translation), and output paths are re-based onto the requested cwd, so callers see the same relative paths as before.
In the HTTP
file.listhandler, a.boltignoreread failure no longer silently becomes an empty policy: onlyNotFoundyields an empty policy, anything else dies instead of exposing files the policy should hide..boltignorerules are also added before.gitignore/.ignoreso those keep higher precedence, mirroring rg's lowest-priority--ignore-filesemantics.How did you verify your code works?
packages/core/test/ripgrep.test.tswith a root-anchored/src/generated/rule checked from both the root and a subdirectory, for find and grep (3/3 pass)bun typecheckinpackages/coreandpackages/opencodeScreenshots / recordings
Not a UI change.
Checklist
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.