Clear deviceIdentityToken when we fail to load id or deviceSecret#474
Open
lawrence-forooghian wants to merge 3 commits into
Open
Clear deviceIdentityToken when we fail to load id or deviceSecret#474lawrence-forooghian wants to merge 3 commits into
deviceIdentityToken when we fail to load id or deviceSecret#474lawrence-forooghian wants to merge 3 commits into
Conversation
The note in RSH8k2 mentioned RSH3a2b three times but only linked the first reference. Link the other two for consistency. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The note previously said "our implementations" all generate eagerly, but this isn't accurate. ably-java follows RSH3a2b (lazy generation on CalledActivate); ably-cocoa and ably-js generate eagerly at device fetch time. Checked against: - ably-cocoa 745e7b7 - ably-java da4c60f - ably-js 17be43e Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Otherwise, the old token will survive and we'll end up trying to validate it with an absent or non-matching device ID in RSH3a2a. Given that most of our SDKs have not yet implemented RSH8j, it seemed like a good moment to also tighten up the language before we start trying to implement it. The spec provides no mechanism for the state machine to perform a state transition outside of the context of receiving an event. So instead of talking about a transition, we make it clear that LocalDevice load failure should always be handled before the state machine is hydrated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6cf8bd6 to
8ce3ee1
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.
A couple of minor bits and then a replacement of RSH8j (which is not implemented in most of our SDKs AFAIK — the important one in which it's not implemented is ably-cocoa since that's the one in which load failure is likely to happen, tracked in ably/ably-cocoa#1257). Intention is to make sure that you don't end up with a
deviceIdentityTokenthat belongs to a previousidand to make it clearer how to implement "becomeNotActivated".See commit messages for more details.