Repository navigation
fix: Ignore FDv2 objects with unrecognized kinds - #468
Merged
Merged
Conversation
put-object and delete-object events whose kind is not flag or segment are now dropped by the streaming and polling parsers before the object is decoded. Previously they were forwarded to the store, which filed any non-flag kind under segments and could overwrite or delete a real segment with the same key.
kinyoklion
marked this pull request as ready for review
October 19, 2026 22:53
keelerm84
reviewed
Oct 26, 2026
keelerm84
approved these changes
Oct 29, 2026
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.
Summary
FDv2 SDKs must silently ignore objects of kinds they do not support, so new kinds can be added to payloads without breaking existing SDKs. The streaming and polling parsers passed any kind into the change set, and
changes_to_store_datafiles every non-flag kind under segments, so an unknown-kind put replaced a real segment with the same key and an unknown-kind delete removed one. The parsers now skip put-object and delete-object events with an unsupported kind beforefrom_h, so the object shape of a new kind cannot fail the payload either. A missingkindis still malformed, and known kinds are unchanged.Tests
New specs in
streaming_synchronizer_spec.rbandpolling_payload_parsing_spec.rbmix unknown-kind puts and deletes with known objects and check only the known changes remain, with no warn/error logs on streaming (both failed before the change).spec/impl/data_system+spec/impl/data_store220 examples, 0 failures; rubocop clean.SDK-3340
Note
Overview
FDv2 put-object and delete-object events whose
kindis not flag or segment are now skipped in both polling and streaming parsers, via newProtocolV2.unsupported_kind?, so payloads can include future kinds without failing or mutating local state.Previously, unknown kinds still entered the change set and were applied as segments in
changes_to_store_data, which could overwrite or delete real segments by key.Both paths also validate shape earlier: event
datamust be an object andkindmust be a string (polling returns a failed result; streaming raisesArgumentError). Malformed events are still rejected; only unrecognized string kinds are ignored.Reviewed by Cursor Bugbot for commit f60707b. Bugbot is set up for automated code reviews on this repo. Configure here.