feat: add scope and shared_with columns for multi-scope memory (PR 1/3)#42
Open
kenyonxu wants to merge 1 commit into
Open
feat: add scope and shared_with columns for multi-scope memory (PR 1/3)#42kenyonxu wants to merge 1 commit into
kenyonxu wants to merge 1 commit into
Conversation
…a only) Add scope (TEXT, default 'personal') and shared_with (TEXT, nullable) columns to 5 core tables, plus composite indexes on (scope) and (profile_id, scope): - memories - atomic_facts - canonical_entities - temporal_events - graph_edges Models updated with scope/shared_with fields. Migration M016 handles ALTER TABLE for existing databases — all existing data defaults to 'personal' for full backward compatibility. This is PR 1/3 of the multi-scope memory feature — pure storage layer. No retrieval logic or interface changes included. Ref: qualixar#20
This was referenced Jun 15, 2026
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
PR 1/3 of the multi-scope memory feature (RFC #20).
Adds
scopeandshared_withcolumns to 5 core tables for multi-scope memory support (personal / shared / global). Pure schema change — no retrieval or interface modifications.Changes
storage/schema.pyscope TEXT NOT NULL DEFAULT 'personal'andshared_with TEXTto 5 tables + 10 composite indexesstorage/models.pyscope/shared_withfields to 5 dataclasses (MemoryRecord, AtomicFact, CanonicalEntity, GraphEdge, TemporalEvent)storage/migrations/M016_add_scope_support.pystorage/migration_runner.pyDesign
scope='personal'Dependencies
Test Results
test_cache_exact_replay_all_byte_identicalon Ubuntu,test_vscode_user_dir_darwinon macOS) are pre-existing upstream issues — reproducible on the upstream main branch CI.Ref: #20