Skip to content

refactor(core): delete dead post-seam compatibility shims#1112

Merged
phernandez merged 1 commit into
mainfrom
refactor/1107-delete-dead-shims
Jul 20, 2026
Merged

refactor(core): delete dead post-seam compatibility shims#1112
phernandez merged 1 commit into
mainfrom
refactor/1107-delete-dead-shims

Conversation

@phernandez

Copy link
Copy Markdown
Member

Summary

First slice of #1107 (2026-07 architecture review post-seam cleanup) — the deletions that are provably dead:

  • src/basic_memory/deps.py — the deprecated shim file was shadowed by the deps/ package (a package wins over a same-named module), so it was unreachable dead code. Every from basic_memory.deps import ... resolves to the package __init__, which stays.
  • src/basic_memory/cloud/ — compat re-export package (5 one-line shims + barrel). Zero production importers in this repo (enforced by the boundary guard test) and zero in basic-memory-cloud's main tree — its imports were already migrated to canonical basic_memory.services/basic_memory.index paths. Only gateway README references remain there (doc touch-up, tracked separately).
  • mcp/async_client.create_client() — deprecated sync client path with zero callers anywhere; get_client() is the only client entrypoint.

Test changes: dropped the basic_memory.cloud parity test and the now-moot cloud import-boundary guard; the rest of tests/cloud/test_cloud_services.py (canonical-service tests) is unchanged.

Remaining #1107 items (legacy_router policy call, naming twins) are reported on the issue — they need decisions, not deletions.

Test plan

  • uv run pytest tests/cloud/test_cloud_services.py tests/test_architecture_boundaries.py tests/mcp/test_async_client_modes.py tests/test_deps.py — 57 passed
  • just typecheck — clean (9 pre-existing uvloop deprecation warnings only)
  • ruff check — clean

Part of #1107

🤖 Generated with Claude Code

Three leftovers from the protocol-seam migration were traps for readers
with zero production impact:

- deps.py: shadowed by the deps/ package, so the module was unreachable
  dead code (the package __init__ is the live re-export surface)
- basic_memory/cloud/: compat re-export package with no production
  importers here or in basic-memory-cloud main (already migrated to
  canonical basic_memory.services/index paths)
- mcp/async_client.create_client(): deprecated sync path with zero
  callers; get_client() is the only client entrypoint

Drop the cloud-package parity test and the now-moot import-boundary
guard along with the package.

Part of #1107

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez
phernandez merged commit f242c6e into main Jul 20, 2026
22 checks passed
@phernandez
phernandez deleted the refactor/1107-delete-dead-shims branch July 20, 2026 13:22
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