Skip to content

fix(docker_retry): use /usr/bin/true for macOS portability - #28

Merged
pofallon merged 1 commit into
mainfrom
chore-macos-true-path
May 25, 2026
Merged

fix(docker_retry): use /usr/bin/true for macOS portability#28
pofallon merged 1 commit into
mainfrom
chore-macos-true-path

Conversation

@pofallon

Copy link
Copy Markdown
Contributor

Three retry-loop tests in `crates/core/src/docker_retry.rs` pass `/bin/true` as a stand-in runtime path to invoke a real subprocess that succeeds without a Docker daemon. `/bin/true` is absent on the macOS GitHub Actions runner images, so these tests have been failing on the `Test (MVP fast) (macos)` job since they were added.

`/usr/bin/true` exists on both Linux (Ubuntu CI) and macOS GHA runners (verified locally on Linux: `ls -la /bin/true /usr/bin/true`). Switching fixes the failure with no semantic change to the tests.

Affected tests

  • `run_build_succeeds_on_first_attempt_without_hook`
  • `run_build_recovers_after_transient_failures`
  • `run_build_gives_up_after_exhausting_retries`

Test plan

  • `cargo fmt --all -- --check`
  • `cargo nextest run --profile dev-fast --no-default-features -E 'test(/docker_retry::tests::run_build_/)'` → 3/3 pass
  • CI green on macOS runner

Context

Surfaced while reviewing CI on #26 (MSRV bump + cargo-deny). Once this lands, #26 and #27 can be rerun and macOS will go green.

🤖 Generated with Claude Code

Three retry-loop tests pass /bin/true as the runtime path to invoke a
real subprocess that succeeds without a Docker daemon. /bin/true is
absent on the macOS GitHub Actions runner images, so these tests have
been failing on the Test (MVP fast) (macos) job for some time.

/usr/bin/true exists on both Linux (Ubuntu) and macOS. Switching to it
fixes the failure with no semantic change to what the tests assert.

Tests:
- run_build_succeeds_on_first_attempt_without_hook
- run_build_recovers_after_transient_failures
- run_build_gives_up_after_exhausting_retries

Surfaced while reviewing CI on the MSRV/cargo-deny PR (#26).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pofallon pofallon changed the title test(docker_retry): use /usr/bin/true for macOS portability fix(docker_retry): use /usr/bin/true for macOS portability May 25, 2026
@pofallon
pofallon merged commit 623e8a7 into main May 25, 2026
7 of 8 checks passed
@pofallon
pofallon deleted the chore-macos-true-path branch May 25, 2026 18:44
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