Repository navigation
fix(sync): a deleted connection's history deletions sync, pulls keep saved-query edits, and Windows runs keep their database - #4763
Merged
Conversation
…s connection records
… saved-query pull never writes over an edit made after its read
…ed-query kind writes over its own read, and iOS keeps unread records' flags
…a run the server holds, and iCloud's standing rows follow a connection that syncs again
Standing rows stay for connections a base names, as main's rejoin rule reads them; the history adapter's base check covers a connection that never synced.
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
SavedQueries::write_over). The store refuses it withImportOutdated, mapped to the stale store error, when the person edited since. Each kind keeps its own read, and a sibling's write moves it on only when both read the same store.HistoryRunandHistoryEntrycarryDatabase, and a query tab records the database the run began in, so other devices show where a Windows run ran.ssh_profile_unlinked,tls_mode_unsettled). The UserDefaults keys are read once and moved, keeping only the ids of records this build cannot read. The move's write is named in the downgrade mirror's record, so a later edit by the previous stable is still taken in..claude/rules/data-sync-storage.md: the iOS flags row.adapters::saved_queries::tests::a_pulled_change_keeps_the_connection_name_the_device_showsnow reads the store before the pull's write, as the engine does.Test plan
the_deletion_of_a_deleted_connection_s_runs_reaches_the_server,a_connection_kept_here_and_then_deleted_keeps_its_runs_deletions_here,a_local_only_connection_deleted_before_it_ever_synced_sends_nothing_of_its_runs,a_local_only_connection_no_pass_saw_keeps_its_runs_deletions_here;a_connection_that_syncs_again_sends_its_deletion_with_no_fetch_between;a_pull_never_writes_over_an_edit_made_after_its_read,an_edit_between_the_reads_of_one_page_keeps_the_kind_read_first_off_it;CoreLibraryStoreTests:earlierDeviceFlagsMoveIntoTheRecords,previousStableEditAfterTheFlagsMoved,earlierFlagsOfAHeldConnectionStay;QueryTabHistoryTests:ARunIsKeptWithTheDatabaseItRanIn,ARunInTheDatabaseTheTabPickedIsKeptThere.a_write_based_on_an_older_read_writes_nothing_and_one_on_the_last_read_lands, synca_connection_is_gone_only_from_a_list_that_was_read, ffia_recorded_run_keeps_the_database_the_app_named, interopHistoryTests.ARunKeepsTheDatabaseItRanIn(Windows CI).cargo testafter merging main: sync lib 402, engine 183, cloudkit 180 and every other sync test target, storagesaved_queries83, ffihistory8, ffisync::77.cargo fmt --checkclean.cargo clippy --locked --all-targets -D warningson storage, sync, sync-testing, ffi, account, cli, foreign-import, mcp, records, session: clean.verify.sh ioson CoreLibraryStoreTests, LibraryRecordMappingTests, AppStateLibraryTests, ConnectionFormEditsTests, IOSConnectionImportIconTests, IOSConnectionImportServiceTests, IOSSyncCoordinatorTests: PASS, 237/237 (CoreStore unchanged on main since).TablePro.App.Model.Testson macOS with a placeholder core library: 1443 pass. 45 fail only because no core library loads there;LocalizationTests.EveryCodeTheCoresSyncKeysAndAccountReturnIsWordedfails on main too (account.no_install_idfrom feat(core): give each OS user on a machine a device row of its own #4746 has no Windows string).