Repository Analysis

MemPalace/mempalace

The best-benchmarked open-source AI memory system. And it's free.

24.1 Moderate AI signal View on GitHub
24.1
Adjusted Score
24.1
Raw Score
100%
Time Factor
2026-05-30
Last Push
53,057
Stars
Python
Language
191,413
Lines of Code
313
Files
3259
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 9MEDIUM 742LOW 2508

Pattern Findings

3259 matches across 16 categories. Click a row to expand file-level details.

Decorative Section Separators718 hits · 2371 pts
SeverityFileLineSnippet
MEDIUMtools/find_orphan_claude_jsonls.sh3# -----------------------------------------------------------------------------
MEDIUMtools/find_orphan_claude_jsonls.sh14# -----------------------------------------------------------------------------
MEDIUMtests/test_closets.py222 # ── Tier 6a — date + line-range pointer segment ────────────────────────
MEDIUMtests/test_closets.py506# ── _extract_drawer_ids_from_closet ───────────────────────────────────
MEDIUMtests/test_closets.py526# ── search_memories closet-first path ────────────────────────────────
MEDIUMtests/test_closets.py579# ── entity metadata ──────────────────────────────────────────────────
MEDIUMtests/test_closets.py692# ── BM25 hybrid search (real IDF over candidate corpus) ──────────────
MEDIUMtests/test_closets.py66# ── mine_lock ────────────────────────────────────────────────────────────
MEDIUMtests/test_closets.py149# ── build_closet_lines ─────────────────────────────────────────────────
MEDIUMtests/test_closets.py350# ── upsert_closet_lines ───────────────────────────────────────────────
MEDIUMtests/test_closets.py389# ── purge_file_closets ────────────────────────────────────────────────
MEDIUMtests/test_closets.py409# ── project miner: closet rebuild end-to-end ──────────────────────────
MEDIUMtests/test_closets.py754# ── diary ingest ─────────────────────────────────────────────────────
MEDIUMtests/test_closets.py932 # ── #1539: per-entry drawers, oversized-entry chunking ─────────
MEDIUMtests/test_closets.py1211# ── cross-wing tunnels ───────────────────────────────────────────────
MEDIUMtests/test_closets.py1285 # ── regression: symmetry, durability, validation, concurrency ─────
MEDIUMtests/test_closets.py1385# ── drawer-grep neighbor expansion ────────────────────────────────────
MEDIUMtests/test_searcher.py15# ── search_memories (API) ──────────────────────────────────────────────
MEDIUMtests/test_searcher.py200# ── BM25 internals: None / empty document safety ─────────────────────
MEDIUMtests/test_searcher.py238# ── search() (CLI print function) ─────────────────────────────────────
MEDIUMtests/test_miner_fts5_validation.py116# ── 1. Helper returns silently on a clean palace ────────────────────
MEDIUMtests/test_miner_fts5_validation.py127# ── 2. Helper raises MineValidationError on corrupt sqlite ──────────
MEDIUMtests/test_miner_fts5_validation.py206# ── 4. Dry-run skips validation ─────────────────────────────────────
MEDIUMtests/test_miner_fts5_validation.py24# ── Helpers ─────────────────────────────────────────────────────────
MEDIUMtests/test_miner_fts5_validation.py158# ── 3. cmd_mine surfaces MineValidationError as exit-1 + banner ─────
MEDIUMtests/test_split_mega_files.py6# ── Config loading ─────────────────────────────────────────────────────
MEDIUMtests/test_split_mega_files.py54# ── Config: force_reload and invalid JSON ──────────────────────────────
MEDIUMtests/test_split_mega_files.py94# ── is_true_session_start ──────────────────────────────────────────────
MEDIUMtests/test_split_mega_files.py175# ── extract_timestamp ──────────────────────────────────────────────────
MEDIUMtests/test_split_mega_files.py198# ── extract_subject ────────────────────────────────────────────────────
MEDIUMtests/test_split_mega_files.py231# ── split_file ─────────────────────────────────────────────────────────
MEDIUMtests/test_split_mega_files.py126# ── find_session_boundaries ────────────────────────────────────────────
MEDIUMtests/test_palace_graph_tunnels.py502# =============================================================================
MEDIUMtests/test_palace_graph_tunnels.py504# =============================================================================
MEDIUMtests/test_palace_graph_tunnels.py575# =============================================================================
MEDIUMtests/test_palace_graph_tunnels.py577# =============================================================================
MEDIUMtests/test_corpus_origin_integration.py1049# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1056# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1721# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1730# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py114# ── Baseline test: pin v3.3.3 behavior ────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py152# ── corpus-origin test: with corpus_origin, personas reclassify ───────────
MEDIUMtests/test_corpus_origin_integration.py192# ── discover_entities (project_scanner) threads corpus_origin ─────────────
MEDIUMtests/test_corpus_origin_integration.py243# ── Pass 0 — cmd_init runs corpus_origin and writes origin.json ──────────
MEDIUMtests/test_corpus_origin_integration.py416# ── llm_refine consumer wiring ────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py508# ── mempalace mine --redetect-origin flag ───────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py645# ── --llm default flip + graceful fallback ───────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py803# ── End-to-end pipeline + edge cases ──────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1315# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1331# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1392# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1410# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1833# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_corpus_origin_integration.py1842# ─────────────────────────────────────────────────────────────────────────
MEDIUMtests/test_dedup.py9# ── get_source_groups ─────────────────────────────────────────────────
MEDIUMtests/test_dedup.py108# ── dedup_source_group ────────────────────────────────────────────────
MEDIUMtests/test_dedup.py198# ── show_stats ────────────────────────────────────────────────────────
MEDIUMtests/test_dedup.py230# ── dedup_palace ──────────────────────────────────────────────────────
MEDIUMtests/test_closet_llm.py22# ── LLMConfig ─────────────────────────────────────────────────────────────
MEDIUMtests/test_closet_llm.py63# ── _parsed_to_closet_lines ──────────────────────────────────────────────
658 more matches not shown…
Hyper-Verbose Identifiers2001 hits · 1684 pts
SeverityFileLineSnippet
LOWCONTRIBUTING.md46def test_function_never_fabricates_output_on_random_input(s):
LOWtests/test_closets.py210 def test_emits_fallback_line_when_nothing_extractable(self):
LOWtests/test_closets.py217 def test_pointer_references_first_three_drawers(self):
LOWtests/test_closets.py224 def test_includes_date_line_segment_when_metas_provided(self):
LOWtests/test_closets.py510 def test_parses_single_pointer(self):
LOWtests/test_closets.py513 def test_parses_multiple_pointers_per_line(self):
LOWtests/test_closets.py517 def test_dedupes_across_lines(self):
LOWtests/test_closets.py521 def test_empty_doc_returns_empty(self):
LOWtests/test_closets.py530 def test_pure_drawer_when_no_closets(self, palace_path, seeded_collection):
LOWtests/test_closets.py540 def test_closet_boost_marks_hit_as_drawer_plus_closet(self, palace_path, seeded_collection):
LOWtests/test_closets.py583 def test_extracts_capitalized_names(self):
LOWtests/test_closets.py589 def test_empty_for_no_entities(self):
LOWtests/test_closets.py598 def test_stoplist_filters_sentence_starters(self):
LOWtests/test_closets.py696 def test_scores_positive_for_matching_doc(self):
LOWtests/test_closets.py704 def test_scores_zero_when_no_overlap(self):
LOWtests/test_closets.py708 def test_idf_downweights_terms_present_in_every_doc(self):
LOWtests/test_closets.py88 def test_lock_acquires_and_releases(self, tmp_path):
LOWtests/test_closets.py99 def test_lock_blocks_concurrent_access(self, tmp_path):
LOWtests/test_closets.py153 def test_emits_pointer_line_shape(self):
LOWtests/test_closets.py174 def test_extracts_section_headers_as_topics(self):
LOWtests/test_closets.py181 def test_entity_stoplist_filters_sentence_starters(self):
LOWtests/test_closets.py199 def test_real_proper_nouns_survive_stoplist(self):
LOWtests/test_closets.py299 def test_date_segment_uses_filed_at_date_portion_only(self):
LOWtests/test_closets.py320 def test_content_date_preferred_over_filed_at(self):
LOWtests/test_closets.py354 def test_overwrites_existing_closet_does_not_append(self, palace_path):
LOWtests/test_closets.py372 def test_packs_into_multiple_closets_without_splitting_lines(self, palace_path):
LOWtests/test_closets.py393 def test_deletes_only_the_targeted_source(self, palace_path):
LOWtests/test_closets.py413 def test_remine_replaces_closets_completely(self, tmp_path):
LOWtests/test_closets.py563 def test_max_distance_filters_hybrid_hits(self, palace_path, seeded_collection):
LOWtests/test_closets.py613 def test_capped_list_never_truncates_a_name(self):
LOWtests/test_closets.py657 def test_known_registry_is_cached_by_mtime(self, monkeypatch, tmp_path):
LOWtests/test_closets.py721 def test_empty_inputs_return_zeros(self):
LOWtests/test_closets.py726 def test_hybrid_rank_promotes_keyword_match(self):
LOWtests/test_closets.py739 def test_hybrid_rank_absolute_normalization(self):
LOWtests/test_closets.py758 def test_ingest_creates_drawers_and_closets(self, tmp_path):
LOWtests/test_closets.py772 def test_ingest_skips_unchanged_on_second_run(self, tmp_path):
LOWtests/test_closets.py786 def test_ingest_detects_same_size_content_edit(self, tmp_path):
LOWtests/test_closets.py823 def test_legacy_state_backfills_content_hash(self, tmp_path):
LOWtests/test_closets.py864 def test_state_file_lives_outside_diary_dir(self, tmp_path):
LOWtests/test_closets.py894 def test_wing_prefixed_drawer_id_prevents_cross_diary_collision(self, tmp_path):
LOWtests/test_closets.py934 def test_diary_multiple_entries_one_drawer_each(self, tmp_path):
LOWtests/test_closets.py955 def test_large_diary_with_oversized_entry_chunks_within_entry(self, tmp_path):
LOWtests/test_closets.py990 def test_incremental_appends_new_entry_only(self, tmp_path):
LOWtests/test_closets.py1017 def test_entry_count_watermark_matches_drawer_count(self, tmp_path):
LOWtests/test_closets.py1044 def test_diary_chunk_index_is_global_across_entries(self, tmp_path):
LOWtests/test_closets.py1081 def test_diary_entry_deletion_purges_orphan_drawers(self, tmp_path):
LOWtests/test_closets.py1116 def test_diary_header_only_entry_produces_drawer(self, tmp_path):
LOWtests/test_closets.py1142 def test_diary_atomic_batched_upsert_on_failure(self, tmp_path, monkeypatch):
LOWtests/test_closets.py1253 def test_list_tunnels_with_and_without_filter(self):
LOWtests/test_closets.py1267 def test_dedup_same_endpoints_updates_label(self):
LOWtests/test_closets.py1274 def test_follow_tunnels_returns_connected_endpoints(self):
LOWtests/test_closets.py1297 def test_follow_tunnels_works_from_either_endpoint(self):
LOWtests/test_closets.py1310 def test_empty_endpoint_fields_rejected(self):
LOWtests/test_closets.py1325 def test_corrupt_tunnel_file_does_not_lose_new_writes(self):
LOWtests/test_closets.py1343 def test_atomic_write_leaves_no_stray_tmp_file(self):
LOWtests/test_closets.py1352 def test_concurrent_creates_preserve_all_tunnels(self):
LOWtests/test_closets.py1378 def test_created_at_is_timezone_aware(self):
LOWtests/test_closets.py1414 def test_expand_returns_matched_plus_neighbors(self, palace_path):
LOWtests/test_closets.py1433 def test_expand_at_start_of_file_only_has_next_neighbor(self, palace_path):
LOWtests/test_closets.py1447 def test_expand_at_end_of_file_only_has_prev_neighbor(self, palace_path):
1941 more matches not shown…
Excessive Try-Catch Wrapping199 hits · 173 pts
SeverityFileLineSnippet
LOWtools/find_orphan_claude_jsonls.sh55 except Exception:
LOWtools/find_orphan_claude_jsonls.sh89except Exception:
MEDIUMtests/test_closets.py1359def worker(i):
LOWtests/test_closets.py1363 except Exception as e:
LOWtests/conftest.py74 except Exception:
LOWtests/test_hooks_cli.py649 except Exception:
LOWtests/test_repair.py1856 except Exception:
LOWtests/test_migrate.py283 except Exception:
LOWtests/benchmarks/conftest.py107 except Exception:
LOWtests/benchmarks/conftest.py114 except Exception:
LOWtests/benchmarks/conftest.py138 except Exception:
LOWtests/benchmarks/test_knowledge_graph_bench.py191 except Exception:
LOWtests/benchmarks/test_knowledge_graph_bench.py233 except Exception:
LOWtests/benchmarks/test_knowledge_graph_bench.py244 except Exception:
LOWmempalace/repair.py236 except Exception:
LOWmempalace/repair.py239 except Exception as exc:
LOWmempalace/repair.py242 except Exception:
LOWmempalace/repair.py72 except Exception:
LOWmempalace/repair.py99 except Exception:
LOWmempalace/repair.py112 except Exception:
LOWmempalace/repair.py121 except Exception:
LOWmempalace/repair.py292 except Exception:
LOWmempalace/repair.py300 except Exception:
LOWmempalace/repair.py356 except Exception:
LOWmempalace/repair.py361 except Exception:
LOWmempalace/repair.py494 except Exception:
LOWmempalace/repair.py591 except Exception:
LOWmempalace/repair.py714 except Exception as exc:
LOWmempalace/repair.py779 except Exception as e:
LOWmempalace/repair.py842 except Exception as restore_error:
LOWmempalace/repair.py944 except Exception as exc: # noqa: BLE001 — chromadb raises many shapes
LOWmempalace/repair.py1189 except Exception as exc: # noqa: BLE001
LOWmempalace/repair.py1321 except Exception:
LOWmempalace/repair.py1327 except Exception:
LOWmempalace/repair.py1548 except Exception:
LOWmempalace/sync.py298 except Exception as exc:
LOWmempalace/hallways.py110 except Exception:
LOWmempalace/hallways.py204 except Exception:
LOWmempalace/miner.py181 except Exception:
LOWmempalace/miner.py622 except Exception:
LOWmempalace/miner.py1019 except Exception:
LOWmempalace/miner.py1051 except Exception:
LOWmempalace/miner.py1072 except Exception:
LOWmempalace/miner.py1147 except Exception:
LOWmempalace/miner.py1356 except Exception:
LOWmempalace/miner.py1711 except Exception as e:
LOWmempalace/miner.py1727 except Exception as e:
LOWmempalace/miner.py1743 except Exception as e:
LOWmempalace/miner.py1802 except Exception as exc:
LOWmempalace/palace_graph.py86 except Exception:
LOWmempalace/palace_graph.py378 except Exception:
LOWmempalace/palace_graph.py477 except Exception:
LOWmempalace/palace_graph.py699 except Exception:
LOWmempalace/onboarding.py263 except Exception:
LOWmempalace/searcher.py228 except Exception:
LOWmempalace/searcher.py248 except Exception:
LOWmempalace/searcher.py275 except Exception:
LOWmempalace/searcher.py343 except Exception as e:
LOWmempalace/searcher.py680 except Exception:
LOWmempalace/searcher.py813 except Exception as e:
139 more matches not shown…
Unused Imports108 hits · 100 pts
SeverityFileLineSnippet
LOWtests/test_miner_fts5_validation.py10
LOWtests/test_corpus_origin_integration.py25
LOWtests/test_hooks_shell.py20
LOWtests/test_format_miner.py12
LOWtests/test_format_miner.py610
LOWtests/test_hnsw_capacity.py9
LOWtests/test_chroma_collection_lock.py26
LOWtests/test_hooks_bash_compat.py17
LOWtests/test_dynamics.py10
LOWtests/test_fact_checker.py19
LOWtests/test_palace_locks.py10
LOWtests/benchmarks/benchmark_dialect.py1
LOWtests/benchmarks/benchmark_dialect.py3
LOWmempalace/sync.py20
LOWmempalace/convo_scanner.py22
LOWmempalace/project_scanner.py18
LOWmempalace/hallways.py33
LOWmempalace/palace_graph.py21
LOWmempalace/embedding.py32
LOWmempalace/__init__.py38
LOWmempalace/fact_checker.py28
LOWmempalace/llm_refine.py21
LOWmempalace/llm_client.py24
LOWmempalace/corpus_origin.py35
LOWmempalace/_stdio.py25
LOWmempalace/format_miner.py59
LOWmempalace/sweeper.py39
LOWmempalace/entity_detector.py33
LOWmempalace/dynamics.py29
LOWmempalace/backends/registry.py15
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py17
LOWmempalace/backends/__init__.py32
LOWmempalace/backends/__init__.py32
LOWmempalace/backends/__init__.py33
LOWmempalace/backends/__init__.py33
LOWmempalace/backends/__init__.py33
LOWmempalace/backends/__init__.py33
LOWmempalace/backends/__init__.py33
LOWmempalace/backends/__init__.py33
LOWmempalace/backends/__init__.py33
LOWmempalace/sources/transforms.py24
LOWmempalace/sources/registry.py20
LOWmempalace/sources/__init__.py19
LOWmempalace/sources/__init__.py19
LOWmempalace/sources/__init__.py19
LOWmempalace/sources/__init__.py19
LOWmempalace/sources/__init__.py19
LOWmempalace/sources/__init__.py19
48 more matches not shown…
Deep Nesting113 hits · 87 pts
SeverityFileLineSnippet
LOWtools/render_jsonl.py20
LOWtests/test_corpus_origin_integration.py1334
LOWtests/conftest.py55
LOWtests/conftest.py63
LOWtests/test_hooks_cli.py691
LOWtests/test_hooks_cli.py707
LOWtests/test_hooks_cli.py742
LOWtests/test_hooks_cli.py791
LOWtests/test_hooks_cli.py829
LOWtests/test_hooks_cli.py840
LOWtests/test_hooks_cli.py983
LOWtests/test_hooks_cli.py1033
LOWtests/test_hnsw_capacity.py358
LOWtests/test_chroma_collection_lock.py80
LOWtests/test_palace_locks.py46
LOWtests/test_palace_locks.py222
LOWtests/benchmarks/report.py34
LOWmempalace/repair.py104
LOWmempalace/repair.py247
LOWmempalace/repair.py325
LOWmempalace/repair.py972
LOWmempalace/repair.py1427
LOWmempalace/sync.py203
LOWmempalace/convo_scanner.py57
LOWmempalace/project_scanner.py444
LOWmempalace/miner.py472
LOWmempalace/miner.py580
LOWmempalace/miner.py684
LOWmempalace/miner.py1456
LOWmempalace/miner.py1592
LOWmempalace/palace_graph.py90
LOWmempalace/palace_graph.py189
LOWmempalace/palace_graph.py640
LOWmempalace/room_detector_local.py100
LOWmempalace/room_detector_local.py195
LOWmempalace/dialect.py806
LOWmempalace/dialect.py928
LOWmempalace/knowledge_graph.py328
LOWmempalace/knowledge_graph.py529
LOWmempalace/onboarding.py113
LOWmempalace/onboarding.py145
LOWmempalace/onboarding.py390
LOWmempalace/searcher.py398
LOWmempalace/exporter.py68
LOWmempalace/normalize.py178
LOWmempalace/normalize.py405
LOWmempalace/normalize.py446
LOWmempalace/normalize.py488
LOWmempalace/normalize.py569
LOWmempalace/llm_refine.py109
LOWmempalace/cli.py230
LOWmempalace/cli.py776
LOWmempalace/dedup.py79
LOWmempalace/llm_client.py44
LOWmempalace/corpus_origin.py332
LOWmempalace/entity_registry.py448
LOWmempalace/entity_registry.py622
LOWmempalace/entity_registry.py667
LOWmempalace/format_miner.py583
LOWmempalace/format_miner.py690
53 more matches not shown…
Over-Commented Block50 hits · 41 pts
SeverityFileLineSnippet
LOWpyproject.toml81 # Pre-commit framework — gates every local ``git commit`` on the
LOWpyproject.toml101dml = ["onnxruntime-directml>=1.16"]
LOWtools/backup_claude_jsonls.sh1#!/usr/bin/env bash
LOWtools/find_orphan_claude_jsonls.sh1#!/usr/bin/env bash
LOWtests/test_corpus_origin_integration.py1321# must use feature names ("corpus_origin", "corpus-origin detection")
LOWtests/test_format_miner.py561
LOWtests/test_convo_miner.py301# ── _is_ai_tool_path / _resolve_wing — wing_api auto-routing ───────────
LOWmempalace/repair.py921 try:
LOWmempalace/miner.py101# magnitude of safety margin against the original lockfile case
LOWmempalace/miner.py901
LOWmempalace/miner.py921# anywhere and no filesystem mtime return None (caller uses filed_at).
LOWmempalace/miner.py1341 # Lock this file so concurrent agents don't interleave delete+insert.
LOWmempalace/miner.py1361 # request for pathological files. A bad chunk can fail its sub-batch;
LOWmempalace/palace_graph.py581 # Preserve original creation timestamp on label updates.
LOWmempalace/palace_graph.py701
LOWmempalace/__init__.py1"""MemPalace — Give your AI a memory. No API key required."""
LOWmempalace/__init__.py41# warnings ("capture() takes 1 positional argument but 3 were given"). In 1.x the
LOWmempalace/cli.py121
LOWmempalace/corpus_origin.py41
LOWmempalace/format_miner.py741 # MempalaceConfig + chunk_text are imported at module level (above) so
LOWmempalace/palace.py501
LOWmempalace/palace.py741 treated as exchange-mode drawers.
LOWmempalace/diary_ingest.py221 # Per-entry drawers, with character chunking inside any entry
LOWmempalace/hooks_cli.py261 resolved = Path(mempal_dir).expanduser().resolve()
LOWmempalace/hooks_cli.py281# a directory of per-target slots, claimed via ``O_CREAT | O_EXCL`` so the
LOWmempalace/mcp_server.py501 ``quarantine_stale_hnsw`` per #1322), so the second attempt heals the
LOWmempalace/mcp_server.py521 # branches that actually open a collection so warm-cache reads stay
LOWmempalace/mcp_server.py1681 # embedding model never sees a document above ``chunk_size``.
LOWmempalace/mcp_server.py2821 # Drop leaked PYTHONPATH so any subprocess this server spawns starts
LOWmempalace/entity_detector.py41
LOWmempalace/entity_detector.py81# ==================== KNOWN-SYSTEMS COMPOUND LEXICON (Tier 3 linguistics cleanup) ====================
LOWmempalace/backends/chroma.py101 if not _hnsw_link_lists_is_usable_for_payload(seg_dir):
LOWmempalace/backends/chroma.py121# (palace 376 MB, link_lists.bin 0 bytes, no segfault) in 2026-04.
LOWmempalace/backends/chroma.py461# synchronization windows worth (2 × sync_threshold) is a safe steady-
LOWmempalace/backends/chroma.py1401
LOWhooks/mempal_save_hook.sh1#!/bin/bash
LOWhooks/mempal_save_hook.sh21# "type": "command",
LOWhooks/mempal_save_hook.sh41# transcript_path — path to the JSONL transcript file
LOWhooks/mempal_save_hook.sh61# is always mined regardless — this is purely additive.
LOWhooks/mempal_save_hook.sh101 if [ "$AUTO_SAVE" = "false" ]; then
LOWhooks/mempal_save_hook.sh121# default, and the hook silently produced zero saves (#1440).
LOWhooks/mempal_save_hook.sh141# where another local user on a shared box could read the traceback,
LOWhooks/mempal_save_hook.sh181TRANSCRIPT_PATH=$(printf '%s\n' "$_mempal_parsed" | sed -n '4p')
LOWhooks/mempal_save_hook.sh201 # silently absorbed by bash (the canonical way to read N bytes from
LOWhooks/mempal_precompact_hook.sh1#!/bin/bash
LOWhooks/mempal_precompact_hook.sh21# "hooks": {
LOWhooks/mempal_precompact_hook.sh41# Claude Code sends JSON on stdin with:
LOWhooks/mempal_precompact_hook.sh101# read sanitized values from one-per-line stdout into shell variables
LOWhooks/mempal_precompact_hook.sh141SESSION_ID=$(printf '%s\n' "$_mempal_parsed" | sed -n '2p')
LOWbenchmarks/model_eval/candidates.yaml1# Candidate models for evaluation.
Self-Referential Comments8 hits · 30 pts
SeverityFileLineSnippet
MEDIUMtests/test_hall_detection.py109 # Create a conversation file with technical content
MEDIUMtests/test_mcp_server.py640 # Create a collection so status works
MEDIUMtests/test_mcp_server.py670 # Create the DB file (init does this) but NOT the collection
MEDIUMtests/test_mcp_server.py2187 # Create a real collection so _get_collection succeeds
MEDIUMtests/test_repair.py318 # Create a valid sqlite file so the repair preflight can run quick_check.
MEDIUMtests/test_miner.py2003 # Create a real file with known mtime.
MEDIUMtests/test_backends.py1557 # Create the collection using the default (minilm-based) EF.
MEDIUMtests/benchmarks/test_knowledge_graph_bench.py58 # Create a hub entity connected to many others
AI Slop Vocabulary9 hits · 26 pts
SeverityFileLineSnippet
MEDIUMtests/test_palace_graph_tunnels.py93 # instead of raising — keeps read-path filters robust to bad records.
MEDIUMtests/test_hooks_bash_compat.py144 # leaks debug output here would silently break the harness contract.
LOWmempalace/room_detector_local.py329 # If still nothing, just use general
MEDIUMmempalace/format_miner.py317 """Convert ``path`` to plain text via MarkItDown, with comprehensive fringe-case handling.
MEDIUMhooks/mempal_save_hook.sh67# Why this is nontrivial: GUI-launched Claude Code on macOS (or any harness
MEDIUMhooks/mempal_save_hook.sh128# every Stop hook for users on i18n harnesses or unusual harness configs.
MEDIUMbenchmarks/model_eval/metrics.py25# the harness can land on develop independently of the model-router PR.
MEDIUM.claude-plugin/hooks/mempal-stop-hook.sh3# All logic lives in mempalace.hooks_cli for cross-harness extensibility
MEDIUM.claude-plugin/hooks/mempal-precompact-hook.sh3# All logic lives in mempalace.hooks_cli for cross-harness extensibility
Cross-Language Confusion5 hits · 24 pts
SeverityFileLineSnippet
HIGHtests/test_hooks_cli.py592 '{"type":"x","cwd":null}\n'
HIGHtests/test_hooks_cli.py587 """A cwd field that isn't a string (e.g. null, number) must be skipped."""
HIGHtests/test_save_hook_mines.py115 script.write_text(f'{func_src}\nis_valid_transcript_path "$1" && echo OK || echo NO\n')
HIGHtests/test_corpus_origin.py283 "primary_platform": null,
HIGHbenchmarks/mine_bench.py17 uv venv /tmp/gpu && source /tmp/gpu/bin/activate
Fake / Example Data18 hits · 18 pts
SeverityFileLineSnippet
LOWtests/test_closets.py211 content = "lorem ipsum dolor sit amet consectetur adipiscing elit"
LOWtests/test_closets.py211 content = "lorem ipsum dolor sit amet consectetur adipiscing elit"
LOWtests/test_miner_fts5_validation.py215 big = "lorem ipsum " * 500
LOWtests/test_miner_fts5_validation.py253 (src / "big.md").write_text("lorem ipsum " * 200)
LOWtests/test_miner_fts5_validation.py303 (src / "big.md").write_text("lorem ipsum " * 200)
LOWtests/conftest.py232 kg.add_triple("Alice", "works_at", "Acme Corp", valid_from="2020-01-01", valid_to="2024-12-31")
LOWtests/test_project_scanner.py114 assert _looks_like_real_name("Jane Doe")
LOWtests/test_project_scanner.py155 ("Jane Doe", "jane@work.com", "r"),
LOWtests/test_project_scanner.py156 ("Jane Doe", "jane@personal.com", "r"),
LOWtests/test_project_scanner.py159 assert people["Jane Doe"].total_commits == 2
LOWtests/test_project_scanner.py160 assert len(people["Jane Doe"].emails) == 2
LOWtests/test_project_scanner.py263def _init_git_repo(path: Path, name: str = "Jane Doe", email: str = "jane@example.com"):
LOWtests/test_project_scanner.py343 assert [person.name for person in people] == ["Jane Doe"]
LOWtests/test_project_scanner.py364 people = [PersonInfo(name="Jane Doe", total_commits=5, repos={"r"})]
LOWtests/test_project_scanner.py371 assert d["people"][0]["name"] == "Jane Doe"
LOWtests/test_project_scanner.py331 _init_git_repo(tmp_path, name="Jane Doe", email="jane@example.com")
LOWtests/test_knowledge_graph.py105 assert "Acme Corp" in employers
LOWtests/test_knowledge_graph.py112 assert "Acme Corp" not in employers
Verbosity Indicators12 hits · 18 pts
SeverityFileLineSnippet
LOWmempalace/onboarding.py84# Step 1: Mode selection
LOWmempalace/onboarding.py268# Step 6: Ambiguity warnings
LOWmempalace/onboarding.py399 # Step 1: Mode
LOWmempalace/onboarding.py409 # Step 2: People
LOWmempalace/onboarding.py412 # Step 3: Projects
LOWmempalace/onboarding.py415 # Step 4: Wings (stored in config, not registry — just show user)
LOWmempalace/onboarding.py418 # Step 5: Auto-detect additional people from files
LOWmempalace/onboarding.py451 # Step 6: Warn about ambiguous names
LOWmempalace/onboarding.py141# Step 2: People
LOWmempalace/onboarding.py196# Step 3: Projects
LOWmempalace/onboarding.py222# Step 4: Wings
LOWmempalace/onboarding.py244# Step 5: Auto-detect from files
Redundant / Tautological Comments11 hits · 16 pts
SeverityFileLineSnippet
LOWtests/test_readme_claims.py556 # Check if either miner references 'hall' in the metadata it writes
LOWtests/test_save_hook_mines.py53 # Check if MEMPAL_DIR defaults to empty
LOWtests/test_miner.py1846 # Set mtime to a known value (2023-07-15 12:00 UTC)
LOWtests/benchmarks/test_search_bench.py86 # Check if needle content appears in top 5
LOWtests/benchmarks/data_generator.py365 # Write files distributed across room directories
LOWtests/benchmarks/test_palace_boost.py173 # Check if boost increases with scale (the hypothesis)
LOWmempalace/normalize.py206 # Check if this message is tool_results only (no user text)
LOWmempalace/entity_registry.py466 # Check if this is an ambiguous word
LOWbenchmarks/convomem_bench.py201 # Check if any retrieved message matches evidence
LOWbenchmarks/membench_bench.py376 # Check if any target turn is retrieved.
LOWbenchmarks/longmemeval_bench.py3217 # Print results
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippet
HIGHmempalace/repair.py0select count(*) from embeddings e join segments s on e.segment_id = s.id join collections c on s.collection = c.id where
HIGHmempalace/mcp_server.py0select count(*) from embeddings e join segments s on e.segment_id = s.id join collections c on s.collection = c.id where
HIGHmempalace/backends/chroma.py0select count(*) from embeddings e join segments s on e.segment_id = s.id join collections c on s.collection = c.id where
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippet
HIGHmempalace/palace_graph.py498Create an explicit (symmetric) tunnel between two locations in the palace. Tunnels are undirected: ``create_tunnel(
Overly Generic Function Names2 hits · 1 pts
SeverityFileLineSnippet
LOWtests/test_mcp_server.py3065 def helper(req):
LOWmempalace/mcp_server.py2447def handle_request(request):
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippet
LOW…nchmarks/results_convomem_raw_top10_20260414_1649.json1873 "question": "I just got a Slack message from a colleague that I need to handle later. What's a good way to keep trac