Skip to content

Comments

feat: add weave semantic merge driver integration for worktrees#11711

Draft
roomote[bot] wants to merge 1 commit intomainfrom
feature/weave-merge-driver
Draft

feat: add weave semantic merge driver integration for worktrees#11711
roomote[bot] wants to merge 1 commit intomainfrom
feature/weave-merge-driver

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Feb 22, 2026

Related GitHub Issue

Closes: #11710

Description

This PR attempts to address Issue #11710 by adding integration for the weave semantic merge driver into Roo Code's worktree infrastructure. As discussed in the issue, this focuses on the merge driver configuration first (priority item), with MCP coordination tools as a follow-up.

What this adds:

  • WeaveMergeDriverService (packages/core/src/worktree/weave-merge-driver.ts): Platform-agnostic service that:

    • Detects if weave is installed on PATH
    • Checks whether the merge driver is configured in .gitconfig and .gitattributes
    • Configures the merge driver (merge.weave.driver in local git config + file patterns in .gitattributes)
    • Supports unconfiguring/removing the setup
    • Supports 17 file extensions (Python, JS/TS, Rust, Go, Java, C/C++, Ruby, Swift, Kotlin, Scala, C#)
  • Webview message types for getWeaveMergeDriverStatus, configureWeaveMergeDriver, and unconfigureWeaveMergeDriver

  • Message handler integration wired into the existing worktree message handling flow

  • 22 tests covering detection, configuration, unconfiguration, deduplication, and edge cases

Design decisions:

  • Detection only, no automatic installation (per issue discussion)
  • Local git config only (not global), scoped to the repository
  • Appends to existing .gitattributes without duplicating entries
  • Uses execFile (not exec with shell interpolation) for git config commands to handle values with spaces safely

Test Procedure

  • Run: cd packages/core && npx vitest run src/worktree/__tests__/weave-merge-driver.spec.ts
  • All 22 tests pass
  • Existing worktree tests (53 total) remain green

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes.
  • Documentation Impact: Documentation updates may be needed for the worktree feature docs.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • Yes, documentation updates may be needed to describe the weave merge driver integration in the worktree feature docs.

Additional Notes

Feedback and guidance are welcome. The MCP coordination tools (weave-mcp --stdio) integration is planned as a follow-up.

Interactively review PR in Roo Code Cloud

@rs545837
Copy link

rs545837 commented Feb 22, 2026

This is really well done. The WeaveMergeDriverService covers exactly the right surface area: detect, configure, unconfigure, with proper dedup in .gitattributes and local-only git config. 22 tests is solid coverage.

One note: the supported extensions list should stay in sync with what sem-core actually supports, which is currently 13 languages. You can pull the full list from sem-core::get_all_code_extensions() rather than hardcoding it, so it stays up to date as new languages are added. You can find about sem here

Happy to review in more detail or help with the MCP coordination tools follow-up when you get there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Semantic merge driver for parallel task worktree merges

2 participants