fix(ios): read an unrecognized Safe Mode level from iCloud as Confirm Writes, not Off - #3214
Merged
Merged
Conversation
datlechin
added a commit
that referenced
this pull request
Sep 30, 2026
datlechin
added a commit
that referenced
this pull request
Oct 1, 2026
…ds:// into the etcd TLS Mode (#3186) * fix(plugin-etcd): drop the SSL Mode the driver ignores and import etcds:// into the etcd TLS Mode * fix(sync): decode unknown safe mode values with the model policy * docs(changelog): drop the Safe Mode entry that #3214 already carries --------- Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
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.
mainis red: Package Tests failsSyncRecordMapperTests"An unrecognized wire value syncs as confirmWrites instead of off" (SyncRecordMapperTests.swift:87), which fails every PR merged against currentmain(seen on #3182 and #3186).What was wrong
#3185 added
SafeModeLevel(wireValue:isReadOnly:), which reads a level it does not recognize as Confirm Writes (fail closed), plus the test above. #3181, written in parallel, kept the packageSyncRecordMapper's own privatesafeModeLevel(fromWire:isReadOnly:), whose fallback is Off. Both merged, so the iOS app still decodes a Safe Mode level synced from a newer Mac that it does not know as Off, and the test #3185 wrote for exactly that fails.This also shipped in 0.76.1: the package mapper there had the same Off fallback.
What changed
SyncRecordMapper.storedSafeModeLevel(in:)callsSafeModeLevel(wireValue:isReadOnly:), and the private copy is gone, so the app mapper, the iOS mapper and both import services decode a wire value through one function.Verification
swift test --filter TableProSyncTestsinPackages/TableProCore: 144 passed, including the failing test.SafeModeLevelTests: 8 passed.