Skip to content

Fix: STLTMemory popped memories not consolidating (issue #107)#207

Open
Harshitmehra-270709 wants to merge 2 commits intomesa:mainfrom
Harshitmehra-270709:fix/issue-107-stltmemory-consolidation
Open

Fix: STLTMemory popped memories not consolidating (issue #107)#207
Harshitmehra-270709 wants to merge 2 commits intomesa:mainfrom
Harshitmehra-270709:fix/issue-107-stltmemory-consolidation

Conversation

@Harshitmehra-270709
Copy link

Description

This PR addresses issue #107 where STLTMemory was dropping popped short-term memories instead of consolidating them into long-term memory, and conversely prompting the LLM with the remaining active entries.

Changes

  • Modified st_lt_memory.py: accurately pops consolidation_capacity items when capacities overflow.
  • Fixed the consolidation prompt to build formatting specifically for popped memories rather than the entire remaining short text queue.
  • Added comprehensive unit tests in tests/test_memory/test_STLT_memory.py to assert exactly $k$ items are removed and exclusively sent for summarization.

Related Tickets

Fixes #107

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 14, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6261c5b0-cf4e-495d-bf44-ffb8cf2f242d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

Copy link

@IlamaranMagesh IlamaranMagesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is duplicate of #166. Please take a look at #107

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.

STLTMemory loses popped memories instead of consolidating them into long-term memory

2 participants