Skip to content

feat(sync): apply selective replication scopes - #331

Draft
LimiNode wants to merge 2 commits into
codex/selective-sync-protocolfrom
codex/selective-sync-engine
Draft

feat(sync): apply selective replication scopes#331
LimiNode wants to merge 2 commits into
codex/selective-sync-protocolfrom
codex/selective-sync-engine

Conversation

@LimiNode

@LimiNode LimiNode commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • add bounded scope-local pull/push/apply to SyncEngine
  • persist mutually exclusive full-global / selective receiver mode and exact duplicate evidence
  • expose selective capability methods through ISyncPeer and DirectSyncPeer
  • add foreground SelectiveSyncWorker paging with durable cursor resume
  • document the implemented engine phase in the paired EN/RU design guides

Stack

This Draft PR is stacked on #330 (codex/selective-sync-protocol). It must be reviewed and merged after that protocol PR.

Contract

  • scoped apply never advances _mdbxc_applied
  • the first committed raw delivery mode is durable and mixing global/scoped streams fails closed
  • multiple selective scopes are admitted only through disjoint immutable descriptors
  • scoped pull is served only by the designated writer, so a receiver cannot become a relay
  • scoped snapshots, persisted snapshot resume, retention/pruning, HTTP/WebSocket routing, and background scheduling remain out of scope

Validation

C++11 and C++17 MinGW CTest:

  • test_sync_engine
  • test_sync_stores
  • test_sync_worker
  • test_sync_replication
  • test_sync_capture
  • test_sync_randomized
  • test_sync_randomized_lifecycle
  • test_selective_replication_protocol
  • header_sync_umbrella_test
  • header_domain_mdbx_containers_sync_storage_hpp
  • header_domain_mdbx_containers_sync_engine_hpp
  • agent_policy_checks

Also built test_sync_stress in both language modes. git diff --cached --check passed before commit.

Add bounded scoped pull/push engine paths, durable receiver-mode exclusion, direct peer and foreground worker orchestration, and C++11/17 regressions for pagination, restart, mode conflicts, and fail-closed apply.
@LimiNode
LimiNode force-pushed the codex/selective-sync-engine branch from d279d1c to 557bf7e Compare September 2, 2026 16:34
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