fix(auto-commit): 🐛 handle claude recovery failure cases
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
d70b90a60b
commit
c508867e0e
1 changed files with 9 additions and 1 deletions
|
|
@ -345,7 +345,8 @@ class LocalCommitAgent:
|
|||
f"Diverged {repo_name}: {ahead}↑ {behind}↓ — invoking claude-code for recovery"
|
||||
)
|
||||
|
||||
if _invoke_claude_recovery(repo_path, repo_name, upstream, ahead, behind):
|
||||
claude_ok = _invoke_claude_recovery(repo_path, repo_name, upstream, ahead, behind)
|
||||
if claude_ok:
|
||||
ahead2, behind2 = _ahead_behind(repo_path, upstream)
|
||||
if ahead2 == 0 and behind2 == 0:
|
||||
logger.info(f"Claude resolved {repo_name} cleanly")
|
||||
|
|
@ -357,7 +358,14 @@ class LocalCommitAgent:
|
|||
return
|
||||
except Exception as e:
|
||||
logger.error(f"Claude rebased {repo_name} but push failed: {e}")
|
||||
logger.warning(
|
||||
f"Claude exited clean but {repo_name} still diverged: {ahead2}↑ {behind2}↓ "
|
||||
f"— marking stalled (likely bailed on semantic conflicts)"
|
||||
)
|
||||
stall_entry.update(ahead=ahead2, behind=behind2, reason="claude_partial")
|
||||
else:
|
||||
logger.warning(f"Claude could not recover {repo_name} — marking stalled")
|
||||
stall_entry["reason"] = "claude_failed"
|
||||
|
||||
result.stalled_repos.append(stall_entry)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue