benchmaxxing/degeneracy.py:126, _tracked(), shells out to git ls-files and falls back to a filesystem glob only on CalledProcessError or FileNotFoundError. When git exits 0 with empty output the screen sees no files and reports nothing.
Two consequences, both reproduced on 78b5c1e:
- The guard is blind to any results file that has not been
git added. A new arm passes the guard while untracked and fails it the moment it is staged. A green guard on an unstaged branch is not evidence.
- Twelve of the guard's own synthetic self-tests fail on
main (tests/test_degeneracy_guard.py, the tmp_path fixtures), because a fresh temporary directory is not a git repository with tracked files, so every screen returns empty and the tests that expect a finding get none.
Minimal repro:
d=$(mktemp -d); mkdir -p $d/experiments/synth/results
echo '{"contrast":{"pvalue":0.0}}' > $d/experiments/synth/results/s_summary.json
python -c "from benchmaxxing.degeneracy import rounded_pvalues; print(list(rounded_pvalues('$d')))" # []
Suggested fix: fall back to the glob whenever the git ls-files result is empty, not only when the call errors, or union the two. Then the twelve self-tests should pass and the guard sees untracked files. Not touching this in the text-lane PR; it is orthogonal and every open PR is affected the same way.
benchmaxxing/degeneracy.py:126,_tracked(), shells out togit ls-filesand falls back to a filesystem glob only onCalledProcessErrororFileNotFoundError. When git exits 0 with empty output the screen sees no files and reports nothing.Two consequences, both reproduced on
78b5c1e:git added. A new arm passes the guard while untracked and fails it the moment it is staged. A green guard on an unstaged branch is not evidence.main(tests/test_degeneracy_guard.py, thetmp_pathfixtures), because a fresh temporary directory is not a git repository with tracked files, so every screen returns empty and the tests that expect a finding get none.Minimal repro:
Suggested fix: fall back to the glob whenever the
git ls-filesresult is empty, not only when the call errors, or union the two. Then the twelve self-tests should pass and the guard sees untracked files. Not touching this in the text-lane PR; it is orthogonal and every open PR is affected the same way.