Repository navigation
fix(core-sync): a landing's mark ends at the write it waited for and never outlives its envelope's copy - #4859
Merged
Conversation
datlechin
force-pushed
the
fix/core-sync-landing-mark-lifetime
branch
2 times, most recently
from
December 3, 2026 15:03
ddbf9a9 to
6e1c79c
Compare
…never outlives its envelope's copy
datlechin
force-pushed
the
fix/core-sync-landing-mark-lifetime
branch
from
December 3, 2026 15:18
6e1c79c to
879b064
Compare
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
Three open defects in the landing marks of core ADR 0117 (#4840).
DeviceSecrets::writesandHostSyncedSecrets::writes: a count of an item's writes and removals that only grows, or none from a store that does not count.KeychainHelper, per item, in its defaults beside the Keychain: each write that lands and each removal that took an item. Saving an empty field over nothing changes no count.Test plan
core/crates/sync/tests/engine/destinations.rs, through the engine and the fake server:a_newer_envelope_that_lands_in_the_same_pull_ends_the_mark_with_no_push_after_it: fails on main (the mark stays after a pull-only pass), passes here.a_pass_reads_the_connections_store_as_often_with_many_open_marks_as_with_one: on main 6 reads with 5 marks against 2 with one; equal here.a_password_typed_and_cleared_again_between_two_reads_is_the_person_s_removal: main has no count to build it on; with the count check taken out the old password comes back (Some("hunter2")), here it does not and the envelope's deletion goes up.a_pulled_move_back_after_a_password_typed_and_cleared_lands_the_envelope_s_passwordpins the Codex P1 case: a pulled move back still lands the envelope, as after a read in between.core/crates/ffi/src/sync/secrets_tests.rs: the app's count crosses the FFI, the Core's own store gives none.apple/TableProTests/Core/Storage/KeychainSyncedSecretsTests.swift,writesCountEachChangeOfTheItem.verify.sh --platform windows --jobs 4on the rebased tree:corePASS (tablepro-ffi 555),core tablepro-syncPASS (1334),core tablepro-sync-hostPASS (16),core tablepro-sync-testingPASS (105),bindingsPASS.cargo clippy --locked -p tablepro-sync -p tablepro-sync-testing -p tablepro-sync-host -p tablepro-ffi --all-targets -- -D warnings: clean.verify.sh --platform apple linton the three Swift files: PASS, 0 violations.