Commit 1f99f39
authored
fix(memory): enforce strict session retrieval semantics (#185)
## Summary
- thread strict session retrieval options through API, service, storage, and MCP
- skip graph retrieval when strict session scope is requested and keep default cross-session semantics unchanged
- add a strict scoped vector fallback plus REST/MCP regressions covering issue #184 semantics
## Testing
- DATABASE_URL=mysql://root:111@localhost:6001/memoria_test SQLX_OFFLINE=true cargo test -p memoria-storage --test store_crud test_search_vector_from_filtered_scoped_prefilters_by_session -- --nocapture
- DATABASE_URL=mysql://root:111@localhost:6001/memoria_test SQLX_OFFLINE=true cargo test -p memoria-storage --test store_crud test_search_vector_from_filtered_scoped_fills_limit_with_session_candidates -- --nocapture
- DATABASE_URL=mysql://root:111@localhost:6001/memoria_test SQLX_OFFLINE=true cargo test -p memoria-api --test api_e2e test_retrieve_filter_session_prefilters_and_skips_graph -- --nocapture
- DATABASE_URL=mysql://root:111@localhost:6001/memoria_test SQLX_OFFLINE=true cargo test -p memoria-api --test api_e2e test_retrieve_filter_session_preserves_top_k_with_session_candidates -- --nocapture
- DATABASE_URL=mysql://root:111@localhost:6001/memoria_test SQLX_OFFLINE=true cargo test -p memoria-api --test api_e2e test_mcp_memory_retrieve_filter_session_end_to_end -- --nocapture
Fixes #184
Approved by: @XuPeng-SH1 parent 897d6d5 commit 1f99f39
9 files changed
Lines changed: 984 additions & 172 deletions
File tree
- memoria/crates
- memoria-api
- src
- routes
- tests
- memoria-mcp/src
- memoria-service/src
- memoria-storage
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
214 | 221 | | |
215 | 222 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 223 | + | |
227 | 224 | | |
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
231 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | | - | |
235 | | - | |
| 237 | + | |
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
242 | | - | |
| 244 | + | |
243 | 245 | | |
244 | 246 | | |
245 | | - | |
246 | | - | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
0 commit comments