BloopAI/vibe-kanban · error · ContainerError
Pre-flight check failed for repo '{}': {}
Error message
Pre-flight check failed for repo '{}': {} What it means
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.
Source
Thrown at crates/local-deployment/src/container.rs:409
&self,
workspace_root: &Path,
repos: &[Repo],
) -> Result<Vec<(Repo, PathBuf)>, ContainerError> {
let git = GitService::new();
let mut repos_with_changes = Vec::new();
for repo in repos {
let worktree_path = workspace_root.join(&repo.name);
match git.get_worktree_status(&worktree_path) {
Ok(ws) if !ws.entries.is_empty() => {
repos_with_changes.push((repo.clone(), worktree_path));
}
Ok(_) => {
tracing::debug!("No changes in repo '{}'", repo.name);
}
Err(e) => {
return Err(ContainerError::Other(anyhow!(
"Pre-flight check failed for repo '{}': {}",
repo.name,
e
)));
}
}
}
Ok(repos_with_changes)
}
async fn has_commits_from_execution(
&self,
ctx: &ExecutionContext,
) -> Result<bool, ContainerError> {
let workspace_root = self.workspace_to_current_dir(&ctx.workspace);
let repo_states = ExecutionProcessRepoState::find_by_execution_process_id(View on GitHub (pinned to 4deb7eca8f)
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.
Example fix
// before
container.try_commit_changes(&execution).await?;
// after
match container.try_commit_changes(&execution).await {
Err(ContainerError::Other(e)) if e.to_string().contains("Pre-flight check failed") => {
tracing::warn!("skipping commit, pre-flight failed: {e}");
}
r => r?,
} Defensive patterns
Strategy: try-catch
Validate before calling
if !worktree_path.exists() {
return Err(anyhow!("worktree missing for repo {}", repo.name));
} Try / catch
match container.try_commit_changes(&execution).await {
Err(ContainerError::Other(e)) if e.to_string().contains("Pre-flight check failed") => {
tracing::warn!("commit aborted: {e}");
// surface to user instead of crashing the flow
Ok(())
}
other => other,
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Force push required. The remote branch has diverged.
- Failed to push changes
- result.message || 'Force push failed'
- result.message || 'Push failed'
- branch_fetch_failed
AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29).
Data as JSON: /api/errors/f1e3fca640bc20c3.
Report an issue: GitHub.