Repository navigation
fix(agent): swarm merge reads raw status paths and both sides of a rename - #500
Merged
Merged
Conversation
…name - `git status --porcelain` C-quotes non-ASCII names (`"src/\303\266dev.rs"`). Stripping the quotes left the escapes in, so no file matched and a worker's edit to `ödev.rs` was dropped with no conflict and no note. Status is now read with `-z`: raw paths, NUL-separated. - A staged rename kept only the new path, so the old file stayed in the main checkout next to the new one. Both sides are now merged; the old path goes through the normal deletion check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
enabled auto-merge (squash)
November 25, 2026 15:53
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 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.
Two ways a swarm worker's changes failed to reach the main checkout.
Non-ASCII names.
git status --porcelainC-quotes any path with non-ASCII characters ("src/\303\266dev.rs"). The parser stripped the quotes but left the escapes, so no file matched. A worker's edit toödev.rswas then dropped with no conflict and no note. Status is now read with-z, which gives raw, NUL-separated paths.Renames. For a staged rename (
git mv a.rs b.rs), only the new path was kept, so the main checkout ended up with botha.rsandb.rs. Both sides are now merged, and the old path goes through the normal deletion check (it is removed only if main still matches the base). A copy keeps its source.Tests:
-zparser covering a plain entry, a rename, a copy, a non-ASCII name and malformed entries;ödev.rsand renamesa.txt→c.txt, and main gets both changes with noa.txtleft behind.All 33 swarm worktree tests pass, and
swarm_worktree.rshas 100% line coverage.🤖 Generated with Claude Code