Files
kebab/tasks/p9/p9-fb-01-ingest-progress-callback.md
altair823 5428412688 docs(p9): decompose dogfooding feedback into 20 task specs + reset plan
P9-1~P9-4 머지 후 사용자가 직접 도그푸딩 하며 수집한 16 항목 UX
피드백을 20 개 single-PR 사이즈 task spec 으로 분해. 각 spec 은
frontmatter (depends_on / unblocks / source_feedback), Goal,
Allowed deps, Public surface, Behavior contract, Test plan, DoD,
Out of scope 절 포함.

추가:
- p9-fb-01 ~ 20-*.md: 분해된 task spec 20 개
- p9-dogfooding-feedback.md: master index + 우선순위 + 권장 실행 순서
  + spec PR vs impl PR 절
- INDEX.md: p9-fb-01 ~ 20 link 추가
- docs/superpowers/plans/2026-05-02-p9-fb-06-reset-command.md:
  첫 후속 작업 (kebab reset 명령) 의 6-task 구현 plan
- .gitignore: .worktrees/ 추가 (superpowers worktree skill 용)

피드백 항목 → task spec 매핑은 p9-dogfooding-feedback.md 의 표 참조.
실행 시작 task: p9-fb-06 (reset 명령) — 도그푸딩 막힘 강도 1위.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 17:54:15 +00:00

2.7 KiB

phase, component, task_id, title, status, depends_on, unblocks, contract_source, contract_sections, source_feedback
phase component task_id title status depends_on unblocks contract_source contract_sections source_feedback
P9 kebab-app + kebab-core p9-fb-01 Ingest progress callback / event channel planned
p9-fb-02
p9-fb-03
../../docs/superpowers/specs/2026-04-27-kebab-final-form-design.md
§7 ingest
§10 UX
p9-dogfooding-feedback.md item 1

p9-fb-01 — Ingest progress callback

Goal

kebab_app::ingest_with_config 가 진행 상황을 caller 에게 흘려보낼 수 있도록 progress callback (또는 mpsc Sender) 주입 surface 추가. CLI / TUI / desktop 셋 모두 같은 이벤트 stream 소비.

Why now

도그푸딩 시 ingest 가 1.8 초 묵음 후 결과만 출력 — hung 인지 빈 워크스페이스인지 구분 불가. progress event 가 모든 UI surface 의 prerequisite.

Allowed dependencies

  • 기존 kebab-app deps. 신규 X.
  • std::sync::mpsc 또는 crossbeam_channel.

Public surface

#[derive(Debug, Clone)]
pub enum IngestEvent {
    ScanStarted { root: PathBuf },
    ScanCompleted { total: u32 },
    AssetStarted { idx: u32, total: u32, path: String, media: MediaKind },
    AssetFinished { idx: u32, kind: IngestItemKind, chunks: u32 },
    EmbedBatchStarted { n_chunks: u32 },
    EmbedBatchFinished { n_chunks: u32, ms: u64 },
    Aborted { partial_counts: AggregateCounts },
    Completed { counts: AggregateCounts },
}

#[doc(hidden)]
pub fn ingest_with_config_progress(
    config: kebab_config::Config,
    scope: SourceScope,
    summary_only: bool,
    progress: Option<Sender<IngestEvent>>,
) -> anyhow::Result<IngestReport>;

기존 ingest_with_configprogress=None 으로 forwarding wrapper.

Behavior contract

  • progress event 발신은 best-effort. receiver drop 되면 이후 send 무시 (panic 금지).
  • 이벤트 ordering: ScanStarted < ScanCompleted < (AssetStarted < AssetFinished)* < Completed|Aborted. embed batch 는 asset 사이 임의 위치.
  • Aborted 는 cancellation token (p9-fb-04) trigger 시. 혼자 발생 X — 14 번과 wiring.
  • --json CLI 는 line-delimited 형태로 dump (schema_version=ingest_progress.v1) — 별도 task (p9-fb-02).

Test plan

kind description
unit Sender<IngestEvent> 가 ScanStarted → ScanCompleted → Asset* → Completed 순서로 받는다
integration tmp workspace 3 md → 받은 이벤트 sequence 가 monotonic idx

DoD

  • cargo test -p kebab-app 통과
  • 기존 ingest_with_config 호출자 (CLI 단발 호출) 변경 없음
  • HOTFIXES 항목 X — 신기능, deviation 아님

Out of scope

  • progress event JSON 직렬화 (별도 wire schema task)
  • TUI 가 이벤트 소비해서 status bar 그리기 (p9-fb-03)