fix(mapper): apply configured path excludes#92
Open
schedawg74 wants to merge 1 commit into
Open
Conversation
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.
Problem
clawpatchconfig exposesinclude/exclude, but deterministic feature mapping did not apply those filters to emitted feature records.That made configured excludes inconsistent:
config.include/config.excludeclawpatch map --source heuristiccould still create features for excluded paths--source autocould skip the agent path when the heuristic map looked meaningful, leaving excluded generated/vendor paths in the final mapIn practice, a config exclude like
src/client/generated/**could still produce feature entrypoints, owned files, context files, or tests under that excluded tree.Changes
src/app.tspasses resolved config filters intomapFeatures, not just agent inventory.src/mapper.tsapplies filters when converting seeds into feature records:src/agent-mapper.tsreuses the same shared filter helper for inventory filtering.src/mappers/shared.tsnow owns the path filter matching logic that was previously local to agent inventory.src/mapper.test.tsadds regression coverage for excluding generated Python files from heuristic mapping.Real-world Impact
Configured path excludes now behave as users would expect during mapping, not only during agent inventory construction. This prevents generated or intentionally excluded source trees from becoming reviewable feature slices and keeps subsequent review/fix workflows focused on the intended code.
Trade-off Considered
Could have pushed filtering earlier into each individual mapper, but that would duplicate policy across many language/framework mappers. Applying filters at seed-to-feature conversion keeps mapper-specific discovery intact while enforcing config consistently at the final feature boundary.
Validation
pnpm typecheckpnpm lintpnpm testpnpm build