fix: TUI indexing status + SCIP LMDB MDB_MAP_FULL fix (v1.0.128)#56
Merged
Conversation
When a project's repo name equals a Python package subdirectory name (e.g. project 'aprimo_mcp', package at aprimo_mcp/config.py), strip_alias_prefix was too aggressive: it turned 'aprimo_mcp/config.py' into 'config.py', which then resolved to the wrong absolute path and yielded no chunks. Fix: extract outline_items_for_normalized helper and add a second lookup in file_outline -- if the stripped path returns empty AND stripping changed the path, retry with the original (un-stripped) relative path. This is harmless for the normal case (alias != subdir name) and restores correct behaviour for the aliased-subdir case. Tested: cargo check + cargo clippy clean.
- Improve doc comment: clarify that multi-store mode never returns Err (per-store I/O failures are logged+skipped), only single-store does. - Replace unwrap_or_default() on fallback path with explicit match that emits a warn! log when the fallback itself fails, so operators can see the failure instead of silently getting an empty result.
…ng during SCIP rebuild
…g watcher-triggered symbol rebuild
…ndexing status Phase 2: pre-mark all queued candidates as CSharpIndexStatus::Indexing immediately after evaluation (before semaphore acquisition), so repos waiting in the queue already show "C#…" in the TUI instead of "C#·" or nothing. Phase 3: set csharp_index_status = Indexing before batch-find-refs starts and restore to Ready on completion (success or failure). Intentionally does NOT touch active_reindexes — pre-warm should not block HTTP /reindex and should not override the repo label (Warm/Open). This makes the 30-60s batch-find-refs operation visible in the TUI as "C#…" instead of the silent "◐ warm C#·" that was shown before. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ented Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Enterprise C# repos with thousands of symbols + Phase-3 ref_cache can exceed the old 64 MB LMDB limit, causing MDB_MAP_FULL errors when find_refs_for_canonical_key writes to scip_ref_cache. This made find_impact fail for all cached-ref writes on affected repos. The 64 MB limit was listed as a known follow-up issue. Fix: - Default map_size → 512 MB (virtual address space, no RAM cost) - Add CODESEARCH_SCIP_LMDB_MAP_MB env-var override for tuning - Constants SCIP_LMDB_DEFAULT_MAP_SIZE_MB / SCIP_LMDB_MAP_SIZE_MB_ENV follow the same pattern as the embed-cache and vector-DB size vars Also update AGENTS.md: mark map_size as resolved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rride Guards against accidental regression of SCIP_LMDB_DEFAULT_MAP_SIZE_MB (must stay at 512 MB — the old 64 MB limit caused MDB_MAP_FULL on enterprise repos once Phase-3 ref_cache writes were introduced). Also verifies that the CODESEARCH_SCIP_LMDB_MAP_MB env-var override reaches open_scip_env() without panicking: a 16 MB override on an empty DB must return Ok(empty) from find_references. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_size Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…code removal - add_repo_handler conflict branch: also unregister alias from repos.json when active_reindexes.insert returns false; previously the config entry was left orphaned (no open stores) until server restart - try_open_stores: rename `create_if_missing` param to `allow_create` for clarity — the old name implied write-failure would fall back to readonly, which it does not when allow_create=true - evaluate_csharp_rebuild: replace (bool, &'static str) return type with a proper RebuildDecision enum; removes the fragile string equality check `reason == "fresh, last_scip>=last_changed"` at the call site - trigger_symbol_rebuild: document the known TUI-flash race when FSW-SCIP rebuild and HTTP /reindex fire concurrently for the same alias (DashSet idempotency means no data corruption; cosmetic-only) - lmdb_registry: remove dead-code is_registered() and tracked_count() fns that were never called in production or tests - AddRepoRequest: remove dead `global: bool` field (global indexing not implemented; serde will silently ignore the field if clients send it) - Remove accidentally committed CTempbase_mcp.rs temp file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All three add_repo_handler cleanup paths that call config.save() after rolling back a failed registration were silently discarding I/O errors. Replace `let _ = config.save()` with a `tracing::warn!` so disk failures during error-path cleanup are visible in logs — consistent with the remove_repo_handler which already logs save failures. Affects three sites: open-DB failure, concurrent-reindex conflict, and background-task index failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace "aprimo_mcp" example in mcp/mod.rs comment with a generic "my_pkg" placeholder. Remove client name from .claude/CLAUDE.md todo item. Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
C#…before semaphore acquisition; Phase 3 (ref-cache pre-warm) now signalsC#…at start andC#·on completion — was previously invisible to the TUIfind_impact) broken on all repos — SCIP LMDBmap_sizeraised from 64 MB → 512 MB (virtual address space only); enterprise repos with full Phase-3 ref_cache exceeded the old limit causingMDB_MAP_FULL; env-var overrideCODESEARCH_SCIP_LMDB_MAP_MBaddedRebuildDecisionenum replaces fragile(bool, &'static str)return;add_repo_handlerconflict branch now rolls back config entry;try_open_storesparam renamed toallow_create; dead code removed; all config save failures now loggedChanges
src/serve/mod.rsadd_repo_handlerconflict cleanup;RebuildDecisionenum;allow_createrename; warn on config.save() failuressrc/symbols/csharp.rsopen_scip_envsrc/constants.rsSCIP_LMDB_DEFAULT_MAP_SIZE_MB = 512,SCIP_LMDB_MAP_SIZE_MB_ENVsrc/lmdb_registry.rsis_registered()/tracked_count()tests/symbols_csharp_test.rsTest plan
cargo test --lib— 402 tests, 0 failurescargo test --test symbols_csharp_test— 6 tests pass (1 ignored, needs helper binary)cargo clippy -- -D warnings— zero warnings🤖 Generated with Claude Code