fix: prevent merge conflicts and improve parallel agent isolation#132
Open
BasselBlal wants to merge 41 commits into
Open
fix: prevent merge conflicts and improve parallel agent isolation#132BasselBlal wants to merge 41 commits into
BasselBlal wants to merge 41 commits into
Conversation
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.
Description:
This PR improves the reliability of parallel agent execution by strictly isolating infrastructure files, preventing merge conflicts, and handling all file changes robustly. It simplifies the commit logic to ensure clean working directories and data integrity.
Key Changes:
src/execution/parallel.ts:DEFAULT_IGNOREDlist fromsandbox.ts..ralphy(entire folder), matching sandbox creation logic.src/execution/sandbox-git.ts:safeGitAddhelper:ENAMETOOLONGerrors on Windows.git check-ignoreto prevent errors fromgit adding ignored files (e.g..env,.turbo).index.lockcontention to handle high-concurrency parallel execution.git status, providing redundancy against missed files.git add .approach was fragile, and standardgit addcrashed on large file sets or locked repos. The new robust approach guarantees data integrity even under heavy parallel load.src/execution/sandbox.ts:DEFAULT_IGNOREDto include the entire.ralphydirectory and improvedmatchesPatternregex escaping..ralphyfolder (config is loaded by the runner), preventing infrastructure pollution. Added comprehensive unit tests (sandbox.test.ts).src/execution/prompt.ts:progress.txt.Result:
Parallel execution now runs cleanly without merge conflicts or "dirty checkout" errors. Infrastructure files are fully isolated, and the commit strategy ensures zero data loss for agent-generated files (including package manager artifacts) while respecting isolation boundaries.