feat: ingest log round 2 — image_w/h + V008 SQLite mirror + CLI inspect + retention #190
Reference in New Issue
Block a user
Delete Branch "feat/ingest-log-round2-enhancements"
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?
요약
v0.20.x ingest log round 2 — sweet-spot 점진 분석 surface 강화 (4 enhancement).
v0.20.0 sub-item 1 (PR #189 머지) 의 round 1 ingest log (file-only ndjson) 의 후속:
kebab inspect ocr-stats+kebab inspect ocr-failures.keep_recent_runs+retention_days.7 commit on
feat/ingest-log-round2-enhancementsatop main89d334a.Commits
5977c8c— feat(app): capture image_width/height in PDF OCR raster decode (Enhancement 1)6482bf1— feat(store): V008 pdf_ocr_events migration + record/prune API (Enhancement 2)4e451c9— feat(app): dual-write PDF OCR events to SQLite + ndjson (Enhancement 2 wiring)d9ec7b8— feat(cli): kebab inspect ocr-stats + ocr-failures (Enhancement 3 + wire schema additive minor)35c987d— feat(app): log retention — keep_recent_runs + retention_days (Enhancement 4)9a36a06— style: cargo fmt --all (feature follow-up)7c24734— docs(superpowers): spec + plan artifactsWorkflow
docs/superpowers/specs/2026-05-28-v0.20.x-logging-r2-spec.md(751 line)docs/superpowers/plans/2026-05-28-v0.20.x-logging-r2-plan.md(576 line)핵심 surface 변경
Enhancement 1: image_width / image_height capture
PdfOcrProgress::Finished+ingest_progress.v1.pdf_ocr_finished의image_width/image_height가 round 1 에서 null hardcode 였음.image::ImageReaderdecode 로 dimension 추출.crates/kebab-app/Cargo.toml의 image feature 에"jpeg"추가 (F3 closure finding).Enhancement 2: V008 SQLite mirror
pdf_ocr_eventstable — per-OCR-call 영구 record.run_id, ts, doc_id, doc_path, page, image_byte_size, image_width, image_height, ms, chars, success, reason, ocr_engine.pdf_ocr_apply.rs— file ndjson + SQLite insert 동시.Arc::clone(&app.store)패턴 (이중 open 회피, G1 closure finding).canonical.doc_id사전 capture 로 NULL 회피 (F1 critic finding).Enhancement 3: CLI inspect commands
kebab inspect ocr-stats --json→ocr_stats.v1:kebab inspect ocr-failures --doc-id <id> --json→ocr_failures.v1(single doc).kebab inspect ocr-failures --json(no doc-id) → corpus-wide failures.*_with_configfacade rule (G2 closure finding).docs/wire-schema/v1/ocr_stats.schema.json+ocr_failures.schema.json신규.schema.schema.json의 wire.schemas 에 2 entry.integrations/claude-code/kebab/SKILL.md동기.Enhancement 4: Log retention
[logging] keep_recent_runs: u32default 100 (최신 N file 보존).[logging] retention_days: u32default 30 (N일 내 file 보존).IngestLogWriter::open.SqliteStore::prune_pdf_ocr_events(retention_days).Wire schema additive minor
ocr_stats.v1+ocr_failures.v1schema →schema.v1.wire.schemasenum 에 2 entry 추가.ingest_progress.v1.pdf_ocr_finished의image_width/image_height는 이미 v0.20.0 (PR #189) 에서 additive 추가됨 — 본 PR 은 null → Some(...) 값 채움.D5 dogfood verification (R6, fresh KB)
[logging] keep_recent_runs = 100,retention_days = 30config default emit ✓.pdf_ocr_eventstable 존재 ✓.kebab inspect ocr-stats --json→ocr_stats.v1schema emit ✓.kebab inspect ocr-failures --json→ocr_failures.v1schema emit ✓.Workspace test + clippy
cargo test --workspace --no-fail-fast -j 1→ 전수 pass.cargo clippy --workspace --all-targets -- -D warnings→ exit 0.🤖 Generated with Claude Code