Skip to content

fix(sync): an edit made before a review keeps its place, Local only drops what waited, a deleted profile's secrets reach its connections, and another sign-in erases the last account's keys - #4773

Merged
datlechin merged 2 commits into
mainfrom
fix/sync-adapter-r3
Nov 30, 2026

Conversation

@datlechin

@datlechin datlechin commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

  • A record a pull held whole for review, whose store now holds a copy under its id, is taken up as the device's record: the held row goes, values approved while it waited land on the copy, and each value still asked about or refused holds back the copy's own. It runs at the start of a pass and before a decision on the record, and each store write follows a fresh read of the copy. Before, Approve wrote the pulled copy over a settings category the person changed before the review, and Reject kept the change off the other devices for good.
  • Values waiting for a record whose copy is Local only leave the review and the count at the start of a pass, and a decision on one writes nothing into it.
  • A pulled deletion of an SSH or credential profile's envelope leaves the secret in the device store while the store no longer holds the profile, so the Mac's handover gives it to the connections still using it and then deletes it. Before, those connections lost the SSH password, key passphrase, TOTP secret or password. Windows keeps no profile secret through the engine on main.
  • The service engine that starts for another account or server than the last sign-in erases the keys that sign-in left, as Sign Out does, with no revoke, so Sign Out Anyway's words ("until another account signs in here") hold on the Mac and Windows.
  • History runs the core cannot check for a password stay on the device, as before; the Mac's What Syncs now lists Query History on TablePro Sync and says which runs stay.
  • ADR 0107 records the five; 0051, 0054, 0056 and 0076 point to it. Its Consequences name what is left: secrets a crash before the Mac's handover leaves in the Keychain, and the keys of a sign-in left before its Move my data / Start empty answer.

Test plan

  • Fail on main, pass here:
    • core/crates/sync/tests/engine/approvals.rs: a_category_held_whole_and_edited_here_keeps_the_edit_through_an_approval_or_a_refusal, a_category_held_whole_and_edited_here_sends_the_edit_before_the_review, a_connection_made_local_only_drops_what_waited_for_it, an_approval_after_the_connection_became_local_only_writes_nothing_into_it.
    • core/crates/ffi/src/sync/secrets_tests.rs: a_pulled_profile_deletion_leaves_its_password_for_the_app_to_hand_over.
    • core/crates/ffi/src/sync/tests.rs: a_sign_in_to_another_account_erases_the_keys_the_last_one_left.
    • apple/TableProTests/Views/Settings/SyncPaneLayoutTests.swift: historyShowsOnTableProSync.
  • verify.sh --platform windows --jobs 4 core tablepro-sync: PASS, 1173 cases. core tablepro-ffi: PASS, 556 cases; core tablepro-ffi sync::secrets after the last test edit: PASS, 9 cases.
  • cargo clippy --locked -p tablepro-sync -p tablepro-sync-testing -p tablepro-ffi --all-targets -- -D warnings: clean. cargo fmt: clean.
  • verify.sh test SyncPaneLayoutTests: PASS, 53. verify.sh l10n: PASS. verify.sh lint on the changed Swift files: PASS.
  • verify.sh --platform windows build: PASS (WinUI projects compile; PRI and manifest steps run on Windows).
  • Review: Codex, three rounds. Round 1: a take-up wrote twice from one read, so the store's stale-write check did not guard the second write (fixed: each write follows its own read). Round 2: a take-up that met a copy changed between reads could leave the held row (fixed: the decision reads again, at most three turns). Round 3: none.

Docs: TableProApp/docs#331

…rops what waited, a deleted profile's secrets reach its connections, and another sign-in erases the last account's keys
@datlechin
datlechin merged commit b4a9a87 into main Nov 30, 2026
2 of 3 checks passed
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