test(sessions): add replay consistency harness across session, memory and summary backends#162
Open
k0mondor wants to merge 5 commits into
Open
test(sessions): add replay consistency harness across session, memory and summary backends#162k0mondor wants to merge 5 commits into
k0mondor wants to merge 5 commits into
Conversation
Add reusable replay cases and backend adapters for session, memory, and summary consistency checks across InMemory, SQLite, and optional Redis. Cover cross-session memory, mid-replay restart, and state namespace round-trips, and fix summary lineage persistence plus Redis app/user state compatibility uncovered by the new suite.
Extend replay snapshots to retain all session aliases, preserve memory query observations across restarts, and allow runtime faults to target non-active sessions. Add cross-user isolation coverage plus targeted harness tests for duplicate query names and restart-stable memory observations.
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Rook1ex
added a commit
to trpc-group/cla-database
that referenced
this pull request
Jul 11, 2026
…ency-harness git commitgit commit#:wq::q!:q!:q!q!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #162 +/- ##
==========================================
Coverage ? 87.56283%
==========================================
Files ? 467
Lines ? 44166
Branches ? 0
==========================================
Hits ? 38673
Misses ? 5493
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
This PR adds a reusable replay consistency harness for Session / Memory / Summary backends.
It replays the same deterministic cases across
InMemory,SQLite, and optionalRedis, then compares normalized snapshots for events, state, memory, and summaries.Design Note
本框架使用统一
ReplayCase/ReplayStep驱动InMemory、SQLite与可选Redis,回放同一条对话轨迹后抽取event/state/memory/summary快照做归一化比较。归一化仅消除非业务噪声,如时间戳精度、自动生成 id 与序列化顺序,不忽略真实语义差异。summary 比较分为内容语义与存储元数据两层,严格校验session_id、summary_id、version、replaces。持久化后端在快照前支持重启读回,Redis 通过环境变量启用,轻量模式默认运行InMemory + SQLiteCoverage
InMemoryvs persistent backend comparison (SQLite, optionalRedis)How To Test