test(sessions): add Session/Memory/Summary multi-backend replay consistency framework#1
Open
coder-mtj wants to merge 26 commits into
Open
test(sessions): add Session/Memory/Summary multi-backend replay consistency framework#1coder-mtj wants to merge 26 commits into
coder-mtj wants to merge 26 commits into
Conversation
- 原因:没有移除思考内容及做中间轮工具调用Event的检测 - 解决方案:使用Event.is_final_response保证是LLM最后一个结果,然后移除最后一个结果的思考内容
Allow the Runner's app identity to differ from the A2A service_name by adding an optional app_name parameter. Falls back to service_name when not provided, preserving existing behavior for all current callers. Co-authored-by: Cursor <cursoragent@cursor.com>
…ion (trpc-group#145) list_sessions 的 user_id 参数改为可选,传 None 时返回指定 app 下 所有用户的会话列表(不含 events)。InMemory/SQL/Redis/EvalSessionService 实现统一调整,并补充中英文文档用法说明及单元测试。
- Fix pip install command by enclosing extras in double quotes - Remove extra spaces and normalize casing in extra packages list - Ensure command works correctly for installing optional dependencies
- Removed extra spaces within the optional dependencies list - Added quotes around the dependency list to ensure proper bash parsing - Corrected capitalization for consistency in package names
- 在模型支持重试的特性支持里,把这个信息打印给移除了,现在修复这个问题
* AI review prompt * Extend example_timeout_second in all_example_test
Feature: - 参考claude code 的工具设计、提示词设计进行框架plan mod能力的设计与实现。 - 支持模型主动进入plan 模式 & 用户主动选择plan模式。 - 支持agui 解析 toolset能力 BugFix: - 修复agui协议传递state数据无法有效更新问题。 Doc: - 支持plan mod指引文档。 - 单独列出todowrite、task、goal的指引文档。
- 接入tavily到websearch及webfetch工具 - 补充单测及文档
…stency framework Add a comprehensive replay consistency test harness for Session, Memory, and Summary backends (closes trpc-group#89). Key components: - 20 deterministic replay cases (10 core + 10 enhanced: Chinese, emoji, nested payloads, large batches, etc.) - 4-stage pipeline: load -> replay -> normalize -> compare -> report - Deterministic summarizer (no LLM dependency) - Recursive comparator with structured DiffEntry - JSONPath-based allowed_diff with governance limits - Jaccard semantic similarity for summary text comparison - Two-layer mutation injection (snapshot + end-to-end backend) - Schema v3 diff report with field-level location Tests: 57 tests covering normalizer, comparator, allowed_diff, summary_checks, E2E replay, and fault injection. Lightweight mode (InMemory vs SQLite): ~2s, well within 30s SLO. Files: - tests/sessions/replay_consistency/ (11 modules) - tests/sessions/test_replay_consistency.py - tests/sessions/test_replay_injections.py - tests/sessions/test_replay_unit.py - tests/sessions/test_summary_checks.py - docs/issue-89-replay-consistency/ (design + usage) Signed-off-by: coder-mtj <coder-mtj@users.noreply.github.com>
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 | 描述
This PR adds a comprehensive Session/Memory/Summary multi-backend replay consistency test framework.
4-stage pipeline:
load → replay → normalize → compare → reportKey Features | 核心特性
_compress_session_to_summary()for stable output without LLM[*]wildcard, mandatory reason, governance limits (≤8 per case, ≤10% ratio)Backend Coverage | 后端覆盖
TRPC_AGENT_REPLAY_SQL_URLTRPC_AGENT_REPLAY_REDIS_URLTest Results | 测试结果
Design Documentation | 设计文档
See docs/issue-89-replay-consistency/design.md for normalization strategy, summary comparison strategy, allowed_diff rules, and backend integration.
Related Issue | 关联 Issue
Fix trpc-group#89
Change Type | 修改类型
Test Coverage | 测试覆盖
Self-test Checklist | 自测清单