Zackriya-Solutions/meetily · warning · anyhow::Error
Failed to determine project root
Error message
Failed to determine project root
What it means
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).
Source
Thrown at frontend/src-tauri/src/summary/summary_engine/sidecar.rs:239
let path = entry.path();
if let Some(name) = path.file_name().and_then(|n| n.to_str()) {
if name.starts_with("llama-helper") && !name.ends_with(".d") {
log::info!("Found fuzzy match in RESOURCE_DIR: {}", path.display());
return Ok(path);
}
}
}
}
} else {
log::warn!("RESOURCE_DIR environment variable not set");
}
// 3. Fallback for dev: try relative paths from workspace (no target triple in dev builds)
if let Ok(manifest_dir) = std::env::var("CARGO_MANIFEST_DIR") {
let project_root = PathBuf::from(&manifest_dir)
.parent()
.and_then(|p| p.parent())
.ok_or_else(|| anyhow!("Failed to determine project root"))?
.to_path_buf();
let candidates = vec![
project_root.join("target/release/llama-helper"),
project_root.join("target/debug/llama-helper"),
project_root.join("target/release/llama-helper.exe"),
project_root.join("target/debug/llama-helper.exe"),
];
for candidate in candidates {
if candidate.exists() {
log::info!("Using dev llama-helper: {}", candidate.display());
return Ok(candidate);
}
}
}
Err(anyhow!(View on GitHub (pinned to 0281737d87)
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
Defensive patterns
Strategy: fallback
Validate before calling
// Prefer the env var before relying on workspace-root derivation
if let Ok(path) = std::env::var("MEETILY_LLAMA_HELPER") {
let p = PathBuf::from(path);
if p.exists() { /* use p */ }
} else {
eprintln!("set MEETILY_LLAMA_HELPER or build llama-helper to avoid dev-path fallbacks");
} Try / catch
match find_helper_binary() {
Ok(bin) => spawn(bin),
Err(_) => {
// dev convenience: point at a known-good checkout instead of failing
let bin = PathBuf::from(std::env::var("MEETILY_LLAMA_HELPER").expect("set MEETILY_LLAMA_HELPER"));
spawn(bin)
}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: CI containers that clone to a root-level directory; manually overriding CARGO_MANIFEST_DIR; building from a mounted volume placed at the filesystem root.
Related errors
- llama-helper binary not found. Build with 'cd llama-helper &
- Generation failed: {}
- Sidecar error: {}
- Unknown model: {}
- Failed to get stdin
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/58645c592c189493.
Report an issue: GitHub.