Repository navigation
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 51618e8. Configure here.
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
FeatureStoreCoreandAsyncFeatureStoreCorenow take and return serialized items, which is how the persistent store interfaces in the Go SDK and js-core already work. Each item reaches a core as a newSerializedItemDescriptor, which holds the version, the deleted flag, and the item as an opaque JSON string. A core stores and returns these strings without knowing the data model.CachingStoreWrapperandAsyncCachingStoreWrappernow handle serialization, tombstone encoding and version reconciliation. A core can store the version and the deleted state in their own fields, or only inside the serialized string. In the second case it returns a version of 0, and the wrapper reads both values from the string.Breaking changes for custom store cores:
get_internalreturns aSerializedItemDescriptoror None, andget_all_internalreturns a mapping of keys to descriptors.init_internalreceives descriptors.upsert_internal(kind, key, item)takes the key and a descriptor, and returns True if it applied the write. If the version check rejected the write, the wrapper re-reads the item, so the cache doesn't keep an older version.VersionedDataKindgainsserializeanddeserializehelpers for core authors. The bundled Redis, DynamoDB and Consul cores, sync and async, now use the new interface.Note
Overview
Persistent store cores (
FeatureStoreCore/AsyncFeatureStoreCore) now exchangeSerializedItemDescriptor(version, deleted flag, opaque JSON string) instead of plain dicts, matching Go and js-core.CachingStoreWrapperandAsyncCachingStoreWrapperown serialization, tombstone handling, and version reconciliation when a core stores only the JSON blob (version0means “read from string”).Breaking changes for custom cores:
init_internaland reads return descriptors;upsert_internal(kind, key, item)returnsbool(applied vs rejected) instead of returning the winning item. On a rejected upsert, the wrapper re-reads the core when caching is enabled so stale entries are not kept.VersionedDataKindaddsserialize/deserializefor version checks on string-only backends.Bundled Redis, DynamoDB, and Consul cores (sync and async) are migrated; tests and
ldclient/testing/serialized_itemshelpers follow the new contract.Reviewed by Cursor Bugbot for commit 51618e8. Bugbot is set up for automated code reviews on this repo. Configure here.