Skip to content

fix: avoid Swift contention on hosted release runs - #116137

Merged
steipete merged 1 commit into
mainfrom
fix/hosted-swift-serial
Jul 30, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/hosted-swift-serial

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where manual release validation and retry CI runs could repeatedly fail the macOS Swift suite when parallel test processes contended on GitHub-hosted macOS runners.

Why This Change Was Made

The macOS Swift job now omits SwiftPM parallel test execution only for manual dispatches and workflow reruns, which are already routed to GitHub-hosted macOS. First-attempt automatic runs retain parallel execution on Blacksmith. Coverage, assertions, and all three retry attempts remain unchanged.

User Impact

Release validation gets a lower-contention hosted fallback without slowing the normal Blacksmith CI path. There is no product runtime change.

Evidence

  • actionlint .github/workflows/ci.yml
  • focused test/scripts/ci-workflow-guards.test.ts: 92 passed, 1 skipped
  • formatting check for both changed files
  • git diff --check
  • Codex autoreview: clean, no accepted or actionable findings

@steipete steipete self-assigned this Jul 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jul 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 29, 2026, 8:33 PM ET / July 30, 2026, 00:33 UTC.

ClawSweeper review

What this changes

This PR makes the macOS Swift suite run without SwiftPM parallelism for manual CI dispatches and workflow reruns, while leaving the first automatic attempt parallel.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 4 items remain

Keep this PR open for explicit maintainer handling: it carries the protected maintainer label, and the supplied evidence does not yet show the changed hosted macOS execution path after the fix. The workflow change itself is narrowly scoped and appears internally consistent from the diff, but a real manual-dispatch or rerun result is needed before merge confidence is high.

Priority: P2
Reviewed head: af12ce37c0e653e3711a03bc54d69c1a44ecc4fd
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is small, focused, and guarded, but real behavior proof for the hosted fallback remains the merge-confidence limiter.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body reports actionlint, formatting, diff checking, and a focused workflow guard test, but not an observed after-fix hosted macOS manual-dispatch or rerun. Please add redacted run output or logs; redact private endpoints, IP addresses, and credentials. Updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports actionlint, formatting, diff checking, and a focused workflow guard test, but not an observed after-fix hosted macOS manual-dispatch or rerun. Please add redacted run output or logs; redact private endpoints, IP addresses, and credentials. Updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items Narrow workflow change: The proposed workflow computes SWIFT_TEST_EXECUTION from manual dispatch or a rerun, then adds --parallel only when that value is parallel; the retry loop and coverage flag remain present.
Focused regression guard: The added guard test asserts the exact execution-mode expression, conditional parallel argument, coverage flag, and three-attempt retry loop.
Current workflow routing context: Current main uses dispatch-specific routing and exposes macOS Swift as a preflight-controlled release-validation job; the supplied PR diff targets that existing job rather than adding another CI lane.
Findings None None.
Security None None.

How this fits together

OpenClaw’s CI workflow determines which native validation jobs run, selects their runner environment, and executes the macOS Swift package suite as part of release validation. This change adds a trigger-and-retry-derived execution mode immediately before that test command.

flowchart LR
  A[CI trigger] --> B[macOS Swift job]
  B --> C[Dispatch or retry decision]
  C --> D[Swift execution mode]
  D --> E[Swift package tests]
  E --> F[Release validation result]
Loading

Decision needed

Question Recommendation
Does the release-validation owner approve serial SwiftPM execution for all manual dispatches and workflow reruns after seeing a successful hosted macOS proof run? Approve after hosted proof: Run or inspect a manual-dispatch or rerun that shows the serial Swift command succeeding on the hosted macOS path, then retain the narrow condition.

Why: The protected maintainer label requires explicit maintainer handling, and the intended performance-versus-reliability tradeoff cannot be settled from the guard test alone.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports actionlint, formatting, diff checking, and a focused workflow guard test, but not an observed after-fix hosted macOS manual-dispatch or rerun. Please add redacted run output or logs; redact private endpoints, IP addresses, and credentials. Updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - A manual dispatch or workflow rerun has not been shown running the serial command on the GitHub-hosted macOS path, so the trigger-to-runner premise remains unproven before release validation relies on it.
  • Complete next step (P2) - A protected maintainer-labeled CI change needs its release-validation owner to approve the scheduling tradeoff after reviewing real hosted-run proof.
Agent review details

Security

None.

PR surface

Tests +20, Config +7. Total +27 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 20 0 +20
Docs 0 0 0 0
Config 1 8 1 +7
Generated 0 0 0 0
Other 0 0 0 0
Total 2 28 1 +27

Review metrics

Metric Value Why it matters
CI scheduling surface 1 execution-mode environment value added; 1 Swift command made conditional The patch changes how release-validation work is scheduled without changing the suite’s coverage flag or retry count.

Merge-risk options

Maintainer options:

  1. Prove hosted serial fallback (recommended)
    Before merge, provide a redacted hosted manual-dispatch or workflow-rerun result that demonstrates the serial Swift invocation and successful suite completion.
  2. Accept an unproven CI tuning change
    Merge based on the focused guard test and workflow linting while accepting that the hosted-run contention premise has not been demonstrated in this PR.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Attach redacted hosted manual-dispatch or rerun evidence showing the serial Swift invocation and successful macOS Swift suite, while retaining parallel execution for the initial automatic run.

Technical review

Best possible solution:

Retain the conditional argument approach, but attach redacted evidence from a hosted manual-dispatch or rerun showing the serial Swift command and a successful suite result before landing.

Do we have a high-confidence way to reproduce the issue?

No deterministic product reproduction is applicable: the reported problem is intermittent contention on GitHub-hosted macOS CI. The source path is clear, but the supplied evidence does not include a successful after-fix hosted manual-dispatch or rerun result.

Is this the best way to solve the issue?

Unclear: conditionally omitting --parallel is the narrowest plausible repair, but the repository policy requires proof that the condition actually matches the hosted contention path before calling it the best fix.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 156d2e623eb3.

Labels

Label changes:

  • add P2: This is a bounded CI and release-validation reliability improvement, not a user-runtime outage.
  • add merge-risk: 🚨 automation: The changed trigger/retry condition directly controls CI scheduling for the macOS release-validation suite.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports actionlint, formatting, diff checking, and a focused workflow guard test, but not an observed after-fix hosted macOS manual-dispatch or rerun. Please add redacted run output or logs; redact private endpoints, IP addresses, and credentials. Updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This is a bounded CI and release-validation reliability improvement, not a user-runtime outage.
  • merge-risk: 🚨 automation: The changed trigger/retry condition directly controls CI scheduling for the macOS release-validation suite.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports actionlint, formatting, diff checking, and a focused workflow guard test, but not an observed after-fix hosted macOS manual-dispatch or rerun. Please add redacted run output or logs; redact private endpoints, IP addresses, and credentials. Updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Narrow workflow change: The proposed workflow computes SWIFT_TEST_EXECUTION from manual dispatch or a rerun, then adds --parallel only when that value is parallel; the retry loop and coverage flag remain present. (.github/workflows/ci.yml:2984, af12ce37c0e6)
  • Focused regression guard: The added guard test asserts the exact execution-mode expression, conditional parallel argument, coverage flag, and three-attempt retry loop. (test/scripts/ci-workflow-guards.test.ts:3582, af12ce37c0e6)
  • Current workflow routing context: Current main uses dispatch-specific routing and exposes macOS Swift as a preflight-controlled release-validation job; the supplied PR diff targets that existing job rather than adding another CI lane. (.github/workflows/ci.yml:3509, 156d2e623eb3)
  • Repository policy applied: The full root policy requires whole-surface workflow review, focused workflow sanity for CI-only changes, and evidence matching the actual risk before landing. (AGENTS.md:43, 156d2e623eb3)

Likely related people:

  • steipete: steipete authored the reviewed workflow change and assigned this maintainer-labeled PR; no stronger current-main ownership trail was available from the read-only inspection backend. (role: current CI workflow contributor; confidence: low; commits: af12ce37c0e6; files: .github/workflows/ci.yml, test/scripts/ci-workflow-guards.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted successful manual-dispatch or rerun result showing that the hosted macOS job runs the Swift suite without --parallel.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Release-owner decision: land this narrow workflow fix now without a separate pre-merge manual-dispatch cycle.

The requested Rank-up move is intentionally deferred because exact-head CI run 30502647386 is fully green, the focused guard proves the event-to-command mapping, and the release owner explicitly accepted this bounded CI tuning to unblock beta.6. The immediately following beta.6 Full Release Validation will exercise the GitHub-hosted manual-dispatch path and provide the real hosted proof. Coverage, assertions, and the three retry attempts remain unchanged.

@steipete
steipete merged commit 1165be3 into main Jul 30, 2026
113 of 120 checks passed
@steipete
steipete deleted the fix/hosted-swift-serial branch July 30, 2026 00:40
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant