Skip to content

test: add session memory summary replay consistency harness#180

Open
March-77 wants to merge 1 commit into
trpc-group:mainfrom
March-77:agent/session-memory-replay-consistency
Open

test: add session memory summary replay consistency harness#180
March-77 wants to merge 1 commit into
trpc-group:mainfrom
March-77:agent/session-memory-replay-consistency

Conversation

@March-77

Copy link
Copy Markdown

Summary

  • add a reusable Session / Memory / Summary replay consistency harness
  • compare InMemory, SQLite, and a Redis-compatible mock through a common backend interface
  • normalize generated IDs, timestamps, ordering, memory results, and summary metadata
  • provide explicit allowed-difference handling and field-level JSON reports
  • cover normal conversations, tool calls, state, memory, summary generation/truncation, retries, and injected inconsistencies

Why

Applications often move from in-memory storage to persistent Session and Memory backends. This harness makes backend differences reproducible and detects event loss, duplicate writes, state corruption, memory loss, summary loss, summary overwrite errors, and wrong-session ownership without requiring Redis or MySQL locally.

Validation

  • python -m pytest tests/sessions/test_replay_consistency.py -q — 2 passed
  • git diff --check
  • generated session_memory_summary_diff_report.json includes backend, case, field path, event/summary identifiers, and both compared values

Closes #89

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@e113610). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             main        #180   +/-   ##
==========================================
  Coverage        ?   87.58588%           
==========================================
  Files           ?         467           
  Lines           ?       44103           
  Branches        ?           0           
==========================================
  Hits            ?       38628           
  Misses          ?        5475           
  Partials        ?           0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@March-77

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@March-77

Copy link
Copy Markdown
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

构建 Session / Memory 多后端回放一致性测试框架

1 participant