fix(find): bound uncached glob traversal - #4044
Merged
Yeachan-Heo merged 1 commit intoAug 9, 2026
Merged
Conversation
Broad sorted finds built a complete native snapshot before applying the requested limit, so large roots failed at the shared scan budget despite narrow output. Lore-id: 23cadfc5 Constraint: cached scans remain complete-or-error Constraint: explicit hidden and global-store searches keep existing routing Rejected: raising filesystem scan limits | preserves root-sized ownership Tested: focused Rust glob, native package, FindTool, package type checks, 250004-entry local regression
Yeachan-Heo
approved these changes
Aug 9, 2026
Yeachan-Heo
left a comment
Owner
There was a problem hiding this comment.
MERGE_READY at f94d105. Reviewed bounded newest-K selection, deterministic mtime/path ordering, callback caps, timeout mapping, cancellation handling, and native/TS coverage. Exact-head CI is green; no active repair overlap or owner gate found.
Owner
|
Contributor ledger — REVIEW. Admitted as the active native/find bounded-traversal lane. Its native + TypeScript boundary, deterministic top-K ordering, and progress cap have focused evidence and clean checks. Review must preserve cache/shared-scan semantics and native ABI behavior; it does not own the unrelated TUI/session census items. |
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.
Summary
mtime desc, path ascordering.gjc/global-store routingThis is intentionally limited to the four files in the approved broad-find plan. It does not change shared fs-cache limits, Darwin session storage, runtime state, or global-store routing.
Related context: #3769 established the real large-root native scan ownership problem; #3780 added complete-or-error shared-scan bounds. This PR fixes the user-facing uncached
findpath that otherwise materializes that complete snapshot before applying K.Verification
cargo test -p pi-natives glob --lib— 16 passedbun run build:native— passedbun test packages/natives/test/native.test.ts— 37 passedbun test packages/coding-agent/test/tools.test.ts -t "find tool"— 8 passed, 17 assertionsbun run --cwd=packages/natives check— passedbun run --cwd=packages/coding-agent generate-docs-index && bun run --cwd=packages/coding-agent check— passedorigin/devcomputer/controller diagnostics allowed — passed with-D warningszz-target-c.txt,zz-target-b.txt,zz-target-a.txt; 4 callbacks for K=3FS_SCAN_MAX_ENTRIES=10contract probe — cached scan failed closed withFS_SCAN_LIMITand zero callbacks; uncached scan returned the newest K=3Base-only gate note
bun run check:rscurrently fails on six denied Clippy diagnostics already present inorigin/dev@3bddcc579, all incrates/pi-natives/src/computer/controller.rs. No changed file is implicated; the affected crate passes scoped Clippy after allowing only those three base-only lint classes.