Skip to content

fix(debt): exclude dependencies and build output from scan - #952

Open
agammann wants to merge 1 commit into
DietrichGebert:mainfrom
agammann:fix/debt-scan-ignore-directories
Open

agammann wants to merge 1 commit into
DietrichGebert:mainfrom
agammann:fix/debt-scan-ignore-directories

Conversation

@agammann

Copy link
Copy Markdown

Fixes #948.

The /ponytail-debt scan says it skips Git metadata, dependencies, and build output, but its grep -r command descended into all four directories. This adds explicit GNU grep exclusions for .git, node_modules, dist, and build, preventing third-party or generated markers from polluting the ledger and reducing unnecessary scanning. Separate flags also work without shell brace expansion.

Verification: In a fixture with markers in .git/config, node_modules/vendor.js, and src.js, the original command returned all three. The updated command returned only src.js. git diff --check passed.

@Bortlesboat Bortlesboat left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 79bf5acb217ca94815c5cdacb8951b1b43891a79 with GNU grep in Git Bash on Windows, including POSIX shell mode.

The original command returned 10 fixture markers; this version returned exactly the 4 source markers. Both root and nested .git/dependency/build exclusions behave as intended. A source path containing spaces and a similarly named build-tools directory remain searchable; ordinary prose mentioning ponytail: does not become a ledger row.

No issue found in this change. This validates the scan command, not an agent's subsequent ledger generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ponytail-debt: scan command doesn't skip .git or node_modules

2 participants