From 1da50ed91509a834f5aafbf812643eadd0c36195 Mon Sep 17 00:00:00 2001 From: Mark Davidoff Date: Wed, 14 Oct 2026 09:52:06 -0700 Subject: [PATCH 1/3] ci: run branch checks on PRs and merge queue with hosted runners Fork has no NVIDIA runners or copy-pr-bot. Trigger Branch Checks and Helm Lint on pull_request alongside merge_group, move them to GitHub-hosted runners, and add a CI Result aggregate job to use as the required status. Signed-off-by: Mark Davidoff --- .github/workflows/branch-checks.yml | 92 ++++++++++++++--------------- .github/workflows/helm-lint.yml | 10 +--- CI.md | 6 ++ 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 5d4a98c61a..32ea65b958 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -1,6 +1,7 @@ name: Branch Checks on: + pull_request: merge_group: types: [checks_requested] push: @@ -40,18 +41,13 @@ jobs: name: mise Lockfile needs: pr_metadata if: needs.pr_metadata.outputs.should_run == 'true' - runs-on: linux-amd64-cpu8 + runs-on: ubuntu-latest timeout-minutes: 30 - container: - image: ghcr.io/nvidia/openshell/ci:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Mark workspace as safe for git - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Install mise + uses: ./.github/actions/setup-mise - name: Verify mise.lock is in sync with mise.toml run: | @@ -65,18 +61,13 @@ jobs: name: License Headers needs: pr_metadata if: needs.pr_metadata.outputs.should_run == 'true' - runs-on: linux-amd64-cpu8 + runs-on: ubuntu-latest timeout-minutes: 30 - container: - image: ghcr.io/nvidia/openshell/ci:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install tools - run: mise install --locked + uses: ./.github/actions/setup-mise - name: Check license headers run: mise run license:check @@ -85,7 +76,7 @@ jobs: name: Cargo Deny needs: pr_metadata if: needs.pr_metadata.outputs.should_run == 'true' - runs-on: linux-amd64-cpu8 + runs-on: ubuntu-latest timeout-minutes: 30 defaults: run: @@ -113,11 +104,11 @@ jobs: fail-fast: false matrix: include: - - runner: linux-amd64-cpu8 + - runner: ubuntu-latest system: x86_64-linux - - runner: linux-arm64-cpu8 + - runner: ubuntu-24.04-arm system: aarch64-linux - - runner: macos-15-xlarge + - runner: macos-latest system: aarch64-darwin runs-on: ${{ matrix.runner }} timeout-minutes: 30 @@ -204,19 +195,14 @@ jobs: strategy: fail-fast: false matrix: - runner: [linux-amd64-cpu8, linux-arm64-cpu8] + runner: [ubuntu-latest, ubuntu-24.04-arm] runs-on: ${{ matrix.runner }} timeout-minutes: 30 - container: - image: ghcr.io/nvidia/openshell/ci:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install tools - run: mise install --locked + uses: ./.github/actions/setup-mise - name: Install dependencies run: uv sync --frozen @@ -237,18 +223,13 @@ jobs: name: Go SDK needs: pr_metadata if: needs.pr_metadata.outputs.should_run == 'true' - runs-on: linux-amd64-cpu8 + runs-on: ubuntu-latest timeout-minutes: 30 - container: - image: ghcr.io/nvidia/openshell/ci:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install tools - run: mise install --locked + uses: ./.github/actions/setup-mise - name: Lint, build, test, proto-check run: mise run go:ci @@ -257,18 +238,13 @@ jobs: name: Markdown needs: pr_metadata if: needs.pr_metadata.outputs.should_run == 'true' - runs-on: linux-amd64-cpu8 + runs-on: ubuntu-latest timeout-minutes: 30 - container: - image: ghcr.io/nvidia/openshell/ci:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install tools - run: mise install --locked + uses: ./.github/actions/setup-mise - name: Lint run: mise run markdown:lint @@ -277,18 +253,13 @@ jobs: name: TypeScript SDK needs: pr_metadata if: needs.pr_metadata.outputs.should_run == 'true' - runs-on: linux-amd64-cpu8 + runs-on: ubuntu-latest timeout-minutes: 30 - container: - image: ghcr.io/nvidia/openshell/ci:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install tools - run: mise install --locked + uses: ./.github/actions/setup-mise - name: Check TypeScript SDK run: mise run sdk:ts:ci @@ -302,3 +273,30 @@ jobs: run: | OPENSHELL_NPM_VERSION="$(uv run python tasks/scripts/release.py get-version --npm)" \ mise run sdk:ts:publish + + # Single required status for branch protection and the merge queue. Runs even + # when upstream jobs fail so the required check reports a result instead of + # staying pending. + ci-result: + name: CI Result + needs: + - pr_metadata + - mise-lockfile + - license-headers + - cargo-deny + - rust + - python + - go + - markdown + - sdk-typescript + if: always() + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: ./.github/actions/check-job-results + with: + results: ${{ toJSON(needs) }} diff --git a/.github/workflows/helm-lint.yml b/.github/workflows/helm-lint.yml index 0ca4473d90..af23d8d67b 100644 --- a/.github/workflows/helm-lint.yml +++ b/.github/workflows/helm-lint.yml @@ -4,6 +4,7 @@ name: Helm Lint on: + pull_request: merge_group: types: [checks_requested] push: @@ -79,17 +80,12 @@ jobs: name: Helm Lint needs: [pr_metadata, helm_changes] if: needs.pr_metadata.outputs.should_run == 'true' && needs.helm_changes.outputs.should_run == 'true' - runs-on: linux-amd64-cpu8 - container: - image: ghcr.io/nvidia/openshell/ci:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install tools - run: mise install --locked + uses: ./.github/actions/setup-mise - name: Lint Helm chart run: mise run helm:lint diff --git a/CI.md b/CI.md index a84bd90638..2bb2459335 100644 --- a/CI.md +++ b/CI.md @@ -28,6 +28,12 @@ The GitHub ruleset should require the `OpenShell / ...` statuses published by `Required CI Gates` plus the direct `OpenShell / Trivy Changes` result, not the push-triggered workflow jobs themselves. +## UsableMachines fork + +The `UsableMachines/OpenShell` fork has no NVIDIA self-hosted runners and no copy-pr-bot, so it does not use the mirror flow above. `Branch Checks` and `Helm Lint` run on GitHub-hosted runners and trigger on `pull_request` and `merge_group`, so no `/ok to test` comment is needed. `Branch Checks` ends with a `CI Result` job that fails when any other job in the workflow did not succeed. + +Branch protection or the merge-queue ruleset on `main` requires `CI Result` and `Helm Lint`. `Required CI Gates` and `Branch E2E Checks` still exist from upstream, but their `OpenShell / ...` statuses and the NVIDIA-runner E2E lanes are not required in the fork. Keep the `branch-checks.yml` and `helm-lint.yml` runner and trigger changes in mind when merging from upstream. + ## Informational security reports Security workflow compute runs directly on GitHub-hosted runners instead of From 6023d812d1cbd5d7d366f5d536e140c9391fb6f6 Mon Sep 17 00:00:00 2001 From: Mark Davidoff Date: Wed, 14 Oct 2026 10:25:04 -0700 Subject: [PATCH 2/3] ci: fix clippy qualification and give nix jobs a longer timeout main fails clippy -D warnings on an unnecessary std::sync::atomic path in openshell-sandbox. Cold nix builds on hosted runners also exceeded the 30 minute limit. Signed-off-by: Mark Davidoff --- .github/workflows/branch-checks.yml | 4 ++-- crates/openshell-sandbox/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 32ea65b958..65114edcd6 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -77,7 +77,7 @@ jobs: needs: pr_metadata if: needs.pr_metadata.outputs.should_run == 'true' runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 60 defaults: run: shell: nix develop .#devShells.x86_64-linux.default -c bash -euo pipefail {0} @@ -111,7 +111,7 @@ jobs: - runner: macos-latest system: aarch64-darwin runs-on: ${{ matrix.runner }} - timeout-minutes: 30 + timeout-minutes: 60 defaults: run: shell: nix develop .#devShells.${{ matrix.system }}.default -c bash -euo pipefail {0} diff --git a/crates/openshell-sandbox/src/lib.rs b/crates/openshell-sandbox/src/lib.rs index 630298cf4d..637f24c077 100644 --- a/crates/openshell-sandbox/src/lib.rs +++ b/crates/openshell-sandbox/src/lib.rs @@ -2380,7 +2380,7 @@ where let attempt = &attempt; let f = &f; async move { - let n = attempt.fetch_add(1, std::sync::atomic::Ordering::Relaxed); + let n = attempt.fetch_add(1, Ordering::Relaxed); let target = fleet_target(endpoint, sandbox_id, n).await?; f(target).await From 66f674619a41e0aff8a284b2c2cbaab33ed6eaad Mon Sep 17 00:00:00 2001 From: Mark Davidoff Date: Wed, 14 Oct 2026 11:00:23 -0700 Subject: [PATCH 3/3] fix(lint): satisfy clippy on linux and non-linux targets Keep the std::sync::atomic path qualified where the Linux-only Ordering import is absent, with a targeted allow for Linux builds, and drop two redundant clones in a proxy test. Signed-off-by: Mark Davidoff --- crates/openshell-sandbox/src/lib.rs | 5 ++++- crates/openshell-supervisor-network/src/proxy.rs | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/openshell-sandbox/src/lib.rs b/crates/openshell-sandbox/src/lib.rs index 637f24c077..02fc14254f 100644 --- a/crates/openshell-sandbox/src/lib.rs +++ b/crates/openshell-sandbox/src/lib.rs @@ -2380,7 +2380,10 @@ where let attempt = &attempt; let f = &f; async move { - let n = attempt.fetch_add(1, Ordering::Relaxed); + // The top-level `Ordering` import is Linux-only, so the path stays qualified + // for other targets; Linux clippy would otherwise flag it. + #[allow(unused_qualifications)] + let n = attempt.fetch_add(1, std::sync::atomic::Ordering::Relaxed); let target = fleet_target(endpoint, sandbox_id, n).await?; f(target).await diff --git a/crates/openshell-supervisor-network/src/proxy.rs b/crates/openshell-supervisor-network/src/proxy.rs index f9405a9296..340a8dac96 100644 --- a/crates/openshell-supervisor-network/src/proxy.rs +++ b/crates/openshell-supervisor-network/src/proxy.rs @@ -6416,10 +6416,7 @@ mod tests { fn ca_only_config_preserves_explicit_baseline_ip_restriction() { let ca = regorus::Value::from_json_str(r#"{"upstream_ca_pem":"reviewed-ca"}"#).unwrap(); let baseline = regorus::Value::from_json_str(r#"{"allowed_ips":["11.0.0.0/8"]}"#).unwrap(); - for configs in [ - vec![ca.clone(), baseline.clone()], - vec![baseline.clone(), ca.clone()], - ] { + for configs in [vec![ca.clone(), baseline.clone()], vec![baseline, ca]] { assert_eq!( explicit_allowed_ips_from_configs(&configs), vec!["11.0.0.0/8"]