mempalace-code 1.6.2__tar.gz → 1.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. mempalace_code-1.8.0/.github/workflows/ci.yml +92 -0
  2. mempalace_code-1.8.0/.github/workflows/dotnet-bench.yml +73 -0
  3. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.github/workflows/publish.yml +2 -2
  4. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/CHANGELOG.md +135 -0
  5. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/CLAUDE.md +19 -6
  6. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/PKG-INFO +268 -90
  7. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/README.md +265 -87
  8. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/BENCHMARKS.md +22 -14
  9. mempalace_code-1.8.0/benchmarks/README.md +345 -0
  10. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/code_retrieval_bench.py +3 -3
  11. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/convomem_bench.py +1 -1
  12. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/data/code_retrieval_queries.json +29 -29
  13. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/dotnet_bench.py +297 -34
  14. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/embed_ab_bench.py +3 -3
  15. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/locomo_bench.py +1 -1
  16. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/longmemeval_bench.py +1 -1
  17. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/token_delta_bench.py +4 -4
  18. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/AGENT_INSTALL.md +102 -71
  19. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/BACKLOG-archived.yaml +125 -0
  20. mempalace_code-1.8.0/docs/BACKLOG.yaml +273 -0
  21. mempalace_code-1.8.0/docs/BACKUP_RESTORE.md +335 -0
  22. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/BENCH_TOKEN_DELTA.md +1 -1
  23. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/COMPARISON_GRAPHIFY.md +12 -12
  24. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/HOW_SEARCH_WORKS.md +29 -6
  25. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/OFFLINE_USAGE.md +13 -13
  26. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/UPSTREAM_HARDENING.md +30 -24
  27. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/WHY_THIS_FORK.md +1 -1
  28. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/examples/basic_mining.py +3 -3
  29. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/examples/convo_import.py +3 -3
  30. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/examples/gemini_cli_setup.md +6 -6
  31. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/examples/mcp_setup.md +2 -2
  32. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/hooks/README.md +5 -5
  33. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/hooks/mempal_precompact_hook.sh +8 -3
  34. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/hooks/mempal_save_hook.sh +8 -3
  35. mempalace_code-1.8.0/mempalace/__init__.py +12 -0
  36. mempalace_code-1.8.0/mempalace/mcp_server.py +10 -0
  37. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/README.md +8 -5
  38. mempalace_code-1.8.0/mempalace_code/__main__.py +5 -0
  39. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/_chroma_store.py +3 -3
  40. mempalace_code-1.8.0/mempalace_code/architecture.py +396 -0
  41. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/backup.py +188 -39
  42. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/cli.py +434 -78
  43. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/config.py +141 -2
  44. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/convo_miner.py +3 -3
  45. mempalace_code-1.8.0/mempalace_code/disk_budget.py +200 -0
  46. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/entity_detector.py +2 -2
  47. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/entity_registry.py +2 -2
  48. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/export.py +2 -2
  49. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/knowledge_graph.py +126 -7
  50. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/layers.py +1 -1
  51. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/mcp_server.py +109 -42
  52. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/migrate.py +1 -1
  53. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/miner.py +288 -12
  54. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/normalize.py +226 -11
  55. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/onboarding.py +11 -7
  56. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/palace_graph.py +2 -0
  57. mempalace_code-1.8.0/mempalace_code/retrieval_rerank.py +156 -0
  58. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/room_detector_local.py +10 -7
  59. mempalace_code-1.8.0/mempalace_code/search_reranker.py +106 -0
  60. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/searcher.py +41 -13
  61. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/spellcheck.py +2 -2
  62. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/storage.py +292 -59
  63. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/watcher.py +275 -67
  64. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/pyproject.toml +8 -8
  65. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/scripts/bootstrap.sh +32 -21
  66. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/scripts/nuke_wing.py +1 -1
  67. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/conftest.py +9 -4
  68. mempalace_code-1.8.0/tests/test_architecture_extraction.py +1057 -0
  69. mempalace_code-1.8.0/tests/test_backup.py +1064 -0
  70. mempalace_code-1.8.0/tests/test_backup_cli.py +172 -0
  71. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_chroma_compat.py +104 -8
  72. mempalace_code-1.8.0/tests/test_chroma_import_errors.py +44 -0
  73. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_chunking.py +183 -9
  74. mempalace_code-1.8.0/tests/test_cli.py +1804 -0
  75. mempalace_code-1.8.0/tests/test_config.py +353 -0
  76. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_convo_miner.py +10 -10
  77. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_dialect.py +1 -1
  78. mempalace_code-1.8.0/tests/test_disk_budget.py +348 -0
  79. mempalace_code-1.8.0/tests/test_dotnet_bench.py +401 -0
  80. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_e2e.py +278 -18
  81. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_entity_detector.py +1 -1
  82. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_export.py +87 -3
  83. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_general_extractor.py +1 -1
  84. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_kg_extract.py +68 -23
  85. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_lang_detect.py +1 -1
  86. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_language_catalog.py +2 -2
  87. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_mcp_server.py +543 -136
  88. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_migrate.py +4 -4
  89. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_miner.py +633 -14
  90. mempalace_code-1.8.0/tests/test_normalize.py +565 -0
  91. mempalace_code-1.8.0/tests/test_offline.py +87 -0
  92. mempalace_code-1.8.0/tests/test_packaging_namespace.py +31 -0
  93. mempalace_code-1.8.0/tests/test_palace_graph.py +82 -0
  94. mempalace_code-1.8.0/tests/test_retrieval_rerank.py +247 -0
  95. mempalace_code-1.8.0/tests/test_search_reranker.py +273 -0
  96. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_searcher.py +268 -8
  97. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_split_mega_files.py +1 -1
  98. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_storage.py +450 -13
  99. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_storage_lance.py +144 -1
  100. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_symbol_extract.py +1 -1
  101. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_treesitter.py +2 -2
  102. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_version_consistency.py +2 -2
  103. mempalace_code-1.8.0/tests/test_watcher.py +1253 -0
  104. mempalace_code-1.6.2/.github/workflows/ci.yml +0 -29
  105. mempalace_code-1.6.2/benchmarks/README.md +0 -198
  106. mempalace_code-1.6.2/docs/BACKLOG.yaml +0 -745
  107. mempalace_code-1.6.2/docs/BACKUP_RESTORE.md +0 -202
  108. mempalace_code-1.6.2/mempalace/__main__.py +0 -5
  109. mempalace_code-1.6.2/tests/test_backup.py +0 -557
  110. mempalace_code-1.6.2/tests/test_cli.py +0 -1007
  111. mempalace_code-1.6.2/tests/test_config.py +0 -141
  112. mempalace_code-1.6.2/tests/test_normalize.py +0 -63
  113. mempalace_code-1.6.2/tests/test_offline.py +0 -44
  114. mempalace_code-1.6.2/tests/test_watcher.py +0 -499
  115. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/prompts/codex-hardening-review.md +0 -0
  116. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/prompts/codex-plan-review.md +0 -0
  117. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/settings.json +0 -0
  118. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/_shared/commit-checkpoint.md +0 -0
  119. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/_shared/mode-classification.md +0 -0
  120. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/_shared/task-state.md +0 -0
  121. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/bench/SKILL.md +0 -0
  122. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/doc-refresh/INSTRUCTIONS.md +0 -0
  123. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/doc-refresh/SKILL.md +0 -0
  124. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/entropy-gc/INSTRUCTIONS.md +0 -0
  125. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/entropy-gc/SKILL.md +0 -0
  126. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/mine/SKILL.md +0 -0
  127. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/palace-health/SKILL.md +0 -0
  128. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/release/SKILL.md +0 -0
  129. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/release-prep/SKILL.md +0 -0
  130. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/ship/INSTRUCTIONS.md +0 -0
  131. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/ship/SKILL.md +0 -0
  132. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/start/INSTRUCTIONS.md +0 -0
  133. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/start/SKILL.md +0 -0
  134. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/status/SKILL.md +0 -0
  135. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/task-hardening/INSTRUCTIONS.md +0 -0
  136. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/task-hardening/SKILL.md +0 -0
  137. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/task-plan/INSTRUCTIONS.md +0 -0
  138. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/task-plan/SKILL.md +0 -0
  139. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/verify/INSTRUCTIONS.md +0 -0
  140. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.claude/skills/verify/SKILL.md +0 -0
  141. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  142. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  143. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  144. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.gitignore +0 -0
  145. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.pre-commit-config.yaml +0 -0
  146. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/.verify-state +0 -0
  147. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/AGENTS.md +0 -0
  148. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/CONTRIBUTING.md +0 -0
  149. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/LICENSE +0 -0
  150. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/NOTICE +0 -0
  151. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/assets/mempalace_banner.jpg +0 -0
  152. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/HYBRID_MODE.md +0 -0
  153. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/membench_bench.py +0 -0
  154. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/results_embed_ab_2026-04-09.json +0 -0
  155. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/results_token_delta_mempalace.json +0 -0
  156. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/benchmarks/results_token_delta_wh40k.json +0 -0
  157. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/docs/LLM_USAGE_RULES.md +0 -0
  158. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/examples/HOOKS_TUTORIAL.md +0 -0
  159. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/__init__.py +0 -0
  160. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/dialect.py +0 -0
  161. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/general_extractor.py +0 -0
  162. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/language_catalog.py +0 -0
  163. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/py.typed +0 -0
  164. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/split_mega_files.py +0 -0
  165. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/treesitter.py +0 -0
  166. {mempalace_code-1.6.2/mempalace → mempalace_code-1.8.0/mempalace_code}/version.py +0 -0
  167. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/scripts/codex-review.sh +0 -0
  168. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_code_retrieval_bench.py +0 -0
  169. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_dotnet_config.py +0 -0
  170. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_embed_ab_bench.py +0 -0
  171. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/tests/test_knowledge_graph.py +0 -0
  172. {mempalace_code-1.6.2 → mempalace_code-1.8.0}/uv.lock +0 -0
@@ -0,0 +1,92 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ inputs:
10
+ model_tests:
11
+ description: "Run needs_network model-backed tests with HuggingFace cache"
12
+ required: false
13
+ default: "false"
14
+ type: choice
15
+ options:
16
+ - "false"
17
+ - "true"
18
+
19
+ jobs:
20
+ test:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v5
24
+ - uses: actions/setup-python@v6
25
+ with:
26
+ python-version: "3.13"
27
+ cache: pip
28
+ cache-dependency-path: |
29
+ pyproject.toml
30
+ uv.lock
31
+ - run: pip install -e ".[dev,treesitter]"
32
+ - run: python3 -m pytest tests/ -v -m "not needs_network"
33
+
34
+ chroma-compat:
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - uses: actions/checkout@v5
38
+ - uses: actions/setup-python@v6
39
+ with:
40
+ python-version: "3.13"
41
+ cache: pip
42
+ cache-dependency-path: |
43
+ pyproject.toml
44
+ uv.lock
45
+ - run: pip install -e ".[dev,chroma]"
46
+ - name: ChromaStore compatibility tests
47
+ run: python -m pytest tests/test_chroma_compat.py -v
48
+ - run: python -m pytest tests/ -v -m "not needs_network"
49
+
50
+ lint:
51
+ runs-on: ubuntu-latest
52
+ steps:
53
+ - uses: actions/checkout@v5
54
+ - uses: actions/setup-python@v6
55
+ with:
56
+ python-version: "3.13"
57
+ cache: pip
58
+ cache-dependency-path: |
59
+ pyproject.toml
60
+ uv.lock
61
+ - run: pip install ruff
62
+ - run: ruff check mempalace_code/ tests/
63
+ - run: ruff format --check mempalace_code/ tests/
64
+
65
+ model-tests:
66
+ runs-on: ubuntu-latest
67
+ if: github.event_name == 'workflow_dispatch' && github.event.inputs.model_tests == 'true'
68
+ env:
69
+ HF_HOME: ${{ github.workspace }}/.cache/huggingface
70
+ MEMPALACE_TEST_HF_HOME: ${{ github.workspace }}/.cache/huggingface
71
+ steps:
72
+ - uses: actions/checkout@v5
73
+ - uses: actions/setup-python@v6
74
+ with:
75
+ python-version: "3.13"
76
+ cache: pip
77
+ cache-dependency-path: |
78
+ pyproject.toml
79
+ uv.lock
80
+ - name: Restore HuggingFace model cache
81
+ id: hf-cache
82
+ uses: actions/cache@v5
83
+ with:
84
+ path: ${{ github.workspace }}/.cache/huggingface/hub/models--sentence-transformers--all-MiniLM-L6-v2
85
+ key: hf-${{ runner.os }}-py3.13-minilm-all-MiniLM-L6-v2-${{ hashFiles('pyproject.toml', 'uv.lock') }}
86
+ restore-keys: |
87
+ hf-${{ runner.os }}-py3.13-minilm-all-MiniLM-L6-v2-
88
+ - run: pip install -e ".[dev,treesitter]"
89
+ - name: Fetch embedding model (no-op on cache hit)
90
+ run: mempalace-code fetch-model
91
+ - name: Run model-backed tests
92
+ run: python -m pytest tests/ -v -m needs_network
@@ -0,0 +1,73 @@
1
+ name: .NET Benchmark
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ push:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ dotnet-bench:
12
+ runs-on: ubuntu-latest
13
+ if: ${{ !(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'skip-bench')) }}
14
+ env:
15
+ HF_HOME: ${{ github.workspace }}/.cache/huggingface
16
+ CLEAN_ARCHITECTURE_COMMIT: 5a600ab8749c110384bc3bd436b9c67f3067b489
17
+ R5_THRESHOLD: "0.900"
18
+ steps:
19
+ - uses: actions/checkout@v5
20
+
21
+ - uses: actions/setup-python@v6
22
+ with:
23
+ python-version: "3.13"
24
+ cache: pip
25
+ cache-dependency-path: |
26
+ pyproject.toml
27
+ uv.lock
28
+
29
+ - name: Restore HuggingFace model cache
30
+ id: hf-cache
31
+ uses: actions/cache@v5
32
+ with:
33
+ path: ${{ github.workspace }}/.cache/huggingface/hub/models--sentence-transformers--all-MiniLM-L6-v2
34
+ key: hf-${{ runner.os }}-py3.13-minilm-all-MiniLM-L6-v2-${{ hashFiles('pyproject.toml', 'uv.lock') }}
35
+ restore-keys: |
36
+ hf-${{ runner.os }}-py3.13-minilm-all-MiniLM-L6-v2-
37
+
38
+ - run: pip install -e ".[dev,treesitter]"
39
+
40
+ - name: Fetch embedding model (no-op on cache hit)
41
+ run: mempalace-code fetch-model
42
+
43
+ - name: Fetch CleanArchitecture at pinned commit
44
+ run: |
45
+ git init /tmp/CleanArchitecture
46
+ git -C /tmp/CleanArchitecture remote add origin https://github.com/jasontaylordev/CleanArchitecture.git
47
+ git -C /tmp/CleanArchitecture fetch --depth=1 origin "$CLEAN_ARCHITECTURE_COMMIT"
48
+ git -C /tmp/CleanArchitecture checkout --detach FETCH_HEAD
49
+ ACTUAL=$(git -C /tmp/CleanArchitecture rev-parse HEAD)
50
+ if [ "$ACTUAL" != "$CLEAN_ARCHITECTURE_COMMIT" ]; then
51
+ echo "Commit mismatch: expected $CLEAN_ARCHITECTURE_COMMIT got $ACTUAL"
52
+ exit 1
53
+ fi
54
+
55
+ - name: Validate benchmark query set
56
+ run: |
57
+ python benchmarks/dotnet_bench.py \
58
+ --repo-dir /tmp/CleanArchitecture \
59
+ --validate-queries
60
+
61
+ - name: Run .NET retrieval benchmark with R@5 gate
62
+ run: |
63
+ python benchmarks/dotnet_bench.py \
64
+ --repo-dir /tmp/CleanArchitecture \
65
+ --out benchmarks/results_dotnet_bench_ci.json \
66
+ --fail-under-r5 ${{ env.R5_THRESHOLD }}
67
+
68
+ - name: Upload benchmark report
69
+ if: always()
70
+ uses: actions/upload-artifact@v6
71
+ with:
72
+ name: dotnet-bench-results
73
+ path: benchmarks/results_dotnet_bench_ci.json
@@ -17,7 +17,7 @@ jobs:
17
17
  python-version: "3.11"
18
18
  - run: pip install build
19
19
  - run: python -m build
20
- - uses: actions/upload-artifact@v5
20
+ - uses: actions/upload-artifact@v6
21
21
  with:
22
22
  name: dist
23
23
  path: dist/
@@ -29,7 +29,7 @@ jobs:
29
29
  permissions:
30
30
  id-token: write
31
31
  steps:
32
- - uses: actions/download-artifact@v5
32
+ - uses: actions/download-artifact@v7
33
33
  with:
34
34
  name: dist
35
35
  path: dist/
@@ -1,5 +1,140 @@
1
1
  # Changelog
2
2
 
3
+ Current command/package names: the CLI is `mempalace-code`, the import package is
4
+ `mempalace_code`, and the MCP module is `python -m mempalace_code.mcp_server`.
5
+ Older historical entries may mention legacy `mempalace` names that were valid
6
+ when those changes landed.
7
+
8
+ ## v1.8.0 — 2026-05-03
9
+
10
+ ### Added
11
+
12
+ - LanceDB storage cleanup: `mempalace-code cleanup` reclaims stale Lance
13
+ versions/fragments after optimization, with dry default retention and an
14
+ explicit `--unsafe-now` emergency mode.
15
+ - Disk-budget guards for backup and watcher loops. Backups now fail before
16
+ opening archive files when projected post-backup free space would fall below
17
+ the configured floor; watchers skip write cycles while the palace is under
18
+ budget.
19
+ - `mempalace-code watch <dir> status` reports free space, palace/backups size,
20
+ configured threshold, and macOS launchd state.
21
+ - `code_search(..., rerank="hybrid")` and the MCP `mempalace_code_search`
22
+ `rerank` argument expose BM25-style token-overlap reranking for code search.
23
+ - Conversation normalization now covers Gemini CLI JSONL and compacts Claude
24
+ Code tool-use/tool-result blocks.
25
+
26
+ ### Changed
27
+
28
+ - .NET retrieval benchmark baseline on the pinned CleanArchitecture corpus is
29
+ now R@5 0.900 / R@10 1.000 in vector mode; local hybrid rerank comparison
30
+ measured R@5 1.000 / R@10 1.000 on 2026-05-03.
31
+ - Generated `entities.json` files from init/entity detection are skipped during
32
+ project mining by default, unless explicitly force-included.
33
+ - `MEMPALACE_BACKUP_MIN_FREE_BYTES` and `backup_min_free_bytes` remain supported
34
+ as compatibility aliases for the newer `backup_disk_min_free_bytes` floor.
35
+ - The collected test suite is now 1769 tests.
36
+
37
+ ### Fixed
38
+
39
+ - MCP request handling tolerates `params: null`, `arguments: null`,
40
+ notification messages, and client noise keys such as `wait_for_previous`.
41
+ - Search/read paths tolerate rows with missing or `None` metadata without
42
+ crashing.
43
+
44
+ ## v1.7.0 — 2026-05-02
45
+
46
+ ### Added
47
+
48
+ - Architecture extraction mode: `mempalace-code mine` now emits higher-level KG
49
+ facts for .NET (C#, F#, VB.NET) and Python projects, including pattern, layer,
50
+ namespace, and project membership facts.
51
+ - Architecture fact refresh is now wing-scoped, so re-mining one project no
52
+ longer invalidates architecture KG facts from other projects in the same
53
+ palace.
54
+ - Multi-repo palace sync: `mempalace-code mine-all` now mines multiple initialized
55
+ projects into one palace with one wing per project, explicit `wing:` overrides,
56
+ git-remote/folder wing auto-naming, duplicate-wing rejection before mining, and
57
+ incremental per-repo re-mining by default.
58
+ - Release-grade coverage for backup/restore CLI dispatch, storage migration CLI
59
+ passthrough/error handling, Python multi-import dependency extraction,
60
+ devops/config file scanning, benchmark CI gates, watcher rule reloads, and
61
+ tree-sitter detached-comment behavior.
62
+
63
+ ### Changed
64
+
65
+ - The shipped Python import namespace is `mempalace_code`; docs and generated
66
+ scheduler snippets prefer `mempalace-code` / `python -m mempalace_code` while
67
+ preserving the source-checkout `mempalace.mcp_server` compatibility shim.
68
+ - Package metadata now matches the Python 3.11+ support floor.
69
+
70
+ ### Fixed
71
+
72
+ - Watchers reload `scan_skip_dirs`, `scan_skip_files`, and `scan_skip_globs`
73
+ without restarting `mempalace-code watch`.
74
+ - Generated backup/watch scheduler fallbacks no longer reference the legacy
75
+ `python -m mempalace` module path.
76
+
77
+ ## 2026-05-02 · ARCH-EXTRACTION-MODE
78
+
79
+ Architecture extraction mode: `mempalace-code mine` now runs a post-mining pass
80
+ that emits higher-level KG facts for .NET (C#, F#, VB.NET) and Python projects.
81
+
82
+ ### Added
83
+
84
+ - `mempalace_code/architecture.py` — new module with pattern detection
85
+ (`is_pattern`: Service, Repository, Controller, ViewModel, Factory), layer
86
+ classification (`is_layer`: UI, Business, Data, Infrastructure), namespace
87
+ tagging (`in_namespace`), and project membership (`in_project`).
88
+ - `KnowledgeGraph.invalidate_by_source_file` gains an optional `predicates`
89
+ parameter so architecture facts can be refreshed without expiring type
90
+ dependency facts (implements, inherits, depends_on, etc.).
91
+ - Architecture config block in `mempalace.yaml` under `architecture:` — supports
92
+ custom `patterns` (name, suffixes, explicit `type_names`) and `layers`
93
+ (name, namespace_globs, type_suffixes, priority). Invalid rule entries are
94
+ silently ignored; the pass continues with built-in defaults.
95
+ - KG queries: `entity="Service", direction="incoming"` shows all services;
96
+ `entity="Data", direction="incoming"` shows all data-layer types.
97
+
98
+ ## 2026-05-02 · FUT-MULTI-REPO
99
+
100
+ Multi-repo palace sync: `mine-all` command mines multiple project directories into one palace with per-repo wing isolation, wing auto-naming from git remote/folder, and incremental per-repo re-mining.
101
+
102
+ ## 2026-05-01 · Recent completed task review
103
+
104
+ ### Added
105
+
106
+ - `MINE-SCAN-RULES-LIVE-RELOAD`: watcher loops now reload `scan_skip_dirs`,
107
+ `scan_skip_files`, and `scan_skip_globs` between scan cycles, so app-level
108
+ exclude changes take effect without restarting `mempalace-code watch`.
109
+ - `QUAL-E2E-REMAINING-MODULES`: end-to-end coverage now includes `convo_miner`,
110
+ `layers`, and `palace_graph` scenarios, including idempotent conversation
111
+ re-mining, tiered context loading, tunnel detection, traversal, and missing-room
112
+ boundary behavior.
113
+
114
+ ### Changed
115
+
116
+ - `CLEAN-ONBOARDING`: `mempalace-code init` is config-file-first by default;
117
+ interactive guided setup is routed through explicit onboarding paths instead
118
+ of blocking the normal init flow.
119
+ - The shipped Python import namespace is now `mempalace_code`. Packaged
120
+ `mempalace-code` installs no longer claim the top-level `mempalace` module,
121
+ allowing same-environment coexistence with upstream/vanilla MemPalace.
122
+ - New MCP setup examples use `python -m mempalace_code.mcp_server`. Source
123
+ checkouts keep a minimal `mempalace.mcp_server` shim so older repo-local
124
+ Codex/Autopilot configs with checkout `PYTHONPATH` continue to start.
125
+
126
+ ### Fixed
127
+
128
+ - `MINE-SCAN-GLOB-DIR-PRUNE`: glob rules that cover an entire generated
129
+ directory now prune that subtree during the walk instead of filtering only
130
+ after file discovery.
131
+ - Legacy hook fallbacks and active docs now call `mempalace-code` or
132
+ `python -m mempalace_code`, matching the renamed package.
133
+
134
+ ## 2026-05-01 · MINE-APP-SCAN-EXCLUDES-PR4
135
+
136
+ App-level scan excludes (`scan_skip_dirs`, `scan_skip_files`, `scan_skip_globs`) implemented in miner and watcher with hardened, tested outputs.
137
+
3
138
  ## v1.6.2 — 2026-05-01
4
139
 
5
140
  ### Added
@@ -45,16 +45,16 @@ python -m pytest tests/test_convo_miner.py -v
45
45
 
46
46
  ```bash
47
47
  # Check
48
- ruff check mempalace/ tests/
48
+ ruff check mempalace_code/ tests/
49
49
 
50
50
  # Format check
51
- ruff format --check mempalace/ tests/
51
+ ruff format --check mempalace_code/ tests/
52
52
 
53
53
  # Auto-fix lint
54
- ruff check --fix mempalace/ tests/
54
+ ruff check --fix mempalace_code/ tests/
55
55
 
56
56
  # Auto-fix format
57
- ruff format mempalace/ tests/
57
+ ruff format mempalace_code/ tests/
58
58
  ```
59
59
 
60
60
  Line length: 100. Target: py39. Quote style: double.
@@ -64,7 +64,7 @@ Line length: 100. Target: py39. Quote style: double.
64
64
  | Module | Purpose |
65
65
  |--------|---------|
66
66
  | `storage.py` | LanceDB vector storage — add, search, delete, health_check, recover |
67
- | `backup.py` | Tarball backup/restore — `mempalace backup`, scheduled backups |
67
+ | `backup.py` | Tarball backup/restore — `mempalace-code backup`, scheduled backups |
68
68
  | `miner.py` | Code project miner — walks source files, extracts drawers |
69
69
  | `convo_miner.py` | Conversation miner — ingests Claude/ChatGPT/Slack exports |
70
70
  | `searcher.py` | Semantic search — query palace with optional wing/room filters |
@@ -73,7 +73,7 @@ Line length: 100. Target: py39. Quote style: double.
73
73
  | `palace_graph.py` | Graph traversal and tunnel detection across wings/rooms |
74
74
  | `mcp_server.py` | MCP server — exposes palace tools to Claude Code and other MCP clients |
75
75
  | `watcher.py` | File watcher — `watch_and_mine`, `watch_all`, launchd/cron schedule rendering |
76
- | `cli.py` | `mempalace` CLI entry point — init, mine, mine-all, watch, search, health, repair, backup |
76
+ | `cli.py` | `mempalace-code` CLI entry point — init, mine, mine-all, watch, search, health, repair, backup |
77
77
 
78
78
  ## Architecture Principles
79
79
 
@@ -130,3 +130,16 @@ Per-category R@5:
130
130
  - `chore:` — maintenance, deps, tooling
131
131
  - **No force-push to `main`**.
132
132
  - PR merges go through the `feat/*` → `main` flow; squash if the branch is noisy.
133
+
134
+ ## Operational Lessons
135
+
136
+ - **Keep this file public-safe.** `CLAUDE.md` is part of the publishable repository. Do not write private remotes, hostnames, credentials, local machine paths, customer/project details, incident specifics, or non-public operational history here. Put private or machine-local lessons in a local-only note outside the published tree.
137
+ - **Record reusable lessons only when they are public knowledge.** When a session exposes a project gotcha, publish step, verification boundary, or agent-behavior correction, add a concise durable note here only if it is safe for public readers and useful to future contributors.
138
+ - **Verify the environment that will actually run the change.** GitHub Actions runtime changes are not proven by Python tests alone. Use local YAML/static checks such as `actionlint`, then verify the real hosted workflow run when action runtime behavior matters.
139
+ - **Name the verification boundary.** If a workflow is tag-only or release-only, say that it was syntax-checked and version-checked but not execution-tested unless a real trigger was run. Do not imply full local coverage for hosted-only behavior.
140
+ - **Check the intended public release target.** Before publishing, verify the repository, branch, tag, and workflow that public users will see. Do not assume local remote names or private mirrors represent public release truth.
141
+ - **Keep benchmark gates tied to measured baselines.** If a release benchmark fails, reproduce it locally against the pinned fixture, update the CI threshold only to the observed stable baseline, and backlog any desired quality increase separately.
142
+ - **Do not call tests "local feature testing."** When asked to test new features locally, run the public CLI/MCP/API behavior itself, not only pytest. For each new feature, exercise at least one success path and one important failure/guard path when safe, record the exact command or request, and name any behavior that was covered only by tests.
143
+ - **Exercise real integration surfaces before release claims.** Direct handler calls are useful for MCP compatibility, but they are not the same as a separate stdio MCP client. CLI help is not the same as executing the command. A release-readiness summary must distinguish unit tests, focused integration tests, direct API smoke, real CLI execution, and hosted/daemon behavior that was not run.
144
+ - **Clean up smoke-test artifacts immediately.** Real backup, cleanup, and benchmark smokes can create archives, temp palaces, and result JSON. Put them under disposable temp paths, verify success/failure, then remove artifacts or explicitly report what remains.
145
+ - **Treat palace disk growth as storage forensics first.** Compare backup size, live storage stats, row counts, and cleanup output before deleting anything. Preserve non-regenerable manual drawers and KG data, stop active writers when needed, use supported cleanup APIs, and verify health/status afterward.