8000 Create non-existent projects when adding semantic memories by mwqgithub · Pull Request #661 · MemMachine/MemMachine · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@mwqgithub
Copy link
Contributor
@mwqgithub mwqgithub commented Dec 2, 2025

Purpose of the change

Create non-existent projects when adding semantic memories. Currently we will only create non-existent projects when adding episodic memories. We should also create non-existent projects when adding semantic memories.

Description

Create non-existent projects when adding semantic memories. Currently we will only create non-existent projects when adding episodic memories. We should also create non-existent projects when adding semantic memories.

Fixes/Closes

Fixes #649

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Unit Test
  • Manual verification (list step-by-step instructions)

Checklist

[Please delete options that are not relevant.]

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project (See STYLE_GUIDE.md)
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

@mwqgithub mwqgithub force-pushed the fix-semantic-memory branch 2 times, most recently from 5c7095d to 70d264f Compare December 2, 2025 09:47
@o-love o-love requested a review from malatewang December 2, 2025 18:15
@mwqgithub mwqgithub force-pushed the fix-semantic-memory branch 2 times, most recently from effc561 to 057be70 Compare December 3, 2025 01:37
)
episode_ids = [e.uid for e in episodes]

if await self.get_session(session_data.session_key) is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is expensive and introduces a race condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added an exist_ok argument to create_session to ensure that if two requests reach self.create_session at the same time, neither of them will fail. Is this ok?

@mwqgithub mwqgithub force-pushed the fix-semantic-memory branch 17 times, most recently from 041472b to d8c04a1 Compare December 5, 2025 01:19
@jgong
Copy link
Contributor
jgong commented Jan 7, 2026

Hi @mwqgithub! Would you mind taking another look at this PR? Once we get that conflict cleared up, feel free to request a review again and we can get this moving forward!

@mwqgithub mwqgithub force-pushed the fix-semantic-memory branch 3 times, most recently from c987225 to a9e5e4e Compare January 9, 2026 07:39
@mwqgithub mwqgithub requested a review from malatewang January 9, 2026 07:54
@mwqgithub mwqgithub force-pushed the fix-semantic-memory branch from a9e5e4e to 0b296b2 Compare January 15, 2026 01:40
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.

[Bug][v2]: The project is not created when adding a new semantic memory with new project

3 participants

0