Skip to content

feat: add block-level LWW for fine-grained text conflict resolution#13

Merged
andinux merged 5 commits intodevfrom
block-lww
Mar 13, 2026
Merged

feat: add block-level LWW for fine-grained text conflict resolution#13
andinux merged 5 commits intodevfrom
block-lww

Conversation

@andinux
Copy link

@andinux andinux commented Mar 13, 2026

Implements block-level Last-Writer-Wins for text columns across SQLite and PostgreSQL. Text is split into blocks (lines by default) and each block is tracked independently, so concurrent edits to different parts of the same text are preserved after sync.

  • Add block.c/block.h with split, diff, position, and materialize logic
  • Add fractional-indexing submodule for stable block ordering
  • Add cloudsync_set_column() and cloudsync_text_materialize() functions
  • Add cross-platform SQL abstractions for blocks table (SQLite/PostgreSQL)
  • Add block handling to PG insert, update, col_value, and set_column
  • Move network code to src/network/ directory
  • Bump version to 0.9.200
  • Add 36 SQLite block LWW unit tests and 7 PostgreSQL test files
  • Update README and API docs with block-level LWW documentation

marcobambini and others added 5 commits March 13, 2026 14:10
Implements block-level Last-Writer-Wins for text columns across SQLite
and PostgreSQL. Text is split into blocks (lines by default) and each
block is tracked independently, so concurrent edits to different parts
of the same text are preserved after sync.

- Add block.c/block.h with split, diff, position, and materialize logic
- Add fractional-indexing submodule for stable block ordering
- Add cloudsync_set_column() and cloudsync_text_materialize() functions
- Add cross-platform SQL abstractions for blocks table (SQLite/PostgreSQL)
- Add block handling to PG insert, update, col_value, and set_column
- Move network code to src/network/ directory
- Bump version to 0.9.200
- Add 36 SQLite block LWW unit tests and 7 PostgreSQL test files
- Update README and API docs with block-level LWW documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@andinux andinux merged commit 6c603fb into dev Mar 13, 2026
17 checks passed
@andinux andinux deleted the block-lww branch March 13, 2026 20:57
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.

2 participants