You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
afx cleanup counts untracked node_modules as uncommitted work and refuses #169
Zero tracked files were modified. The check counts untracked entries as uncommitted work, and in a pnpm workspace every package has a node_modules that shows up this way, so every builder worktree that has ever been installed trips it.
Why a papercut is worth an issue here
This guard exists to stop real work being destroyed. If it fires on every cleanup regardless of whether anything is at risk, the trained response becomes "add --force, it always says that" — and then it fires on the one occasion something real is uncommitted and gets waved through the same way. A guard that cries wolf is worse than no guard, because it manufactures the habit that defeats it.
Suggested fix
Count only tracked modifications, staged or unstaged, plus untracked files that are not ignored. Report the count and the paths in the refusal so the operator can judge without running git status themselves. If untracked-but-ignored content is worth mentioning at all, mention it as a separate informational line, not as the reason for refusing.
Related: #160, where afx cleanup deletes a task builder remote branch unconditionally. Both are cleanup safety checks that are wrong in opposite directions — one refuses when nothing is at risk, the other proceeds when something is.
Activity