Version: graphifyy 0.9.6, Windows / Cross-platform.
Description
In graphify/extract.py, the new collect_files() implementation uses p.suffix in _EXTENSIONS to check if a file should be collected for extraction.
Because _EXTENSIONS contains lowercase suffixes (like .py, .js), any file with a capitalized or mixed-case extension (such as app.PY or index.JS) is silently skipped.
On case-insensitive filesystems (such as Windows and macOS), files with capitalized extensions are valid and should be collected and processed. Previously, the legacy _legacy_collect_files implementation used target.rglob(f"*{ext}") which matched these extensions case-insensitively on Windows. The optimization in #1261 introduced this regression.
Reproduction
Create a repository with a Python file named app.PY (capitalized extension) and run collect_files or run graphify extract ..
import tempfile
from pathlib import Path
from graphify.extract import collect_files
with tempfile.TemporaryDirectory() as tmpdir:
tmp_path = Path(tmpdir)
py_file = tmp_path / "app.PY"
py_file.write_text("print('hello')", encoding="utf-8")
collected = collect_files(tmp_path)
print("Collected:", collected) # Returns [] instead of [app.PY]
Expected Behavior
Files with capitalized or mixed-case extensions (like .PY or .JS) should be collected and parsed.
Root Cause & Location
In graphify/extract.py:
if p.suffix in _EXTENSIONS and not _ignored(p) and _resolves_under_root(p, containment_root):
This performs a case-sensitive check against _EXTENSIONS. Suffix checks should be case-insensitive (e.g., using p.suffix.lower()).
Version: graphifyy 0.9.6, Windows / Cross-platform.
Description
In
graphify/extract.py, the newcollect_files()implementation usesp.suffix in _EXTENSIONSto check if a file should be collected for extraction.Because
_EXTENSIONScontains lowercase suffixes (like.py,.js), any file with a capitalized or mixed-case extension (such asapp.PYorindex.JS) is silently skipped.On case-insensitive filesystems (such as Windows and macOS), files with capitalized extensions are valid and should be collected and processed. Previously, the legacy
_legacy_collect_filesimplementation usedtarget.rglob(f"*{ext}")which matched these extensions case-insensitively on Windows. The optimization in #1261 introduced this regression.Reproduction
Create a repository with a Python file named
app.PY(capitalized extension) and runcollect_filesor rungraphify extract ..Expected Behavior
Files with capitalized or mixed-case extensions (like
.PYor.JS) should be collected and parsed.Root Cause & Location
In graphify/extract.py:
This performs a case-sensitive check against
_EXTENSIONS. Suffix checks should be case-insensitive (e.g., usingp.suffix.lower()).