Problem
tracked() in .github/actions/repo-gate/repo_gate.py decodes the git ls-files call's stderr strictly as UTF-8. When git's error message echoes a path that is not valid UTF-8, the decode raises UnicodeDecodeError. That is a ValueError, so nothing catches it, and the gate ends in a traceback instead of main returning 2.
Evidence
Constructed case: pass --root a directory that does not exist and whose name contains the byte 0xff. Git's "cannot change to" message quotes the name raw on stderr, and the strict decode of that stderr raises.
The same line is on develop, so this change did not introduce it. A local review pass found it on the branch that pins and decodes the stdout side for #1580.
Suggested fix
Decode that call's output with errors="surrogateescape", matching sh() and resolved_eol.
Problem
tracked()in.github/actions/repo-gate/repo_gate.pydecodes thegit ls-filescall's stderr strictly as UTF-8. When git's error message echoes a path that is not valid UTF-8, the decode raisesUnicodeDecodeError. That is aValueError, so nothing catches it, and the gate ends in a traceback instead ofmainreturning 2.Evidence
Constructed case: pass
--roota directory that does not exist and whose name contains the byte0xff. Git's "cannot change to" message quotes the name raw on stderr, and the strict decode of that stderr raises.The same line is on develop, so this change did not introduce it. A local review pass found it on the branch that pins and decodes the stdout side for #1580.
Suggested fix
Decode that call's output with
errors="surrogateescape", matchingsh()andresolved_eol.