Skip to content

fix(agent): exclude vendored files from tech detection - #978

Open
JohnsonGNEP wants to merge 5 commits into
ascherj:mainfrom
JohnsonGNEP:fix/150-exclude-vendored-build-files
Open

fix(agent): exclude vendored files from tech detection#978
JohnsonGNEP wants to merge 5 commits into
ascherj:mainfrom
JohnsonGNEP:fix/150-exclude-vendored-build-files

Conversation

@JohnsonGNEP

Copy link
Copy Markdown

Summary

Fixes tech stack detection so vendored, dependency, build-output, cache, virtualenv, and git metadata paths do not affect detected languages or the primary language. This prevents generated JavaScript files under paths like node_modules/ and build/ from making a mostly Python repo look like JavaScript.

Issue

Closes #150

Changes

  • Normalize repository file paths before filtering.
  • Skip files when any path part matches ignored directories such as node_modules, vendor, dist, or build.
  • Count detected languages from filtered real source/config files.
  • Add regression coverage for root-relative vendored and build-output paths.

Testing

  • Unit tests pass (make test-unit)
  • Integration tests pass (make test-integration)
  • Linter passes (make lint)
  • Type checker passes (make typecheck)
  • New/updated tests cover the changes

Direct validation:

  • ruff check agent/tools/tech_detector.py tests/unit/test_tech_detector.py
  • python -m pytest tests/unit/test_tech_detector.py -v -m unit — 28 passed

Note: make is not installed in my local PowerShell environment. Running the equivalent repo-wide checks directly showed pre-existing unrelated failures outside this issue's files:

  • ruff check . reports 173 unrelated lint issues.
  • python -m pytest tests/unit -v -m unit reports 50 failed, 348 passed, and 31 errors in unrelated modules.

Screenshots / Demo

N/A

Notes for Reviewers

Please focus on agent/tools/tech_detector.py and tests/unit/test_tech_detector.py. The issue-specific lint and unit tests pass locally.

@JohnsonGNEP

Copy link
Copy Markdown
Author

Hi! This PR is ready for review. The issue-specific lint and tests pass locally:

  • ruff check agent/tools/tech_detector.py tests/unit/test_tech_detector.py
  • python -m pytest tests/unit/test_tech_detector.py -v -m unit

I also documented the repo-wide pre-existing failures in the PR description.

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.

Tech detector counts vendored and build-output files, skewing language detection

1 participant