feat(ingest): 진행 로그 개선 — 파일명/phase/heartbeat/slowest 요약 #204
Reference in New Issue
Block a user
Delete Branch "feat/ingest-log-improve"
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?
요약
arctic 도그푸딩에서 OCR/caption 켜진 Obsidian 볼트 ingest 가 중간부터 느려졌는데, TTY 진행바가 현재 파일명·phase·모델·경과시간을 안 보여 "멈춘 것처럼" 보였다(원인은 비전 모델 스와핑인데 로그만으론 파악 불가). v0.24.0 상세 진행 로깅의 후속으로, 느린 phase(특히 이미지 OCR/caption)와 병목 파일을 가시화한다. 기본 동작 불변, additive wire.
설계: docs/superpowers/specs/2026-06-03-ingest-log-improve-spec.md
계획: docs/superpowers/plans/2026-06-03-ingest-log-improve-plan.md
변경
AssetPhase { idx, total, phase, model }(asset_phase) — asset 이 느린 phase(ocr/caption/embed) 진입 시 emit, model 은 그 phase 수행 모델.AssetTimings에ocr_ms/caption_ms추가(default 0).apply_ocr/apply_caption/임베딩 진입 직전AssetPhaseemit + OCR/caption 소요 측정.· phase(model)…③ asset 경과초 heartbeat(steady-tick). 종료 시 최장 소요 파일 top-5 요약(stderr; quiet 여도 출력,--json미출력).검증
cargo clippy --workspace --all-targets -j 8 -- -D warnings→ exit 0.cargo test -p kebab-app -p kebab-cli -j 8→ 61 그룹 0 failed.cargo test -p kebab-parse-image -p kebab-tui -j 8→ 14 그룹 0 failed.시험 항목 (Test Plan)
--json:asset_phase/ocr_msndjson, 사람텍스트 미혼입Assisted-by: Claude Code
OCR/caption 켜진 볼트 ingest 가 중간부터 느릴 때 TTY 진행바가 파일명·phase· 모델·경과시간을 안 보여 "멈춤"처럼 보이던 문제 해결. - 신규 wire AssetPhase{idx,total,phase,model} + AssetTimings.ocr_ms/caption_ms (additive, ingest_progress.v1 유지) - app: apply_ocr/apply_caption/embed 진입 시 AssetPhase emit + ocr/caption 시간 측정 - cli: TTY 진행바에 현재 파일명 + phase(model) + asset 경과초(heartbeat), 종료 시 최장 소요 파일 top-5 요약(quiet 여도 출력, --json 미출력) - wire schema / README / HANDOFF / HOTFIXES 동기화, version 0.26.0 → 0.27.0 검증(리더): clippy 0, kebab-app/cli 61그룹·parse-image/tui 14그룹 0실패(-j8). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>회차 1 — 진행 로그 개선. 구현은 견고하나 버전 라벨 nit 1건으로 REQUEST_CHANGES.
검증(리더 독립): clippy 0, kebab-app/cli 61그룹·parse-image/tui 14그룹 0 failed (-j8). 기능 코드 정상 동작.
좋았던 설계:
(Ns)를 갱신 — 공유Arc<Mutex<Option<Instant>>>+ indicatif 커스텀{asset_elapsed}템플릿 키 + steady-tick. 이번 사건(느린 OCR 중 진행바 정지처럼 보임)의 정확한 해법.current_path보관 → AssetPhase{path} · {phase}…+ slowest 요약(AssetTimings 가 idx 만 줘서 idx→path 매핑) 재사용. abbreviate_path 로 긴 경로 처리.지적 (actionable, nit):
v0.26.0으로 잘못 표기됨.asset_phase/ocr_ms/caption_ms와 progress.rs 의 heartbeat·slowest 주석은 v0.27.0(본 PR) 에서 추가되는 것이고, v0.26.0(arctic)엔 진행로깅 변경이 없었음.docs/wire-schema/v1/ingest_progress.schema.json의 asset_phase/phase/model/ocr_ms/caption_ms 설명 "(v0.26.0…)" → "(v0.27.0…)", progress.rs/ingest_progress.rs 의v0.26.0:주석 →v0.27.0:. (기존 asset_timings 의 parse/chunk/embed/store_ms 의 "(v0.24.0)" 은 정확하니 유지.) wire schema 의 "추가 버전" 은 외부 통합이 참조하므로 정확해야 함.이 라벨만 정정하면 머지 가능. 회차 2에서 반영 확인.
회차 2 — 회차1 지적(버전 라벨) 반영 확인. actionable 0, 머지 동의(APPROVE).
후속 커밋: 신규 표면의
v0.26.0라벨을 전부v0.27.0(실제 추가 버전)으로 정정 — wire schema(asset_phase/phase/model/ocr_ms/caption_ms) + progress.rs/ingest_progress.rs/lib.rs/tui 주석. 기존 asset_timings 의 v0.24.0 라벨은 보존. 로직 변경 없음(주석/json doc만),cargo check -p kebab-cli -p kebab-app -p kebab-tui통과.회차1 검증(clippy 0, app/cli 61 + parse-image/tui 14 그룹 0 failed) 유효. heartbeat 가 이벤트 사이에도 경과초를 갱신하는 설계로 "느린 OCR 중 멈춤처럼 보임" 문제를 정조준 해결. 문서·라벨 정합 완결. 사용자 머지 권장.
회차 3 — bump 규칙 적용(0.27.0 → 0.26.1 patch). actionable 0, 머지 동의(APPROVE).
후속: CLAUDE.md 에 명문화한 신규 규칙(기능/인터페이스 변경=minor, 없으면 patch)에 따라 본 PR 을 patch(0.26.1) 로 재조정. 근거 — 검색/색인 결과 불변, 신규 CLI subcommand·flag·config 키 없음, wire 변경은 additive-only(asset_phase + ocr_ms/caption_ms, 기존 소비자 무영향)인 관측성(로깅) 개선. Cargo.toml·라벨·HOTFIXES 헤더 0.26.1 로 통일,
cargo check통과. 로직 변경 없음.회차1~2 검증(clippy 0, app/cli 61 + parse-image/tui 14 그룹 0 failed) 유효. 문서·버전 정합 완결. 사용자 머지 권장.