Skip to content

fix: Handle JSON deserialized State.REMOVED sentinel#1007

Closed
copybara-service[bot] wants to merge 1 commit intomainfrom
test_881521527
Closed

fix: Handle JSON deserialized State.REMOVED sentinel#1007
copybara-service[bot] wants to merge 1 commit intomainfrom
test_881521527

Conversation

@copybara-service
Copy link
Copy Markdown

fix: Handle JSON deserialized State.REMOVED sentinel

The State.REMOVED sentinel object is serialized to a specific string in JSON. When deserialized, this becomes a String object, not the original sentinel instance. This change updates the logic to correctly identify removals when the value is either the State.REMOVED object or its string representation.

Additionally, when applying state deltas from app/user state, removals are now handled using a new removeWithoutDelta method on the State object to avoid re-recording these removals as new deltas.

@copybara-service copybara-service Bot force-pushed the test_881521527 branch 4 times, most recently from 56e6c4e to b227dab Compare March 10, 2026 20:38
The State.REMOVED sentinel object is serialized to a specific string in JSON. When deserialized, this becomes a String object, not the original sentinel instance. This change updates the logic to correctly identify removals when the value is either the State.REMOVED object or its string representation.

Additionally, when applying state deltas from app/user state, removals are now handled using a new removeWithoutDelta method on the State object to avoid re-recording these removals as new deltas.

PiperOrigin-RevId: 881521527
@copybara-service copybara-service Bot closed this Mar 11, 2026
@copybara-service copybara-service Bot deleted the test_881521527 branch March 11, 2026 00:02
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