Skip to content

fix: disable set -e during main loop to allow retry on transient API …#209

Open
sainthardrock wants to merge 1 commit into
LarsCowe:mainfrom
sainthardrock:fix/set-e-blocks-retry
Open

fix: disable set -e during main loop to allow retry on transient API …#209
sainthardrock wants to merge 1 commit into
LarsCowe:mainfrom
sainthardrock:fix/set-e-blocks-retry

Conversation

@sainthardrock

Copy link
Copy Markdown

Problem

ralph/ralph_loop.sh line 6 has set -e which kills the script on
transient errors (e.g. "Connection closed mid-response") before the
retry logic in main() can work.

Fix

One-line: add set +e before the main while loop. The circuit breaker
still protects against real stagnation.

Checklist

  • Conventional commit format (fix:)
  • Bash syntax check passed (bash -n ralph/ralph_loop.sh)
  • npm run ci — TypeScript tests only, not relevant to this bash change

…errors

The main loop retry logic handles non-zero exit codes by sleeping 30s
and continuing, but set -e at line 6 kills the script before retry can
work. Adding set +e before the while loop lets transient network errors
trigger the retry path instead of a fatal unexpected_exit.

The circuit breaker (record_loop_result) still protects against real
stagnation — it only tracks progress during successful executions.

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant