Skip to content

refactor(sync): harden MobileSync and CDS wire contracts - #192

Draft
MRiecy wants to merge 17 commits into
lioensky:mainfrom
MRiecy:agent/vcpmobile-sync-error-contract-1-2
Draft

refactor(sync): harden MobileSync and CDS wire contracts#192
MRiecy wants to merge 17 commits into
lioensky:mainfrom
MRiecy:agent/vcpmobile-sync-error-contract-1-2

Conversation

@MRiecy

@MRiecy MRiecy commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Important

Work in progress. This draft is published early to expose the active MobileSync/CDS direction after upstream CDS commit 12c8ffe landed. Please coordinate before making overlapping changes in VCPMobileSync or rust_chat_data_service while this integration is still moving.

Summary

  • reduce CDS and MobileSync intermediate work for large histories
  • harden the structured Wire 1.5 handshake, error envelopes, snapshot validation, topic versions, message hashes, and committed wire state
  • skip unchanged avatar hashing using rebuildable file metadata
  • merge origin/main through 12c8ffe, including lazy search initialization and clean-start CDS recovery
  • migrate already-deployed upstream Schema 3 databases in place when avatar metadata columns are missing, persist recovery intent, and require one reconcile before returning to the fast startup path

Upstream integration

The merge keeps upstream SearchRuntime behavior together with the branch SnapshotStale and SyncTopicVersion contracts. Existing Schema 3 databases retain hashes, timestamps, and tombstones while mtime_ms/file_size are added transactionally. The migration marks filesystem_dirty so interruption or an incomplete first reconcile is retried.

Validation completed

  • cargo fmt -- --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked: 67 passed
  • node --test tests/mobile-sync-*.test.js: 92 passed

Still in progress

  • final VCPMobile cross-repository alignment and validation
  • rebuild and verify the Windows CDS runtime from final source
  • Windows/Desktop and Android full-sync acceptance
  • final scope review before marking ready

This PR is intentionally draft and is not ready to merge yet.

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