Conversation
- Add roots table with stable root_id - Add root_id column to documents with composite unique constraint - Add root_id to links table with source_root_id/target_root_id - Add per-root statistics (RootStats, IndexStats.roots) - Migration v3 handles existing single-root data - Update DocumentRecord, FileRecord, LinkInfo with root_id - Add root_id to search Index (SearchableDocument, SearchFilters)
- RootConfig with optional id + path - OkcConfig.roots changed from Vec<PathBuf> to Vec<RootConfig> - FileRecord includes root_id string - Scanner discovers files per-root with root_id - ChangeDetector operates on (root_id, path) composite key - Config validation and env overrides updated
- DocumentRecord, SearchableDocument include root_id (i64) - DocumentStore methods accept optional root_id parameter - RepositoryIndex.get_or_create_root_id for string-to-int mapping - store_parsed_document uses root_id for upsert/search/index - Change processing handles root_id in deletions - Metadata/query/document lookup filters by root_id - SearchFilters includes root_id - Stats delegated to document_store with per-root breakdown
- GraphStore links table adds source_root_id, target_root_id - store_links resolves target_root_id from target document - get_links/get_backlinks return target_root_id in LinkInfo - traverse_graph tracks current_root_id and marks cross-root edges - SearchIndex includes root_id in FTS, filters by root_id - SearchIndex.stats computes per-root breakdown
- OkcService.search accepts optional root_id - RootConfig exported from config module - CLI --root-path/--root-id paired flags for explicit roots - MCP ScanParams supports root_configs array - MCP SearchParams includes root_id - MCP GetDocumentParams passes through to service - LinkInfoOutput/LinkInfo includes target_root_id
- Integration tests use RootConfig with id/path - Property tests include root_id in FileRecord - Search evaluation updated for multi-root config - MCP E2E tests updated for new ScanParams - ChangeDetector tests pass with root_id composite key
- docs/architecture.md: add Multi-Root Repositories section - docs/configuration.md: document RootConfig, CLI flags, TOML format - Config tests updated for RootConfig path field
- Validation checks use root.path - MCP LinkInfoOutput adds target_root_id - Watcher handles RootConfig for canonical roots - OKC-00105 task marked Done
- get_links and get_backlinks SELECT target_root_id - LinkInfo populated with target_root_id from database
- Use RootConfig struct with id/path for roots configuration - Add target_root_id parameter (None) to search calls in benchmarks
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.
Summary
RootConfigwith stableroot_ididentifiers (auto-generated from path hash if not provided)rootstable,root_idcolumns ondocuments,links,headings,scan_errorstables with composite unique constraintsroot_id(upsert, get, delete, list)root_idas UNINDEXED field in FTS5 for filteringsource_root_idandtarget_root_idfor cross-root link resolutionIndexStats.rootswith document/error/link/heading countssearch,query_metadata,browse,get_document) now accept optionalroot_idfilter--root-id/--root-pathpaired flags for explicit root configurationRootConfigobjectsOKC_ROOTSsupports JSON array for structured configTesting