Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/runners.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@
"reads no picker output and so waits on one fixed label (scripts/ci/runner_routing_table.py). All three",
"lists only shrink."
],
"pr-checks.yml#size": "portable-checks",
"pr-checks.yml#ui-review": "portable-checks",
"pr-checks.yml#split": "portable-checks",
"cmux-next-fast-gates.yml#resolve": "portable-checks",
"cmux-next-fast-gates.yml#post": "portable-checks",
"web-validation.yml#web-validation": "portable-checks",
"agent-brands.yml#swift-test": {
"class": "apple-swift-tests",
"placement_followup": "runs-on reads vars.CI_SIDE_LANE_RUNNER directly; take the label from a placement job"
Expand Down Expand Up @@ -578,11 +584,21 @@
"ci-guards.yml#guard-status": {"class": "portable-checks", "reason": "report step: rolls up the guard job results, 2 s of work (runs 41393826242, 41393801145)"},
"pr-checks.yml#size": {"class": "portable-checks", "reason": "report step: one GraphQL read and a size warning, 4 s of work (runs 41394557472, 41394554327)"},
"pr-checks.yml#ui-review": {"class": "portable-checks", "reason": "report step: one file-list read and an advisory warning, 4 s of work (run 41394554327)"},
"web-validation.yml#web-validation": {"class": "portable-checks", "reason": "status rollup: accepts selected web results"},
"cmux-next.yml#path_route": {"class": "portable-checks", "reason": "router: classifies the PR's paths and probes the published tree, 32-51 s of work (runs 41394344151, 41393817927)"},
"ci-web.yml#web-subarea-scope": {"class": "portable-checks", "reason": "router: classifies the webview subareas and hands the shards their duration manifest, 29 s of work (run 41762274751)"},
"ci-web.yml#webviews-test-durations": {"class": "portable-checks", "reason": "bookkeeping: merges and saves the shard duration manifest beside web-subarea-scope's restore, 5 s of work (run 41761413284)"},
"resolve-runners.yml#resolve": {"class": "portable-checks", "reason": "resolver: prints the runner capability map, 5 s of work (run 41762274751)"}
},
"portable_light_jobs": {
"$comment": [
"Secretless placement bootstraps are admitted as light jobs so their short runner-state read cannot queue behind the paid overflow.",
"They fail open to the workflow's existing hosted or Blacksmith fallback when CI_RUNNER_STATE is stale or unavailable."
],
"pr-checks.yml#portable-placement": {"class": "portable-checks", "reason": "runner-state placement bootstrap"},
"cmux-next-fast-gates.yml#portable-placement": {"class": "portable-checks", "reason": "runner-state placement bootstrap"},
"web-validation.yml#portable-placement": {"class": "portable-checks", "reason": "runner-state placement bootstrap"}
},
"linux_sizes": {
"$comment": [
"The Blacksmith Linux size of every job that named blacksmith-32vcpu-ubuntu-2404 on 2026-11-01,",
Expand Down
47 changes: 42 additions & 5 deletions .github/workflows/cmux-next-fast-gates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,47 @@ concurrency:
cancel-in-progress: true

jobs:
# Secretless placement bootstrap: it reads the fresh runner-state publication and
# fails open to the existing hosted/Blacksmith route when state is stale.
portable-placement:
name: portable light placement
if: ${{ vars.CI_PORTABLE_LIGHT_JOBS_OFF != '1' && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-2vcpu-ubuntu-2404' || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux_2 }}
timeout-minutes: 4
permissions:
contents: read
actions: read
outputs:
linux_runner: ${{ steps.place.outputs.linux_runner }}
linux_jobs: ${{ steps.place.outputs.linux_jobs }}
mini_runner: ${{ steps.place.outputs.mini_runner }}
mini_jobs: ${{ steps.place.outputs.mini_jobs }}
placed_attempt: ${{ github.run_attempt }}
steps:
- name: Check out the trusted placement script
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.pull_request.base.sha || github.sha }}
sparse-checkout: scripts/ci
persist-credentials: false
- name: Place the portable light jobs
id: place
continue-on-error: true
env:
CI_RUNNER_STATE: ${{ vars.CI_RUNNER_STATE }}
GITHUB_REPOSITORY: ${{ github.repository }}
JOBS: resolve post
FLEET_LINUX: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-24.04' || vars.LINUX_RUNNER }}
REQUIRE_LIVE_CAPACITY: '1'
SIDE_LABEL: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-24.04' || vars.CI_LIGHT_LANE_RUNNER || vars.CI_SIDE_LANE_RUNNER }}
SNAPSHOT_TOKEN: ${{ github.token }}
run: python3 scripts/ci/portable_job_placement.py

resolve:
name: resolve head and base
needs: portable-placement
# A draft is gated when it is marked ready; a dispatch always runs.
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
if: ${{ always() && !cancelled() && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }}
# Fork pull requests use the same ephemeral Blacksmith lane as other
# Linux work; this job has read-only contents permission and no secrets.
# The reconciled pool admits fleet first, records a three-minute no-start
Expand All @@ -68,7 +105,7 @@ jobs:
# A declared light job (.github/runners.json hosted_light_jobs): hosted Ubuntu on attempt 1, the
# reconciled Linux pool on a re-run (it holds no secret). On 2026-11-02 this queued on RUNNER_POOLS.linux's
# saturated blacksmith-4vcpu-ubuntu-2404 (hundreds of jobs deep) for a few seconds of work.
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.linux_jobs, ' resolve ') && needs.portable-placement.outputs.linux_runner || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.mini_jobs, ' resolve ') && needs.portable-placement.outputs.mini_runner || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux }}
timeout-minutes: 5
permissions:
contents: read
Expand Down Expand Up @@ -329,12 +366,12 @@ jobs:
# panic-ratchet (nothing to rejudge) does not fail it.
post:
name: post cmux-next/fast-gates
needs: [resolve, fast-gates, panic-ratchet]
if: ${{ !cancelled() && needs.resolve.result == 'success' && needs.resolve.outputs.post == 'true' }}
needs: [resolve, fast-gates, panic-ratchet, portable-placement]
if: ${{ always() && !cancelled() && needs.resolve.result == 'success' && needs.resolve.outputs.post == 'true' }}
# A declared light job (.github/runners.json hosted_light_jobs): hosted Ubuntu on attempt 1, the
# reconciled Linux pool on a re-run (it holds no secret). On 2026-11-02 this queued on RUNNER_POOLS.linux's
# saturated blacksmith-4vcpu-ubuntu-2404 (hundreds of jobs deep) for a few seconds of work.
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.linux_jobs, ' post ') && needs.portable-placement.outputs.linux_runner || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.mini_jobs, ' post ') && needs.portable-placement.outputs.mini_runner || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux }}
timeout-minutes: 5
permissions:
statuses: write
Expand Down
55 changes: 47 additions & 8 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,44 @@ concurrency:
cancel-in-progress: true

jobs:
# A small, secretless bootstrap reads the fresh runner-state publication and
# assigns the advisory jobs to an idle owned mini when one is available. The
# source branch is trusted and the placement script fails open, so a stale or
# missing publication keeps the existing hosted/Blacksmith route.
portable-placement:
name: portable light placement
if: ${{ vars.CI_PORTABLE_LIGHT_JOBS_OFF != '1' }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-2vcpu-ubuntu-2404' || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux_2 }}
timeout-minutes: 4
permissions:
contents: read
actions: read
outputs:
linux_runner: ${{ steps.place.outputs.linux_runner }}
linux_jobs: ${{ steps.place.outputs.linux_jobs }}
mini_runner: ${{ steps.place.outputs.mini_runner }}
mini_jobs: ${{ steps.place.outputs.mini_jobs }}
placed_attempt: ${{ github.run_attempt }}
steps:
- name: Check out the trusted placement script
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.pull_request.base.sha || github.sha }}
sparse-checkout: scripts/ci
persist-credentials: false
- name: Place the portable advisory jobs
id: place
continue-on-error: true
env:
CI_RUNNER_STATE: ${{ vars.CI_RUNNER_STATE }}
GITHUB_REPOSITORY: ${{ github.repository }}
JOBS: size ui-review split
FLEET_LINUX: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-24.04' || vars.LINUX_RUNNER }}
REQUIRE_LIVE_CAPACITY: '1'
SIDE_LABEL: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-24.04' || vars.CI_LIGHT_LANE_RUNNER || vars.CI_SIDE_LANE_RUNNER }}
SNAPSHOT_TOKEN: ${{ github.token }}
run: python3 scripts/ci/portable_job_placement.py

# Whether this push only merged the base, so the previous head's answers still
# hold. Any doubt (another event, a force push, a failed fetch or read, a
# conflict resolved by hand, a previous run that did not finish) answers false
Expand Down Expand Up @@ -214,10 +252,11 @@ jobs:
# base-only update too: it costs one API call, and a previous head's green run
# from before it could fail (or that a later Size: edit changed) must not
# answer for it.
if: ${{ !cancelled() && contains(fromJSON('["opened","synchronize","reopened","edited","ready_for_review"]'), github.event.action) && vars.CI_QUOTA_HOLD != '1' && !github.event.pull_request.draft }}
if: ${{ always() && !cancelled() && contains(fromJSON('["opened","synchronize","reopened","edited","ready_for_review"]'), github.event.action) && vars.CI_QUOTA_HOLD != '1' && !github.event.pull_request.draft }}
# A declared light job (.github/runners.json hosted_light_jobs): one GraphQL read, 4 s of work.
# Hosted Ubuntu on attempt 1, the reconciled Linux pool on a re-run (no secret).
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux }}
needs: portable-placement
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.linux_jobs, ' size ') && needs.portable-placement.outputs.linux_runner || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.mini_jobs, ' size ') && needs.portable-placement.outputs.mini_runner || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux }}
timeout-minutes: 5
permissions:
contents: read
Expand Down Expand Up @@ -296,11 +335,11 @@ jobs:
# The checker comes from the base branch so a PR cannot weaken its own policy.
ui-review:
name: UI review advisory
needs: base-only
if: ${{ !cancelled() && needs.base-only.outputs.base_only != 'true' && contains(fromJSON('["opened","synchronize","reopened","edited","ready_for_review"]'), github.event.action) && vars.CI_QUOTA_HOLD != '1' && !github.event.pull_request.draft }}
needs: [base-only, portable-placement]
if: ${{ always() && !cancelled() && needs.base-only.outputs.base_only != 'true' && contains(fromJSON('["opened","synchronize","reopened","edited","ready_for_review"]'), github.event.action) && vars.CI_QUOTA_HOLD != '1' && !github.event.pull_request.draft }}
# A declared light job (.github/runners.json hosted_light_jobs): one file list read, 4 s of work.
# Hosted Ubuntu on attempt 1, the reconciled Linux pool on a re-run (no secret).
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.linux_jobs, ' ui-review ') && needs.portable-placement.outputs.linux_runner || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.mini_jobs, ' ui-review ') && needs.portable-placement.outputs.mini_runner || github.run_attempt == 1 && 'ubuntu-24.04' || fromJSON(vars.RUNNER_POOLS).linux }}
timeout-minutes: 5
permissions:
contents: read
Expand Down Expand Up @@ -358,9 +397,9 @@ jobs:
# that event can cancel a push run, and its own run must answer for all three checks.
split:
name: split-plan advisory
needs: base-only
if: ${{ !cancelled() && needs.base-only.outputs.base_only != 'true' && github.event.action != 'edited' }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || fromJSON(vars.RUNNER_POOLS).linux }}
needs: [base-only, portable-placement]
if: ${{ always() && !cancelled() && needs.base-only.outputs.base_only != 'true' && github.event.action != 'edited' }}
runs-on: ${{ github.repository_owner != 'manaflow-ai' && 'ubuntu-24.04' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'blacksmith-4vcpu-ubuntu-2404' || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.linux_jobs, ' split ') && needs.portable-placement.outputs.linux_runner || needs.portable-placement.outputs.placed_attempt == format('{0}', github.run_attempt) && contains(needs.portable-placement.outputs.mini_jobs, ' split ') && needs.portable-placement.outputs.mini_runner || fromJSON(vars.RUNNER_POOLS).linux }}
timeout-minutes: 5
permissions:
contents: read
Expand Down
Loading
Loading