Skip to content

refactor(index): one index-session module for index/watch/serve/brain/MCP setup #567

Closed

Description

@ajianaz

Problem. config → embedding backend → vector store → skip patterns is assembled by hand at each entry point: index::prepare_index_config (used by main.rs:740/778, serve.rs), re-inlined in commands/watch.rs:36-49 and main.rs:1170-1190. Concrete bugs: serve passes None as config path so --config is ignored; MCP handle_brain_search (tools.rs:1044) never calls resolve_backend; review.rs:175 skips only index_skip_files while indexing uses ignore.files + index_skip_files. The index --watch poll loop duplicates commands/watch.rs. #565 threaded skip patterns through each entry point individually.

Direction. A single session module owns config → backend → store → skip → root → incremental index → stats. The Index arm of main.rs becomes thin dispatch; drop the duplicate poll loop in favour of watch.

Depends on the project-root seam issue.

From the 2026-10 architecture review (deepening candidates, develop @ 147dd75).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions