{"record":{"id":"58645c592c189493","repo":"Zackriya-Solutions/meetily","slug":"failed-to-determine-project-root","errorCode":null,"errorMessage":"Failed to determine project root","messagePattern":"Failed to determine project root","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"frontend/src-tauri/src/summary/summary_engine/sidecar.rs","lineNumber":239,"sourceCode":"                    let path = entry.path();\n                    if let Some(name) = path.file_name().and_then(|n| n.to_str()) {\n                        if name.starts_with(\"llama-helper\") && !name.ends_with(\".d\") {\n                            log::info!(\"Found fuzzy match in RESOURCE_DIR: {}\", path.display());\n                            return Ok(path);\n                        }\n                    }\n                }\n            }\n        } else {\n            log::warn!(\"RESOURCE_DIR environment variable not set\");\n        }\n\n        // 3. Fallback for dev: try relative paths from workspace (no target triple in dev builds)\n        if let Ok(manifest_dir) = std::env::var(\"CARGO_MANIFEST_DIR\") {\n            let project_root = PathBuf::from(&manifest_dir)\n                .parent()\n                .and_then(|p| p.parent())\n                .ok_or_else(|| anyhow!(\"Failed to determine project root\"))?\n                .to_path_buf();\n\n            let candidates = vec![\n                project_root.join(\"target/release/llama-helper\"),\n                project_root.join(\"target/debug/llama-helper\"),\n                project_root.join(\"target/release/llama-helper.exe\"),\n                project_root.join(\"target/debug/llama-helper.exe\"),\n            ];\n\n            for candidate in candidates {\n                if candidate.exists() {\n                    log::info!(\"Using dev llama-helper: {}\", candidate.display());\n                    return Ok(candidate);\n                }\n            }\n        }\n\n        Err(anyhow!(","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/summary/summary_engine/sidecar.rs#L221-L257","documentation":"In the dev-only fallback of llama-helper path resolution, the code goes from CARGO_MANIFEST_DIR two parents up to find the workspace root, and fails when .parent().parent() is None - i.e. the manifest directory has fewer than two ancestors (a path at or directly under the filesystem root).","triggerScenarios":"Running the app with CARGO_MANIFEST_DIR set to a shallow path such as '/x' (parent '/' , whose parent is None). Normal checkouts like /repo/frontend/src-tauri never hit this; it requires an unusually shallow source location or a mis-set env var.","commonSituations":"CI containers that clone to a root-level directory; manually overriding CARGO_MANIFEST_DIR; building from a mounted volume placed at the filesystem root.","solutions":["Set MEETILY_LLAMA_HELPER to the built helper binary - it is checked before this fallback and bypasses root derivation entirely","Build llama-helper (cd llama-helper && cargo build --release) so the target/ candidates exist and run from a normal-depth workspace checkout","Fix CARGO_MANIFEST_DIR to point at the real frontend/src-tauri directory inside the repo"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Prefer the env var before relying on workspace-root derivation\nif let Ok(path) = std::env::var(\"MEETILY_LLAMA_HELPER\") {\n    let p = PathBuf::from(path);\n    if p.exists() { /* use p */ }\n} else {\n    eprintln!(\"set MEETILY_LLAMA_HELPER or build llama-helper to avoid dev-path fallbacks\");\n}","typeGuard":null,"tryCatchPattern":"match find_helper_binary() {\n    Ok(bin) => spawn(bin),\n    Err(_) => {\n        // dev convenience: point at a known-good checkout instead of failing\n        let bin = PathBuf::from(std::env::var(\"MEETILY_LLAMA_HELPER\").expect(\"set MEETILY_LLAMA_HELPER\"));\n        spawn(bin)\n    }\n}","preventionTips":["Set MEETILY_LLAMA_HELPER explicitly in dev environments with unusual checkout layouts","Clone the repo to a normal-depth path (not directly under /)","Treat path-resolution failures as setup errors: fail fast with the env-var hint rather than probing silently"],"tags":["sidecar","dev-environment","path","build"],"backgroundTag":"path-resolution-failed","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}