You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw the demo of importing a Git DAG into Loro's version controller and thought it was fascinating. We've been working on a related problem from the other direction: building entity-level merge and coordination for Git repos where multiple AI agents edit code simultaneously.
The project is weave, a semantic merge driver that replaces Git's line-based merge with entity-level merge. Instead of diffing lines, it parses code into semantic entities (functions, classes, types) via tree-sitter, matches them across versions, and merges at that granularity. Two agents add different functions to the same file? Auto-resolved, no conflict. Same entity changed incompatibly? Real conflict with entity-level context.
We also built a CRDT coordination layer (currently on Automerge 0.5) that tracks which agents are editing which entities, with advisory locks and conflict detection. This runs as an MCP server so AI agents can claim entities before editing, check who's working on what, and detect potential collisions before they happen.
I'm curious about a few things:
Loro's merge semantics for code: Loro uses 2-way CRDT merge (commutative, no base version needed), while Git uses 3-way merge. For structured code, we found that 3-way merge with entity matching catches things like "one side modified, other side deleted" that 2-way merge can miss. Has there been any thinking about how Loro's merge would handle code-specific patterns like function renames or signature changes?
updateByLine vs entity-level updates: Loro's LoroText.updateByLine() operates at the line level. Have you considered an entity-aware variant where updates are tracked at the function/class level? This would make concurrent edits to different functions in the same file commutative by default, instead of potentially interleaving at the line level.
Integration possibility: We use Automerge for the coordination CRDT, but Loro's performance characteristics (especially the Fugue algorithm for text and shallow snapshots) are compelling. Would Loro be a good fit for tracking entity-level coordination state (claims, modifications, agent status) alongside code content?
The entity extraction comes from sem-core, a Rust library with tree-sitter grammars for 11 languages. Happy to discuss how these pieces might fit together.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I saw the demo of importing a Git DAG into Loro's version controller and thought it was fascinating. We've been working on a related problem from the other direction: building entity-level merge and coordination for Git repos where multiple AI agents edit code simultaneously.
The project is weave, a semantic merge driver that replaces Git's line-based merge with entity-level merge. Instead of diffing lines, it parses code into semantic entities (functions, classes, types) via tree-sitter, matches them across versions, and merges at that granularity. Two agents add different functions to the same file? Auto-resolved, no conflict. Same entity changed incompatibly? Real conflict with entity-level context.
We also built a CRDT coordination layer (currently on Automerge 0.5) that tracks which agents are editing which entities, with advisory locks and conflict detection. This runs as an MCP server so AI agents can claim entities before editing, check who's working on what, and detect potential collisions before they happen.
I'm curious about a few things:
Loro's merge semantics for code: Loro uses 2-way CRDT merge (commutative, no base version needed), while Git uses 3-way merge. For structured code, we found that 3-way merge with entity matching catches things like "one side modified, other side deleted" that 2-way merge can miss. Has there been any thinking about how Loro's merge would handle code-specific patterns like function renames or signature changes?
updateByLinevs entity-level updates: Loro'sLoroText.updateByLine()operates at the line level. Have you considered an entity-aware variant where updates are tracked at the function/class level? This would make concurrent edits to different functions in the same file commutative by default, instead of potentially interleaving at the line level.Integration possibility: We use Automerge for the coordination CRDT, but Loro's performance characteristics (especially the Fugue algorithm for text and shallow snapshots) are compelling. Would Loro be a good fit for tracking entity-level coordination state (claims, modifications, agent status) alongside code content?
The entity extraction comes from sem-core, a Rust library with tree-sitter grammars for 11 languages. Happy to discuss how these pieces might fit together.
Beta Was this translation helpful? Give feedback.
All reactions