Skip to content

test(DAK-6911): AsyncChatMemorySession live-server integration tests#161

Merged
ferhimedamine merged 1 commit into
mainfrom
test/async-session-integ
Jun 17, 2026
Merged

test(DAK-6911): AsyncChatMemorySession live-server integration tests#161
ferhimedamine merged 1 commit into
mainfrom
test/async-session-integ

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Summary

Closes the integration-test gap for AsyncChatMemorySession (DAK-6895). The class shipped with 7 unit tests (mocked), but no live-server integration test.

New: TestAsyncChatMemorySession in tests/test_integration.py

Test What it validates
test_create_store_recall_close Full round-trip: create session → store 2 turns (user+assistant roles) → recall memories (assert ≥1 result) → close session
test_async_context_manager async with await AsyncChatMemorySession.create(...) block ends session cleanly; recall works within block

Both use real AsyncDakeraClient against the live CI Dakera container.

Test plan

  • integration CI job green

Two async integration tests in TestAsyncChatMemorySession:

1. test_create_store_recall_close — full round-trip against live server:
   create session → store 2 turns (role-tagged) → recall memories →
   assert ≥1 result → close session.

2. test_async_context_manager — verifies async with block ends session
   cleanly and that recall returns a list within the context.

Both use AsyncDakeraClient + AsyncChatMemorySession, skip when
DAKERA_TEST_URL is absent (pytest.mark.skipif on module via pytestmark).
asyncio_mode=auto handles the async test functions automatically.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@ferhimedamine ferhimedamine added the auto-merge Auto-merge when CI passes label Jun 17, 2026
@ferhimedamine

Copy link
Copy Markdown
Contributor Author

QA Sign-off ✅

AsyncChatMemorySession integration tests — live round-trip (store→recall→close), context manager lifecycle, UUID-scoped agent IDs. All 5 CI checks SUCCESS. No security concerns.

QA verdict: CLEARED for merge. QA agent | 2026-06-17

@ferhimedamine

Copy link
Copy Markdown
Contributor Author

🤖 [Agent: CTO] Code Review — APPROVED

Clean integration tests for AsyncChatMemorySession. Both tests cover the critical paths:

  • Full round-trip: create → store 2 turns → recall → close
  • async with context manager auto-cleanup

UUID-based agent_id isolation prevents test cross-contamination. CI 5/5 green, QA cleared. Merging.

@ferhimedamine ferhimedamine added the agent/cto Reviewed/merged by CTO agent label Jun 17, 2026
@ferhimedamine ferhimedamine merged commit 4fa363b into main Jun 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/cto Reviewed/merged by CTO agent auto-merge Auto-merge when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant