review(회차1): nit 3건 — 의도 문서화 (best-effort IO 의도 + bar invariant + display join)
회차 1 actionable 모두 동작 변경 없음, 의도 명시. - progress.rs handle_human: doc-comment 한 단락 — `let _ = writeln!` 의 IO error swallow 와 `bar.as_ref()` None 분기 silent skip 의 두 best-effort 의도 + §2.4a ordering invariant (ScanStarted 가 bar 를 lazy 초기화) 명시. - main.rs Cmd::Ingest: `let _ = display_handle.join();` 위에 한 줄 trailing comment — Result<Result<(), anyhow::Error>, Box<dyn Any>> 를 모두 discard 하는 이유 (display thread 의 에러 / panic 이 ingest exit code 에 영향 없어야 함). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,15 @@ impl ProgressDisplay {
|
||||
}
|
||||
}
|
||||
|
||||
/// Render an event in human mode. **Best-effort**: every
|
||||
/// `writeln!` into stderr swallows IO errors (`let _ = ...`)
|
||||
/// because the progress display must not fail the ingest run if
|
||||
/// the terminal is closed mid-stream. Likewise the
|
||||
/// `self.bar.as_ref()` / `as_mut()` branches treat a missing
|
||||
/// bar as silent skip — the bar is initialized lazily in the
|
||||
/// `ScanStarted` arm and §2.4a's ordering invariant
|
||||
/// (`ScanStarted` < everything else) guarantees it is `Some` by
|
||||
/// the time later events arrive.
|
||||
fn handle_human(&mut self, event: &IngestEvent, tty: bool) -> anyhow::Result<()> {
|
||||
match event {
|
||||
IngestEvent::ScanStarted { root } => {
|
||||
|
||||
Reference in New Issue
Block a user