Files
cleveragents-core/features/memory_service_coverage.feature
T

43 lines
2.0 KiB
Gherkin

Feature: Memory Service Coverage
As a developer
I want to exercise memory service behavior
So that uncovered logic gains test coverage
Scenario: Conversation adapter returns buffer text when configured for summaries
Given a conversation adapter configured to return text values
When I load memory variables from the adapter
Then the adapter provides a string buffer representation
Scenario: Conversation adapter handles nested context and async operations
Given a conversation adapter with prune tracking
When I save nested user and ai context through the adapter
And I invoke the adapter async operations
Then the adapter normalizes all values and prunes history three times
Scenario: Memory service prunes history to the configured window
Given a memory service limited to 3 messages
When I add five interactions via save context
And I ask for the two most recent messages
And I ask for more messages than available
Then the service keeps only the three latest messages
And the recent message requests respect their sizes
And the service summary honors a 20 character limit
And memory variables expose history and counts
Scenario: Memory service manages direct messages and adapters
Given a memory service with default settings
When I add direct message objects to the service
And I inspect the default conversation adapter
And I reset the max message limit to 1
And I save a new interaction to enforce pruning
And I clear the service memory
Then the service computed token counts and summaries before clearing
And the service history is empty after clearing
And a custom conversation adapter returns text values
Scenario: Memory service uses SQL chat history when available
Given a patched SQL chat history for memory service
When I create a memory service with a connection string
Then the SQL history constructor receives the session and connection
And stored messages flow through the patched SQL history