agent: lumotia-rebrand — fix QC blockers for phase 2
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled

Phase 2 QC found three explicit blockers + a broader sweep needed:

Explicit (QC-named):
- crates/mcp/src/lib.rs:15 — SERVER_NAME public MCP wire identity
- crates/transcription/build.rs:59 — panic message prefix
- crates/llm/tests/content_tags_smoke.rs:7 — docstring -p flag

Swept (string literals + dev env vars + doc comments + test fixtures):
- crates/mcp/src/main.rs — eprintln log prefixes
- src-tauri/src/commands/diagnostics.rs — diagnostic filename + MAGNOTIA_VERSION
- src-tauri/src/commands/audio.rs — recording filename pattern lumotia-<secs>-...wav
- src-tauri/src/commands/fs.rs — test placeholder path
- crates/transcription/src/model_manager.rs — .lumotia-verified marker
- crates/storage/src/database.rs — lumotia-storage-ro-<pid> temp dirs + doc comments
- crates/cloud-providers/src/keystore.rs — LUMOTIA_API_KEY_<PROVIDER> env var
- crates/audio/src/{wav,decode}.rs — lumotia_test_* / lumotia_decode_* test fixtures
- crates/core/src/tuning.rs — LUMOTIA_INFERENCE_THREADS env var
- All MAGNOTIA_LLM_TEST_MODEL / MAGNOTIA_WHISPER_TEST_* env vars
- Doc comments referencing crate names

Excluded (intentional Phase 4/5 scope):
- magnotia_preferences, magnotia_history, magnotia_morning_triage_last_shown
  DB setting keys (Phase 5 paths.rs migration)
- magnotia_startup tracing target (Phase 4)
- crates/core/src/paths.rs (Phase 5 wholesale rewrite + migration shim)

cargo build --workspace passes. cargo test --workspace: 330 pass, 0 fail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 08:52:47 +01:00
parent 089349d966
commit ce6dc1e728
21 changed files with 83 additions and 83 deletions

View File

@@ -52,8 +52,8 @@ pub fn resolve_recording_path(
/// collisions, which `SystemTime::now()` alone cannot guarantee
/// (two calls in the same clock tick can return identical nanos).
///
/// Format: `magnotia-<secs>-<nanos_in_sec>-<counter>.wav`, e.g.
/// `magnotia-1776828000-123456789-0000.wav`.
/// Format: `lumotia-<secs>-<nanos_in_sec>-<counter>.wav`, e.g.
/// `lumotia-1776828000-123456789-0000.wav`.
fn recording_filename() -> String {
let duration = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
@@ -61,7 +61,7 @@ fn recording_filename() -> String {
let secs = duration.as_secs();
let nanos = duration.subsec_nanos();
let counter = RECORDING_COUNTER.fetch_add(1, Ordering::SeqCst);
format!("magnotia-{secs}-{nanos:09}-{counter:04}.wav")
format!("lumotia-{secs}-{nanos:09}-{counter:04}.wav")
}
/// Process-lifetime monotonic counter for `recording_filename`. Starts
@@ -97,11 +97,11 @@ mod tests {
#[test]
fn recording_filename_has_expected_shape() {
let name = recording_filename();
assert!(name.starts_with("magnotia-"));
assert!(name.starts_with("lumotia-"));
assert!(name.ends_with(".wav"));
// Shape: magnotia-<digits>-<9 digits>-<>=4 digits>.wav
// Shape: lumotia-<digits>-<9 digits>-<>=4 digits>.wav
let rest = name
.strip_prefix("magnotia-")
.strip_prefix("lumotia-")
.and_then(|s| s.strip_suffix(".wav"))
.expect("shape prefix/suffix");
let parts: Vec<&str> = rest.split('-').collect();

View File

@@ -24,7 +24,7 @@ use crate::commands::security::ensure_main_window;
use crate::AppState;
const DEFAULT_RECENT_ERRORS: i64 = 50;
const MAGNOTIA_VERSION: &str = env!("CARGO_PKG_VERSION");
const LUMOTIA_VERSION: &str = env!("CARGO_PKG_VERSION");
/// Install the Rust panic hook. Writes each panic to a separate file in
/// crashes_dir so the diagnostic-report bundler can attach them. Also
@@ -60,7 +60,7 @@ pub fn install_panic_hook() {
\n\
OS: {os} {arch}\n\
RUST_BACKTRACE: {bt}\n",
ver = MAGNOTIA_VERSION,
ver = LUMOTIA_VERSION,
ts = ts,
thread = std::thread::current().name().unwrap_or("<unnamed>"),
info = info,
@@ -312,7 +312,7 @@ async fn generate_diagnostic_report_inner(
let mut out = String::new();
out.push_str("# Magnotia diagnostic report\n\n");
out.push_str(&format!("- Version: `{}`\n", MAGNOTIA_VERSION));
out.push_str(&format!("- Version: `{}`\n", LUMOTIA_VERSION));
out.push_str(&format!(
"- OS / arch: `{} / {}`\n",
std::env::consts::OS,
@@ -527,7 +527,7 @@ pub async fn save_diagnostic_report(
.duration_since(UNIX_EPOCH)
.map(|d| d.as_secs())
.unwrap_or(0);
let path = dir.join(format!("magnotia-diagnostic-{ts}.md"));
let path = dir.join(format!("lumotia-diagnostic-{ts}.md"));
fs::write(&path, &report).map_err(|e| format!("write file: {e}"))?;
Ok(path.to_string_lossy().to_string())

View File

@@ -35,7 +35,7 @@ mod tests {
#[tokio::test]
async fn write_text_file_errors_on_bad_parent() {
let result = write_text_file_cmd(
"/definitely-not-a-real-path-magnotia-phase9/out.md".into(),
"/definitely-not-a-real-path-lumotia-phase9/out.md".into(),
"x".into(),
)
.await;