Repository navigation
Fail Closed on a Rooted Driveless Directory in the Guard and Fix the Wait Usage Text - #2939
Conversation
… Windows Git Bash resolves a rooted path with no drive segment under the Git install root, while Windows Python joins it onto the session drive. A failed leading cd then ran the push in the session branch while the guard read another branch and allowed. The decision is now unresolved there, and POSIX is unchanged. The pr_review.py wait and exit 49 usage text now matches holds(), which needs a Copilot round on an earlier head. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
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.
🔵 Needs a closer look
Update the held-branch message to mention review of an earlier head.
0 open findings
What changed in this PR
This PR hardens Windows/MSYS path handling and clarifies wait review-state messaging.
Changes:
- Rejects ambiguous rooted paths without drive segments.
- Adds path-resolution regression tests.
- Updates
waitand exit-code wording.
| File | Summary |
|---|---|
scripts/pr_review.py |
Updates review timing and exit-code text. |
host-setup/agent-safety/claude/test_install.py |
Adds rooted-path regression tests. |
host-setup/agent-safety/claude/gh-write-guard.py |
Fails closed for ambiguous MSYS rooted paths. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2939 +/- ##
========================================
Coverage 59.96% 59.96%
========================================
Files 17 17
Lines 8777 8777
========================================
Hits 5263 5263
Misses 3514 3514
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:
|
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Fixed in 56a39f7: the held-branch note and the exit 49 status message now say Copilot has reviewed an earlier head. |
Part of #2821 and #2897.
Why
The develop -> main promotion PR introduced two defects.
cdor-Cvalue with no drive segment, such as/repos/wt-example, resolved with Windows Python semantics onto the session drive. Git Bash resolves it under the Git install root, so thecdfails there,;runs the push in the session branch, and the guard read another branch and allowed._bare_push_branchnow returns unresolved for that value when the MSYS drive regime is on. POSIX behavior is unchanged.waitusage text and the exit 49 text said "once Copilot has reviewed it at all" and "after Copilot's first round". Since the attest change,holds()needs a Copilot round on an earlier head. Both now say so, matching thestatustext.scripts/README.mdand the pr-review-conduct skill state it without the stale claim, so they are unchanged.Verification
_bare_push_branchon POSIX with the Windows regime patched on. Reverting the two-line fix fails the leading-cd and-Ctests, restoring it passes.test_install.py,test_pr_review.py,test_cli_usage.pyand the whole suite pass. The only failure seen is the known TestAttest timing flake (Stop the Attest Timing Tests Recording Subprocess Polling Sleeps #2934), which passes alone._msys_drive_pathcontract.Review
Local strict review declined two guard observations as extra denials only (UNC paths denied, and a deny message that does not name the drive spelling), since neither allows a push that origin/main's guard denied. Four sentence-length findings were fixed.
🤖 Generated with Claude Code