Skip to content

feat(runs-on-selector): add runs-on selector action - #10

Merged
yordis merged 2 commits into
mainfrom
yordis/feat-runner-selector
Sep 22, 2026
Merged

yordis merged 2 commits into
mainfrom
yordis/feat-runner-selector

Conversation

@yordis

@yordis yordis commented Sep 22, 2026 •

Copy link
Copy Markdown
Member
  • Moving one pull request onto other hardware meant editing runs-on in that pull request, so the choice arrived as a change to the workflow rather than as a decision about where to run it.
  • Every repository that tried this wrote its own copy of the label parsing, and the copies stopped agreeing on the label vocabulary, which is the drift this repository exists to remove.
  • The pool map belongs to the consumer rather than here, so it is an input: no token, no API call, and no permissions.
  • An unknown pool name fails the run rather than falling back, because the wrong runner is a green run on hardware nobody chose, and that is expensive to notice.
  • The repository resolves its own runner with the action it ships, so a change to the action is exercised by the pull request that makes the change.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d7a4e9a9-49b5-4289-9ba2-b782845439a1

📥 Commits

Reviewing files that changed from the base of the PR and between 6752709 and fc48016.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d3089e40-0d83-4076-ab19-409824d540c4

📥 Commits

Reviewing files that changed from the base of the PR and between 993cb1e and 6752709.

📒 Files selected for processing (12)
  • .config/mise/tasks/github/actions/tests/node
  • .github/release-please-config.json
  • .github/release-please-manifest.json
  • .github/workflows/ci.yml
  • actions/runs-on-selector/README.md
  • actions/runs-on-selector/action.yml
  • actions/runs-on-selector/lib/core.mjs
  • actions/runs-on-selector/lib/index.mjs
  • actions/runs-on-selector/lib/main.mjs
  • mise.toml
  • tests/node/runs-on-selector/core.test.mjs
  • tests/node/runs-on-selector/index.test.mjs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

Adds a Node 24 GitHub Action that selects a runner from pull-request labels and a caller-provided pool map. CI resolves the runner before dependent jobs. Tests, documentation, Node tooling, and release metadata are included.

Changes

Runner selection

Layer / File(s) Summary
Selector action and resolution
actions/runs-on-selector/action.yml, actions/runs-on-selector/lib/*
Defines action inputs and outputs. Validates pools and labels, reads pull-request labels, and writes the selected runner and pool.
Runtime helpers
actions/runs-on-selector/lib/core.mjs
Adds input, logging, failure, annotation, and workflow-output helpers.
CI runner integration
.github/workflows/ci.yml
Adds a resolver job. The check and test jobs use its runs-on output.
Validation and test execution
mise.toml, .config/mise/tasks/github/actions/tests/node, tests/node/runs-on-selector/*
Adds Node 24 tooling, a Node test task, and coverage for selection, validation, event parsing, and runtime helpers.
Usage and release registration
actions/runs-on-selector/README.md, .github/release-please-config.json, .github/release-please-manifest.json
Documents configuration and selection behavior. Registers the action for release management.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant RunnerSelector
  participant GitHubEvent
  participant DependentJobs
  CI->>RunnerSelector: Provide pool map and default pool
  RunnerSelector->>GitHubEvent: Read pull-request labels
  GitHubEvent-->>RunnerSelector: Return event labels
  RunnerSelector-->>CI: Write runs-on output
  CI->>DependentJobs: Schedule check and test jobs on selected runner
Loading

Merge Risk: ⚪ Minimal · up to 67527

The action selects runners from pull-request labels, validates configuration, and fails safely on invalid selections. No merge-blocking production risk remains evident.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 5 files. (7 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description directly explains the runs-on selector action, its label-based runner selection, consumer-provided pool map, failure behavior, permissions, and self-testing workflow.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding the runs-on selector action.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 5 files. (7 skipped: 7 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit maps the pools with care
Labels guide the runner there
Tests hop neatly through the gate
CI selects before they wait
New outputs bloom in lines of light

Comment @coderabbitai help to get the list of available commands.

@yordis
yordis force-pushed the yordis/feat-runner-selector branch 10 times, most recently from b10195f to 2c8ab2b Compare September 22, 2026 04:16
@yordis yordis changed the title feat(runner-selector): add runner selector action feat(runs-on-selector): add runs-on selector action Sep 22, 2026
@yordis
yordis force-pushed the yordis/feat-runner-selector branch 7 times, most recently from 194593a to 4ae7b69 Compare September 22, 2026 04:36
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/feat-runner-selector branch from 4ae7b69 to 6752709 Compare September 22, 2026 04:39
@yordis yordis added the runs-on:blacksmith Schedule this pull request's jobs on the blacksmith pool label Sep 22, 2026
A runner label nobody provisioned queues instead of failing, so a job reading
the resolved value needs a ceiling.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis merged commit 98ac812 into main Sep 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

runs-on:blacksmith Schedule this pull request's jobs on the blacksmith pool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant