Skip to main content

migrate_legacy_layout

Function migrate_legacy_layout 

Source
pub fn migrate_legacy_layout() -> Result<usize, ConfigError>
Expand description

One-time best-effort migration of a pre-nesting flat layout (~/.rpi/{auth.json,models.json,.setup_done,.earendil_seen}) into the nested ~/.rpi/agent/ layout. No-op when RPI_CODING_AGENT_DIR is set (never touch an explicit override), when the agent dir already exists, or when no flat files are present. Idempotent: a partial move resumes. Errors are swallowed (logged via the returned Result only so tests can observe); app::run ignores them so a migration hiccup never blocks startup.