Repository navigation
ci(fork): run macOS jobs on the owner's self-hosted Mac behind an approval gate - #7
Merged
HernandoR merged 4 commits intoDec 3, 2026
Conversation
- Move the native mobile lint and the macOS arm64 desktop build from GitHub-hosted macOS runners to the owner's self-hosted Mac. - Gate runs the owner did not start (actor or triggering actor differs from the repo owner) behind the `macos-self-hosted` environment, so they wait for the owner's approval. The repo is public, so this keeps outside pull requests off the Mac. - Add check.ts assertions for the environment gate in ci.yml and fork-release.yml. - Update fork/README.md to describe the self-hosted macOS jobs and the required reviewer rule.
HernandoR
had a problem deploying
to
macos-self-hosted
December 2, 2026 15:43 — with
GitHub Actions
Failure
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosNo All 64 scenario measurements
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
…unner's PATH The gate was written as `owner && '' || 'macos-self-hosted'`. '' is falsy in GitHub expressions, so every run, the owner's included, waited for approval. The condition is now inverted, and the owner's own pull requests from this repository skip approval too. The self-hosted runner's service PATH has no Homebrew, so `brew bundle` failed with exit 127. A step now adds /opt/homebrew/bin (or /usr/local/bin) to PATH. Both macOS jobs target [self-hosted, macOS, ARM64, tart]; release-desktop.yml parses a JSON label list passed as its runner input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The self-hosted Tart VM has only the Command Line Tools, and Homebrew builds swiftlint from source there, which needs a full Xcode. CI's macOS job returns to macos-26, where it passed. The approval gate and the Homebrew PATH step only served the self-hosted runner, so they go too. The macOS release build stays on the self-hosted Mac behind the gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o runner
The v0.1.0 release's macOS build was cancelled after GitHub could not get a
macos-26 runner ("not acquired by Runner of type hosted"), not because the
build failed; earlier builds passed there. The release goes back to
macos-26, and release-desktop.yml loses its JSON runner hook.
GitHub has no setting for how long a job waits for a hosted runner, so
fork-release-retry.yml re-runs a Fork release's failed jobs, up to three
times, while a macOS job ended with that cancellation. Build failures and
manual cancels are left alone. The owner approval gate stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HernandoR
merged commit Dec 3, 2026
4754358
into
feature/fork-cli-command-not3
26 of 27 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The fork's macOS jobs (the native mobile static analysis in CI and the macOS arm64 desktop build in the fork release workflow) ran on GitHub-hosted
macos-26runners. The owner wants these builds on their own self-hosted macOS 27 runner instead. Because the repository is public, a self-hosted runner must not run code from pull requests or runs the owner did not start.Change
ci.yml: the "Mobile Native Static Analysis" job usesruns-on: self-hosted.fork-release.yml: the macOS arm64 matrix entry usesrunner: self-hosted. The workflow's first job (Preflight) carries the gate, because a reusable workflow call cannot take an environment.environment: ${{ (github.actor == github.repository_owner && github.triggering_actor == github.repository_owner) && '' || 'macos-self-hosted' }}. When the owner both pushed and started the run, the job runs with no environment. Any other run waits for the owner's approval in themacos-self-hostedenvironment.fork/check.tsfails if an upstream merge drops the gate line from either workflow.fork/README.mddescribes the self-hosted macOS jobs and the approval gate.The
macos-self-hostedenvironment was created on the fork with the owner as the required reviewer. Without that reviewer rule, the gate does nothing.Scope
This is a fork-only CI and release change requested directly by the repository owner, so there is no linked issue. It changes where macOS jobs run and who can start them. It adds no product features.
Verification
node fork/check.tspasses locally (fork/check: ok).yaml.safe_load).''environment expression for owner-started runs is unverified; the first CI run will show whether owner runs skip the environment and whether other runs wait for approval.self-hosted, and the CI job runsbrew bundle install --file apps/mobile/Brewfileon the Mac.Change produced by: model claude-opus-5-5, harness Claude