Skip to content

Expand nested untracked files in Git inspection and changed-only context - #105

Closed
MatthiasLew wants to merge 1 commit into
mainfrom
fix/expand-untracked-source-files
Closed

MatthiasLew wants to merge 1 commit into
mainfrom
fix/expand-untracked-source-files

Conversation

@MatthiasLew

@MatthiasLew MatthiasLew commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Superseded by #107 at the maintainer's request. Closed without merging; track reproduction, proposed remediation and acceptance criteria in that issue.


When a project adds an untracked source directory, Git's default status collapses it to a directory entry such as src/. Git inspection then reports that directory as a changed file, and changed-only context can omit every new source file. This was observed while building ai-threat-lab.

Request --untracked-files=all in the existing porcelain-v2 status call. Git still applies ignore rules and NUL-delimited path handling, while downstream secret scanning, symbol analysis, and context selection receive individual paths. No additional subprocess is required.

Two regression tests failed before the fix and pass after it: nested untracked files (including a path with a space and an ignored directory), and changed-only context selecting a newly created nested Python module. The existing single-status-call test now expects the explicit flag.

Validation: focused Git/context suites passed (30 tests); full repository suite passed (733 passed, 6 skipped); coverage gate passed at 90%; repository Ruff and git diff --check passed; sdist/wheel build passed. Full dev gate stops at a pre-existing set of eight mypy errors in scripts/unified_benchmark.py on main, addressed independently in PR #106. This PR remains draft until that blocker is resolved and the complete required CI matrix passes.

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.

1 participant