Conversation
An agent session runs with the working directory set to the user's home, so selecting the current directory as the project walked ~2.4M files, ran past any subprocess timeout, and produced no output at all. Refuse an implicit root that is a home directory or the filesystem root, naming the fix in the error. An explicit --root keeps selecting whatever the caller asks for. A wide root also omits one entry per skipped file: a status envelope for /tmp carried 22,933 entries and 9 MB of JSON, and both the project and cached lists duplicated it. Cap each reported omission list at 256 entries, keep the full count in omittedFiles / omitted_files (new on IndexOutput, so the index report no longer implies its total by list length), and mark a capped list with omissionsTruncated. Human output names the truncation and reports the index total from the count instead of the list.
This branch has not been deployed
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.
Why
An agent session runs with the working directory set to the user's home, so selecting the current directory as the project walked ~2.4M files, ran past any subprocess timeout, and produced no output at all.
A wide root also omits one entry per skipped file: a status envelope for
/tmpcarried 22,933 entries and 9 MB of JSON, and both the project and cached lists duplicated it.What
--rootstill selects whatever the caller asks for.omittedFiles/omitted_files(new onIndexOutput), and mark a capped list withomissionsTruncated.Tests
implicit_cwd_root_refuses_home_and_filesystem_root_only(cli/src/project/select.rs)omission_entry_lists_are_capped_while_the_truncation_is_reported(cli/src/result.rs)cargo test -p code2graph-cli— 20 pass