run_default_bundle_migration

Function run_default_bundle_migration 

Source
pub fn run_default_bundle_migration(
    wstore: &Arc<WaveStore>,
    broker: Option<&Arc<Broker>>,
    home_dir_override: Option<PathBuf>,
) -> MigrationStats
Expand description

Entry point — call once on srv startup, after WaveStore is open and before the srv begins accepting requests. home_dir_override is None in production (resolves dirs::home_dir()); tests use Some(tempdir) so they can plant fake ~/.<auth_dir_name>/.credentials.json files without touching the user’s real home.

Returns the MigrationStats for logging. Never panics; every internal failure path logs at warn and continues.