fix(agent): exclude vendored files from tech detection - #978
Open
JohnsonGNEP wants to merge 5 commits into
Open
Conversation
Author
|
Hi! This PR is ready for review. The issue-specific lint and tests pass locally:
I also documented the repo-wide pre-existing failures in the PR description. |
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.
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/andbuild/from making a mostly Python repo look like JavaScript.Issue
Closes #150
Changes
node_modules,vendor,dist, orbuild.Testing
make test-unit)make test-integration)make lint)make typecheck)Direct validation:
ruff check agent/tools/tech_detector.py tests/unit/test_tech_detector.pypython -m pytest tests/unit/test_tech_detector.py -v -m unit— 28 passedNote:
makeis 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 unitreports 50 failed, 348 passed, and 31 errors in unrelated modules.Screenshots / Demo
N/A
Notes for Reviewers
Please focus on
agent/tools/tech_detector.pyandtests/unit/test_tech_detector.py. The issue-specific lint and unit tests pass locally.