feat(sync): replace legacy replication with transactional sync v2 - #84
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the legacy sync runtime with a transactional, causal sync v2 architecture designed for safe bidirectional replication across multiple devices.
What changed