Skip to content

fix(sync): Keep Theirs keeps a team connection's password, and an edit never drops one it did not touch - #4706

Merged
datlechin merged 2 commits into
mainfrom
fix/sync-keep-theirs-keeps-team-password
Nov 28, 2026
Merged

datlechin merged 2 commits into
mainfrom
fix/sync-keep-theirs-keeps-team-password

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • Core: while a team connection has an open conflict, the envelopes this device wrote for it stay out of the push, so the team keeps the password sealed for the copy it holds.
  • Core: a connection's envelopes go up only after the connection's own write is taken. A write the server turns down as a conflict no longer lets its password land first.
  • Core: Keep Mine and Keep Theirs keep, per secret, the envelope that opens for the copy the team holds after the choice. The chosen side's comes first, the other side's when only it fits. This runs before the conflict row goes, and a discard reverts envelopes before its conflicts go.
  • Core and FFI: publish_team_connection_edit takes changes: [TeamSecretChangeArg] (set or cleared, per kind) in place of the full set (TeamSecrets::Edit). A secret not named keeps the team's envelope. On a move it is sealed again when this device opens it for the copy's current destination, else left as it is. A secret the edited copy stops using loses its envelope.
  • macOS: the team copy's Edit form names only the secrets the person changed. A field it could not fill, or one left alone, no longer removes the team's password. A typed password goes up even when the team's secrets cannot be read.
  • ADR 0080 amends 0051 and 0079; core/ARCHITECTURE.md points to it. Windows bindings regenerated; the Windows app has no team-copy edit and resolves conflicts through the core.
  • Tests changed on purpose: ConnectionEditorStoreTeamCopyTests (a moved edit names no secret; unreadable team secrets no longer refuse a typed password) and TeamLibrarySecretsTests.editPublishesUnderTheTeamsId.

Test plan

  • core_engine team_secrets::a_conflict_over_the_destination_keeps_the_team_s_password_until_the_choice_and_keep_theirs_keeps_theirs fails on main (no member and not the owner opens the password after Keep Theirs) and passes here.
  • New core tests: a password sent with a connection write the team turns down waits with the conflict (fails without the push ordering), Keep Theirs keeps the envelope of a move of mine that outlives it, Keep Mine keeps the team's when only it fits, Keep Mine over the destination, and edits that name nothing, set, clear, move, or stop using TOTP.
  • FFI: an_edit_names_only_what_the_person_set_or_cleared.
  • macOS: ConnectionEditorStoreTeamCopyTests/unfilledPasswordIsKept (the F35 save, with the field unfilled or unreadable) and the updated suites.
  • Local: verify.sh core tablepro-sync 1040/1040, core tablepro-ffi 525/525, macOS Team Library suites 111/111, lint clean, cargo clippy --locked -p tablepro-sync -p tablepro-sync-testing -p tablepro-ffi --all-targets -- -D warnings clean.

@datlechin
datlechin merged commit 4e98fe6 into main Nov 28, 2026
11 of 34 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