pub fn latest_exec_id_for_session(session_dir: &Path) -> Option<u64>Expand description
Read the maximum exec_id recorded in the session’s
phase_outcomes table — i.e. “which execution_id is the
most recent one in this session’s history”. Used by
ExecutionQualifier::latest to resolve the latest-
execution intent into a concrete id.
Returns None when:
- The session dir doesn’t exist
- The sqlite file doesn’t exist (no run captured yet)
- The
phase_outcomestable is empty or absent
O(1) against the PK index — no full scan.