pub fn resolve_active(args: &[String]) -> Result<PathBuf, String>Expand description
Active-session resolver consolidating the patterns used by
replay.rs / summary.rs / report_cmd.rs /
metricsql_cmd.rs / plot_metrics.rs / completion.rs.
Resolves to an existing session directory in this order:
--session/--session-path/--session-namefromargs(viaread_session_dir).- The
logs/latestsymlink, when it exists and points at a session directory with the expected artifacts (metrics.dborsession.log). Errwith a remediation message naming the flags that would have worked.
Read-only — no filesystem mutation. Use this anywhere a post-run command needs to operate on an existing session.
Why a separate function from read_session_dir.
read_session_dir returns Option (no opinion on what to do
when nothing’s set); resolve_active makes that the call
site’s failure mode, with a single canonical error message.