Repository navigation
Conversation
Remove stored message bodies, untrusted type values, and exception details from deserialization diagnostics. Preserve existing read behavior and cover INFO/DEBUG logs with offline and real Redis regression tests. Fixes agentic-ai-java#54
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
Redis chat-memory deserialization logs currently expose stored message text through ERROR log arguments, DEBUG JSON dumps, field-conversion exception messages, and unrecognized message-type values. Exception causes and stack traces can also contain source data even when the first-level log template is sanitized.
This PR removes those content-bearing diagnostics while retaining useful error categories and input length. It does not change damaged-record handling.
Does this pull request fix one issue?
Fixes #54
Describe how you did it
Describe how to verify it
With an isolated standalone Redis on port 16380:
mvn -B -ntp -pl memory-repository/argi-model-chat-memory-repository-redis -am \ -Dtest=RedisDeserializationLoggingTest,RedisDeserializationLoggingIntegrationTest \ -Dredis.test.port=16380 -Dcheckstyle.skip=false testThe integration suite can alternatively start a Redis container when Docker is available. It deletes only its uniquely named test keys and never flushes a database.
Verified locally with JDK 21 and Redis 7.0.15:
git diff --checkpassed.Special notes for reviews
Five files change: two production classes, two test classes, and the existing README. This branch is based on main and does not include the separate key-prefix fix in #71.
No changes to serialization, public APIs, stored records, or damaged-message read policy are included. Actual malformed-field errors in the current Jackson version are still rejected; the existing IllegalArgumentException fallback branches are tested separately with synthetic failures.
Applications parsing the previous log templates should update their queries. There is no new message-body logging opt-in, raw conversation-ID label, or content hash. Existing request/trace context can be used for correlation. Standalone Redis verification does not certify TLS or Redis Cluster behavior.