[PR #29] [MERGED] feat(cursor-review): parameterize runs_on + models for self-hosted support #39

Closed
opened 2026-10-26 22:35:38 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/github-workflows/pull/29
Author: @mattmillerai
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/15/2026
Merged by: @mattmillerai

Base: main ← Head: matt/cursor-review-self-hostable


📝 Commits (1)

  • 872d00c feat(cursor-review): parameterize runs_on + models, support self-hosted macOS

📊 Changes

2 files changed (+55 additions, -16 deletions)

View changed files

📝 .github/workflows/cursor-review.yml (+54 -15)
📝 README.md (+1 -1)

📄 Description

ELI-5

The cursor-review workflow was hardcoded to GitHub-hosted ubuntu-latest and a fixed model list. That blocks a repo that (a) is out of GitHub-hosted minutes and wants its own machine, or (b) has a Cursor account that can't reach a default provider. This adds two backward-compatible inputs so those repos self-host and pick their own models — without forking this workflow.

What

Two new optional inputs, both defaulting to current behavior:

  1. runs_on (JSON string, default '"ubuntu-latest"') — applied to all 7 jobs via fromJSON. Override to '["self-hosted", "macOS"]'.
  2. models (JSON array string, default = current 4-lab panel) — override when the account can't reach a default provider (no Google access → swap gemini for grok) or a model is delisted.

Plus a portability fix: both cursor-agent install steps add ~/.local/bin to GITHUB_PATH alongside ~/.cursor/bin (macOS installer targets the former, Linux the latter; absent dir is a harmless PATH entry).

Why

A private consumer repo (agent-work) is over its GitHub-hosted-minutes quota and needs reviews on a self-hosted Mac, and its Cursor account has no Google access (all gemini variants error). Rather than vendor a forked copy with those changes, these inputs let it call the canonical workflow directly — keeping this repo the single source of truth.

Compatibility

  • runs_on defaults to ubuntu-latest → every existing caller renders identically.
  • models default unchanged → existing panels identical.
  • ~/.local/bin addition is inert on Linux.

Self-hosted macOS note (learned the hard way)

On a self-hosted macOS runner, cursor-agent must run in a normal shell context (e.g. run.sh under tmux + caffeinate) — a launchd LaunchAgent context makes cursor-agent exit instantly empty with no error. Noted in the caller-example header.

Verification

runs_on + models overrides validated end-to-end on a self-hosted macOS runner (agent-work): all four override models produced findings and a consolidated review posted. Default path is unchanged YAML for existing callers.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/github-workflows/pull/29 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 7/15/2026 **Status:** ✅ Merged **Merged:** 7/15/2026 **Merged by:** [@mattmillerai](https://github.com/mattmillerai) **Base:** `main` ← **Head:** `matt/cursor-review-self-hostable` --- ### 📝 Commits (1) - [`872d00c`](https://github.com/Comfy-Org/github-workflows/commit/872d00c6dbdcc6a9fdfd424314ce3b375e371a12) feat(cursor-review): parameterize runs_on + models, support self-hosted macOS ### 📊 Changes **2 files changed** (+55 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/cursor-review.yml` (+54 -15) 📝 `README.md` (+1 -1) </details> ### 📄 Description ## ELI-5 The cursor-review workflow was hardcoded to GitHub-hosted `ubuntu-latest` and a fixed model list. That blocks a repo that (a) is out of GitHub-hosted minutes and wants its own machine, or (b) has a Cursor account that can't reach a default provider. This adds two backward-compatible inputs so those repos self-host and pick their own models — without forking this workflow. ## What Two new optional inputs, both defaulting to current behavior: 1. **`runs_on`** (JSON string, default `'"ubuntu-latest"'`) — applied to all 7 jobs via `fromJSON`. Override to `'["self-hosted", "macOS"]'`. 2. **`models`** (JSON array string, default = current 4-lab panel) — override when the account can't reach a default provider (no Google access → swap gemini for grok) or a model is delisted. Plus a portability fix: both cursor-agent install steps add `~/.local/bin` to `GITHUB_PATH` alongside `~/.cursor/bin` (macOS installer targets the former, Linux the latter; absent dir is a harmless PATH entry). ## Why A private consumer repo (agent-work) is over its GitHub-hosted-minutes quota and needs reviews on a self-hosted Mac, and its Cursor account has no Google access (all gemini variants error). Rather than vendor a forked copy with those changes, these inputs let it call the canonical workflow directly — keeping this repo the single source of truth. ## Compatibility - `runs_on` defaults to `ubuntu-latest` → every existing caller renders identically. - `models` default unchanged → existing panels identical. - `~/.local/bin` addition is inert on Linux. ## Self-hosted macOS note (learned the hard way) On a self-hosted macOS runner, cursor-agent must run in a normal shell context (e.g. `run.sh` under tmux + caffeinate) — a launchd LaunchAgent context makes cursor-agent exit instantly empty with no error. Noted in the caller-example header. ## Verification `runs_on` + `models` overrides validated end-to-end on a self-hosted macOS runner (agent-work): all four override models produced findings and a consolidated review posted. Default path is unchanged YAML for existing callers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:35:38 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/github-workflows#39
No description provided.