Repository navigation
fix(indexer): dotted .cceignore patterns and directory targets - #167
Open
KM-IA-Agency wants to merge 1 commit into
Open
KM-IA-Agency wants to merge 1 commit into
KM-IA-Agency wants to merge 1 commit into
Conversation
…-labs#165) - matches_any normalized paths with rel.lstrip("./"), which strips a character set: ".env" became "env", so patterns starting with "." never matched root-level entries. Strip only a "./" prefix and "/". - `cce index --path <dir>` walked <dir> with <dir> as the matcher root: rules matching <dir> or an ancestor were never tested, and root-relative rules were evaluated against <dir>-relative paths. Skip an excluded directory target and keep paths project-relative. Closes elara-labs#165 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KM-IA-Agency
requested review from
fazleelahhee and
rajkumarsakthivel
as code owners
October 4, 2026 23:39
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.
Closes #165.
1. Dotted patterns never matched at the project root
matches_anynormalized withrel.lstrip("./").str.lstripstrips a character set, so.envbecameenv,.pytest-tmp-cibecamepytest-tmp-ci, and every.cceignorepattern starting with.was a no-op for root-level entries. The fix strips only a./prefix (repeated) and leading/.2.
cce index --path <dir>bypassed directory exclusionsThe directory-target branch walked
<dir>with<dir>as the matcher root:<dir>itself or one of its ancestors (data/with--path dataor--path data/sub) was never tested;src/gen/were evaluated against<dir>-relative paths.The fix skips a directory target when it, or an ancestor, is excluded (by
ignore_setnames or.cceignore)._iter_project_filesalso gains arelative_toargument, so paths stay project-relative when the walk starts below the root.Tests
test_dotted_patterns_match_root_entries(5 cases) andtest_leading_dot_is_not_dropped_from_the_name.test_directory_target_respects_cceignore:--path data,--path data/suband--path srcwithsrc/gen/excluded.tests/indexer/test_ignorefile.py,test_pipeline_target_path.py,test_pipeline_secret_target.py: 32 passed with the fix; 7 of the new cases fail without it.test_target_path_through_symlinked_project_root:Path.symlink_tois not permitted on my Windows machine, which is unrelated to this change. Run locally on Windows / Python 3.13 with-n0; I have not run the full suite locally.Related: #163, #164 / #166.
🤖 Generated with Claude Code