Add dry-run index preview - #274
Open
faysou wants to merge 3 commits into
Open
Conversation
- Compare matched files with persisted components without indexing - Report added and deleted paths, including empty files - Cover CLI help and non-mutating dry-run behavior
Apply the configured file-size limit when computing additions and preserve the E2E non-mutation check on main.
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
ccc index --drynow lists files that would enter or leave the index source set without running the indexer. The command compares files matched from the project tree with persistedprocess_filecomponent paths, then prints sorted additions and deletions with exact counts.Dry runs require an initialized project and do not auto-create settings. They open the CocoIndex application database through its read-only inspection API and leave the indexed paths unchanged.
Preview flow
flowchart LR Command["ccc index --dry"] --> Settings["Load project settings"] Settings --> Matched["Walk matched source files"] Command --> Persisted["Read persisted process_file paths"] Matched --> Compare["Compare path sets"] Persisted --> Compare Compare --> Added["Print sorted additions"] Compare --> Deleted["Print sorted deletions"]The preview reads source and index state but does not start the indexing flow.
Matching behavior
.gitignorerules, andmax_file_sizelimit as indexing.Testing
prekgate passed trailing whitespace, end-of-file, large-file, conflict, gitleaks, Ruff lint, Ruff format, mypy, and the full pytest suite.git diff --check upstream/main...HEADpassed.