test(sessions): add session/memory multi-backend replay consistency framework#125
Open
coder-mtj wants to merge 10 commits into
Open
test(sessions): add session/memory multi-backend replay consistency framework#125coder-mtj wants to merge 10 commits into
coder-mtj wants to merge 10 commits into
Conversation
15 tests covering event normalization (author, text, state_delta) and snapshot normalization (session_id, state, events, memories, summaries). Signed-off-by: coder-mtj <coder-mtj@users.noreply.github.com>
15 tests covering recursive diff on dicts, lists, primitives, nested structures, and full session snapshots. Signed-off-by: coder-mtj <coder-mtj@users.noreply.github.com>
10 replay scenarios defined in cases.py with round-trip JSONL fixture support. Mirrors Go trpc-agent-go session/replaytest. Signed-off-by: coder-mtj <coder-mtj@users.noreply.github.com>
- test_replay_consistency.py: InMemory vs SQLite 10-case E2E - test_replay_redis.py: env-var-gated Redis vs InMemory/SQLite - 379 passed, 3 skipped (Redis), 0 new failures Signed-off-by: coder-mtj <coder-mtj@users.noreply.github.com>
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #125 +/- ##
==========================================
Coverage ? 87.51534%
==========================================
Files ? 467
Lines ? 44006
Branches ? 0
==========================================
Hits ? 38512
Misses ? 5494
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
建议给出一些设计文档,使用说明,方便复现效果,另外也可以提供一下完成这个项目的提示词,如果提示词不方便展示,可以邮件发送我 |
- design-en.md: English architecture design document - usage.md: Usage guide with reproduction steps - ai-prompts.md: AI-assisted development prompts (4 rounds) - Include existing design.md, test-plan.md, summary.md Response to reviewer feedback from raychen911.
Author
@raychen911 感谢 review!已补充设计文档和 AI 提示词: 新增文档(docs/issue-89-replay-consistency/)
AI 提示词要点项目架构(10 个 ReplayCase 设计、normalize_event/normalize_snapshot 归一化规则、recursive_diff 算法、JSONL fixture 格式、多后端 gating 策略)均由我亲自设计,AI 执行编码。4 轮对话:
完整提示词见 PR 中的 docs/issue-89-replay-consistency/ai-prompts.md。 |
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 6, 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.
Description | 描述
构建 Session/Memory/Summary 多后端回放一致性测试框架。
驱动 InMemory 和 SQLite 后端用同一组确定性 replay case 归一化比较,
输出结构化 diff 报告。Redis 后端通过
REDIS_URLenv var 按需启用。Closes #89
Change Type | 修改类型
Files Changed
tests/sessions/replay_consistency/— 模块化框架cases.py— 10 个 ReplayCase 定义 + JSONL load/savenormalizer.py— Event/Snapshot 归一化comparator.py— 递归 diff 引擎fixtures/— 10 个.jsonlreplay fixture 文件test_normalizer.py— 15 个归一化单元测试test_comparator.py— 15 个比较器单元测试test_cases.py— 9 个 case 定义/fixture 测试tests/sessions/test_replay_consistency.py— 主测试(InMemory vs SQLite E2E)tests/sessions/test_replay_redis.py— Redis 后端测试(env-var gated)Test Coverage | 测试覆盖
REDIS_URLnot setSelf-test Checklist | 自测清单