Repository navigation
Skip the Windows Self-Test Probe Only on Git's Invalid-Path Error - #3360
Conversation
A Windows git add failure unrelated to the name no longer reads as an unsupported filename and passes --selftest. 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 |
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes have no unresolved findings, and all approval-readiness assessments support approval.
No open issues 🎉
What changed in this PR
This pull request narrows the Windows invalid-byte self-test exception so only Git’s invalid path error is skipped; unrelated git add failures are re-raised.
Changes:
- Require
invalid pathin Git’s captured stderr before skipping on Windows. - Update the invalid-path test fixture with representative stderr.
- Add regression coverage for unrelated Windows
git addfailures.
| File | Description |
|---|---|
tests/test_audit.py |
Adds invalid-path stderr and coverage verifying unrelated failures are re-raised. |
spec/audit.py |
Restricts the Windows self-test skip condition to invalid-path errors. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3360 +/- ##
========================================
Coverage 81.32% 81.32%
========================================
Files 18 18
Lines 10045 10047 +2
========================================
+ Hits 8169 8171 +2
Misses 1876 1876
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:
|
…eason Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…robe Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A control file added first makes any unrelated git failure raise on every platform. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
…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)
Summary
git addreports an invalid path, and re-raise any otherCalledProcessError.The previous skip covered every Windows
git addfailure, so an unrelated failure in the temporary repository passed--selftest. This addresses a review finding on the develop to main promotion. The Windows message text is reasoned from git's source and was not run on Windows from this host.Local review: one pass, one finding (the existing test's stub carried no stderr), fixed in the second commit. Revert proof: with the old
audit.py, the new unrelated-failure test fails.🤖 Generated with Claude Code