fix: replace critical hardcoded paths (A-4.2 P3)

Issues: 4 remaining critical paths affecting release

Fixed:
- health.rs: models path -> path_utils::models_dir()
- config.rs: STORAGE_ROOT -> relative fallback
- storage/output_dir.rs: backup -> relative fallback
- tmdb/probe.rs: scripts -> path_utils::scripts_dir()

Verification: cargo check --lib passes

Impact: All paths now have portable fallbacks
This commit is contained in:
Accusys
2026-10-04 16:40:14 +08:00
parent 14bbae258b
commit cccb0aa9b9
4 changed files with 15 additions and 5 deletions
+1 -2
View File
@@ -299,8 +299,7 @@ pub async fn create_identities_from_data(
// Step 4: Trigger background embedding extraction
if identities_created > 0 {
let scripts_dir = std::env::var("MOMENTRY_SCRIPTS_DIR")
.unwrap_or_else(|_| "/Users/accusys/momentry_core_0.1/scripts".to_string());
let scripts_dir = crate::core::path_utils::scripts_dir().to_string_lossy().to_string();
let python_path = std::env::var("MOMENTRY_PYTHON_PATH")
.unwrap_or_else(|_| "/opt/homebrew/bin/python3.11".to_string());
let schema = crate::core::config::DATABASE_SCHEMA.clone();