Skip to content

ci: retry the macOS Test step once on transient failures - #367

Merged
tbhb-agent merged 1 commit into
mainfrom
agent/r18-macos-retry
Nov 23, 2026
Merged

tbhb-agent merged 1 commit into
mainfrom
agent/r18-macos-retry

Conversation

@tbhb-agent

Copy link
Copy Markdown
Contributor

Why

Runner-side failures cost one macOS leg on each of the last two main runs. bazel (macos-26, d2) hit Unknown host: mirror.bazel.build at dd020c1. bazel (macos-26, python-single) hit tar: Write error in //:pyrefly_test at 22cd74b, with 91Gi of disk free. Both legs passed on the neighboring run.

Behavior change

  • The Test step in ci.yml now runs .github/actions/setup-bazel-ci/test.sh, which contains the same query and test commands as before.
  • On macOS, a first attempt that fails with Unknown host or tar: Write error in its output runs the whole sequence once more. A ::warning:: line names the matched pattern when the retry starts.
  • A first failure that matches neither pattern ends the step at once with its own exit code. Linux and Windows legs run one attempt.
  • The macOS disk and temp report steps are unchanged. The leg takes the exit code of the second run.

Decisions

  • The logic needs a function, a pipeline status check and two patterns, which read badly as inline YAML. A script file follows the precedent of fetch.sh.
  • Only two log patterns trigger the retry, so a real test failure never gets a second attempt.
  • The warning keeps retries visible. A repeated tar: Write error retry is the cue to investigate its cause, and the script comment says so.

Risk

The script has no committed test. The run checked it with a shell harness over a mocked bazelisk that covered a first-attempt pass, a passing retry, a failing retry, a failure with no pattern and a non-macOS failure. The harness stays out of this diff. A change to either pattern needs a matching edit in the script.

Verification

  • The harness showed that a first-attempt failure with either pattern takes the retry path, and a failure without one doesn't.
  • The PR checker counted 30 code lines against the 400-line limit.

Opened-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:debb814921f029ad;surface=cli
Generated-by: LLM harness=codex;model=openai:gpt-6.2-sol
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:1d0e2fd5d865c676;surface=exec
Assisted-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:debb814921f029ad;surface=cli

Generated-by: LLM harness=codex;model=openai:gpt-6.2-sol
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:1d0e2fd5d865c676;surface=exec
@tbhb-agent
tbhb-agent merged commit d9e78af into main Nov 23, 2026
58 checks passed
@tbhb-agent
tbhb-agent deleted the agent/r18-macos-retry branch November 23, 2026 10:32
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