Skip to content

Bug: Fix too-aggressive file exclusions in Bus Factor is_code_file logic #21

Description

@eshaanag

What is missing / Why it matters

The is_code_file utility in backend/features/repo_ingestion/bus_factor.py excludes directories and files using substring matches against EXCLUDE_PATTERNS (which includes "LICENSE", "README", "CHANGELOG"). Because it checks if pattern in normalized or pattern in upper_path, any valid source files containing these strings in their names or paths (e.g., src/hooks/useLicense.ts, src/components/LicenseGate.tsx, or src/services/changelog.go) are silently excluded from ownership and bus factor computations.

Acceptance Criteria

  • Refactor the exclusion check in bus_factor.py to match exact file names/extensions rather than checking if they are substrings anywhere in the path.
  • Add test coverage in backend/tests/test_repo_ingestion_logic.py ensuring that useLicense.ts and changelog.go are correctly classified as code files, while true LICENSE or CHANGELOG.md files are still excluded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingintermediateIntermediate complexity issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions