Repository navigation
Conversation
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.
Describe what this PR does / why we need it
When a stored record cannot be decoded, all three Redis clients currently drop it and return the remaining messages as a complete conversation. This can lose context, including messages between a tool call and its response.
Does this pull request fix one issue?
Fixes #52
Describe how you did it
Jedis, Lettuce and Redisson now decode the list in order and fail the read at the first unreadable record. The exception identifies its zero-based position without including the record or the parser exception. Reads do not modify the stored list. The README documents the change for applications that previously relied on partial reads.
Describe how to verify it
Run the Redis memory module against an isolated standalone Redis using its existing
-Dredis.test.port=<port>option. With Java 21 and Redis 7.0.15, all nine focused integration cases failed on the unchanged implementation and passed with the fix. They cover a corrupt middle record, tool call/response order, all-unreadable records, legacy and empty histories, unchanged stored records, and safe diagnostics. The module run had 86 passes, no failures or errors, and 57 Docker-dependent tests skipped.Special notes for reviews
No migration or write-path changes. The existing decoder still accepts legacy formats and retains its existing behavior for unknown types. This changes how a failed decode is handled, not which message schemas are supported.