Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(ci): add hosted runner workflow for fast CI

Steven Enamakeldb1380d5f1ee
diff --git a/.github/workflows/ci-fast-hosted.yml b/.github/workflows/ci-fast-hosted.yml
new file mode 100644
index 0000000000..7470211d96
--- /dev/null
+++ b/.github/workflows/ci-fast-hosted.yml
@@ -0,0 +1,60 @@
+---
+# CI Fast (hosted) — PRs from outside the tinyhumansai org run the same lane
+# flow as ci-fast.yml, split across GitHub-hosted runners and cached with
+# GitHub's Actions cache. The EX63 runners never run this code: their runner
+# group only admits ci-fast.yml / ci-lanes.yml at refs/heads/main, and a fork's
+# `pull_request` run resolves to refs/pull/N/merge.
+#
+# Org members skip this workflow; ci-fast.yml runs theirs on the EX63.
+name: CI Fast (hosted)
+
+on:
+ pull_request:
+ branches: [main, release]
+ types: [opened, synchronize, reopened, ready_for_review]
+
+permissions:
+ actions: read
+ contents: read
+ pull-requests: read
+
+concurrency:
+ group: ci-fast-hosted-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
+jobs:
+ route:
+ name: Route (outsiders → GitHub-hosted)
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+ outputs:
+ outsider: ${{ steps.route.outputs.outsider }}
+ steps:
+ - name: Decide whether the author is an outside contributor
+ id: route
+ env:
+ AUTHOR: ${{ github.event.pull_request.user.login }}
+ ACTOR: ${{ github.actor }}
+ ASSOCIATION: ${{ github.event.pull_request.author_association }}
+ run: |
+ set -euo pipefail
+ # Fork `pull_request` runs get no secrets, so this can only read the
+ # event's author association. Mirrors ci-fast.yml's no-token path:
+ # a run is a member run only when the author is OWNER/MEMBER and the
+ # pusher is the author.
+ outsider=true
+ if { [ "${ASSOCIATION}" = "OWNER" ] || [ "${ASSOCIATION}" = "MEMBER" ]; } && [ "${ACTOR}" = "${AUTHOR}" ]; then
+ outsider=false
+ fi
+ echo "[ci][route] author=${AUTHOR} actor=${ACTOR} association=${ASSOCIATION} outsider=${outsider}"
+ echo "outsider=${outsider}" >> "$GITHUB_OUTPUT"
+
+ lanes:
+ name: Lanes
+ needs: route
+ if: needs.route.outputs.outsider == 'true'
+ uses: ./.github/workflows/ci-lanes.yml
+ with:
+ profile: hosted
+ pr-number: ${{ github.event.pull_request.number }}
+ base-ref: ${{ github.base_ref }}
diff --git a/.github/workflows/ci-fast.yml b/.github/workflows/ci-fast.yml
new file mode 100644
index 0000000000..5fd72bc5f2
--- /dev/null
+++ b/.github/workflows/ci-fast.yml
@@ -0,0 +1,79 @@
+---
+# CI Fast — PRs by tinyhumansai org members run the full lane flow on the
+# EX63 Firecracker microVM runners (runner group `openhuman-ex63`).
+#
+# Why pull_request_target: a pull_request_target run always uses THIS file
+# from the base branch, never the PR's copy, so a PR cannot edit the routing
+# gate below. The runner group is restricted to this workflow (and
+# ci-lanes.yml) at refs/heads/main, so a fork's own `pull_request` workflow
+# cannot claim these runners even if it names their label.
+#
+# The gate job never checks out or runs PR code. Only the lanes job does, and
+# only for org members; it has a read-only token and no secrets. Everyone else
+# runs the same lanes on GitHub-hosted runners via ci-fast-hosted.yml.
+name: CI Fast
+
+on:
+ pull_request_target:
+ branches: [main, release]
+ types: [opened, synchronize, reopened, ready_for_review]
+
+permissions:
+ actions: read
+ contents: read
+ pull-requests: read
+
+concurrency:
+ group: ci-fast-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
+jobs:
+ route:
+ name: Route (org members → EX63)
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+ outputs:
+ member: ${{ steps.member.outputs.member }}
+ steps:
+ - name: Decide whether the author and pusher are org members
+ id: member
+ env:
+ ORG: ${{ github.repository_owner }}
+ AUTHOR: ${{ github.event.pull_request.user.login }}
+ ACTOR: ${{ github.actor }}
+ ASSOCIATION: ${{ github.event.pull_request.author_association }}
+ # Optional fine-grained token with only Organization → Members: Read.
+ # Without it, private members may be reported as non-members and
+ # simply run on GitHub-hosted runners instead.
+ MEMBERSHIP_TOKEN: ${{ secrets.CI_MEMBERSHIP_TOKEN }}
+ run: |
+ set -euo pipefail
+ is_member() {
+ local login="$1" code
+ if [ -n "${MEMBERSHIP_TOKEN}" ]; then
+ code="$(curl -sS -o /dev/null -w '%{http_code}' \
+ -H "Authorization: Bearer ${MEMBERSHIP_TOKEN}" \
+ -H 'Accept: application/vnd.github+json' \
+ "https://api.github.com/orgs/${ORG}/members/${login}")"
+ [ "${code}" = "204" ]
+ return
+ fi
+ # No token: only the PR author's association is available.
+ [ "${login}" = "${AUTHOR}" ] && { [ "${ASSOCIATION}" = "OWNER" ] || [ "${ASSOCIATION}" = "MEMBER" ]; }
+ }
+ member=false
+ if is_member "${AUTHOR}" && is_member "${ACTOR}"; then
+ member=true
+ fi
+ echo "[ci][route] author=${AUTHOR} actor=${ACTOR} association=${ASSOCIATION} token=$([ -n "${MEMBERSHIP_TOKEN}" ] && echo yes || echo no) member=${member}"
+ echo "member=${member}" >> "$GITHUB_OUTPUT"
+
+ lanes:
+ name: Lanes
+ needs: route
+ if: needs.route.outputs.member == 'true'
+ uses: ./.github/workflows/ci-lanes.yml
+ with:
+ profile: ex63
+ pr-number: ${{ github.event.pull_request.number }}
+ base-ref: ${{ github.base_ref }}