Repository navigation
Skip the Invalid-Byte Selftest Probe When Windows Git Cannot Add the Name - #3350
Conversation
The hub_tracked probe aborted audit.py --selftest on Windows when git add exited 128 on the non-UTF-8 filename. Only that add now skips, as for a name the filesystem refuses, and every other git failure still aborts. The Windows skip on the selftest wrapper test is removed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A failing add of the probe file skips only on Windows, where git rejects the name. Elsewhere it fails loudly. The tests now run on hosts that cannot create the name by skipping rather than failing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3350 +/- ##
============================================
+ Coverage 65.53% 81.32% +15.78%
============================================
Files 18 18
Lines 10036 10045 +9
============================================
+ Hits 6577 8169 +1592
+ Misses 3459 1876 -1583
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues were identified, and all reviewers assessed it as ready for approval.
No open issues 🎉
What changed in this PR
This pull request updates the audit self-test to tolerate Windows Git's inability to stage an intentionally invalid-byte filename while preserving failures from other operations and platforms.
Changes:
- Adds Windows-only handling for the invalid-byte probe's
git add -Afailure. - Adds tests for Windows skipping and failure propagation.
- Removes the obsolete Windows skip from the Git environment test.
| File | Description |
|---|---|
tests/test_git_env.py |
Re-enables the self-test environment-isolation test on Windows. |
tests/test_audit.py |
Tests platform-specific skipping and propagation of unrelated Git failures. |
spec/audit.py |
Handles the Windows-specific invalid-byte staging failure without suppressing other failures. |
Review effort: Lite
…dows Self-Test Skip, and Subprocess Failure Rule to Main (#3359) ## Summary - Skip the invalid-byte audit self-test probe when Windows Git cannot add the name, so the self-test no longer fails on a host that cannot represent the path (#3350). The skip fires only on that one add, after a control file's add has proven git works (#3360). - Read a backslash-newline in the write guard by its quoting: inside single quotes and quoted heredoc data it is text, and a continuation after a shell operator is no word split (#3357). - Keep each escaped backslash pair before a kept line break in the guard's readings, as the shell does, and state the kept-span word and names tests in full in the README and docstring (#3368). - Add a `CODESTYLE.md` General rule: classify a subprocess failure by which command failed and the status code it reports, never by the wording of its message (#3366). Closes #3338 Closes #3358 Closes #3363 Refs #3344, which stays open because only part of it is fixed here. #3358's Markdown-body finding moves to #3354. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The hub_tracked probe in the audit self-test aborted on Windows when git add exited 128 on its non-UTF-8 filename. Now only that add's failure skips the probe, and only on Windows. Any other git failure still aborts, and a failing add elsewhere still fails loudly. The Windows skip on the self-test wrapper test is removed.
Tests simulate the Windows failure on Linux by patching the platform flag and subprocess.run, and skip on hosts that cannot create the name. Reverting either branch of the fix fails a test. Real Windows verification is this PR's Windows CI job.
Closes #3338
🤖 Generated with Claude Code