You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up from #6696 (fixed via PR #6697). While fixing the guard-flush bypass for early_ctrlc and the 3 doctor/gonka/cocoon subcommand exits, the review chain (impl-critic) found 2 more sites directly inside run() and 5 sites inside handle_url_open sharing the exact same bug pattern — a bare std::process::exit that skips TracingGuards::drop's take-once-cell flush logic — but they were not named in #6696's scope and were intentionally left untouched.
src/runner.rs:4482,4495,4514,4520,4547 inside fn handle_url_open (#[cfg(feature = "deep-link")]) — tracing_guards is alive on the caller's (run()) stack when handle_url_open is invoked, but handle_url_open is a separate function with no access to it. Fixing these requires either threading a flush handle into handle_url_open or returning an exit code up to run() instead of exiting internally — larger refactor than the other two groups, since it changes the function's control-flow shape.
Expected Behavior
The first two sites should be trivial to fix with the exit_with_flush helper already added in #6697 (near-zero marginal cost). The 5 handle_url_open sites need a small design decision (thread a flush handle through vs. return exit code to caller) before implementing.
Description
Follow-up from #6696 (fixed via PR #6697). While fixing the guard-flush bypass for
early_ctrlcand the 3 doctor/gonka/cocoon subcommand exits, the review chain (impl-critic) found 2 more sites directly insiderun()and 5 sites insidehandle_url_opensharing the exact same bug pattern — a barestd::process::exitthat skipsTracingGuards::drop's take-once-cell flush logic — but they were not named in #6696's scope and were intentionally left untouched.Sites
src/runner.rs:1186(Notify::Testfailure path) — directly insiderun(),tracing_guardsis in scope; trivial fix with thecrate::tracing_init::exit_with_flush(tracing_guards, code)helper added in fix(tracing): flush guards on Ctrl-C and doctor-subcommand exit #6697.src/runner.rs:1231(UrlScheme::Status --checkstale-status path) — same, trivial fix withexit_with_flush.src/runner.rs:4482,4495,4514,4520,4547insidefn handle_url_open(#[cfg(feature = "deep-link")]) —tracing_guardsis alive on the caller's (run()) stack whenhandle_url_openis invoked, buthandle_url_openis a separate function with no access to it. Fixing these requires either threading a flush handle intohandle_url_openor returning an exit code up torun()instead of exiting internally — larger refactor than the other two groups, since it changes the function's control-flow shape.Expected Behavior
The first two sites should be trivial to fix with the
exit_with_flushhelper already added in #6697 (near-zero marginal cost). The 5handle_url_opensites need a small design decision (thread a flush handle through vs. return exit code to caller) before implementing.Environment
src/runner.rs(Notify::Test,UrlScheme::Status,handle_url_open),src/tracing_init.rs(exit_with_flush,take_and_flush_guard_cells)