Skip to content

ai-slop: bare-invocation scan silently drops tracked markdown with non-ASCII filenames (quotePath fix missing on the no-args path) #3407

Description

@kyle-sexton

Context

The core.quotePath fix from #3332 reached only the directory-expansion path of plugins/ai-slop/skills/audit/scripts/detect.sh. expand_dir_target lists with git -C "$dir" -c core.quotePath=false ls-files '*.md' (line 488) and reports listing failures on stderr (line 491). The no-args default path, the bare-invocation whole-repo mode SKILL.md documents, still lists with:

done < <(git -C "$REPO_ROOT" ls-files '*.md' 2>/dev/null)   # line 421

Without core.quotePath=false, git C-quotes any path holding a non-ASCII byte (the file's own comment at lines 434-439 explains this for the dir path). The C-quoted string then fails [[ -f "$file" ]] || continue at line 648 and the file is silently dropped: no finding, no declined-files row, no stderr. The same line's 2>/dev/null also suppresses the listing-failure diagnostic the dir path was explicitly fixed to report. The regression test at detect.test.sh:807-815 covers only the dir-target path.

Net effect: in default whole-repo mode, a tracked café.md (or any name with a non-ASCII byte) is invisible to the audit while the run reports success.

Verified against the code on 2026-08-27.

Proposed work

  • Apply the same listing discipline to the no-args path: -c core.quotePath=false, and surface a listing failure instead of 2>/dev/null.
  • Extend the suite with a bare-invocation case over a repo containing a tracked non-ASCII-named markdown file, asserting it is scanned (or declined visibly), plus a case asserting a listing failure is reported.
  • Consider the related deepening candidate (filed separately): target resolution lives at six sites in this script, which is why this fix landed at one site and missed this one.

Acceptance criteria

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: highSignificant impact, or blocks an imminent release; staff this cycle.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions