Skip to content

fix(retry): enforce timeout_minutes without coreutils timeout - #18

Merged
jdx merged 2 commits into
mainfrom
fix/retry-timeout-fallback
Oct 21, 2026
Merged

jdx merged 2 commits into
mainfrom
fix/retry-timeout-fallback

Conversation

@jdx

@jdx jdx commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

retry enforced timeout_minutes only when timeout or gtimeout was on the PATH, and otherwise warned and ran with no limit. Hosted macOS runners don't ship either, so a hung attempt there would run until the job's own timeout instead of being retried.

When neither binary exists, the action now runs the attempt in the background with a small watchdog that sends TERM, then KILL 30 seconds later, and the attempt fails with that exit status. timeout_minutes: 0 still means no limit.

Tested locally with PATH=/usr/bin:/bin (no timeout on macOS): a sleep 20 attempt is killed at the limit and retried, and a command that fails once then succeeds still passes on the second attempt.

AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable.

🤖 Generated with Claude Code


Note

Medium Risk
Changes process-group signaling and kill timing for all attempts on runners without coreutils timeout; behavior on Linux with timeout is unchanged but the fallback path is new shell logic worth validating on macOS CI.

Overview
Fixes timeout_minutes on hosted macOS runners where neither timeout nor gtimeout is available. Previously the action logged a warning and ran attempts with no per-attempt limit, so hung commands only stopped at the job timeout and never triggered retries.

The timeout logic is refactored into run_limited: it still prefers coreutils timeout / gtimeout, but when those are missing it backgrounds the attempt under job control and uses a watchdog that sends TERM to the process group, then KILL after 30 seconds (mirroring --kill-after=30). timeout_minutes: 0 still disables limiting. Header comments are updated to document the watchdog fallback.

Reviewed by Cursor Bugbot for commit 6a3ad2f. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ca09deab-02b9-4b42-98ce-ae1e8b9a2db3
📥 Commits

Reviewing files that changed from the base of the PR and between 9043f44 and 6a3ad2f.

📒 Files selected for processing: 1
  • retry/action.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5441d46. Configure here.

Comment thread retry/action.yml Resolved
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jdx
jdx merged commit 5b54f6c into main Oct 21, 2026
4 checks passed
@jdx
jdx deleted the fix/retry-timeout-fallback branch October 21, 2026 18:49
@jdx jdx mentioned this pull request Oct 21, 2026
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