You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+19-14Lines changed: 19 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
JP's fork of [milla-jovovich/mempalace](https://github.com/milla-jovovich/mempalace) — a local AI memory system using ChromaDB for verbatim storage and semantic search.
-**Version**: 3.3.1 (merged upstream v3.3.1 on 2026-04-18)
8
+
-**Version**: 3.3.1 on fork main; upstream shipped v3.3.2 on 2026-04-21 (includes our #681/#1000/#1023). Main merged upstream/develop through 2026-04-21 so fork runs post-v3.3.2 code.
9
9
-**Python**: venv at `./venv/`, editable install with dev deps
python -m mempalace.mcp_server # run MCP server standalone
27
27
```
28
28
29
29
Ruff for linting (`ruff check`), line length 100, target Python 3.9.
30
30
31
-
## Fork Changes (still ahead of upstream after v3.3.1 merge)
31
+
## Fork Changes (still ahead of upstream after v3.3.2 merge)
32
32
33
33
1.**feat: bulk_check_mined()** — paginated pre-fetch of all source_file/mtime pairs for concurrent mining (fork-only; independent of the mtime comparison fix, which has since been upstreamed)
34
34
2.**feat: similarity threshold** — `max_distance` parameter in search, default 1.5 cosine distance in MCP
@@ -40,19 +40,22 @@ Ruff for linting (`ruff check`), line length 100, target Python 3.9.
40
40
8.**fix: MCP stale HNSW index** — `_get_client()` detects external writes via mtime (not just inode), `mempalace_reconnect` MCP tool
10.**fix: `.blob_seq_ids_migrated` marker** — skip Python `sqlite3.connect()` against a live ChromaDB 1.5.x DB after first successful migration; opening the sqlite file from Python corrupts the next `PersistentClient` call
43
-
11.**feat: `quarantine_stale_hnsw()`** — rename HNSW segment dirs whose `data_level0.bin` is 1h+ older than `chroma.sqlite3`, sidestepping the read-path SIGSEGV from dangling neighbor pointers (same failure mode as neo-cortex-mcp#2, mempalace#823)
43
+
11.~~**feat: `quarantine_stale_hnsw()`**~~ — **merged upstream via #1000 in v3.3.2.** No longer fork-ahead.
44
44
12.**feat: search warnings + sqlite BM25 top-up** — `search_memories()` returns `warnings: [...]` and `available_in_scope: N` whenever the vector path underdelivers (sparse HNSW after repair, `#951` filter-planner failure, drift). Fallback promotes BM25-ranked sqlite candidates tagged `matched_via: "sqlite_bm25_fallback"`. Closes the "silent 0-hit when data is in sqlite" failure mode. CLI `search()` delegates to `search_memories()` so both paths share the fallback.
45
45
13.**fix: stop_hook_active guard** — guard only applies in block mode; silent mode skips it so Claude Code 2.1.114's plugin dispatch (which sets `stop_hook_active:true` on every fire after the first) doesn't suppress subsequent auto-saves
46
46
14.**fix: `_output()` stdout routing** — uses `sys.modules.get()` to find an already-loaded `mcp_server` and reuse its `_REAL_STDOUT_FD`; otherwise writes directly to fd 1. Avoids importing `mcp_server` cold (which would trigger its stdout→stderr redirect as a side effect). Write-all loop handles partial `os.write()` returns.
47
47
15.**fix: `_get_client()` get-then-create guard** — `get_or_create_collection` segfaults ChromaDB 1.5.x when existing collection metadata differs; fork tries `get_collection` first, falls back to `create_collection` only on `InvalidCollectionException`.
48
48
16.**perf: `miner.status()` paginated `col.get()`** — upstream's single `col.get(limit=total)` hits SQLite's max-variable limit on palaces with many thousands of drawers; fork paginates in 10 K-drawer batches.
49
49
17.**feat: configurable chunking parameters** — `chunk_size` (800), `chunk_overlap` (100), `min_chunk_size` (50) written to `config.json` and exposed via `MempalaceConfig` properties.
50
-
18.**fix: PID file guard prevents stacking mine processes** — `_mine_already_running()` checks `hook_state/mine.pid` via `os.kill(pid, 0)`; both `_ingest_transcript` and `_maybe_auto_ingest` bail if a mine is already running. Observed without fix: 4 concurrent mines at ~770% CPU.
50
+
18.~~**fix: PID file guard prevents stacking mine processes**~~ — **merged upstream via #1023 in v3.3.2.** Includes the Windows `os.kill` → `OpenProcess` cross-platform fix. No longer fork-ahead.
51
51
52
52
### Merged into upstream (post-v3.3.1)
53
53
54
54
- epsilon mtime comparison (upstream PR #610, merged 2026-04-12 by Arnold Wender — their threshold is 0.001, ours was 0.01, semantically equivalent)
|#661| open (`CHANGES_REQUESTED` but feedback addressed, waiting `@bensig` re-review — GitHub holds state until reviewer dismisses) | Graph cache with write-invalidation |
98
+
|#673| open (externally approved 2026-04-12, rebased + squashed on 2026-04-21, `MERGEABLE`) | Deterministic hook saves (broader than upstream's #966) |
99
+
|#1005| open (CI green all platforms, waiting maintainer) | Warnings + sqlite BM25 top-up when vector underdelivers (never silent miss) |
100
+
|#1021| open (CI green all platforms, waiting maintainer) | Hook stdout routing + silent_save guard fixes for Claude Code 2.1.114 |
101
+
|#1024| open (CI green all platforms, waiting maintainer) | Configurable chunk_size, chunk_overlap, min_chunk_size |
|#1000|**merged** in v3.3.2 (2026-04-21) |`quarantine_stale_hnsw()` for HNSW/sqlite drift |
104
+
|#1023|**merged** in v3.3.2 (2026-04-21) | PID file guard prevents stacking mine processes + Windows `os.kill` cross-platform fix |
97
105
|#999|**merged** 2026-04-18 |`None`-metadata guards in `searcher.py`, `miner.status()`, and 4 `mcp_server.py` handlers |
98
-
|#1000| open (CI green all platforms, Copilot + Dialectician review addressed, waiting maintainer) |`quarantine_stale_hnsw()` for HNSW/sqlite drift |
99
-
|#1005| open (CI green all platforms, Copilot + Dialectician review addressed, waiting maintainer) | Warnings + sqlite BM25 top-up when vector underdelivers (never silent miss) |
100
-
|#1021| open (CI green all platforms, Copilot review addressed, waiting maintainer) | Hook stdout routing + silent_save guard fixes for Claude Code 2.1.114 |
0 commit comments