Conversation
…a mode This test reproduces the issue where Guid fields in observable query items lose their methods (like .equals()) when reconstructed from change sets in delta mode. The regression was introduced in commit b52ecba.
Commit b52ecba introduced delta change-set optimization to reduce bandwidth, but did not deserialize changeSet items into typed model instances. This caused Guid fields (and other strongly-typed fields) to remain as plain JSON objects, losing their methods like .equals(). Solution: Deserialize all changeSet items (added, replaced, removed) using JsonSerializer.deserializeArrayFromInstance before applying delta reconstruction. This ensures Guid fields are properly instantiated as Guid class instances with working methods, fixing downstream components like ChecklistValidation that depend on Guid.equals().
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.
Fixed
.equals()) when reconstructed from change sets in delta mode (guid.equals is not a function #2173)Summary
Commit b52ecba introduced delta change-set optimization to reduce bandwidth by only sending items that were added, replaced, or removed since the last update. However, the change-set items were not being deserialized into typed model instances, causing Guid fields (and other strongly-typed fields) to remain as plain JSON objects and lose their methods.
This fix adds deserialization of all change-set items (added, replaced, removed) using
JsonSerializer.deserializeArrayFromInstancebefore applying delta reconstruction inuseObservableQuery, ensuring Guid fields are properly instantiated and methods like.equals()work correctly.The fix includes a regression test that reproduces the exact failure scenario and ensures this issue doesn't regress in the future.