Skip to content

fix(ci): move the org main-source-gate to a GitHub-hosted runner - #13

Merged
Aurora Capital (auroracapital) merged 2 commits into
mainfrom
fix/main-source-gate-aws-label
Oct 17, 2026
Merged

Aurora Capital (auroracapital) merged 2 commits into
mainfrom
fix/main-source-gate-aws-label

Conversation

@auroracapital

@auroracapital Aurora Capital (auroracapital) commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Probleem

De org-brede main-source-gate draaide op een self-hosted runner. Dat kan niet meer, en wel om twee onafhankelijke redenen.

1. Deze repository is publiek. GitHub's eigen richtlijn is expliciet: gebruik self-hosted runners niet voor publieke repos, want forks kunnen workflow-code op je runner uitvoeren. Die aanvalsroute is nu dichtgezet: de AWS-fleet registreert in de private-only runner group aws-ephemeral-private, en allows_public_repositories staat op false voor de default group. Een publieke repo kan dus geen self-hosted runner meer krijgen.

Gevolg in de praktijk: op commit 22614f4a bleef de gate indefinitely queued. Dat is precies de bug die deze PR zichtbaar maakte.

2. actionlint weigert het label. Organization PR Baseline draait actionlint 1.7.12, dat runs-on-labels valideert tegen GitHub's ingebouwde lijst. Het custom label aws faalt daarop:

.github/workflows/main-source-gate.yml:15:35: label "aws" is unknown. ... [runner-label]

Er is geen actionlint.yaml in deze repo, dus het label is nergens gedeclareerd.

Wijziging

-    runs-on: [self-hosted, Linux, X64]
+    runs-on: ubuntu-latest

De gate vergelijkt alleen twee strings (head_repo en head_ref). Daar is geen self-hosted runner voor nodig, en al helemaal geen AWS-instance. ubuntu-latest is de goedkoopste en veiligste plek.

Dit maakt het label-conflict ook moot: geen custom label, dus niets voor actionlint om over te vallen.

Bewijs (A/B op dezelfde check, dezelfde branch)

commit runs-on Organization PR Baseline
22614f4a [self-hosted, Linux, aws] FAILURE (actionlint, label unknown)
c3b59735 ubuntu-latest SUCCESS

En de gate zelf draait nu weer: job PR to main must come from dev op GitHub Actions 1001364824, en faalt om de correcte reden (deze branch is niet dev), niet omdat er geen runner is.

Historiek

PR #12 zette de gate op self-hosted vanwege een GitHub-hosted spending limit block. Dat block is voorbij: ubuntu-latest jobs draaien weer normaal in deze org (bewijs: de Organization PR Baseline job van deze PR).

Context

Onderdeel van de ephemeral runner optimalisatie. Deze PR verwijdert de laatste reden voor een publieke repo om de self-hosted fleet te bereiken.

runs-on [self-hosted, Linux, X64] matched no scale-up queue, because the
webhook matcher uses exactMatch with the label set
[self-hosted, linux, x64, aws]. The job could only ever land on an
already-existing runner, so it never triggered a scale-up and could sit
queued until the 24h timeout.

Adding the aws label makes the gate trigger its own runner, and keeps it
off the aws-large / aws-od fleets.
Copilot AI balanced review requested due to automatic review settings October 17, 2026 09:14
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-17T09:14:54.741384Z 22614f4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The gate lived on [self-hosted, Linux, aws], but this repository is
public. GitHub's self-hosted runner guidance is explicit that self-hosted
runners should not be used for public repositories, because forks can run
workflow code on them.

That risk is now closed off: the AWS runner fleet registers in the
private-only runner group 'aws-ephemeral-private', and
allows_public_repositories is false on the default group. So this public
repository can no longer obtain a self-hosted runner at all, which left
the gate queued indefinitely.

The gate only compares two strings (head repo and head ref), so
ubuntu-latest is the correct and cheapest home for it. This also removes
the last reason for a public repository to reach the self-hosted fleet.
@auroracapital Aurora Capital (auroracapital) changed the title fix(ci): route main-source-gate to the aws fleet explicitly fix(ci): move the org main-source-gate to a GitHub-hosted runner Oct 17, 2026
Aurora Capital (auroracapital) pushed a commit that referenced this pull request Oct 17, 2026
A self-hosted job whose runs-on omits the fleet label matches no scale-up
queue. It therefore never spawns its own runner: it can only land on an
instance another job happened to create, and otherwise sits queued until
GitHub's 24-hour timeout. That is how the org-wide main-source-gate
stalled, and how unmatched events fell through to the on-demand queue.

The webhook matcher matches exactly against a fixed label set
([self-hosted, linux, x64, aws] and its siblings), so the label is
load-bearing rather than cosmetic. Nothing enforced it.

scripts/fleet-label-guard.py parses each workflow and fails when a
self-hosted runs-on carries no fleet label. It skips non-self-hosted
runners, non-Linux self-hosted runners such as macOS, and expressions
that resolve at runtime.

Wired into organization-pr-baseline.yml as a blocking step, placed after
PyYAML is installed.

Depends on #13: main-source-gate omits the label today, so this check is
red until #13 lands. The branch is based on #13 for that reason.
@auroracapital
Aurora Capital (auroracapital) merged commit 5f40265 into main Oct 17, 2026
4 of 6 checks passed
@auroracapital
Aurora Capital (auroracapital) deleted the fix/main-source-gate-aws-label branch October 17, 2026 11:32
Aurora Capital (auroracapital) pushed a commit that referenced this pull request Oct 17, 2026
A self-hosted job whose runs-on omits the fleet label matches no scale-up
queue. It therefore never spawns its own runner: it can only land on an
instance another job happened to create, and otherwise sits queued until
GitHub's 24-hour timeout. That is how the org-wide main-source-gate
stalled, and how unmatched events fell through to the on-demand queue.

The webhook matcher matches exactly against a fixed label set
([self-hosted, linux, x64, aws] and its siblings), so the label is
load-bearing rather than cosmetic. Nothing enforced it.

scripts/fleet-label-guard.py parses each workflow and fails when a
self-hosted runs-on carries no fleet label. It skips non-self-hosted
runners, non-Linux self-hosted runners such as macOS, and expressions
that resolve at runtime.

Wired into organization-pr-baseline.yml as a blocking step, placed after
PyYAML is installed.

Depends on #13: main-source-gate omits the label today, so this check is
red until #13 lands. The branch is based on #13 for that reason.
Aurora Capital (auroracapital) added a commit that referenced this pull request Oct 17, 2026
A self-hosted job whose runs-on omits the fleet label matches no scale-up
queue. It therefore never spawns its own runner: it can only land on an
instance another job happened to create, and otherwise sits queued until
GitHub's 24-hour timeout. That is how the org-wide main-source-gate
stalled, and how unmatched events fell through to the on-demand queue.

The webhook matcher matches exactly against a fixed label set
([self-hosted, linux, x64, aws] and its siblings), so the label is
load-bearing rather than cosmetic. Nothing enforced it.

scripts/fleet-label-guard.py parses each workflow and fails when a
self-hosted runs-on carries no fleet label. It skips non-self-hosted
runners, non-Linux self-hosted runners such as macOS, and expressions
that resolve at runtime.

Wired into organization-pr-baseline.yml as a blocking step, placed after
PyYAML is installed.

Depends on #13: main-source-gate omits the label today, so this check is
red until #13 lands. The branch is based on #13 for that reason.

Co-authored-by: Sam Renders <sam.renders@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants