Skip to content

feat(sync): replace legacy replication with transactional sync v2 - #84

Merged
MegalithOfficial merged 5 commits into
mainfrom
refactor/sync-v2
Aug 5, 2026
Merged

feat(sync): replace legacy replication with transactional sync v2#84
MegalithOfficial merged 5 commits into
mainfrom
refactor/sync-v2

Conversation

@MegalithOfficial

Copy link
Copy Markdown
Contributor

Summary

Replaces the legacy sync runtime with a transactional, causal sync v2 architecture designed for safe bidirectional replication across multiple devices.

What changed

  • Captures SQLite changes as crash-safe revision batches instead of manually constructing entity payloads.
  • Tracks causal frontiers, row provenance, tombstones, and durable conflict records.
  • Applies revisions deterministically while preserving dependency ordering across replicas.
  • Detects divergent direct and group chat histories and materializes them as separate sessions instead of mixing conversations.
  • Adds resumable, content-addressed, hash-verified asset transfer.
  • Enforces exact protocol and structural schema compatibility during the sync handshake.
  • Canonicalizes drifted SQLite table layouts and rebuilds stale sync journals during migration.
  • Routes tracked storage writes through the new transactional capture path.
  • Adds detailed sync-stage progress, directional transfer activity, and a conflict inbox with explicit resolution controls.
  • Localizes the new sync and conflict UI across all supported locales.

Replace handwritten entity payload planning with SQLite native changeset capture, schema fingerprinting, causal frontiers, row provenance, tombstones, and durable conflict records.

Add crash-safe revision batches, deterministic multi-replica application, exact hello validation, resumable content-addressed blob transfer, and initial tracked session/message write paths. Document the cutover architecture and cover atomic capture, retries, convergence, conflict resolution, and schema evolution with tests.
Remove the v1 runtime and wire exact-version, bidirectional sync through revision capture, causal frontiers, deterministic row conflict handling, and resumable hash-verified asset transfer.

Add transactional schema migration and startup initialization, route tracked storage writes through sync capture, and update sync and onboarding UI with directional transfer metrics and localized phase stages.
Track causal ancestry for individual and group chat messages, detect divergent tails, and materialize them as deterministic separate sessions so conversations cannot mix during replication.

Add a localized conflict inbox and verbose sync/database-wait progress, repair existing-database migrations and stale journal preflight, and make remote application resilient to short SQLite writer contention.

Defer periodic active-usage writes while sync is active, add conflict and writer-collision coverage, and refresh integration fixtures to current provider and model contracts.
Rebuild drifted group session, image LoRA, and lorebook entry tables into a deterministic column layout while preserving rows, indexes, and foreign-key integrity.

Fingerprint structural column compatibility instead of stored CREATE TABLE formatting, invalidate cached legacy fingerprints, and rebuild stale sync journals once during migration v88.
Rework conflict cards with clearer version grouping, field comparisons, resolution actions, and inline error states.

Replace the static bidirectional indicator with animated directional rails so device transfer activity is easier to understand.
@MegalithOfficial
MegalithOfficial merged commit 53e8426 into main Aug 5, 2026
10 checks passed
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.

1 participant