altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

fix(tracing): wire flushSync into the TUI worker exit/SIGINT path (M3 crash-guard never fires in pure-TUI)

Open anandgupta42 opened this issue 6 months ago • 1 comments

Found during v0.8.1 release review (CTO, P2). The M3 crash-guard added in #865 only runs when flushSync fires, which is wired in run.ts (CLI SIGINT/exit) but not in worker.ts. In pure-TUI sessions the M3 export-vs-flushSync path is never exercised. Not a regression (no worse than before #865); add a flushSync call in a TUI exit/SIGINT handler so the guard actually protects TUI traces.

anandgupta42 avatar Jun 03 '26 04:06 anandgupta42

Closing as fixed on main: The TUI worker now calls traceConsumer.flushSync() during shutdown, and the CLI invokes that shutdown before terminating the worker. Please reopen if you still see this on v0.12.9 or later.

anandgupta42 avatar Nov 05 '26 21:11 anandgupta42