[search] Duplicate search implementation in services/search/ and src/search/ — near-identical files #771

Closed
opened 2026-06-03 00:28:08 +02:00 by sleepy · 0 comments
Owner

Problem

Two nearly-identical copies of the search module exist:

  • services/search/ (8 files, ~2240 lines)
  • src/search/ (7 files, ~2183 lines)

Only minor differences exist between them (e.g., content.py has 160 lines of diff, providers.py has 27 lines of diff for comment rewording). services/search/ has an extra service.py that src/search/ lacks.

Cross-import inconsistency

Routes import from services.search:

  • routes/search_routes.pyfrom services.search import ...

But src/deep_research.py imports from src.search:

  • from src.search.providers import _get_search_settings
  • from src.search.core import _call_provider, _build_provider_chain

This means two different copies of the same code are being used depending on call path.

AGENTS.md violations

  • No duplication: Two copies of the same codebase violates the principle of organizing by feature/domain
  • No README.md in either services/search/ or src/search/

Fix

  1. Pick one canonical location (likely services/search/ since routes use it)
  2. Delete the duplicate src/search/ or make it a thin re-export
  3. Update src/deep_research.py imports
  4. Add README.md
## Problem Two nearly-identical copies of the search module exist: - `services/search/` (8 files, ~2240 lines) - `src/search/` (7 files, ~2183 lines) Only minor differences exist between them (e.g., `content.py` has 160 lines of diff, `providers.py` has 27 lines of diff for comment rewording). `services/search/` has an extra `service.py` that `src/search/` lacks. ## Cross-import inconsistency Routes import from `services.search`: - `routes/search_routes.py` → `from services.search import ...` But `src/deep_research.py` imports from `src.search`: - `from src.search.providers import _get_search_settings` - `from src.search.core import _call_provider, _build_provider_chain` This means two different copies of the same code are being used depending on call path. ## AGENTS.md violations - **No duplication**: Two copies of the same codebase violates the principle of organizing by feature/domain - **No README.md** in either `services/search/` or `src/search/` ## Fix 1. Pick one canonical location (likely `services/search/` since routes use it) 2. Delete the duplicate `src/search/` or make it a thin re-export 3. Update `src/deep_research.py` imports 4. Add `README.md`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/odysseus#771
No description provided.