launcher_saga_log_path

Function launcher_saga_log_path 

Source
pub fn launcher_saga_log_path(data_dir: &Path) -> PathBuf
Expand description

Canonical path for the launcher saga log (<data-dir>/db/launcher-sagas.db). Performs a one-shot back- compat migration: launcher releases prior to this change wrote the saga log directly under <data-dir>/launcher-sagas.db (with srv DBs alongside in <data-dir>/db/, an inconsistency flagged by AUDIT_SQLITE_SYSTEMS §8.3). If only the legacy path exists, move it into db/.

This variant has WRITE side effects (rename + mkdir). Callers that must stay read-only (e.g. --diag sagas is documented as a passive on-disk inspector) should use launcher_saga_log_path_read_only instead. The launcher’s own startup path uses this one — the rename is welcome there.

Idempotent + safe to call repeatedly. Returns the canonical (post-migration) path the caller should open.