feat(wiki): P59 — wiki backend timeout 300s → 1800s + docs sync#69
Merged
Conversation
## wiki backend timeout 상향 (300s → 1800s) P52 의 300s 한도는 정상 wiki 생성 케이스에서도 SIGKILL 당하는 회귀를 유발 (sync-monitor 2026-05-15 에서 sonnet 가 5분 넘는 분석을 정상적으로 수행 중인 케이스 관측). 대형 vault (1000+ 세션) 의 wiki update 는 10~20분 걸리는 게 정상 — 30분 한도로 상향한다. - `wiki/claude.rs`: `Duration::from_secs(300)` → `1800` - `wiki/codex.rs`: 동일 - `wiki/ollama.rs`: reqwest `.timeout(300)` → `1800` - `wiki/lmstudio.rs`: 동일 ## docs sync - `README.md` 한국어 history table 에 P40 항목 추가 (영문은 이미 존재, 한국어만 누락이었음) - `docs/reference/handoff_2026-05-12.md` 추가 (tunaFlow → 터미널 에이전트 환경 이관 핸드오프) - `docs/reference/sync-monitor-2026-05-15.md` 추가 (P49~P52 머지 후 실 환경 검증 보고 — 1240 세션 cloud graph rebuild + wiki claude 5분 hang fix 검증) NOTE: CHANGELOG v0.3.x~v0.4.x backfill 은 의도적으로 skip — CHANGELOG.md 머리말에 "v0.2.x 시점에서 README 의 버전 히스토리 표로 SSOT 이전됨" 명시. P57 의 git tag SSOT 정책과 일치. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request increases the wiki generation timeout from 300 to 1800 seconds across the Claude, Codex, LM Studio, and Ollama backends to support long-running analysis. It also introduces a session handoff document, a sync monitoring report, and updates the README with a new milestone entry. Feedback from the review suggests centralizing the duplicated timeout constant for better maintainability and improving the consistency of error messages across backends. Additionally, a discrepancy in task numbering (P-numbers) within the documentation was identified for correction.
Comment on lines
+92
to
+94
| tokio::time::timeout(std::time::Duration::from_secs(1800), stream_and_wait) | ||
| .await | ||
| .map_err(|_| anyhow::anyhow!("claude wiki generation timed out after 300s"))??; | ||
| .map_err(|_| anyhow::anyhow!("claude wiki generation timed out after 1800s"))??; |
|
|
||
| | 항목 | 값 | | ||
| |------|-----| | ||
| | 머지된 PR | #57 (P49 노이즈), #58 (P50-B LlmBackend), #59 (P50-C/D/E 분해), #60 (P51 cloud default), #61 (P52 timeout) | |
This was referenced May 19, 2026
hang-in
added a commit
that referenced
this pull request
May 19, 2026
…on (#87) (#90) * feat(wiki,config): P85 — `[wiki].generation_timeout_secs` config option (#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> * fix(config): P85 follow-up — Gemini 리뷰 반영 (const 정의) 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> --------- Co-authored-by: d9ng <d9ng@outlook.com> Co-authored-by: Claude Opus 4.7 <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
handoff_2026-05-12.md,sync-monitor-2026-05-15.md배경
P52 에서 wiki backend 4 종에 300s timeout 을 추가했으나, sync-monitor 2026-05-15 검증에서 정상 wiki 생성 케이스도 5분 넘는 사례 관측됐다. 대형 vault (1000+ 세션) 의 wiki update 는 LLM 이 vault 전체 분석 후 합성하는 작업이라 10~20분 걸리는 게 정상 —
300s한도가 정상 케이스도 SIGKILL 시키는 회귀를 유발했다.P59 는 한도를 30분 (1800s) 으로 상향.
kill_on_drop+ tokio timeout 구조는 그대로 유지 — 실제 hang 케이스는 여전히 차단된다.Changes
crates/secall-core/src/wiki/claude.rsDuration::from_secs(300)→1800+ 주석crates/secall-core/src/wiki/codex.rscrates/secall-core/src/wiki/ollama.rs.timeout(300)→1800crates/secall-core/src/wiki/lmstudio.rsREADME.mddocs/reference/handoff_2026-05-12.mddocs/reference/sync-monitor-2026-05-15.mdNotes
CHANGELOG v0.3.x~v0.4.x backfill 은 의도적으로 skip — CHANGELOG.md 머리말에 "v0.2.x 시점에서 README 의 버전 히스토리 표로 SSOT 이전됨" 명시. P57 의 git tag SSOT 정책과 일치.
ollama/lmstudio HTTP 응답 streaming (P58 패턴의 다른 백엔드 확장) 은 SSE/chunked 응답으로의 큰 전환이라 별도 plan 으로 분리 — 본 PR 에는 포함되지 않음.
Test plan
cargo check --workspace통과cargo test --lib -p secall-core wiki통과 (46 tests)🤖 Generated with Claude Code