From 75eb7ff871ae3005844aec65f8d15ae4129fe0b2 Mon Sep 17 00:00:00 2001 From: adv3nt3 Date: Wed, 8 Apr 2026 00:57:58 +0200 Subject: [PATCH 1/2] fix: use actual detected room in mine summary stats process_file() now returns (drawer_count, room) instead of just drawer_count. The mine summary uses the returned room directly instead of re-calling detect_room with empty content, which produced wrong stats when routing relied on content keywords. --- mempalace/miner.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mempalace/miner.py b/mempalace/miner.py index 7b4e949..4afacd4 100644 --- a/mempalace/miner.py +++ b/mempalace/miner.py @@ -451,29 +451,29 @@ def process_file( rooms: list, agent: str, dry_run: bool, -) -> int: - """Read, chunk, route, and file one file. Returns drawer count.""" +) -> tuple: + """Read, chunk, route, and file one file. Returns (drawer_count, room_name).""" # Skip if already filed source_file = str(filepath) if not dry_run and file_already_mined(collection, source_file): - return 0 + return 0, None try: content = filepath.read_text(encoding="utf-8", errors="replace") except OSError: - return 0 + return 0, None content = content.strip() if len(content) < MIN_CHUNK_SIZE: - return 0 + return 0, None room = detect_room(filepath, content, rooms, project_path) chunks = chunk_text(content, source_file) if dry_run: print(f" [DRY RUN] {filepath.name} → room:{room} ({len(chunks)} drawers)") - return len(chunks) + return len(chunks), room drawers_added = 0 for chunk in chunks: @@ -489,7 +489,7 @@ def process_file( if added: drawers_added += 1 - return drawers_added + return drawers_added, room # ============================================================================= @@ -608,7 +608,7 @@ def mine( room_counts = defaultdict(int) for i, filepath in enumerate(files, 1): - drawers = process_file( + drawers, room = process_file( filepath=filepath, project_path=project_path, collection=collection, @@ -621,7 +621,6 @@ def mine( files_skipped += 1 else: total_drawers += drawers - room = detect_room(filepath, "", rooms, project_path) room_counts[room] += 1 if not dry_run: print(f" ✓ [{i:4}/{len(files)}] {filepath.name[:50]:50} +{drawers}") From 26835e30ef2bb910aaa4f8626468d9108d13d661 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 8 Apr 2026 23:54:30 +0000 Subject: [PATCH 2/2] chore: bump version to 3.0.14 --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- mempalace/version.py | 2 +- pyproject.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index e9cabc6..6b23ccf 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "mempalace", "source": "./.claude-plugin", "description": "AI memory system — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, guided setup.", - "version": "3.0.13", + "version": "3.0.14", "author": { "name": "milla-jovovich" } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 2e53a9e..fa05a15 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "mempalace", - "version": "3.0.13", + "version": "3.0.14", "description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.", "author": { "name": "milla-jovovich" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 395c2ba..5784847 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "mempalace", - "version": "3.0.13", + "version": "3.0.14", "description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.", "author": { "name": "milla-jovovich" diff --git a/mempalace/version.py b/mempalace/version.py index 85d0a44..e56289e 100644 --- a/mempalace/version.py +++ b/mempalace/version.py @@ -1,3 +1,3 @@ """Single source of truth for the MemPalace package version.""" -__version__ = "3.0.13" +__version__ = "3.0.14" diff --git a/pyproject.toml b/pyproject.toml index 4f2784c..3aaa765 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mempalace" -version = "3.0.13" +version = "3.0.14" description = "Give your AI a memory — mine projects and conversations into a searchable palace. No API key required." readme = "README.md" requires-python = ">=3.9"