test(sessions): add replay consistency harness for sessions memory and summaries#116
Open
coder-mtj wants to merge 2 commits into
Open
test(sessions): add replay consistency harness for sessions memory and summaries#116coder-mtj wants to merge 2 commits into
coder-mtj wants to merge 2 commits into
Conversation
…d summaries Add a multi-backend replay consistency test framework that drives InMemory and SQLite backends with the same deterministic replay cases, normalizes non-business differences, compares snapshots, and writes a structured diff report. Key features: - 10 replay cases: single/multi-turn, tool calls, state updates, memory write/read, summary generation/overwrite/truncation, track events, concurrent writes, error recovery. - Normalized snapshot comparison for events, state, memory, summaries, and tracks. - Structured diff report (session_memory_summary_diff_report.json). - Supports InMemory and SQLite backends. - Mirrors the Go implementation in trpc-agent-go/session/replaytest/ for shared fixtures and cross-language verification. Resolves trpc-group#89
Fix the summary injection test and state/memory injection test assertions to correctly extract top-level sections from diff paths containing array indices (e.g., 'events[0].text' -> 'events').
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
==========================================
Coverage ? 87.51506%
==========================================
Files ? 467
Lines ? 44005
Branches ? 0
==========================================
Hits ? 38511
Misses ? 5494
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
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.
Description
Add a multi-backend replay consistency test framework for Session/Memory/Summary. Drives InMemory and SQLite backends with the same 10 deterministic replay cases, normalizes non-business differences, compares snapshots, and writes a structured diff report.
Related Issue
Fix #89
Change Type
Key Features
Test Coverage
3 tests all passing: full replay matrix, summary injection detection, state/memory injection detection
Self-test Checklist