Honor force-included paths in lazy repo metadata#12235
Conversation
Co-Authored-By: Oz <oz-agent@warp.dev>
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR updates lazy repository metadata so configured force-included paths, such as project skill provider directories, continue to be traversed past the shallow tree depth and adds focused tests for initial discovery plus watcher deltas.
Concerns
- Force-included subtrees now bypass the only directory-depth guard, while the existing budget only counts files. A repo can create an arbitrarily deep
.agents/skillsdirectory chain with few or no files and force unbounded traversal plus recursive assembly during lazy indexing.
Security
- The unbounded force-included traversal is a resource-exhaustion risk for untrusted repositories and should keep a hard directory/depth limit or directory budget even while overriding the shallow lazy depth.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
|
||
| // If we've reached the max depth, force lazy-loading even of non-ignored folders unless the | ||
| // folder is on the path to a force-included subtree. | ||
| let mut lazy = current_depth >= options.max_depth && !force_included; |
There was a problem hiding this comment.
.agents/skills directory chain with few/no files and force unbounded traversal plus recursive assemble_node calls during lazy indexing; keep a hard depth or directory budget for force-included descendants while still loading the intended provider path.
Merge activity
|
Description
Linked Issue
ready-to-specorready-to-implement.Testing
./script/format./script/format --checkcargo nextest run -p repo_metadata --features local_fs(100 passed, 2 skipped)cargo clippy -p repo_metadata --all-targets --tests --features local_fs -- -D warningscargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warningscargo clippy -p warp_completer --all-targets --tests -- -D warningsI have manually tested my changes locally with
./script/runAgent Mode
CHANGELOG-BUG-FIX: Discover project skills under force-included paths when repo metadata is lazily loaded.
Co-Authored-By: Oz oz-agent@warp.dev