leo: fix pending file cleanup — failed extractions no longer block retries
Failed/timed-out extractions and no-change extractions now remove the source from extract-pending.txt so the next cron cycle can retry. Caught by: Ganymede <00F28B10-062E-4863-9DD2-A5E9407B33FA> Pentagon-Agent: Leo <14FF9C29-CABF-40C8-8808-B0B495D03FF8>
This commit is contained in:
parent
9987925ced
commit
a25ef69ffa
1 changed files with 3 additions and 0 deletions
|
|
@ -152,6 +152,7 @@ IMPORTANT: Use the Edit tool to update the source file status. Use the Write too
|
|||
--permission-mode bypassPermissions \
|
||||
>> "$LOG" 2>&1 || {
|
||||
log "WARN: Claude extraction failed or timed out for $SOURCE_FILE"
|
||||
sed -i "\|^${SOURCE_FILE}$|d" "$PENDING_FILE"
|
||||
git checkout main >> "$LOG" 2>&1
|
||||
continue
|
||||
}
|
||||
|
|
@ -160,6 +161,7 @@ IMPORTANT: Use the Edit tool to update the source file status. Use the Write too
|
|||
CHANGED_FILES=$(git status --porcelain)
|
||||
if [ -z "$CHANGED_FILES" ]; then
|
||||
log "No changes produced for $SOURCE_FILE"
|
||||
sed -i "\|^${SOURCE_FILE}$|d" "$PENDING_FILE"
|
||||
git checkout main >> "$LOG" 2>&1
|
||||
continue
|
||||
fi
|
||||
|
|
@ -179,6 +181,7 @@ IMPORTANT: Use the Edit tool to update the source file status. Use the Write too
|
|||
# Check if anything was staged
|
||||
if git diff --cached --quiet; then
|
||||
log "No valid changes to commit for $SOURCE_FILE"
|
||||
sed -i "\|^${SOURCE_FILE}$|d" "$PENDING_FILE"
|
||||
git checkout -- . >> "$LOG" 2>&1
|
||||
git checkout main >> "$LOG" 2>&1
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue