Skip to content

doctor: verify timeout/gtimeout is available (Ralph loop requires it)#193

Open
selimdev00 wants to merge 1 commit into
LarsCowe:mainfrom
selimdev00:fix/doctor-timeout-check
Open

doctor: verify timeout/gtimeout is available (Ralph loop requires it)#193
selimdev00 wants to merge 1 commit into
LarsCowe:mainfrom
selimdev00:fix/doctor-timeout-check

Conversation

@selimdev00

Copy link
Copy Markdown

Problem

bmalph doctor reports "all checks OK" on a machine where the Ralph loop cannot actually run. The loop wraps every agent call in timeout/gtimeout (.ralph/lib/timeout_utils.sh), but doctor never verifies that command exists.

On a fresh macOS without GNU coreutils, the result is:

So a green doctor is not a guarantee the loop will start.

Fix

Add a timeout-available check to the core registry, right after the jq check (both are loop runtime deps). It probes the same way the loop resolves the binary - via command -v inside bash - so it matches the loop's actual environment rather than the host PATH:

  • macOS: command -v gtimeout || command -v timeout
  • Linux/other: command -v timeout

On failure it fails the check with a platform-specific hint (brew install coreutils on macOS, apt-get install coreutils on Linux, MSYS2 on Windows). On success it reports the resolved binary, e.g. timeout command available (gtimeout).

Tests

  • Unit tests for checkTimeout (label, pass + resolved-binary detail, macOS gtimeout-first probe, failure hint).
  • Updated registry assertions (length 18 -> 19, new id ordered after jq-available).
  • Full unit suite (1839) and the doctor e2e suite pass.

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