05Software Engineering9 of 44 runs pass

Loro Mergeable Containers

Reconstruct mergeable child containers with convergence and persistence in the Loro CRDT library.

Results

Each square represents one run. Score is the percentage of runs that pass: 0, 25, 50, 75, or 100 for four runs.

#ModelRolloutsPass@1ScoreTime
1GPT-6 Astra xhigh4/41001.3h
2Claude Opus 5.5 max3/475.01.7h
3GPT-6.1 Sol max1/425.02.7h
4Claude Sonnet 5.5 max1/425.03.2h
5GPT-5.6 Sol max0/400.7h
6Gemini 3.8 Flash high0/400.6h
7Qwen3.8 Max xhigh0/402.5h
8GLM 5.3 Flash max0/402.1h
9Muse Spark 1.3 max0/400.8h
10Kimi K3 max0/402.4h
11Grok 4.7 xhigh0/400.8h

Background

Loro is a CRDT library in Rust for local-first collaborative apps. A document is a tree of containers that replicas edit offline and merge without a server. Two replicas that each create a child container under the same map key produce two containers with different identities; the key resolves to one, and the other replica's edits vanish after sync. The agent starts from the commit before upstream's fix (loro-dev/loro#991). Container identity must come from position rather than from the creating operation, and that choice reaches deletion and revival, undo, events, every export format, and peers still on the previous release.

Task

The agent adds six ensure_mergeable_* methods to LoroMap, one per container type: maps, lists, movable lists, text, trees and counters. Each returns the existing mergeable child at a key or creates one, never replacing a different value. Replicas that ensure the same child independently end up editing one container. Deleting the key keeps the child's content for revival, undo works in place, and events describe the resulting state. Existing public signatures, binary and JSON encodings, and compatibility with the current release must be preserved. No Cargo.lock changes, vendored crates or dependency overrides. Only the committed HEAD is graded.

Workspace

The offline sandbox (4 CPUs, 8 GB, 4 hours) holds the Loro repository at commit 5d40d39d with Rust 1.96, prefetched dependencies and Cargo capped at 4 build jobs, plus commands that build the loro crate and run its test suites. The reference merge-semantics model, scenario driver and compatibility checks against the previous release are held out.

Verification

The branch is rebuilt in a separate environment. Builds with and without default features, a loro-wasm build, 525 starter integration tests, unchanged dependencies, and 14 compatibility checks against the previous release must all pass; exports of documents without mergeable children must match byte for byte. Any failure scores 0. 70 feature scenarios, each with a 60-second limit, cover convergence across two and three replicas for all six types, nesting, type conflicts, delete and revive, persistence through every export mode, events, undo and redo. Expectations come from an independent reference model. A pass requires all 70.

Environment

Toolchain
Rust 1.96 (rustup toolchain), Cargo, git
Compute
4 CPUs · 8 GB RAM
Network
Offline
Time limit
4 hours

References

  • Loro: The CRDT library the agent extends; the checkout starts at commit 5d40d39d, which also serves as the previous release in the compatibility checks.
  • loro-dev/loro#991: The upstream change that introduced mergeable child containers, which the task reconstructs.
All tasks