fix(config + tilde): LLM default → gemma4:e4b + workspace.root ~ expansion #47
Reference in New Issue
Block a user
Delete Branch "fix/config-defaults-and-tilde-expansion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
요약
도그푸딩 시 발견된 두 issue 한 PR.
LLM default 변경 (사용자 결정):
Config::defaults의qwen2.5:14b-instruct→gemma4:e4b. OCR/caption (P6-2/P6-3) 가 이미 gemma4:e4b 사용 중이라 사용자가 한 family 만 pull 하면 ingest + ask 모두 작동.workspace.root~ expansion 일관성 fix: 사용자 init config 의root = \"~/KnowledgeBase\"가 코드 path 별로 다르게 처리. source-fs walk 는 정상이지만 image/pdf ingest branch + TUI editor jump 는~미확장 → 의미 없는 경로.변경
Config::defaults().models.llm.model→\"gemma4:e4b\"+ 코멘트.kebab-app::ingest_one_image_assetworkspace_root →expand_tilde(...)(markdown path 가 이미 쓰는 self-contained helper).kebab-app::ingest_one_pdf_asset동일.kebab-tui::search::handle_key_searchjump 호출 →kebab_config::expand_path(..., \"\")(env var + templating 도 처리하는 superset helper).Caveat
kebab-app::expand_tilde와kebab-config::expand_path가 별도 정의로 남음 — 후자가 superset. 통합은 P+ task (본 PR scope 외).검증
cargo test -p kebab-tui51 passedcargo clippy --workspace --all-targets -- -D warningscleancargo check --workspacecleanTest plan
-D warnings다음
원래 도그푸딩 시작이 막혀있던 두 issue 모두 해결 —
~/KnowledgeBaseworkspace 그대로 사용 +gemma4:e4b모델 default. 사용자 manual smoke 권장.도그푸딩 시 사용자 결정 (2026-05-02): 텍스트 LLM 기본을 gemma4 계열로 통일. OCR/caption 어댑터 (P6-2/P6-3) 가 이미 gemma4:e4b 사용 중 — 사용자가 한 family 만 pull 하면 ingest + ask 모두 작동. 같이 발견된 ~ expansion 불일치: - kebab-source-fs::connector 는 expand_tilde 사용 (walk 정상) - kebab-app::ingest_one_image_asset / ingest_one_pdf_asset 은 직접 PathBuf::from → ~ 미확장 → ExtractContext 에 ~/KnowledgeBase 그대로 전달 - kebab-tui::search::handle_key_search 의 editor jump 도 동일 → 의미 없는 경로 spawn Fix: - Config::defaults().models.llm.model = \"gemma4:e4b\". OCR/caption family 통일 코멘트 추가. - kebab-app 의 image / pdf 분기 두 곳 모두 expand_tilde 호출. - kebab-tui::search jump 가 kebab_config::expand_path(.., \"\") 사용 (expand_path 는 ~ / ${XDG_DATA_HOME} / {data_dir} 모두 처리하는 정식 helper). Caveat: kebab-app::expand_tilde 와 kebab-config::expand_path 가 별도 정의. 통합은 P+ task. Docs (sync rule): - README 사전 요구 절: gemma4:e4b 기본 + 더 큰 variant override 안내. - docs/ARCHITECTURE 핵심 결정 표: LLM default qwen2.5:7b-instruct → gemma4:e4b. - docs/SMOKE: ollama pull 예시 + KEBAB_MODELS_LLM_MODEL env 예시 qwen2.5:32b → gemma4:26b. - HOTFIXES: 새 entry (\"Config defaults: LLM = gemma4:e4b + workspace.root tilde expansion\"). - Memory: project_llm_default.md 신설, MEMORY.md 인덱스 추가. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>회차 1 — 두 issue (LLM default + ~ expansion 일관성) fix. actionable 0 — caveat (남은 두 helper 통합 P+ task) 만 명시. 머지 가능. 도그푸딩 시작 가능 상태.
@@ -6,3 +6,3 @@- **Rust toolchain** ≥ 1.85 (workspace 가 edition 2024 + resolver 3 사용). [rustup](https://rustup.rs) 권장.- **Ollama** — `kebab ask` 와 이미지 OCR/caption 가 사용. `https://ollama.com/download` 에서 설치 후 `ollama serve` 실행. 모델은 `ollama pull qwen2.5:7b-instruct` (텍스트) / `ollama pull gemma4:e4b` (vision) 등. config 의 `[models.llm].endpoint` 에 host:port 명시.- **Ollama** — `kebab ask` 와 이미지 OCR/caption 가 사용. `https://ollama.com/download` 에서 설치 후 `ollama serve` 실행. 기본 LLM 은 gemma4 계열 (`ollama pull gemma4:e4b`) — OCR / caption 도 같은 family 라 모델 하나만 pull 하면 됨. 더 큰 variant 원하면 `gemma4:26b` 등으로 config override. config 의 `[models.llm].endpoint` 에 host:port 명시.(칭찬) 사전 요구 절 한 줄이 "OCR / caption 도 같은 family 라 모델 하나만 pull 하면 됨" 운영 효과까지 명시. 사용자가
kebab init후 첫 단계 (ollama pull) 에서 한 명령만 실행하면 ingest + ask ���두 작동 — 도그푸딩 시작 friction 0.@@ -745,3 +745,3 @@// instance per the trait shape.let extract_config = kebab_core::ExtractConfig::default();let workspace_root = std::path::PathBuf::from(&app.config.workspace.root);// `~` / `${XDG_…}` expansion via the same helper the markdown(suggestion / 일관성) image / pdf 두 분기가
expand_tilde, kebab-tui search 가kebab_config::expand_path— 두 helper 동시 사용. HOTFIXES 의 "caveat (남은 inconsistency)" 도 이 사실 명시. 이번 PR scope 는 fix 의 minimum surface 라 OK 지만, 미래 P+ 로 넘기는 게 정확.Why:
kebab-app::expand_tilde가 이미kebab-config::expand_path의 subset. 한 helper 로 통합하면 두 spec literal 차이 (env var / templating) 제거 + 미래 contributor 가 "어떤 helper 써야 하지" 의문 사라짐.How to apply (P+ task):
kebab-app::expand_tilde호출 site (3 곳: line 114, 762, 1057, 1369) 모두kebab_config::expand_path(s, "")로 교체 후 self-helper 삭제. 본 PR 에서는 안 함 — caveat 그대로 명시.@@ -747,1 +747,3 @@let workspace_root = std::path::PathBuf::from(&app.config.workspace.root);// `~` / `${XDG_…}` expansion via the same helper the markdown// path uses, so a `~/KnowledgeBase` workspace.root resolves// identically across all media (HOTFIXES 2026-05-02 P9-4 follow-up).(칭찬) 두 분기 코멘트가 "HOTFIXES 2026-05-02 P9-4 follow-up" 으로 cross-link — 미래 contributor 가 "왜 expand_tilde 가 여기 있지" 묻으면 즉시 HOTFIXES entry 로 이동. 도그푸딩 시 발견된 인콘시스턴시의 history 가 코드 옆에 박혀있음.
@@ -240,3 +240,3 @@llm: LlmCfg {provider: "ollama".to_string(),model: "qwen2.5:14b-instruct".to_string(),// gemma4 계열 통일 — OCR (P6-2) + caption (P6-3)(칭찬)
gemma4:e4bdefault + 코멘트 (OCR/caption family 통일 + 사용자 override 안내) 가 한 결정의 의도를 정확히 코드 옆에. 미래 reader 가 "왜 gemma4 인가" 묻으면 코멘트 한 줄로 답 —kebab init으로 생성된 config.toml 도 이 모델 명을 그대로 받음.@@ -228,0 +227,4 @@// `~/...` / `${XDG_…}` expansion via `kebab-config::expand_path`// — same helper used by the markdown / image / PDF ingest// paths (HOTFIXES 2026-05-02 P9-4 follow-up).let workspace_root =(칭찬)
kebab_config::expand_path(.., "")사용 — kebab-tui 가 kebab-app 의 private helper 가져올 수 없으니 kebab-config 의 superset helper 호출.""(빈 data_dir) 가{data_dir}치환 우회하는 정확한 idiom —expand_pathdoc 의 "Pass an empty data_dir when resolving data_dir itself" 와 일치.@@ -14,6 +14,30 @@ historical contract that was implemented; this file accumulates thedeltas so phase 5+ readers can find the live behavior without diffinggit history.## 2026-05-02 — Config defaults: LLM = gemma4:e4b + workspace.root tilde expansion(칭찬) HOTFIXES entry 가 두 issue (LLM default 변경 + ~ expansion 일관성) 를 한 entry 에 묶음. 단일 도그푸딩 turn 에서 발견된 두 결정이라 entry 합치는 게 정직 — 두 별개 PR 으로 split 했으면 history 가 더 흩어짐. "Caveat (남은 inconsistency)" 절 이 P+ task 신호 명시.