Skip to content

refactor(core): remove Vulture-confirmed dead code - #1153

Merged
phernandez merged 1 commit into
mainfrom
codex/remove-vulture-dead-code
Jul 25, 2026
Merged

refactor(core): remove Vulture-confirmed dead code#1153
phernandez merged 1 commit into
mainfrom
codex/remove-vulture-dead-code

Conversation

@phernandez

Copy link
Copy Markdown
Member

Why

Vulture found several production helpers and one complete MCP formatting module
that have no callers. Keeping these paths makes the codebase harder to navigate
and leaves obsolete compatibility layers looking like supported behavior.

This PR removes only findings that were confirmed unused in this repository and
cross-checked against the current Basic Memory Cloud source.

What Changed

  • Deleted the unreferenced basic_memory.mcp.formatting module.
  • Removed an unused cross-project move guidance formatter.
  • Removed four unused private semantic-search repository wrappers and their
    now-unused import.
  • Removed the unused internal type_filter argument from recent-activity
    formatting and updated its tests.

There are no public API, MCP schema, persistence, or runtime behavior changes.
The net change is 270 deleted lines across five files.

Implementation Details

  • Ran Vulture at both broad and 100% confidence, then verified every selected
    symbol with exact repository searches.
  • Kept Vulture findings that are required framework callback parameters for
    Alembic, Pydantic, and SQLAlchemy.
  • Kept locally unused runtime protocol symbols that are imported by Basic
    Memory Cloud.
  • Used Vulture through uvx; this PR does not add a project dependency or CI
    requirement.

Testing

Automated

  • source .venv/bin/activate && python -m pytest -q tests/mcp/test_tool_recent_activity.py tests/mcp/test_tool_move_note.py tests/repository/test_semantic_search_base.py tests/repository/test_semantic_vector_sync.py tests/repository/test_hybrid_fusion.py tests/repository/test_vector_pagination.py tests/repository/test_vector_threshold.py: 108 passed.
  • source .venv/bin/activate && ruff check src/basic_memory/mcp/tools/move_note.py src/basic_memory/mcp/tools/recent_activity.py src/basic_memory/repository/search_repository_base.py tests/mcp/test_tool_recent_activity.py: passed.
  • source .venv/bin/activate && ruff format --check src/basic_memory/mcp/tools/move_note.py src/basic_memory/mcp/tools/recent_activity.py src/basic_memory/repository/search_repository_base.py tests/mcp/test_tool_recent_activity.py: passed.
  • just fast-check: passed.
  • just fast-test: expanded to the full suite after testmon detected an
    environment change; 4,675 passed and 41 skipped. The sole failure was the
    live postgres-openai semantic benchmark because OpenAI returned HTTP 429
    insufficient_quota.
  • git diff --check: passed.

Manual

  • Re-ran Vulture after the cleanup. The remaining four 100%-confidence
    production findings are required framework callback parameters.
  • Confirmed exact searches return no references to the deleted module or
    helpers.

Risks / Follow-ups

  • Risk is low because the change removes private, unreferenced paths without
    replacing behavior.
  • The live OpenAI benchmark can be rerun when quota is available; local
    SQLite, Postgres, and FastEmbed coverage passed.
  • No follow-up code changes are required.

Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez
phernandez merged commit 5778739 into main Jul 25, 2026
22 checks passed
@phernandez
phernandez deleted the codex/remove-vulture-dead-code branch July 25, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant