feat(error-handling): ✨ add claudesync recovery logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
fa4d7adc98
commit
b93c3aca2d
1 changed files with 19 additions and 2 deletions
|
|
@ -677,10 +677,27 @@ class CommitDaemon:
|
|||
f"commit(s) from remote"
|
||||
)
|
||||
elif sync_result["error"]:
|
||||
error = sync_result["error"]
|
||||
logger.warning(
|
||||
f"[{cycle_id}] {repo.name}: Pre-cycle sync issue: "
|
||||
f"{sync_result['error']} (continuing anyway)"
|
||||
f"[{cycle_id}] {repo.name}: Pre-cycle sync issue: {error}"
|
||||
)
|
||||
# Let Claude handle sync failures (conflicts, pull issues)
|
||||
if self.error_handler and error != "fetch_failed":
|
||||
logger.info(
|
||||
f"[{cycle_id}] {repo.name}: Invoking Claude to resolve sync issue"
|
||||
)
|
||||
recovery = await self.error_handler.handle(
|
||||
repo, f"Pre-cycle sync failed: {error}"
|
||||
)
|
||||
if recovery.success:
|
||||
logger.info(
|
||||
f"[{cycle_id}] {repo.name}: Claude resolved sync issue"
|
||||
)
|
||||
else:
|
||||
logger.warning(
|
||||
f"[{cycle_id}] {repo.name}: Claude could not resolve sync: "
|
||||
f"{recovery.error} (continuing anyway)"
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"[{cycle_id}] {repo.name}: Pre-cycle sync failed: {e} "
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue