feat(wiki,config): P85 — [wiki].generation_timeout_secs config option (#87)#90
Conversation
…on (#87) Issue #87 (cakel): wiki update 시 claude/codex/ollama/lmstudio 백엔드의 timeout 값 (1800s) 을 사용자가 직접 조정할 수 있는 config 옵션 추가. 배경: P59 (#69) 머지로 hardcoded 5분 → 30분 (1800s) 상향됐지만, 수만 세션 vault 또는 느린 모델 사용 시 1800s 도 부족할 수 있음. cakel 보고의 300s 에러는 P59 이전 버전 사용 의심이지만 (release 진행으로 별도 해소), 사용자 override 옵션은 정당한 기능 요청. 변경: - `vault/config.rs`: WikiConfig 에 `generation_timeout_secs: u64` 필드 (default 1800). - `wiki/{claude,codex,ollama,lmstudio}.rs`: 각 Backend struct 에 `timeout_secs` 필드. generate() 가 hardcoded `from_secs(1800)` → `from_secs(self.timeout_secs)`. - `commands/wiki.rs::build_wiki_backend`: 5개 instantiation 모두에 `timeout_secs: config.wiki.generation_timeout_secs` 전달. - `commands/log.rs`: log command 의 backend 5 instantiation 도 동일 (log 가 wiki backend struct 를 reuse 하므로 동일 timeout 적용). - `tests/sync_termination.rs` + wiki/{ollama,lmstudio} unit test 의 backend literal 갱신 (test 는 짧은 timeout 사용). 사용: ```toml [wiki] generation_timeout_secs = 3600 # 30분 → 1시간 ``` 비목표: haiku (Anthropic API HTTP 120s) + reviewers (60~120s) timeout 은 별도. log 가 별도 timeout 필요해지면 future 에 `[log]` 섹션에 추가 가능. 검증: - cargo fmt --check: clean - cargo clippy --workspace --all-targets -D warnings: clean - cargo test --workspace --no-fail-fast: all green (lib 426 + integration) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a configurable timeout for wiki generation backends, addressing issue #87. The previously hardcoded 1800-second timeout is replaced with a generation_timeout_secs field in the WikiConfig, which is then propagated to the Claude, Codex, Ollama, and LM Studio backends. The changes include updates to configuration structures, backend logic, command-line tool instantiation, tests, and documentation. Review feedback recommends defining the default timeout value as a constant to enhance code maintainability and clarity.
| fn default_wiki_generation_timeout_secs() -> u64 { | ||
| 1800 | ||
| } |
There was a problem hiding this comment.
| backends: std::collections::HashMap::new(), | ||
| review_backend: None, | ||
| review_model: None, | ||
| generation_timeout_secs: default_wiki_generation_timeout_secs(), |
Gemini PR #90 리뷰 (2건 medium): - `DEFAULT_WIKI_GENERATION_TIMEOUT_SECS: u64 = 1800` const 정의 - `Default` impl 에서 함수 호출 대신 const 직접 사용 - serde default 속성용 함수도 같은 const 반환 (단일 source of truth) 검증: - cargo fmt --check: clean - cargo clippy --workspace --all-targets -D warnings: clean - cargo test -p secall-core --lib vault::config: 17 passed Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Gemini 리뷰 2건 모두 반영 (commit d5c9e4c). |
* chore: v0.6.0 release P56 ~ P86 누적 18+ PR (#66~#90) — wiki self-ingest 루프 차단 (#82), wiki timeout config (#87), ollama/lmstudio fail-fast (#88), web 디자인 / model discovery / graph snapshot 개선, CI 시간 단축, 문서 룰 정리. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: update Cargo.lock for v0.6.0 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(changelog): v0.6.0 follow-up — Gemini 리뷰 반영 (P83/P86 중복 제거) PR #91 Gemini 리뷰 (medium): Behavior changes + Fixes 양쪽에 중복 기재되던 P83 / P86 항목을 Behavior changes 로 통합 (Closes #82 / Closes #88 명시 포함) + Fixes 섹션에서 해당 라인 제거. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: d9ng <d9ng@outlook.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Issue #87 (cakel): wiki update 시 claude/codex/ollama/lmstudio 백엔드의 timeout 값을 사용자가 직접 조정할 수 있는 config 옵션 추가.
배경:
변경
vault/config.rs:WikiConfig.generation_timeout_secs: u64(default 1800).wiki/{claude,codex,ollama,lmstudio}.rs: 각 Backend struct 에timeout_secs필드.generate()가from_secs(self.timeout_secs).commands/wiki.rs::build_wiki_backend: 5개 instantiation 모두timeout_secs: config.wiki.generation_timeout_secs전달.commands/log.rs: log command 의 backend 5 instantiation 도 동일 (log 가 wiki backend struct 를 reuse).tests/sync_termination.rs+ wiki/{ollama,lmstudio} unit test literal 갱신.사용 예시
```toml
config.toml
[wiki]
generation_timeout_secs = 3600 # 30분 → 1시간
```
Out of scope
[log]섹션에 추가 가능 (현재는 wiki 와 unify).Test plan
Closes #87
🤖 Generated with Claude Code