Skip to content

fix: keep CI running during Blacksmith outages - #123263

Merged
steipete merged 2 commits into
mainfrom
steipete/ci-runner-circuit-breaker
Aug 13, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/ci-runner-circuit-breaker

Conversation

@steipete

@steipete steipete commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where OpenClaw CI would remain queued and stop validating changes when Blacksmith runners were unavailable, even though every configurable job already had a working GitHub-hosted fallback label.

Why This Change Was Made

Adds a repository Actions variable, OPENCLAW_CI_RUNNER_BACKEND, as a manual circuit breaker. Unset or blacksmith preserves the current Blacksmith-first behavior; github prepends the existing hosted label to all 24 configurable runs-on expressions and routes Blacksmith-only optimizations through their established hosted paths. The planner remains unchanged: matrix rows may still emit Blacksmith labels, but the job-level expression overrides them.

The workflow change is operational production +78/-76 (net +2); tests are +168/-7. Documentation and the CI-limits runbook add +49/-1.

User Impact

Maintainers can keep CI moving during a Blacksmith outage by setting one repository variable, accepting slower standard hosted runners and GitHub-hosted concurrency limits, then delete the variable to return to normal operation. This PR does not set the variable and does not add scheduled health detection or automatic flipping.

Evidence

Expression evaluation

Derived directly from the checked-in expressions with a canonical first-attempt pull request and the representative matrix runner shown below:

Job backend=github dispatch fork PR canonical PR default
compact Node lane ubuntu-24.04 ubuntu-24.04 ubuntu-24.04 blacksmith-4vcpu-ubuntu-2404
build-artifacts ubuntu-24.04 ubuntu-24.04 ubuntu-24.04 blacksmith-32vcpu-ubuntu-2404
Windows windows-2025 windows-2025 windows-2025 blacksmith-8vcpu-windows-2025
macOS Swift macos-26 macos-26 macos-26 blacksmith-12vcpu-macos-26

The existing workflow_dispatch route forces hosted labels, and fork pull requests exercise the same hosted labels continuously. No repository variable was changed for this proof.

Blacksmith and hosted-path gate audit

  • Publish exact dependency cache (.github/workflows/ci.yml:877) is disabled for the GitHub backend; pnpm-store-warmup (.github/workflows/ci.yml:1094) becomes the hosted cache path.
  • Setup Node environment consumers select the exact dependency cache only on Blacksmith and the ordinary Actions pnpm-store cache on the GitHub backend: build-artifacts (.github/workflows/ci.yml:1185), sqlite-session-lifecycle (:1456), native-i18n (:1492), checks-ui (:1533), checks-ui-e2e (:1600), checks-ui-e2e-real-gateway (:1638), control-ui-i18n (:1676), checks-fast-core (:1765), qa-smoke-ci-profile (:1870), checks-fast-plugin-contracts-shard (:2050), checks-fast-channel-contracts-shard (:2092), checks-node-core-test-nondist-shard (:2167), check-shard (:2304), check-additional-shard (:2608), and check-docs (:2897).
  • Set up Blacksmith Docker layer cache (.github/workflows/ci.yml:1879) and the Blacksmith-specific QA zero-stagger setting in Run smoke profile part (:1908) are disabled for the GitHub backend.
  • Extension boundary sticky gates all exclude the GitHub backend: Mount extension boundary sticky disk (.github/workflows/ci.yml:2317, :2622), Restore extension boundary artifacts from sticky disk (:2330, :2642), and Seed extension boundary sticky disk (:2864). The existing Actions cache and cold-build path remain active.
  • Android sticky gates exclude the GitHub backend: Mount Gradle sticky disk (.github/workflows/ci.yml:3679) and Point Gradle at the sticky disk (:3701). Run Android ${{ matrix.task }} (:3732) uses the existing dispatch-style split Gradle build for the GitHub backend.
  • Label-derived gates already degrade without another condition: Check CLI startup memory (.github/workflows/ci.yml:1287) uses runner.environment == 'github-hosted', while Run built artifact checks (:1311) serializes Gateway watch when runner.environment is hosted. The lint shard continues to size itself from nproc.
  • .github/actions/setup-node-env/action.yml contains no Blacksmith action dependency; its portable compile/Vitest/dependency caches use the upstream Actions cache API and remain valid on hosted labels.

Hosted timeout audit

  • build-artifacts (.github/workflows/ci.yml:1170) now receives the existing 35-minute hosted budget when OPENCLAW_CI_RUNNER_BACKEND=github; Blacksmith remains at 20 minutes.
  • macos-swift (.github/workflows/ci.yml:3205) now receives the existing 30-minute hosted budget when OPENCLAW_CI_RUNNER_BACKEND=github; Blacksmith remains at 20 minutes.
  • The guard at test/scripts/ci-workflow-guards.test.ts:2915 enumerates every event-dependent timeout-minutes expression, pins these as the complete adjusted set, and evaluates both GitHub and Blacksmith backend values. All other CI jobs use a backend-independent fixed or matrix-owned timeout.

Commands

  • node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts — 117 passed, 2 skipped.
  • node --import tsx scripts/check-workflows.mts — passed, including zizmor and composite interpolation checks.
  • node scripts/check-changed.mjs — the trusted Testbox route timed out after 15 minutes while still queued, before executing the plan. The identical changed-lane plan passed locally with delegation disabled via CI=1 node scripts/check-changed.mjs (test root typecheck, docs/tooling formatting, dependency guards, and script lint all green).
  • git diff --check — clean.
  • oxfmt --check .github/workflows/ci.yml docs/ci.md test/scripts/ci-workflow-guards.test.ts .agents/skills/openclaw-ci-limits/SKILL.md — clean.
  • Branch-wide autoreview against origin/main after the timeout fix — clean; no accepted or actionable findings.

Follow-up workflow candidates

  • Blacksmith Build Artifacts Testbox
  • Blacksmith ARM Testbox
  • Blacksmith Testbox
  • CodeQL Android Critical Security
  • CodeQL macOS Critical Security
  • Full Release Validation
  • Install Smoke (Reusable)
  • iOS Periphery Dead Code
  • Live Media Runner Image
  • macOS Periphery Dead Code
  • Mantis Discord Smoke
  • Mantis Discord Status Reactions
  • Mantis Discord Thread Attachment
  • Mantis Scenario
  • Mantis Telegram Desktop Proof
  • Mantis Web UI Chat Proof
  • NPM Telegram Beta E2E
  • OpenClaw Live And E2E Checks (Reusable)
  • OpenClaw NPM Release
  • OpenClaw Performance
  • OpenClaw Release Checks
  • OpenGrep — Full
  • OpenGrep — PR Diff
  • Plugin Init Scaffold Validation
  • Plugin Prerelease
  • QA-Lab - All Lanes
  • QA Profile Evidence
  • Sandbox Common Smoke
  • Shared OpenClawKit Periphery
  • Stale
  • Sticky Disk Cleanup
  • Vitest Cache Warm
  • Windows Blacksmith Testbox
  • Windows Testbox Probe

@clawsweeper

clawsweeper Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M labels Aug 13, 2026
@steipete
steipete marked this pull request as ready for review August 13, 2026 16:48
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 13, 2026
@steipete
steipete merged commit fb82d87 into main Aug 13, 2026
53 of 55 checks passed
@steipete
steipete deleted the steipete/ci-runner-circuit-breaker branch August 13, 2026 17:18
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 14, 2026
* ci: add runner-backend circuit breaker with GitHub-hosted fallback

* fix(ci): extend hosted timeouts to circuit-breaker runs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant