Repository navigation
refactor(index): one index session for index/watch/serve/brain/MCP setup - #576
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
ajianaz
added a commit
that referenced
this pull request
Oct 8, 2026
) Covers security hardening (#563, #572, #573), fixes (#553, #561, #562, #564, #565, #574-#576), and the ignore-pattern semantic changes from #577 that can alter which files existing configs exclude. Signed-off-by: ajianaz <ajianaz@users.noreply.github.com> Co-authored-by: ajianaz <ajianaz@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
index::session(IndexSession,ConfigSource,configure) as the single owner of config -> embedding backend -> vector store -> skip patterns -> project root (viaIndexBridge) -> incremental index -> stats.index,index --watch,watch,serve,brainand the MCP brain tool all go through it.Why
Closes #567
How
prepare_index_configremoved;commands/watch.rsand thebrainarm no longer re-inline the steps.servenow takes the global--config(it used to passNone).ConfigSource::ProjectOnly(project.cora.yamlonly, no env/global/API keys, per security(config): don't send API key to base_url from project .cora.yaml #563).resolve_backendonly consumes the localbrain.embeddingstring, so this does not widen the trust surface.index_skip_patterns(config)=ignore.files+index_skip_files, the same set as indexing.cora indexarm is thin dispatch tocommands/index_cmd.rs.index --watchnow delegates to thewatchimplementation (500ms debounce instead of a fixed 2s poll; watch's message wording). Flags unchanged.--rebuildnow also refreshes the session's project id.IndexBridge::current_root.Testing
cargo test --features tree-sitterpassescargo fmt --all -- --checkpassescargo clippy --all-targets --features tree-sitter -- -D warningspassescargo build --releasenot run (disk)index/session.rs: merged skip patterns, backend resolution (project-only path used by MCP), explicit--confighonored, incremental stats, rebuild/prune, scanners and indexing sharing one skip source.🤖 Generated with Claude Code