fix(memory): scope LanceDB identities across projects - #407
Open
essentiaMarco wants to merge 2 commits into
Open
fix(memory): scope LanceDB identities across projects#407essentiaMarco wants to merge 2 commits into
essentiaMarco wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #320.
Owner-scoped LanceDB rows did not include application and project scope in their primary key, so identical logical identifiers could overwrite one another across projects.
Area
Compatibility and migration
Public response ID shapes and the existing mixed-case validation for sender and owner identifiers remain unchanged.
This change introduces a stricter contract for app_id and project_id:
Before upgrading an existing memory root, both its source directories and retained SQLite scope values must be audited.
Verification
All commands passed on macOS with Python 3.12.13:
The real-LanceDB matrix covers all six owner-scoped schemas for cross-project coexistence, replay idempotency, isolated updates, injectivity, and public response-ID compatibility where exposed. Separate cascade, marker, API/CLI lifecycle, and multiprocess lock tests cover end-to-end indexing, migration gates, failed or interrupted rebuilds, serialized first boot, cancellation-safe cleanup, and rebuild exclusion.
Credentialed live-provider tests were not run as part of this verification.
Checklist
Notes for Reviewers
A markerless root initializes generation 2 automatically only when it contains neither extracted-memory source Markdown nor LanceDB artifacts. Existing source or projection data without a current marker fails closed.
If rebuild fails or is interrupted after publishing REBUILDING, normal startup and mutating cascade commands remain blocked. Correct the underlying problem and rerun everos cascade rebuild --yes with the server stopped.
By submitting this pull request, I agree that my contribution is licensed under
the Apache License 2.0.