Skip to content
CAI
Software that uses CAICheck a score

loro-dev/loro

58.9

Adequate · 14 November 2026

156.4k

lines of production code

Rust

with TypeScript

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Loro-Quill rich text collaboration example

This change introduces a new example application in the \examples/loro-quill\ directory that demonstrates real-time collaborative editing using the Loro CRDT engine with the Quill rich text editor. The example features a Vue.js frontend with four synchronized editor instances, allowing users to test concurrent editing and conflict resolution. It includes a custom \QuillBinding\ implementation to bridge Quill's delta operations with Loro's text state, along with the necessary build configuration (Vite, WASM plugins) and assets to run the demo locally.

examples/loro-quill · high confidence

Add LoroCounter container and event subscription support

Users can now use a new LoroCounter container type to maintain incrementable/decrementable numeric values within a document, accessible via the LoroCounter struct with methods like increment, decrement, and get. Additionally, the public API now exposes a subscription mechanism allowing users to listen for local updates and document changes through DiffEvent and Subscriber types, enabling reactive handling of state modifications.

crates/loro/src · high confidence

Add Rsbuild-based React example for Loro

Added a new example in the \examples/test-rsbuild\ directory that demonstrates integrating Loro with a React application using the Rsbuild build tool. The example includes configuration for the Rsbuild bundler, a React component that initializes a Loro document and displays a shared message, and the necessary entry points and styles to run the demo.

examples/test-rsbuild · high confidence

Add benchmark utilities for simulating drawing, JSON, and spreadsheet workflows

The \crates/bench-utils\ crate now provides helper modules to generate and normalize synthetic actions for performance testing. It includes \draw.rs\ for simulating drawing operations (paths, text, rectangles, moves), \json.rs\ for JSON-like data mutations (maps, lists, text), and \sheet.rs\ for spreadsheet-like operations (rows, columns, values), all implementing the \ActionTrait\ to normalize inputs against specific limits. The \lib.rs\ module exposes generic action generation functions (\gen\_realtime\_actions\, \gen\_async\_actions\) and a \SyncKind\ enum to support various synchronization scenarios in benchmarks.

crates/bench-utils · high confidence

Add esbuild-based bug reproduction example for LoroMap

A new example located at examples/test-esbuild has been added to reproduce and test a specific issue with LoroMap when bundled with esbuild. This example includes a Node.js server that uses esbuild to bundle app.js into an ESM module, serving the resulting dist/app.js and index.html. It also provides a Playwright test script (test.js) that launches the server, navigates to the page, and verifies that window.LoroMap is available and functional, capturing console output and page errors to diagnose the bug.

examples/test-esbuild · high confidence

Added Deno-based fuzzing and memory profiling scripts

New scripts have been added to the project to automate fuzz testing and memory usage analysis. The \fuzz.ts\ script allows users to run cargo fuzz targets against the library, while \mem.ts\ and \run\_mem.ts\ provide a framework for executing memory profiling tasks and parsing the resulting byte-count metrics from dhat output.

crates/loro-internal/scripts · high confidence

Added example programs for jitter analysis and API testing

The \crates/fractional\_index/examples\ directory now includes three new Rust programs: \jitter.rs\ calculates the collision probability threshold for different jitter levels, \size.rs\ benchmarks the byte size and compression efficiency of fractional indices with varying jitter, and \npm\_fixture.rs\ generates a comprehensive JSON fixture exercising the \FractionalIndex\ API (including \new\, \new\_between\, \generate\_n\_evenly\, and various jitter-based constructors) to support TypeScript package testing.

_crates/fractional\index/examples · high confidence

Added fuzzing targets for draw and JSON examples

New fuzzing targets have been added for the draw and JSON example modules, enabling automated fuzz testing of their respective action sequences. A .gitignore file has also been added to exclude fuzzing artifacts such as corpus, artifacts, and coverage data from version control.

crates/examples/fuzz · high confidence

Added loro-wasm-tools CLI for WebAssembly artifact management

A new command-line utility has been added to help manage WebAssembly artifacts for loro-wasm. It provides commands to generate source maps, split DWARF debug sections into separate companion files, strip debug information, and remove custom sections from Wasm binaries, facilitating better debugging and optimization of the compiled output.

crates/loro-wasm-tools · high confidence

Introduce @loro-dev/fractional-index TypeScript package

A new TypeScript package, @loro-dev/fractional-index, is now available to generate compact, lexicographically sortable string positions. This implementation mirrors the Rust \loro\_fractional\_index\ crate, ensuring byte-for-byte compatibility with its \Display\ output. The package provides a public API that accepts and returns canonical uppercase hex strings, allowing indexes to be easily stored, compared, serialized, and used as object or map keys. Key features include creating indexes before, after, or between existing ones, generating evenly spaced indexes, and optional jitter support for randomization. The package has no runtime dependencies and outputs ESM with TypeScript declarations.

packages/fractional-index · high confidence

Introduce Awareness and Ephemeral Store APIs for real-time peer state

The WASM bindings now expose \Awareness\ and \EphemeralStore\ classes, enabling applications to synchronize transient peer information such as cursor positions, selections, and user names across connected clients. The \Awareness\ component tracks ephemeral state with configurable timeouts and provides methods to encode, apply, and query peer states, while the \EphemeralStore\ offers a simple key-value store for temporary data that automatically cleans up outdated entries.

crates/loro-wasm/src · high confidence

Introduce MemKvStore with SSTable backend and LZ4 compression

The \crates/kv-store/src\ module now implements a new in-memory key-value store (\MemKvStore\) backed by Sorted String Tables (SSTables). This change introduces the core binary format for SSTables, including block structures (Normal and Large Value blocks), metadata handling, and LZ4 compression support. It also adds a \MergeIterator\ for combining multiple SSTable iterators, enabling efficient scanning and merging of key-value data across multiple tables.

crates/kv-store/src · high confidence

Introduce generic B-Tree crate with Rope, OrdTreeMap, and OrdTreeSet

The new \crates/generic-btree\ crate provides a pure-safe B-Tree implementation designed to optimize Loro CRDT components. It exposes a generic \BTree\ core along with specialized data structures: a \Rope\ for efficient string editing, and \OrdTreeMap\/\OrdTreeSet\ for ordered key-value and key-only storage. The implementation includes internal optimizations such as a \GapBuffer\ for local editing and a \LengthFinder\ to reduce memory usage during snapshot operations.

crates/generic-btree · high confidence

Introduce pure TypeScript Loro runtime

loro.js is now available as a pure TypeScript implementation of the Loro binary format and CRDT runtime, providing wire and API compatibility with the existing \loro-crdt\ package without requiring WebAssembly. This new runtime targets ES2022 and includes full support for document synchronization, text navigation, and the complete suite of container types (Map, List, MovableList, Text, Tree, Counter, and nested containers). It also exposes low-level binary format readers and writers via the \loro.js/codec\ entry point, allowing developers to read and rewrite the Loro binary format directly in TypeScript.

loro-js · high confidence

Introduces configurable default rich text styles

The richtext container now supports a \StyleConfigMap\ that defines default configurations for common text styles such as bold, italic, underline, link, highlight, comment, and code. This allows the system to automatically apply specific expansion behaviors (e.g., whether a style expands after insertion or remains fixed) when these styles are applied, providing a consistent baseline for rich text formatting without requiring explicit configuration for every operation.

crates/loro-internal/src/container/richtext · high confidence

Introduction of DeltaRope data structure for efficient text operations

The delta crate now includes a new DeltaRope implementation, a rope-like data structure built on a generic B-tree, designed to handle text deltas with efficient composition and manipulation. This addition introduces core components such as DeltaItem (representing retain, replace, and delete operations), DeltaRopeBuilder, and specialized types like TextChunk and ArrayVec to manage text content and attributes. The change also includes a fuzzing harness for operational transformation (OT) consistency checks and benchmarks for rope performance, providing a foundation for high-performance text synchronization and editing features.

crates/delta · high confidence

Introduction of Movable List operations and internal op structures

The list container now supports a 'Movable' variant, introducing specific operations for moving elements (Move), setting values by ID (Set), and applying rich text styles (StyleStart/StyleEnd) alongside standard insert and delete actions. This change adds the \list\_op.rs\ module defining \ListOp\ and \InnerListOp\ enums, which handle these new capabilities and include logic for estimating storage size based on the container type (MovableList, List, or Text).

crates/loro-internal/src/container/list · high confidence

Introduction of Rich Text Container with Style Expansion Logic

The \crates/loro-internal/src/container\ module now includes a new \richtext.rs\ file that implements the core data structures for rich text support. This change introduces \RichtextSpan\ and \Style\ types to handle text attributes and enables users to apply styles to text segments. The implementation includes logic for \ExpandType\ (Before, After, Both, None) to control how styles propagate when new text is inserted adjacent to styled content, ensuring consistent formatting behavior during collaborative editing.

crates/loro-internal/src/container · high confidence

Introduction of StrArena for efficient Unicode-aware string storage

A new \StrArena\ component has been added to the internal arena module to manage string data with optimized Unicode indexing. This addition enables efficient allocation and slicing of strings based on Unicode code points rather than raw bytes, supporting features like rich text manipulation by maintaining parallel byte, UTF-16, and Unicode length metrics. The implementation includes checkpoint and rollback capabilities, allowing for atomic updates with conditional rollback, which is critical for maintaining data integrity during collaborative editing operations.

crates/loro-internal/src/arena · high confidence

Introduction of internal diff algorithm module with timeout support

The \crates/loro-internal/src/diff\ directory now contains the internal implementation for text diffing, including a new \diff\_impl.rs\ file that adapts Myers' algorithm and a \LICENSE\ file for the Apache 2.0 licensed code. This module introduces \UpdateOptions\ allowing users to configure a \timeout\_ms\ for diff computations and a \use\_refined\_diff\ flag, enabling controlled performance and timeout handling during text updates.

crates/loro-internal/src/diff · high confidence

Introduction of movable tree data structure with fractional indexing

The tree container now supports movable nodes, allowing tree elements to be created, moved under new parents, or deleted. This capability is implemented via a new \TreeOp\ enum that utilizes \FractionalIndex\ to determine child ordering, alongside a new \BoolRleVec\ for efficient history tracking and a \TreeLinearHistory\ structure to manage operation effects.

crates/loro-internal/src/container/tree · high confidence

New DAG iteration and visualization utilities

The \crates/loro-internal/src/dag\ module now includes new internal utilities for traversing and visualizing the Directed Acyclic Graph (DAG) of operations. A new \iter.rs\ file adds \DagIterator\ and \DagIteratorVV\ to traverse nodes in causal order using version vectors and heaps, and \DagCausalIter\ to visit specific ID spans. A new \mermaid.rs\ file provides a \dag\_to\_mermaid\ function that generates Mermaid flowchart diagrams of the DAG structure for debugging. These changes are accompanied by a comprehensive \test.rs\ file with fuzzing and unit tests for the DAG logic, and a \test.excalidraw\ file storing visual test diagrams.

crates/loro-internal/src/dag · high confidence

New Moonbit Loro Codec library and CLI tool

This change introduces a new Loro binary encoding codec implementation in Moonbit, located in \moon/loro\_codec/\, along with a corresponding command-line utility in \moon/cmd/loro\_codec\_cli/\. The library provides core encoding and decoding primitives for Loro's binary format, including support for ChangeBlocks, SSTables, and various value types (Maps, Lists, Text, Trees, etc.), with specific attention to endianness and integer encodings (ULEB128/SLEB128) to ensure compatibility with the existing Rust implementation. The CLI tool enables users to transcode Loro documents, decode updates to JSON, export and import JSON schemas, and export deep JSON snapshots, facilitating interoperability and debugging between Moonbit and Rust-based Loro systems.

moon · high confidence

New allocation algorithms and ephemeral store infrastructure

The internal crate now includes new BFS and DFS-based allocation algorithms for calculating critical versions in the document DAG, alongside a new \EphemeralStore\ for managing transient peer presence data (replacing the deprecated \Awareness\ type). These changes introduce the foundational structures for improved version resolution and real-time collaboration features, while also adding fuzzing targets to test these new internal components.

crates/loro-internal/src · high confidence

New benchmarking and demonstration examples for encoding, trees, and events

Added a suite of new Rust examples in the \crates/loro-internal/examples\ directory to demonstrate core Loro capabilities and benchmark performance. These include \automerge\_x100.rs\ and \encoding.rs\ for measuring snapshot and update encoding/decoding speeds and sizes, \tree.rs\ for demonstrating tree creation and movement, \event.rs\ for showing deep subscription handling, and \many\_actors.rs\ for testing concurrent actor scenarios. These files provide concrete usage patterns for the \LoroDoc\ API and performance baselines for encoding modes.

crates/loro-internal/examples · high confidence

New benchmarking and fuzzing examples for Loro

Added new example modules in \crates/examples/src\ to support performance benchmarking and fuzz testing. This includes a \draw\ actor for simulating collaborative drawing actions (paths, text, rects), a \json\ actor for testing standard JSON-like operations on lists, maps, and text, and a \list\ module implementing traits for both \LoroList\ and \LoroMovableList\ to facilitate movable list benchmarks. Additionally, \sheet.rs\ provides utilities for initializing large spreadsheet-like structures, \utils.rs\ contains benchmarks for the new fast snapshot and shallow snapshot (GC) modes, and \lib.rs\ defines the \ActorTrait\ and workflow runners used to execute these tests across multiple peers.

crates/examples/src · high confidence

New benchmarking and fuzzing examples for Loro

Added several new command-line examples to help users measure performance and validate correctness. The \map\_equal\_value\_bench\ and \movable\_set\_bench\ examples provide benchmarks for checkout/diff/import costs with equal map values and local MovableList set operations, respectively. The \richtext\_typing\_bench\ example measures typing performance in text with style anchors. Additionally, \moon\_golden\_gen\ generates deterministic random documents for testing, while \moon\_jsonschema\_fuzz\ and \moon\_snapshot\_fuzz\ fuzz-test the MoonBit codec integration by comparing Rust-generated states against MoonBit-encoded/decoded outputs.

crates/loro/examples · high confidence

New common crate with foundational types and error handling

The \loro-common\ crate has been introduced to centralize core data structures and error definitions. It provides the \LoroValue\ enum (supporting strings, lists, maps, and binary data) and specific wrapper types like \LoroStringValue\ and \LoroBinaryValue\. The crate defines the \ID\ struct for operation identification, \PeerID\ for client identification, and \InternalString\ for efficient string handling. It also establishes the \LoroError\ and \LoroTreeError\ enums for comprehensive error reporting, including specific variants for decoding issues, transaction conflicts, and tree manipulation errors.

crates/loro-common/src · high confidence

New dev-utils crate for test logging and memory monitoring

A new \crates/dev-utils\ library has been added to support development and testing workflows. It introduces a \setup\_test\_log\ function that configures tracing with both console output and Chrome DevTools-compatible JSON traces when the \DEBUG\ environment variable is set. Additionally, it implements a global memory allocator wrapper (\Counter\) that tracks total allocated bytes, exposing a \get\_mem\_usage\ function and a \ByteSize\ type for displaying memory consumption in human-readable units (B, KB, MB, GB).

crates/dev-utils · high confidence

New developer tooling scripts for fuzzing, releases, and publishing

The repository now includes a suite of new scripts in the \scripts/\ directory to streamline development and release workflows. \cargo-fuzz-run.mjs\ provides a Node.js wrapper for running Rust fuzzing targets with configurable sanitizers, while \cargo-release.ts\ (Deno) automates Rust crate versioning with optimized exclusion logic. \publish-wasm-packages.mjs\ handles the publication of \loro-js\, \loro-wasm\, and \loro-wasm-map\ to npm, checking for existing versions to avoid conflicts. Additionally, \sync-loro-version.ts\ ensures version consistency across \package.json\ and \Cargo.toml\ files, and \run-js-doc-tests.ts\ executes TypeScript code blocks from documentation. A \deno.json\ configuration and corresponding lockfile support these Deno-based tools, and \install-dev-tools.sh\ assists in setting up required Rust development utilities.

scripts · high confidence

New diff calculators for Counter and Tree containers

Added new diff calculator implementations for Counter and Tree containers in the internal diff calculation module. The CounterDiffCalculator tracks counter operations and computes the net difference between version vectors, while the TreeDiffCalculator supports multiple modes (Crdt, Linear, ImportGreaterUpdates) to handle tree structure changes including create, move, and delete operations. These calculators enable proper diff generation for these container types when computing changes between document states.

_crates/loro-internal/src/diff\calc · high confidence

New internal state module with container store, mergeable container support, and analysis tools

The \crates/loro-internal/src/state\ directory now contains the core implementation for materialized document state, including a new KV-backed \ContainerStore\ for persisted snapshots, dedicated state handlers for maps, lists, movable lists, trees, counters, and richtext, and a \mergeable.rs\ module that resolves logical child edges for mergeable containers using deterministic IDs and parent map markers. A \DeadContainersCache\ tracks deletion liveness without caching entries that depend on mutable mergeable markers, and an \analyzer.rs\ module provides document introspection (container counts, sizes, and edit stats). The \container\_tree.rs\ module enables structured traversal of the document state into a sink for efficient serialization or inspection.

crates/loro-internal/src/state · high confidence

New performance benchmarks and profiling examples for Loro

Added a suite of new example programs in \crates/examples/examples\ to benchmark and profile Loro's performance characteristics. These include \b4\_bench\ for text editing and snapshot import/export speeds, \flat\_folder\ and \flat\_folder\_by\_map\ for large-scale tree and map operations (1M nodes, 100M ops), \large\_movable\_list\ for list performance and memory management, \mergeable\_notes\ comparing mergeable vs regular child containers, and \import\_batch\_perf\ for profiling batch import rollback bookkeeping. These examples provide developers with concrete metrics on execution time, memory usage, and snapshot sizes for various workloads.

crates/examples/examples · high confidence

Repository initialization and project scaffolding

The repository has been initialized with core project infrastructure, including an MIT license, a Rust toolchain configuration, and a pnpm workspace setup for managing the JS/WASM and Rust components. Development guidelines are established via AGENTS.md and CONTRIBUTING.md, while automated changelog generation is configured through git-cliff. Security and dependency hygiene are enforced via cargo-deny, and the project now includes a Deno lockfile for deterministic dependency resolution alongside a sponsorship configuration for Tana, Inc.

(repo-wide) · high confidence

Architecture

New internal encoding module with fast snapshot, shallow snapshot, and JSON schema support

The \crates/loro-internal/src/encoding\ directory has been reorganized into a dedicated module that centralizes Loro import/export formats. This change introduces new source files for \fast\_snapshot.rs\ (handling oplog, state, and GC block layouts), \shallow\_snapshot.rs\ (managing state-only and snapshot-at exports with style redaction), and \json\_schema.rs\ (providing JSON-based updates with optional peer compression). It also adds \arena.rs\ for columnar encoding of container IDs and positions, \value.rs\ for op/value type definitions, and \value\_register.rs\ for deduplication. Documentation files \AGENTS.md\ and \CLAUDE.md\ have been added to define the module's entry points, rules, and validation tests.

crates/loro-internal/src/encoding · high confidence

WASM package build pipeline and packaging structure reorganized

The \crates/loro-wasm\ directory has been restructured to support a multi-target build pipeline. New configuration files (\rollup.config.mjs\, \rollup.base64.config.mjs\) and a \deno.lock\ file establish the build environment, while \.gitignore\ and \.npmignore\ define artifact exclusions. Documentation files (\AGENTS.md\, \README.md\, \CHANGELOG.md\) provide guidelines for the new WASM-specific event handling, error reporting, and bundler compatibility (Vite, Webpack, esbuild). The \index.ts\ wrapper now exports the WASM bindings and includes deprecated aliases for backward compatibility.

crates/loro-wasm · high confidence

Behavioural changes

Bounded decoded-value cache prevents WASM memory growth

The container store now limits the number of lazily decoded container values cached in memory to 2048 entries (16 in tests) using a second-chance FIFO eviction policy. This change prevents unbounded memory retention when reading large documents, specifically addressing a WASM memory growth issue where walking over many containers could pin gigabytes of memory until the document is dropped. Evicted entries are re-decoded from the key-value store on subsequent access, trading a small decode cost for strict memory bounds.

_crates/loro-internal/src/state/container\store · high confidence

Improved WASM bundler compatibility and performance optimizations

The WASM build pipeline now includes dedicated patch scripts to ensure compatibility with various bundlers and runtimes. A new browser patch enables synchronous WASM loading via XMLHttpRequest to prevent circular chunk issues in Vite/Rolldown, while a bundler patch normalizes WASM module imports to support rsbuild, Bun, and Cloudflare Workers. Additionally, a container ID cache patch optimizes performance by caching the \id\ and \kind\ properties on JS wrappers, reducing redundant WASM calls during repeated access.

crates/loro-wasm/scripts · high confidence

Improved fractional index jitter for better ordering stability

The \fractional\_index\ crate now includes a new \jitter.rs\ module that provides methods for generating fractional indices with random jitter (e.g., \new\_jitter\, \generate\_n\_evenly\_jitter\). This change enhances the stability of element ordering in collaborative editing scenarios by reducing the likelihood of collisions when inserting items between existing ones, addressing issues identified in fix \#360.

_crates/fractional\index/src · high confidence

Internal refactoring of document state storage and string handling utilities

This change introduces a new internal key-value store wrapper (KvWrapper) to manage document state, replacing previous in-memory structures to support better snapshot import/export and garbage collection. It also adds a LazyLoad utility for deferred state resolution, refactors string handling with a new StringSlice type that distinguishes between Unicode and UTF-16 lengths (crucial for WASM compatibility), and implements optimized UTF-16 length counting. These updates improve internal performance and memory usage for snapshot operations and multi-threaded access, though they do not expose new public APIs.

crates/loro-internal/src/utils · high confidence

Introduce new CRDT rope and ID-to-cursor tracking for rich text

The rich text tracker now uses a new \CrdtRope\ data structure to manage text content and a dedicated \IdToCursor\ mapping to efficiently track operation IDs against rope positions. This change replaces the previous implementation, introducing specific optimizations such as fragment merging for contiguous operations and batched updates to improve performance during large transactions and text imports.

crates/loro-internal/src/container/richtext/tracker · high confidence

New compact block encoding for change storage

The change store now uses a new binary block format to encode and decode changes, replacing the previous structure. This new format groups changes into blocks and uses efficient encoding (LEB128, RLE, DeltaOfDelta) for metadata like timestamps, commit messages, and dependencies, as well as for the operations themselves. This change aims to reduce the size of stored changes and improve import/export performance.

_crates/loro-internal/src/oplog/change\store · high confidence

New delta structures for map, text, tree, and list containers

The \crates/loro-internal/src/delta\ module has been restructured with new files defining the internal delta representations for all container types. \map.rs\ and \map\_delta.rs\ introduce \MapDiff\ and \MapDelta\ to track added, updated, and deleted entries with composition logic. \text.rs\ adds \StyleMeta\ and \TextMeta\ to handle rich text styling and metadata within delta items. \tree.rs\ defines \TreeDiff\ and \TreeDelta\ to represent structural changes like create, move, and delete operations in movable trees, including old parent/index tracking. \movable\_list.rs\ and \seq.rs\ provide \MovableListInnerDelta\ and the generic \Delta\/\DeltaItem\ structures for sequence-based containers, enabling efficient composition and transformation of list and text changes.

crates/loro-internal/src/delta · high confidence

New internal change storage and DAG management architecture

The internal operation log has been restructured to use a new \ChangeStore\ backed by a KV store for persistent, block-encoded change history, replacing the previous in-memory list. A new \AppDag\ component now manages the causal dependency graph, supporting lazy loading of nodes and shallow snapshots to reduce memory retention. Additionally, a \PendingChanges\ system has been introduced to handle out-of-order remote updates and support atomic import rollbacks, ensuring data consistency during concurrent imports.

crates/loro-internal/src/oplog · high confidence

RLE library refactored to use generic traits and SmallVec

The \crates/rle\ library has been restructured to replace the previous monolithic \RleVec\ implementation with a modular, trait-based architecture. The core data structure now utilizes \SmallVec\ for improved memory efficiency, and the previous \HasLength\ and \Mergable\ traits have been expanded into a comprehensive set of traits (\Sliceable\, \HasIndex\, \RleCollection\, etc.) defined in \rle\_trait.rs\. This change introduces a new \RleVecWithLen\ wrapper to track atom lengths separately from merged element counts, and updates the public API to expose these new traits and the \RleVecWithLen\ type, fundamentally changing how run-length encoded collections are constructed and iterated.

crates/rle/src · high confidence

Refactored frontier representation for deterministic encoding and performance

The internal representation of version frontiers has been refactored to use a new \Frontiers\ enum and \InternalMap\ structure. This change ensures that frontier encoding is deterministic, meaning the same logical state will always produce the same serialized output, which is critical for consistent replication and diffing. Additionally, the new data structure improves performance by optimizing how frontier IDs are stored and iterated, replacing the previous implementation.

crates/loro-internal/src/version · high confidence

Refactored internal handler implementations for trees, movable lists, and text

The internal handler logic in \crates/loro-internal/src/handler\ has been restructured to improve stability and performance. The \tree.rs\ handler now uses a dedicated \TreeInner\ struct to manage parent-child relationships and node metadata, supporting fractional indexing for child ordering. A new \movable\_list\_apply\_delta.rs\ module implements delta application for movable lists, handling insertions, deletions, and moves with proper container ID remapping. Additionally, \text\_update.rs\ introduces \DiffHook\ and \DiffHookForLine\ structures to efficiently apply text diffs, including line-based updates, to the text handler.

crates/loro-internal/src/handler · high confidence

Removal of legacy core modules in loro-core

The \id.rs\, \lib.rs\, \rle.rs\, and \store.rs\ files have been deleted from the \loro-core\ crate. This removes the previous definitions for \ClientID\, \ID\, \RleArray\, and the \Store\ struct, indicating a structural refactor where these components are no longer part of this specific crate's public or internal API surface.

crates/loro-core · high confidence

Fixes

2 commits (2 fixes) fixing crates/examples

A fix in crates/examples — 2 commits (2 fixs), 1 file: “fix: reduce overlapping import costs (\#1176)”; “fix: reject caller input that panicked or silently lost ops (\#1258)” (refs \#1176, \#1258).

crates/examples · medium confidence · unverified

84 commits (64 fixes) fixing context

A fix in context — 84 commits (64 fixs), 62 files: “fix: keep parsed blocks out of doc-wide arenas and contain callback panics (\#1197)”; “test: guard movable-list split imports against \#1046 (\#1271)”; “fix: bound tree history parent walks and cover skipped cycle moves (\#1273)”; and 81 more (refs \#1197, \#1046, \#1271, \#1273, \#1275, …).

context · medium confidence · unverified

Fuzzing crate now pins the nightly Rust toolchain

The \crates/fuzz\ directory now includes a \rust-toolchain\ file that explicitly sets the Rust toolchain to \nightly\. This ensures that fuzzing builds and runs use the nightly compiler version, providing consistency for fuzzing-specific features or dependencies that may require it.

crates/fuzz · high confidence

Undo and redo operations now roll back on application failure

Undo and redo operations now guarantee atomicity: if an application error occurs during the operation, the system rolls back the inverse changes and preserves the undo/redo item for retry, rather than leaving the document in a partially changed state. This fix introduces a transaction writer gate to prevent concurrent writers from interfering with compound undo/redo operations, ensuring that failed attempts do not discard concurrent edits or emit spurious events. Also in this area: Fixes for stack overflows, undo integrity, and text slicing.

crates/loro-internal/src/undo · high confidence

Test coverage

1 commit adding/updating tests in crates/loro-common/tests; 14 commits adding/updating tests in crates/loro/tests/contracts; Add Loro bundler smoke tests for WASM compatibility; Added Deno integration tests for Loro WASM; Added benchmark suite for FractionalIndex operations; Added benchmarks for text, list, fork, and mergeable container performance; Added comprehensive benchmark suite for encoding, events, JSONPath, and CRDT operations; Added integration tests for detached editing, JSONPath, redaction, shallow snapshots, and undo; Added integration tests for mergeable container behavior; Added regression test for JSON fuzzing failure; Added snapshot tests for Loro WASM diff, JSON, and tree operations; Added strict TypeScript declaration tests for WASM bindings; Added test fixtures and utilities for unknown container support; Added tests for JSON float precision and binary import behavior; Added tests for MemKvStore import/export and SSTable fixture loading; Added tests for import atomicity, op-count consistency, and replay-base selection; Added tests for rich-text insert position caching near style anchors; Expanded fuzz testing for CRDT operations and compatibility; Expanded fuzzing coverage for CRDT operations and data structures; Expanded fuzzing coverage for Counter, MovableList, and Tree containers; Expanded test coverage for Loro WASM bindings; Expanded test coverage for Loro core behaviors and cross-language interoperability; Expanded test coverage for internal Loro contracts and behaviors; New comprehensive fuzzing harness for Loro CRDTs.

Housekeeping

Internal crate scaffolding and documentation for loro-internal

The \crates/loro-internal\ directory has been initialized with core project files, including a \.gitignore\ to exclude \dhat-heap.json\ profiling artifacts, a \VERSION\ file setting the crate to 1.16.0, and a \deno.json\ defining development tasks for testing, fuzzing, and benchmarking. Additionally, \AGENTS.md\ and \Encoding.md\ provide essential documentation on the internal CRDT implementation, encoding schemas, and working rules for developers.

crates/loro-internal · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 57 → 59 (+1.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 46 → 46 (+0.8)
  • Architecture 92 → 93 (+0.5)
  • Maturity 67 → 67 (-0.2)
  • Readiness 68 → 67 (-1.1)
  • Security 64 → 67 (+2.6)
  • Performance 71 → 91 (+20.7)

Resolved (74)

  • ArenaContainers::get_depth (cognitive 22) (crates/loro-internal/src/arena.rs)
  • DocState::get_container_deep_value (cognitive 25) (crates/loro-internal/src/state.rs)
  • DocState::get_container_deep_value_with_id (cognitive 22) (crates/loro-internal/src/state.rs)
  • Duplicated block (10 lines × 2) (crates/loro-internal/src/handler.rs)
  • Duplicated block (10 lines × 2) (crates/loro-internal/src/state.rs)
  • Duplicated block (10 lines × 3) (crates/fuzz/src/one_doc_fuzzer.rs)
  • Duplicated block (11 lines × 2) (crates/fuzz/src/value.rs)
  • Duplicated block (11 lines × 2) (crates/loro-internal/src/container/richtext/richtext_state.rs)
  • Duplicated block (11 lines × 2) (crates/loro-internal/src/handler.rs)
  • Duplicated block (11 lines × 2) (crates/loro-wasm/src/lib.rs)
  • Duplicated block (11 lines × 3) (crates/loro-internal/src/value.rs)
  • Duplicated block (11 lines × 5) (crates/loro-wasm/src/counter.rs)
  • Duplicated block (13 lines × 2) (crates/fuzz/src/one_doc_fuzzer.rs)
  • Duplicated block (13 lines × 2) (crates/loro-internal/src/oplog/change_store.rs)
  • Duplicated block (13 lines × 2) (crates/loro-wasm/src/lib.rs)
  • Duplicated block (14 lines × 2) (crates/loro-internal/src/state/tree_state.rs)
  • Duplicated block (15 lines × 2) (crates/fuzz/src/actor.rs)
  • Duplicated block (15 lines × 2) (crates/loro-internal/src/state/movable_list_state.rs)
  • Duplicated block (15 lines × 2) (crates/loro-internal/src/value.rs)
  • Duplicated block (15–16 lines × 2) (crates/loro-wasm-tools/src/main.rs)
  • …and 54 more

New (268)

  • AppDag::debug_vv_from_block_headers (cognitive 50) (crates/loro-internal/src/oplog/loro_dag.rs)
  • AppDag::debug_vv_from_block_headers (cyclomatic 26) (crates/loro-internal/src/oplog/loro_dag.rs)
  • AppDag::try_does_id_cover (cognitive 37) (crates/loro-internal/src/oplog/loro_dag.rs)
  • AppDag::try_does_id_cover (cyclomatic 21) (crates/loro-internal/src/oplog/loro_dag.rs)
  • CausalWorkspace::summary_of (cognitive 32) (crates/loro-internal/src/oplog/known_history.rs)
  • ClassTooLong: InnerStore (crates/loro-internal/src/state/container_store/inner_store.rs)
  • Critical CVE: [GHSA redacted] (packages/fractional-index/package.json)
  • Documentation: no build, run or usage example (crates/loro-wasm-map/README.md)
  • Duplicated block (10 lines × 2) (crates/loro-internal/src/handler.rs)
  • Duplicated block (10 lines × 3) (crates/fuzz/src/one_doc_fuzzer.rs)
  • Duplicated block (10 lines × 3) (crates/loro-internal/src/handler.rs)
  • Duplicated block (10–17 lines × 2) (crates/loro-internal/src/handler.rs)
  • Duplicated block (11 lines × 2) (crates/fuzz/src/value.rs)
  • Duplicated block (11 lines × 2) (crates/loro-internal/src/container/richtext/tracker.rs)
  • Duplicated block (11 lines × 2) (crates/loro-internal/src/encoding/shallow_snapshot.rs)
  • Duplicated block (11 lines × 2) (crates/loro-internal/src/handler.rs)
  • Duplicated block (11 lines × 2) (crates/loro-internal/src/handler.rs)
  • Duplicated block (11 lines × 3) (crates/loro-internal/src/jsonpath/parser.rs)
  • Duplicated block (11 lines × 3) (crates/loro-internal/src/jsonpath/parser.rs)
  • Duplicated block (11 lines × 3) (crates/loro-internal/src/value.rs)
  • …and 248 more

Changes since last survey

  • 43 commits — 14 feature/other, 29 fixes

By area

  • crates/loro-internal — 21 commits
  • crates/loro — 4 commits
  • .changeset/big-insert-import.md — 1 commit
  • .changeset/coalesce-giant-op-checkout.md — 1 commit
  • .changeset/delta-int-overflow.md — 1 commit
  • .changeset/jsonpath-literal-root-keys.md — 1 commit
  • .changeset/last-undo-selection.md — 1 commit
  • .changeset/linear-richtext-snapshot.md — 1 commit
  • .changeset/metadata-oplog-scratch.md — 1 commit
  • .changeset/optional-jsonpath-pest.md — 1 commit
  • .changeset/pending-change-lamport.md — 1 commit
  • .changeset/reject-own-peer-deps.md — 1 commit
  • .changeset/tree-history-cycle.md — 1 commit
  • .changeset/undo-backwards-clock.md — 1 commit
  • .changeset/undo-merge-timer.md — 1 commit
  • .github/workflows — 1 commit
  • context/benchmarks — 1 commit
  • context/movable-list-op-validation.md — 1 commit
  • crates/fractional_index — 1 commit
  • crates/loro-common — 1 commit

Notable commits

  • fix: chore: fix package name in jsonpath changesets
  • fix: chore: make release version sync idempotent and fix Windows test portability (#1286)
  • fix: fix(wasm): keep onPush metadata at the undo limit (#1253)
  • fix: fix: big text insert after a concurrent change imports in linear time (#1236)
  • fix: fix: bound change-header allocations during import (#1275)
  • fix: fix: bound tree history parent walks and cover skipped cycle moves (#1273)
  • fix: fix: check value decoding bounds before conversion and allocation (#1269)
  • fix: fix: create fractional indexes between jittered siblings (#1213)
  • fix: fix: enforce undo stack limit on resize and redo (#1272)
  • fix: fix: gate pest dependencies behind jsonpath (#1270)
  • fix: fix: keep untrusted deep nesting from aborting the process (#1249)
  • fix: fix: merge static text runs after unmarking (#1277)
  • fix: fix: preserve grouped undo across split history spans (#1278)
  • fix: fix: prevent undo merging when the clock moves backwards (#1265)
  • fix: fix: reconcile #1222 and #1244 frontier walks (#1251)
  • fix: fix: reject caller input that panicked or silently lost ops (#1258)
  • fix: fix: reject imported changes with invalid deps on their own peer (#1237)
  • fix: fix: reject imported style end anchors without their style start (#1261)
  • fix: fix: reject imports missing a causal peer predecessor (#1274)
  • fix: fix: reject overflowing or inverted text mark ranges on import (#1287)
  • …and 23 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

loro-dev/loro was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 98465472165d086ea7649df4facc17637a73fb72 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.