fix: force full sync database snapshots#590
Open
codedogQBY wants to merge 1 commit into
Open
Conversation
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
forceUploadSnapshotoption to the simple sync database layerAnalysis
Issues #586 and #587 report the same cross-device flow: PC performs full upload, then Android performs full download, but the mobile data is not the latest. The file layer already had force-upload/force-download options, but the database snapshot layer could skip rewriting this device's remote snapshot when
last_sync_atmade incremental changes look empty and the existing remote snapshot was recent. In that case, a full upload could refresh files while leaving metadata/progress/library snapshot stale.Verification
git diff --checkbiome check packages/core/src/stores/sync-store.ts packages/core/src/stores/sync-store.test.ts packages/core/src/sync/simple-sync.ts packages/core/src/sync/__tests__/simple-sync.integration.test.tsPATH=/Users/bealqiu/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH packages/core/node_modules/.bin/vitest run packages/core/src/stores/sync-store.test.tsPATH=/Users/bealqiu/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH packages/core/node_modules/.bin/vitest run packages/core/src/sync/__tests__/simple-sync.integration.test.tsFixes #586
Fixes #587