//! Retired local persistence migrations — live startup guard.
//!
//! Installs create per-project context indexes at
//! `~/.difflore/projects/{project_hash}/context-index.db`. The former global
//! `~/.difflore/context-index.db` split migration is retired; runtimes must
//! not copy or reinterpret historical index contents.
//!
//! NOTE (R1/R4): the *migration* is retired, but this module is NOT dead code
//! and must not be deleted. [`run_if_needed`] is a live fail-closed guard
//! called from `difflore-cli/src/lib.rs` on every startup, and it is covered
//! by `tests/migration_test.rs`. Removing it would drop the protection against
//! silently reinterpreting a stale global index.
use crateindex_db;
use crateCoreError;
/// Startup guard for retired local index layouts.
///
/// If a retired global `context-index.db` is present, fail closed and leave
/// it untouched. Users can delete/move it and let the per-project index
/// rebuild from canonical rules.
pub async