[LOOP-5150] storing user roles with session#76
Merged
Conversation
d761869 to
61b2fe7
Compare
61b2fe7 to
8d67483
Compare
2 tasks
ps2
added a commit
that referenced
this pull request
Jun 1, 2026
* Decode TSession.userRoles with backward compatibility Sessions persisted before #76 added userRoles lack the key, so the synthesized Codable decoder throws .keyNotFound. In TidepoolService that kills init?(rawState:), which drops the saved service entry and forces the user to re-authenticate on the next upgrade. Provide a custom init(from:) that uses decodeIfPresent for userRoles defaulting to []. Keeps the public API unchanged (userRoles stays non-optional) and adds a backward-compat test. * ci: bump Xcode to 16.4 on Apple Silicon resource class CircleCI's m4pro.medium resource class does not support Xcode 14.1.0. Use Xcode 16.4 and drop the OS pin on the simulator destination. * tests: compare XCTAssertCodableAsJSON semantically Newer Foundation emits Doubles at full IEEE-754 precision (e.g. 2.34 -> 2.3399...) and key order can differ between JSONEncoder and JSONSerialization output -- both of which broke the previous raw string comparison even though the data is equivalent. Parse both sides back to Foundation objects and compare via NSObject equality, which handles nested values, key ordering, and number equivalence by value. Brings 46 pre-existing test failures back to green on current SDKs (and preserves the encode/decode round-trip assertions).
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.
https://tidepool.atlassian.net/browse/LOOP-5150