Repository navigation
fix(#5519): code-review --files no longer skips every file on Windows Git Bash - #5643
Merged
Merged
Conversation
Lockfile-only. ip-address <= 10.7.3 (transitive, via claude-agent-sdk > @modelcontextprotocol/sdk > express-rate-limit) has a moderate advisory published 2026-10-22; npm audit --omit=dev now reports 0 vulnerabilities. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…every path form and rejects siblings Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…h form and compare on a boundary Emitted-Drift-Ack-Growth: code-review.md — the Tier 1 containment fence gains a small cygpath normalization helper and a path-boundary comparison (and a platform note) so Windows Git Bash stops rejecting every --files entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…latform note to both path forms Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…losed Emitted-Drift-Ack-Growth: code-review.md — the Tier 1 containment fence gains a small cygpath normalization helper, a path-boundary comparison and two fail-closed guards (and a platform note) so Windows Git Bash stops rejecting every --files entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
trek-e
requested review from
Solvely-Colin,
davesienkowski and
jeremymcs
as code owners
October 23, 2026 03:59
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 23, 2026
… print the compared path forms on failure The merge-queue Windows shard rejected the in-repository file because the runner's 8.3 temp path (RUNNER~1) differs from the long path git reports. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
12 of 18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix PR
Linked Issue
Fixes #5519
What was broken
/gsd-code-review --filesreported every file as outside the repository on Windows Git Bash and ended with an empty scope. The Tier 1 containment guard comparedgit rev-parse --show-toplevel(mixed form,C:/Users/...) againstrealpath -moutput (MSYS POSIX form,/c/Users/...) with a bare"$REPO_ROOT"*prefix test, so no path could ever match. The bare prefix also had no path boundary, so a sibling directory sharing the repository's name prefix was accepted on every platform.What this fix does
gsd-core/workflows/code-review.mdTier 1 now normalizes both sides throughcygpath -mwhen it exists (a no-op elsewhere), and tests equality-or-root/boundary instead of a bare prefix. It still fails closed: an empty root, an unresolved.., or a missingrealpath(macOS) reports the entry as outside.<platform_notes>documents thecygpathbehaviour.Root cause
Two path forms from two tools compared as strings, plus a prefix test with no boundary. Introduced with the original command (#1630) and recorded as a known unfixed limitation in the #4460 test docblock.
Testing
How I verified the fix
tests/code-review-tier3-files-override-scoping.test.cjsgains a describe "#5519: Tier 1 --files containment guard" that extracts and runs the real fence fromcode-review.mdin bash with stubbedgit/realpath/cygpathemitting the Git Bash forms (relative, POSIX-absolute and mixed-absolute accepted; escapes and siblings rejected), a real-bash sibling/escape case, and the fail-closed cases. RED on the test-only commit failed 4 tests (run on333dfbb81d). GREEN: 54264 tests, 0 failed on3b8bfe9f59.Regression test added?
Platforms tested
Runtimes tested
Self-test report
{ "schema": 1, "head_sha": "3b8bfe9f593951b9b7003257ed0b49136ebd6ce4", "tool": "gsd-test", "failing_first": { "test": "tests/code-review-tier3-files-override-scoping.test.cjs (#5519 describe)", "fails_on_base": true, "passes_on_head": true }, "commands": ["gsd-test --base next --head 3b8bfe9f593951b9b7003257ed0b49136ebd6ce4"], "full_suite": { "command": "gsd-test", "result": "passed" }, "environment": { "os": "darwin driver, linux-node24 bench", "node": "24" }, "output_excerpt": "verdict passed on linux-node24, head 3b8bfe9f59" }Notes for the reviewer
package-lock.jsonchange (ip-address10.7.2 to 10.7.4, GHSA-rxp7-6hxx-x8q5):tests/npm-integrity-gate.test.cjsfails every bench run while the old version is locked. The same hunk is in other open PRs; identical hunks merge cleanly.realpathis missing; the Git Bash forms are exercised through stubs, so a live Windows run is still the final confirmation.Checklist
Fixes #NNNconfirmed-buglabel.changeset/fragment addedBreaking changes
None.
🤖 Generated with Claude Code