refactor(search): 죽은 search-cache + search --explain scaffold 제거

in-process LRU search cache 는 spine 재작성(#214)에서 이미 삭제됐는데
그 비계(scaffold)만 남아 있었다. 잔존물 제거:

- App::search/search_uncached 붕괴 (search() 는 1줄 위임자였음)
- search_uncached_with_config facade + 그 테스트 삭제
- 죽은 `search --no-cache` / `search --explain` CLI 플래그 제거
  (ask --explain 은 live — 건드리지 않음)
- 안 읽히던 RagCfg.explain_default config 필드 + fixture 제거
- 제거된 표면을 가리키던 stale 주석/문서(citation_helper/hybrid/
  search·app-facade README/DOGFOOD/HANDOFF) 정정

코어 검색 출력은 byte-identical (search_uncached 본문이 search() 로
verbatim 이동). `search_cache: false` wire capability 는 유지 — 제거 시
schema.v1 breaking bump 이라 손해. 적대적 검증 2렌즈(correctness-preserved
+ wire/config-safe) 통과, dead-symbol-complete 가 잡은 5건 주석/문서 정정 완료.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Mc6W1fgsrbFKTsqA6P8La
This commit is contained in:
2026-06-26 17:12:55 +00:00
parent fd3b4ae3d2
commit db9090c87b
17 changed files with 22 additions and 92 deletions

View File

@@ -42,7 +42,7 @@ classDiagram
ingest_with_config_progress
ingest_with_config_cancellable
list_docs_with_config / inspect_*_with_config
search_with_config / search_uncached_with_config
search_with_config
ask_with_config / ask_with_session_with_config
doctor_with_config_path
}
@@ -117,7 +117,7 @@ flowchart LR
- `ingest_with_config(cfg, scope, summary_only)` — 가장 단순.
- `ingest_with_config_progress(cfg, scope, progress: Option<Sender<IngestEvent>>)` — TTY 진행 표시 / `--json` line-delimited 용.
- `ingest_with_config_cancellable(cfg, scope, progress, cancel: Option<Arc<AtomicBool>>)` — 위 + cooperative cancel. asset loop iter 시작에서 poll → true 면 break + `Aborted{partial_counts}` + `Ok(IngestReport)` 반환 (Err 아님). 부분 commit 보존.
- `search_with_config / search_uncached_with_config` — 후자는 LRU cache bypass (debug).
- `search_with_config` — one-shot `App` 생성 후 `App::search` 위임.
- `ask_with_session_with_config(cfg, session_id, query, opts)` — multi-turn (p9-fb-18).
- `doctor_with_config_path(Option<&Path>)` — config 경로 explicit.
@@ -125,7 +125,7 @@ flowchart LR
- `App::open_with_config(cfg) -> Result<Self>` — SQLite open + migration. embedder/vector/llm 은 lazy `OnceLock` 으로 첫 호출에서 build.
- `App::embedder() -> Option<...>``provider == "none"` 또는 `dimensions == 0` 이면 `None` (lexical-only fallback).
- `App::ask_with_session(session_id, query, opts)` — repo + RAG ask + 새 turn append 한 묶음 (p9-fb-18).
- `App::search(query)`LRU cache lookup → miss 시 `search_uncached` → put. cache key = `(query_norm, mode, k, snippet_chars, embedding_version, chunker_version, corpus_revision)`.
- `App::search(query)`설정된 retriever stack 실행 후 top-k hits 반환. staleness stamp + `code_lang` / `repo` backfill 을 hit 에 적용.
**`IngestEvent`** (`kebab-app::ingest_progress`):
- `Started { total }` / `AssetStarted { workspace_path }` / `AssetCompleted { counts }` / `Completed { counts }` / `Aborted { partial_counts }`. terminal frame 후 sender drop.