Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions session_memory_summary_diff_report.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"description": "Sample field-level replay diff report for Session / Memory / Summary consistency tests.",
"allowed_diff_policy": [
"Event ids and timestamps are normalized before comparison.",
"Summary ownership, summary text, event counts, state values, memory text, and tool payloads are compared exactly.",
"Backend-specific differences must be listed by exact field path, never by broad wildcard."
],
"sample_diffs": [
{
"case_id": "summary_update",
"session_id": "replay-session",
"event_index": null,
"summary_id": "replay-session",
"field_path": "$.summary.session_id",
"expected": "replay-session",
"actual": "other-session",
"allowed_diff": false
},
{
"case_id": "tool_call_and_response",
"session_id": "replay-session",
"event_index": 2,
"summary_id": null,
"field_path": "$.events[2].parts[0].response.temperature",
"expected": "30C",
"actual": "lost",
"allowed_diff": false
}
]
}
3 changes: 3 additions & 0 deletions tests/sessions/replay_consistency_design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 回放一致性测试设计

框架以 ReplayCase 描述标准输入,由同一驱动器依次执行会话事件、工具调用与响应、状态覆盖、记忆写读及摘要更新,再对 InMemory 与 SQLite 的快照做递归字段比较。快照会剔除随机事件 ID、时间戳等非确定字段,并固定回放事件顺序;摘要归属、正文、计数、状态覆盖关系及工具载荷保持精确比较。每条差异包含用例、会话、事件索引、摘要标识、字段路径和两侧值,后端特例只能按精确路径声明 allowed_diff。轻量测试使用内存数据库,外部 Redis/SQL 集成可通过环境开关启用并在缺少服务时跳过。
Loading
Loading