This repository was archived by the owner on Aug 25, 2026. It is now read-only.
fix(kaos): resolve Git Bash POSIX paths for file tools on Windows - #74
Merged
Merged
Conversation
…onshotAI#2200) Add a shell path bridge that translates between win32 paths and the MSYS2/Git Bash path dialect. File tools resolve model-supplied paths through it before canonicalization and workspace checks: drive-letter forms translate lexically, root-relative paths resolve via cygpath -w with per-segment caching, and every failure mode falls back to the previous behavior. Fixes MoonshotAI#2199 (cherry picked from commit 30e7f62)
Upstream routes the bridge through a src/runtime abstraction this fork does not have -- the commit's runtime files depend on a ./runtime module that is not part of it. Those are left out; the bridge itself, the path-access checks and the Bash tool wiring all apply. bashTool keeps this fork's spawn signature and its isWindowsBash gate, swapping only the path conversion from windowsPathToPosixPath to the bridge's toShellPath.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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 |
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Ports upstream
30e7f62d2(MoonshotAI#2200). A model-supplied POSIX path like/c/Users/you/projectis now translated to its win32 form before canonicalization and the workspace check, so file tools stop rejecting paths the shell itself accepts. Drive-letter forms translate lexically, root-relative paths go throughcygpath -wwith per-segment caching, and every failure mode falls back to the previous behaviour.Relevant now that Windows is actually tested here.
Adapted: upstream routes the bridge through a
src/runtimeabstraction this fork doesn't have — the commit's runtime files import a./runtimemodule that isn't part of it, andsrc/runtime/doesn't exist on our main at all. Those are left out; the bridge, the path-access checks and the Bash tool wiring all apply.bashToolkeeps ourspawnsignature andisWindowsBashgate, swapping only the conversion from ourwindowsPathToPosixPathto the bridge'stoShellPath.Three more skipped this round, all for features we don't ship:
c212ae971(MCP launch targets in the trust prompt) — no workspace trust prompt here.c9c34ae5a(pasted videos to the daemon file store) — no media staging leases here.98ebda840(todo panel reverts on undo) — needs SDK exportsSessionTodoItemandgetLiveSessionByIdwe don't have.Tested: full suite 17,221 passed / 0 failures (up 87 — the bridge tests landed); typecheck, lint, sherif, release:check and build clean.