Repository navigation
fix: Write a JSON tombstone for deleted items in the DynamoDB store - #269
Merged
Merged
Conversation
The DynamoDB store wrote the string "null" as the item of a deleted flag or
segment. SDKs in other languages and the Relay Proxy fail a whole bulk read
on that value. Store the SDK's serialized tombstone ({"version":N,"deleted":true})
instead, as the Redis and Consul stores do. The store still reads "null" as a
deleted item, so tables written by older versions keep working.
Remove the contract test suppression for DynamoDB data source deletions.
Generated-by: termag
There was a problem hiding this comment.
Risk: medium.
Automated risk review (dry run): Medium
This PR would not be automatically approved. Human approval required.
Why: DynamoDbDataStoreImpl now writes JSON tombstones for deleted flags and segments instead of the string "null", which is a persistent-store write-format change that other SDKs and Relay read from the same table. Tests cover the new writes and legacy "null" reads, but this is still a medium-risk behavior change, so human approval is needed and no reviewers were assigned.
If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.
Sent by Cursor Approval Agent: Dry-Run PR Approver
kinyoklion
approved these changes
Nov 19, 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
The DynamoDB store wrote the
itemattribute of a deleted flag or segment as the string"null". Other SDKs that read the same table fail on it: the Go SDK and the Relay Proxy fail the whole read of the kind, Python'sall()raises, Ruby raises, and PHP'sgetAllFeaturesthrows a TypeError.The store now writes the tombstone JSON that the SDK passes in,
{"version":N,"deleted":true}, the same as the Redis and Consul stores. If the serialized item is null, it builds the same JSON from the data kind. It still reads a"null"item as deleted, so tables written by older versions keep working. New unit tests cover the stored tombstone on upsert and init, and the legacy placeholder throughgetandgetAll.The contract test service uses the published DynamoDB store, so the
persistent data store/dynamodb/read-write/data source deletions respect versioningsuppression stays until a release with this fix is out and the service's store version is bumped. Against a local build of this store, that test passes on the v2 and v3 harness.Opened from termag
Note
Overview
Fixes deleted-item persistence in the DynamoDB data store so deleted flags/segments are written as standard tombstone JSON (
{"version":N,"deleted":true}) instead of the literal"null"string, matching Redis/Consul and keeping the table readable by other SDKs and Relay Proxy.marshalItemnow persists the SDK’s serialized tombstone when present, and synthesizes the same JSON viaDataKind.serialize(ItemDescriptor.deletedItem(...))when the serialized payload is null.unmarshalItemstill treats legacy"null"values as deleted, so older table data keeps working.New DynamoDbDataStoreImplTest cases assert tombstone JSON on upsert and init, null-serialized deletes, and legacy placeholder behavior through get and getAll.
Reviewed by Cursor Bugbot for commit 730f22d. Bugbot is set up for automated code reviews on this repo. Configure here.