Skip to content

fix(database): allow nullable resource_id in InMemory and SQLite backends#362

Open
h0ll0w-AkuZr0guY wants to merge 1 commit intoNevaMind-AI:mainfrom
h0ll0w-AkuZr0guY:fix/issue-318-resource-id
Open

fix(database): allow nullable resource_id in InMemory and SQLite backends#362
h0ll0w-AkuZr0guY wants to merge 1 commit intoNevaMind-AI:mainfrom
h0ll0w-AkuZr0guY:fix/issue-318-resource-id

Conversation

@h0ll0w-AkuZr0guY
Copy link
Copy Markdown

📝 Pull Request Summary

This PR makes the resource_id parameter optional (str | None = None) in the InMemory and SQLite database backends, aligning their signatures with the PostgreSQL backend and resolving a runtime TypeError.


✅ What does this PR do?

  • Updates the MemoryItemRepo protocol in src/memu/database/repositories/memory_item.py to allow resource_id: str | None = None.
  • Updates create_item and create_item_reinforce methods in the InMemory backend (inmemory/repositories/memory_item_repo.py).
  • Updates create_item and create_item_reinforce methods in the SQLite backend (sqlite/repositories/memory_item_repo.py).

🤔 Why is this change needed?


🔍 Type of Change

Please check what applies:

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / cleanup
  • Other (please explain)

✅ PR Quality Checklist

  • PR title follows the conventional format (feat:, fix:, docs:)
  • Changes are limited in scope and easy to review
  • Documentation updated where applicable
  • No breaking changes (or clearly documented)
  • Related issues or discussions linked

📌 Optional

  • Screenshots or examples added (if applicable)
  • Edge cases considered
  • Follow-up tasks mentioned

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: InMemory/SQLite backends fail with missing resource_id

1 participant