agent: code-atomiser-fix — repair sed-scar provenance from 26c7307
The Magnotia->Lumotia rebrand commit 26c7307 ran a too-greedy
s/magnotia/lumotia/g across comments that already had the correct
legacy/target distinction. The commit author caught one case in
src-tauri/src/lib.rs ("magnotia era" -> "lumotia era" restored) but
missed four others, plus a duplicated word in a Cargo description
from an earlier two-name sed.
Fixed sites:
* crates/storage/src/database.rs — migrate_legacy_setting_keys docstring
* src/lib/utils/localStorageMigration.ts — file-level docstring
* src/lib/utils/settingsMigrations.ts — historical-key comment
* crates/cloud-providers/Cargo.toml — description duplication
* src-tauri/src/lib.rs — data-dir migration log + doc
None of the underlying code paths were wrong; the lies were
docstring-only. Risk: future maintainer reading any of these
comments at incident time could invert the migration direction or
conclude no migration ran.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
name = "lumotia-cloud-providers"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Provider trait and BYOK cloud STT scaffolding for Lumotia (Lumotia)"
|
||||
description = "Provider trait and BYOK cloud STT scaffolding for Lumotia"
|
||||
|
||||
[dependencies]
|
||||
lumotia-core = { path = "../core" }
|
||||
|
||||
@@ -905,14 +905,16 @@ pub async fn get_setting(pool: &SqlitePool, key: &str) -> Result<Option<String>>
|
||||
Ok(row.map(|r| r.get("value")))
|
||||
}
|
||||
|
||||
/// One-shot key rename for settings rows carried over from the lumotia era
|
||||
/// (`magnotia_preferences`, `magnotia_morning_triage_last_shown`, etc.).
|
||||
/// One-shot key rename for settings rows carried over from the magnotia era
|
||||
/// (`magnotia_preferences`, `magnotia_morning_triage_last_shown`, etc.) to
|
||||
/// the lumotia naming convention.
|
||||
///
|
||||
/// Idempotent. Returns `(renamed, orphans_deleted)`:
|
||||
/// * `renamed` — rows where only the lumotia key existed; the row's key
|
||||
/// is updated to the lumotia equivalent.
|
||||
/// * `orphans_deleted` — rows where BOTH keys existed; the lumotia row is
|
||||
/// authoritative and the lumotia row is deleted to avoid silent debt.
|
||||
/// * `renamed` — rows where only the legacy (magnotia) key existed; the
|
||||
/// row's key is updated to the lumotia equivalent.
|
||||
/// * `orphans_deleted` — rows where BOTH keys existed; the new (lumotia)
|
||||
/// row is authoritative and the legacy (magnotia) row is deleted to
|
||||
/// avoid silent debt.
|
||||
pub async fn migrate_legacy_setting_keys(pool: &SqlitePool) -> Result<(u64, u64)> {
|
||||
let mut tx = pool.begin().await.map_err(|source| Error::Query {
|
||||
operation: "migrate_legacy_setting_keys:begin".into(),
|
||||
|
||||
Reference in New Issue
Block a user