Repository navigation
fix: Ignore FDv2 put-object and delete-object events with unsupported kinds - #2109
Open
kinyoklion wants to merge 1 commit into
Open
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
… kinds The FDv2 protocol handler now drops put-object and delete-object events whose kind has no registered object processor, logging at debug level. Previously an unsupported kind on put-object was dropped with a warning, and on delete-object it was forwarded into the payload, where the server SDK applied it to the data store and a persistent store failed to write it. Kind lookup uses an own-property check so kinds that name inherited object members are not treated as supported.
Contributor
|
@launchdarkly/js-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk size report |
Contributor
|
@launchdarkly/js-client-sdk-common size report |
kinyoklion
marked this pull request as ready for review
October 19, 2026 22:54
This branch has not been deployed
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 protocol handler checked the kind on put-object (with a warning per object) but not on delete-object, so an unknown-kind delete reached the server payload listener: the in-memory store kept it under an unknown namespace, and the persistent store wrapper threw in
sortDataSetduring init, leaving the store unavailable. Put-object and delete-object now drop kinds without a registered processor at debug level. The check is an own-property lookup, so kinds such asconstructoror__proto__no longer resolve to inherited object members. A supported kind whose processor rejects the object still warns.Tests
protocolHandler.test.tscovers unknown puts and deletes mixed with known objects, built-in member names as kinds, and the known-kind rejection warning;PollingProcessorFDv2.test.ts(server) andStreamingFDv2Base.test.ts(client) check only known updates are delivered with no warnings. common 642/642, sdk-server 1551 passed / 7 skipped, sdk-client 874/874; oxlint and oxfmt clean.SDK-3341. Covers the delete-object and
sortDataSetitems of SDK-3086; its remaining persistence hardening is not part of this change.Note
Overview
FDv2 protocol handling now treats unknown object kinds the same on put-object and delete-object: events whose
kindhas no registered processor are dropped at debug (not warn), so future payload kinds do not break older SDKs or poll into the data store.Supported-kind filtering uses an own-property check on
objProcessors, so kinds likeconstructoror__proto__no longer match inherited object members. Rejection by a processor for a known kind still warns and drops the object.Tests cover mixed supported/unsupported streams, inherited member names, processor rejection, and end-to-end streaming/polling paths (only known updates delivered, no warn/error logs).
Reviewed by Cursor Bugbot for commit 77d2d24. Bugbot is set up for automated code reviews on this repo. Configure here.