Problem
When the operator hits Ctrl+C during the graph phase of indexing, the [graph]/[increment] task is left visually "running" in the progress renderer — no terminal event is emitted.
Root cause
_run_cocoindex_update_impl wraps its _popen_capturing_stderr call in a try/finally that emits a parent-side terminal event (status="failed"/"done") for the vectors task — see `src/java_codebase_rag/pipeline.py` (on_progress(ProgressEvent(kind="vectors", ..., status="failed"))).
run_build_ast_graph and run_incremental_graph call _popen_capturing_stderr bare — no finally, so on abort the graph task never gets a terminal event.
Why it surfaced now
Follow-up to #414, which made Ctrl+C actually interrupt the indexing wait (proc.wait() is now called before the uninterruptible Thread.join()). Abort is now reliable, so this rendering gap is actually reachable.
Fix (sketch)
Mirror the cocoindex path: wrap the _popen_capturing_stderr call in both graph functions with a try/finally that emits a terminal ProgressEvent(kind="graph", ..., status="failed") (and "done" on success), based on the returned code — same shape as the vectors finally.
Acceptance
- Ctrl+C during the graph phase renders a red cross / failed marker for the graph task (not a perpetual spinner).
- A passing graph build still renders the done marker.
Problem
When the operator hits Ctrl+C during the graph phase of indexing, the
[graph]/[increment]task is left visually "running" in the progress renderer — no terminal event is emitted.Root cause
_run_cocoindex_update_implwraps its_popen_capturing_stderrcall in atry/finallythat emits a parent-side terminal event (status="failed"/"done") for the vectors task — see `src/java_codebase_rag/pipeline.py` (on_progress(ProgressEvent(kind="vectors", ..., status="failed"))).run_build_ast_graphandrun_incremental_graphcall_popen_capturing_stderrbare — nofinally, so on abort the graph task never gets a terminal event.Why it surfaced now
Follow-up to #414, which made Ctrl+C actually interrupt the indexing wait (
proc.wait()is now called before the uninterruptibleThread.join()). Abort is now reliable, so this rendering gap is actually reachable.Fix (sketch)
Mirror the cocoindex path: wrap the
_popen_capturing_stderrcall in both graph functions with atry/finallythat emits a terminalProgressEvent(kind="graph", ..., status="failed")(and"done"on success), based on the returnedcode— same shape as the vectorsfinally.Acceptance