Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/pr-review-responder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ jobs:
github.event_name == 'workflow_run' ||
(github.event_name == 'pull_request_target' && github.event.label.name == 'cc:request:now')
environment: ai-bots
runs-on: ubuntu-latest
runs-on:
- self-hosted
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Switching from an ephemeral GitHub-hosted runner (ubuntu-latest) to a persistent self-hosted macOS ARM64 runner requires adding a cleanup step at the end of the job. All other workflows in this repo that use the self-hosted macOS ARM64 runner include a final step:

- name: Cleanup (self-hosted macOS)
  if: always()
  run: bash scripts/ci-cleanup-macos.sh

Without this, each run will leave build artifacts, caches, and runner diagnostics on the shared machine, eventually filling up disk space.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/pr-review-responder.yml, line 26:

<comment>Switching from an ephemeral GitHub-hosted runner (`ubuntu-latest`) to a persistent self-hosted macOS ARM64 runner requires adding a cleanup step at the end of the job. All other workflows in this repo that use the `self-hosted macOS ARM64` runner include a final step:
```yaml
- name: Cleanup (self-hosted macOS)
  if: always()
  run: bash scripts/ci-cleanup-macos.sh

Without this, each run will leave build artifacts, caches, and runner diagnostics on the shared machine, eventually filling up disk space.

@@ -22,7 +22,10 @@ jobs: environment: ai-bots - runs-on: ubuntu-latest + runs-on: + - self-hosted + - macOS + - ARM64 ```
Fix with Cubic

- macOS
- ARM64
Comment on lines +25 to +28
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Missing self-hosted macOS cleanup step causes disk space accumulation

Every other workflow in this repo that runs on the self-hosted macOS ARM64 runner includes a cleanup step at the end:

- name: Cleanup (self-hosted macOS)
  if: always()
  run: bash scripts/ci-cleanup-macos.sh

See claude-check-workflows.yml:39-41, claude-deflake-e2e.yml:74-76, and ci.yml (build and e2e-tests jobs). This cleanup script (scripts/ci-cleanup-macos.sh) removes build outputs, test artifacts, old Playwright browsers, npm cache bloat, and stale runner diagnostics. Without this step, each run of pr-review-responder will leave artifacts on the shared self-hosted runner, eventually filling up disk space.

Prompt for agents
Add a cleanup step at the end of the job in .github/workflows/pr-review-responder.yml (after the last step "Update labels to failed" around line 326). All other workflows using self-hosted macOS ARM64 runners in this repo include this cleanup step. Add the following step:

    - name: Cleanup (self-hosted macOS)
      if: always()
      run: bash scripts/ci-cleanup-macos.sh

Note that this step needs to be added after the "Checkout base repo for labeler script" and "Apply needs-human status label" steps as well (after approximately line 363), and it must use if: always() so it runs regardless of job success/failure. The checkout at line 338 checks out to __base path so the cleanup script path should reference the correct location, or an additional checkout of the base repo may be needed. The simplest approach is to add the cleanup step as the very last step in the job.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +25 to +28
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM | consistency

Missing cleanup step for self-hosted macOS runner

Every other workflow using self-hosted + macOS + ARM64 runners in this repo includes a final cleanup step with bash scripts/ci-cleanup-macos.sh (see ci.yml:203, claude-deflake-e2e.yml:74, claude-check-workflows.yml:39). This workflow now runs on the same runner pool but omits it, which could lead to disk space accumulation over time.

💡 Suggestion: Add a final step to the job:

- name: Cleanup (self-hosted macOS)
  if: always()
  run: bash scripts/ci-cleanup-macos.sh

Comment on lines +25 to +28
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-hosted runner availability risk

Switching from ubuntu-latest (GitHub-managed, always available) to a self-hosted runner means that if the runner machine is offline or busy, this workflow will queue indefinitely rather than fail fast. Because this workflow drives the automated PR-fix loop (labeling, Claude Code invocations, retry counters), a stalled runner would leave PRs stuck in cc:pending with no timeout or fallback path.

Consider adding a timeout-minutes at the job level to ensure the workflow fails gracefully rather than hanging:

Suggested change
runs-on:
- self-hosted
- macOS
- ARM64
runs-on:
- self-hosted
- macOS
- ARM64
timeout-minutes: 60

This also ensures the cc:pending / cc:failed label cleanup in the final steps always runs within a predictable window.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/pr-review-responder.yml
Line: 25-28

Comment:
**Self-hosted runner availability risk**

Switching from `ubuntu-latest` (GitHub-managed, always available) to a self-hosted runner means that if the runner machine is offline or busy, this workflow will queue indefinitely rather than fail fast. Because this workflow drives the automated PR-fix loop (labeling, Claude Code invocations, retry counters), a stalled runner would leave PRs stuck in `cc:pending` with no timeout or fallback path.

Consider adding a `timeout-minutes` at the job level to ensure the workflow fails gracefully rather than hanging:

```suggestion
    runs-on:
      - self-hosted
      - macOS
      - ARM64
    timeout-minutes: 60
```

This also ensures the `cc:pending` / `cc:failed` label cleanup in the final steps always runs within a predictable window.

How can I resolve this? If you propose a fix, please make it concise.

permissions:
actions: write
contents: write
Expand Down
Loading