{"record":{"id":"f1e3fca640bc20c3","repo":"BloopAI/vibe-kanban","slug":"pre-flight-check-failed-for-repo","errorCode":null,"errorMessage":"Pre-flight check failed for repo '{}': {}","messagePattern":"Pre-flight check failed for repo '(.+?)': (.+?)","errorType":"exception","errorClass":"ContainerError","httpStatus":null,"severity":"error","filePath":"crates/local-deployment/src/container.rs","lineNumber":409,"sourceCode":"        &self,\n        workspace_root: &Path,\n        repos: &[Repo],\n    ) -> Result<Vec<(Repo, PathBuf)>, ContainerError> {\n        let git = GitService::new();\n        let mut repos_with_changes = Vec::new();\n\n        for repo in repos {\n            let worktree_path = workspace_root.join(&repo.name);\n\n            match git.get_worktree_status(&worktree_path) {\n                Ok(ws) if !ws.entries.is_empty() => {\n                    repos_with_changes.push((repo.clone(), worktree_path));\n                }\n                Ok(_) => {\n                    tracing::debug!(\"No changes in repo '{}'\", repo.name);\n                }\n                Err(e) => {\n                    return Err(ContainerError::Other(anyhow!(\n                        \"Pre-flight check failed for repo '{}': {}\",\n                        repo.name,\n                        e\n                    )));\n                }\n            }\n        }\n\n        Ok(repos_with_changes)\n    }\n\n    async fn has_commits_from_execution(\n        &self,\n        ctx: &ExecutionContext,\n    ) -> Result<bool, ContainerError> {\n        let workspace_root = self.workspace_to_current_dir(&ctx.workspace);\n\n        let repo_states = ExecutionProcessRepoState::find_by_execution_process_id(","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/local-deployment/src/container.rs#L391-L427","documentation":"check_repos_for_changes runs a git status check per repo before committing; if the status command itself errors (not merely reports changes), this error wraps the repo name and the underlying git failure. It is a pre-flight guard in try_commit_changes ensuring commits are only attempted against repos whose state could be inspected successfully.","triggerScenarios":"Calling try_commit_changes when a repo's worktree is missing/corrupt, git exits non-zero (locked index, bare repo, permission denied), or the status command fails for any repo.","commonSituations":"Worktree directory deleted while workspace still references it; .git/index.lock left over from a crashed process; filesystem permissions changed; repo moved or disk unmounted.","solutions":["Inspect the wrapped `e` message to see the underlying git failure for that repo.","Remove stale git lock files (e.g. .git/index.lock) if present.","Verify the worktree path exists and is a valid git worktree; re-create the workspace if it is gone.","Fix filesystem permissions or remount the missing volume, then retry the commit."],"exampleFix":"// before\ncontainer.try_commit_changes(&execution).await?;\n// after\nmatch container.try_commit_changes(&execution).await {\n    Err(ContainerError::Other(e)) if e.to_string().contains(\"Pre-flight check failed\") => {\n        tracing::warn!(\"skipping commit, pre-flight failed: {e}\");\n    }\n    r => r?,\n}","handlingStrategy":"try-catch","validationCode":"if !worktree_path.exists() {\n    return Err(anyhow!(\"worktree missing for repo {}\", repo.name));\n}","typeGuard":null,"tryCatchPattern":"match container.try_commit_changes(&execution).await {\n    Err(ContainerError::Other(e)) if e.to_string().contains(\"Pre-flight check failed\") => {\n        tracing::warn!(\"commit aborted: {e}\");\n        // surface to user instead of crashing the flow\n        Ok(())\n    }\n    other => other,\n}","preventionTips":["Verify worktree paths exist before commit flows.","Clean stale .git/index.lock files after crashes.","Monitor disk/permission health on worktree volumes.","Log the inner git error, not just the wrapper message."],"tags":["git","pre-flight","worktree"],"backgroundTag":"git-command-failed","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}