Files
codebase-memory-mcp/tests
Martin VogelandPatrick bd9ad5a17e fix(pipeline): honor discovery exclusions in pkgmap/path-alias/envscan walks
The auxiliary filesystem walks (pkgmap manifest scan, tsconfig/jsconfig
path-alias discovery, env-URL scan) ignored the directory subtrees that
discovery had already excluded (gitignore + skip dirs). On a huge
monorepo with a gitignored vendored tree this kept the pkgmap walk busy
for ~15 minutes re-traversing directories the index never uses (#792).

Distills PR #793 by Patrick (@Sowiedu): a shared root-anchored,
'/'-boundary exclusion predicate (cbm_pipeline_relpath_is_excluded) in
pipeline_internal.h, exclusion parameters threaded through
cbm_pkgmap_scan_repo / cbm_pkgmap_build_from_repo, find_alias_files /
cbm_load_path_aliases_excluded and cbm_scan_project_env_urls_excluded,
NULL-exclusion wrappers preserving the old signatures, and the borrowed
excluded_dirs/excluded_count pair on cbm_pipeline_ctx_t.

Beyond #793:
- Thread the excluded list into pipeline_incremental.c's extract ctx
  and its path-alias load as well, so incremental runs stop walking
  excluded trees too (#804).
- Add regression tests: boundary semantics of the exclusion predicate,
  plus walk-level exclusion tests for pkgmap, path-alias, and envscan
  (each with an unexcluded control run so they cannot pass vacuously).
  All are red against the unfixed sources.
- Correct the envscan narrative: cbm_scan_project_env_urls has no
  production callers today; the exclusion plumbing is kept for
  consistency and exercised by tests.

Closes #792. Closes #804.

Co-authored-by: Patrick <11910229+Sowiedu@users.noreply.github.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-07-03 19:57:01 +02:00
..
…
2026-06-28 13:05:05 +02:00