From db6a2e8f3f123d9ad3a060ee6c3de099256b8bf9 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Fri, 20 Nov 2026 15:30:16 -0800 Subject: [PATCH 01/17] ci: exercise branch checks on gke runners Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 10 +++ .github/actionlint.yml | 1 + .github/actions/setup-rust/action.yml | 13 ++++ .github/workflows/branch-checks.yml | 74 ++++++++++++++------ CI.md | 15 +++- 5 files changed, 90 insertions(+), 23 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index 4b03fb5b32..68eca2ec88 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -131,6 +131,16 @@ gh run list --json databaseId,status,headBranch,url --jq '.[] | {id: .databaseId `Release Dev` finishes its active run and replaces pending runs when new commits arrive. Other callers retain E2E cancellation. Inspect job annotations for cancellation reasons. +## GKE runner trial + +Branch Checks Linux amd64 jobs from ai-openshell/openshell branches run on the +`openshell-ci-amd64` ARC scale set during the GKE trial. Fork, ARM, and macOS jobs +keep their hosted runners. Confirm the runner name in the job details before +attributing a result to GKE. For a job-container or PostgreSQL startup failure, +check the runner pod's Docker sidecar first. Rust jobs report shared memcached +sccache statistics; distinguish backend connectivity errors from compiler/test +failures. See `CI.md` for the trial scope and cache setup. + ## View Job Logs For Branch Checks `Reviewer Roster` failures, the log lists non-collaborators in diff --git a/.github/actionlint.yml b/.github/actionlint.yml index 31c5f55713..d36e985cea 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -3,6 +3,7 @@ self-hosted-runner: labels: + - openshell-ci-amd64 - ubuntu-26.04 - windows-arm64 diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index 10e76ed63c..d8ca8ac0a9 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -21,6 +21,19 @@ outputs: runs: using: composite steps: + - name: Configure shared sccache on GKE runners + if: ${{ runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + shell: nix develop -c bash -euo pipefail {0} + run: | + mise install --locked github:mozilla/sccache + sccache_bin=$(mise which sccache) + dirname "$sccache_bin" >> "$GITHUB_PATH" + { + echo "RUSTC_WRAPPER=$sccache_bin" + echo "SCCACHE_MEMCACHED_ENDPOINT=tcp://memcached.sccache:11211" + echo "SCCACHE_BASEDIRS=$GITHUB_WORKSPACE" + } >> "$GITHUB_ENV" + - name: Hash Nix development shell id: dev-shell shell: bash diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 5505a1fa1b..1c50c2c215 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -22,7 +22,7 @@ concurrency: jobs: reviewer-roster: name: Reviewer Roster - runs-on: ubuntu-latest + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-latest' }} timeout-minutes: 5 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -59,7 +59,7 @@ jobs: ${{ !cancelled() && github.event_name == 'pull_request' && needs.compatibility-review.outputs.has_findings == 'true' && needs.compatibility-review.outputs.report_artifact != '' }} - runs-on: ubuntu-latest + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-latest' }} timeout-minutes: 5 continue-on-error: true permissions: @@ -98,7 +98,7 @@ jobs: protobuf-compatibility: name: Protobuf Compatibility - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -116,7 +116,7 @@ jobs: monitoring-changes: name: Detect monitoring mixin changes - runs-on: ubuntu-latest + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-latest' }} timeout-minutes: 5 outputs: changed: ${{ steps.changes.outputs.changed }} @@ -153,7 +153,7 @@ jobs: name: Monitoring Mixin needs: monitoring-changes if: needs.monitoring-changes.outputs.changed == 'true' - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 15 container: image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de @@ -174,7 +174,7 @@ jobs: mise-lockfile: name: mise Lockfile - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 container: image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de @@ -197,7 +197,7 @@ jobs: license-headers: name: License Headers - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 container: image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de @@ -215,7 +215,7 @@ jobs: cargo-deny: name: Cargo Deny - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 defaults: run: @@ -243,7 +243,7 @@ jobs: rust-format: name: Rust format - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -272,7 +272,7 @@ jobs: cargo-lockfiles: name: Cargo lockfiles - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -294,7 +294,7 @@ jobs: fail-fast: false matrix: include: - - runner: ubuntu-24.04 + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} system: x86_64-linux - runner: ubuntu-24.04-arm system: aarch64-linux @@ -332,13 +332,17 @@ jobs: cargo clippy --locked --manifest-path tests/suites/features/Cargo.toml --workspace --all-targets -- -D warnings cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings + - name: Shared sccache statistics + if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + run: sccache --show-stats + rust-test: name: Rust test (${{ matrix.system }}) strategy: fail-fast: false matrix: include: - - runner: ubuntu-24.04 + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} system: x86_64-linux - runner: ubuntu-24.04-arm system: aarch64-linux @@ -421,11 +425,15 @@ jobs: cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/support/Cargo.toml tasks/scripts/check-conformance-program.sh + - name: Shared sccache statistics + if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + run: sccache --show-stats + rust-postgres-test: name: Rust PostgreSQL tests # Bare runner: the test script starts a disposable PostgreSQL container # with the host's Docker. - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -449,13 +457,17 @@ jobs: OPENSHELL_TELEMETRY_ENABLED: "false" run: tasks/scripts/run-postgres-tests.sh --locked --profile ci + - name: Shared sccache statistics + if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + run: sccache --show-stats + rust-build-modes: name: Rust build modes (${{ matrix.system }}) strategy: fail-fast: false matrix: include: - - runner: ubuntu-24.04 + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} system: x86_64-linux - runner: ubuntu-24.04-arm system: aarch64-linux @@ -507,9 +519,13 @@ jobs: exit 1 fi + - name: Shared sccache statistics + if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + run: sccache --show-stats + rust-feature-alias: name: Rust feature alias - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -530,9 +546,13 @@ jobs: tasks/scripts/verify-defaults-without-telemetry.sh git diff --exit-code HEAD -- ':(glob)**/Cargo.lock' + - name: Shared sccache statistics + if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + run: sccache --show-stats + rust-gateway-core-features: name: Rust gateway core features - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -555,9 +575,13 @@ jobs: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-kubernetes cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-podman + - name: Shared sccache statistics + if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + run: sccache --show-stats + rust-gateway-extended-features: name: Rust gateway extended features - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -579,12 +603,18 @@ jobs: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-mxc cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-docker,compute-driver-vm + - name: Shared sccache statistics + if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + run: sccache --show-stats + python: name: Python (${{ matrix.runner }}) strategy: fail-fast: false matrix: - runner: [ubuntu-24.04, ubuntu-24.04-arm] + runner: + - ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} + - ubuntu-24.04-arm runs-on: ${{ matrix.runner }} timeout-minutes: 30 container: @@ -635,7 +665,7 @@ jobs: # Merge queue runs skip this job; the PR already passed it. name: Python SDK Freeze if: github.event_name == 'pull_request' - runs-on: ubuntu-latest + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-latest' }} timeout-minutes: 5 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -662,7 +692,7 @@ jobs: markdown: name: Markdown - runs-on: ubuntu-24.04 + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 container: image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de @@ -681,7 +711,7 @@ jobs: typescript-sdk-freeze: name: TypeScript SDK Freeze if: github.event_name == 'pull_request' - runs-on: ubuntu-latest + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-latest' }} timeout-minutes: 5 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -714,7 +744,7 @@ jobs: install-script: name: install.sh - runs-on: ubuntu-latest + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-latest' }} timeout-minutes: 10 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/CI.md b/CI.md index cab896eefd..77a41a6e25 100644 --- a/CI.md +++ b/CI.md @@ -6,7 +6,20 @@ For local test commands see [TESTING.md](TESTING.md). For PR conventions see [CO ## Overview -PR CI runs on standard GitHub-hosted runners. `Branch Checks` and `Helm Lint` trigger on `pull_request` and `merge_group`. Workflow runs from outside contributors wait for a maintainer to approve them in the Actions tab. +`Branch Checks` uses the `openshell-ci-amd64` GKE ARC scale set for Linux amd64 +jobs from branches in `ai-openshell/openshell`, manual runs, and merge groups. +Fork PRs use GitHub-hosted runners; ARM and macOS jobs keep their existing +runner labels. This is a branch trial and does not change main until merged. +`Branch Checks` and `Helm Lint` trigger on `pull_request` and `merge_group`. +Workflow runs from outside contributors wait for a maintainer to approve them +in the Actions tab. + +The GKE scale set maintains five idle runners and permits twenty total. Each +runner has an isolated Docker daemon for job containers and Docker-backed tests. +Rust jobs use the shared memcached sccache backend and report cache statistics; +the existing GitHub Rust target/registry cache remains enabled. Inspect the job's +runner name to confirm whether it ran on GKE. ARM, macOS, and fork jobs do not +use the cluster-local cache endpoint. `pull_request` runs from forks get a read-only token and no secrets, so they cannot post statuses. `Required CI Gates` runs from the base repository (`pull_request_target` and `workflow_run`), never checks out PR code, and posts the required `OpenShell / ...` statuses on the PR head SHA. E2E suites are opt-in because they are more expensive. From 0e060237d039b0c9873dd9af3780fc8ba20b4068 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Fri, 20 Nov 2026 15:34:58 -0800 Subject: [PATCH 02/17] ci: guard cache statistics until setup succeeds Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 4 +++- .github/workflows/branch-checks.yml | 14 +++++++------- CI.md | 2 ++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index 68eca2ec88..1538bf90a5 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -137,7 +137,9 @@ Branch Checks Linux amd64 jobs from ai-openshell/openshell branches run on the `openshell-ci-amd64` ARC scale set during the GKE trial. Fork, ARM, and macOS jobs keep their hosted runners. Confirm the runner name in the job details before attributing a result to GKE. For a job-container or PostgreSQL startup failure, -check the runner pod's Docker sidecar first. Rust jobs report shared memcached +check the runner pod's Docker sidecar first. A missing `gh` executable or +Cachix's `$USER must be set` error indicates incomplete runner bootstrap. +Rust jobs report shared memcached sccache statistics; distinguish backend connectivity errors from compiler/test failures. See `CI.md` for the trial scope and cache setup. diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 1c50c2c215..f85b8568a8 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -333,7 +333,7 @@ jobs: cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings - name: Shared sccache statistics - if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} run: sccache --show-stats rust-test: @@ -426,7 +426,7 @@ jobs: tasks/scripts/check-conformance-program.sh - name: Shared sccache statistics - if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} run: sccache --show-stats rust-postgres-test: @@ -458,7 +458,7 @@ jobs: run: tasks/scripts/run-postgres-tests.sh --locked --profile ci - name: Shared sccache statistics - if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} run: sccache --show-stats rust-build-modes: @@ -520,7 +520,7 @@ jobs: fi - name: Shared sccache statistics - if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} run: sccache --show-stats rust-feature-alias: @@ -547,7 +547,7 @@ jobs: git diff --exit-code HEAD -- ':(glob)**/Cargo.lock' - name: Shared sccache statistics - if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} run: sccache --show-stats rust-gateway-core-features: @@ -576,7 +576,7 @@ jobs: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-podman - name: Shared sccache statistics - if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} run: sccache --show-stats rust-gateway-extended-features: @@ -604,7 +604,7 @@ jobs: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-docker,compute-driver-vm - name: Shared sccache statistics - if: ${{ always() && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} run: sccache --show-stats python: diff --git a/CI.md b/CI.md index 77a41a6e25..e81f01c314 100644 --- a/CI.md +++ b/CI.md @@ -16,6 +16,8 @@ in the Actions tab. The GKE scale set maintains five idle runners and permits twenty total. Each runner has an isolated Docker daemon for job containers and Docker-backed tests. +Runner bootstrap provides GitHub CLI, compression utilities, and the `USER` +environment variable expected by the existing checks and Cachix. Rust jobs use the shared memcached sccache backend and report cache statistics; the existing GitHub Rust target/registry cache remains enabled. Inspect the job's runner name to confirm whether it ran on GKE. ARM, macOS, and fork jobs do not From 94b9950ba047f1ca149fd690104ddfc6d9035a4d Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Fri, 20 Nov 2026 16:19:03 -0800 Subject: [PATCH 03/17] ci: reuse the image-configured nix cache on gke runners Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 4 +++- .github/actions/setup-nix/action.yml | 8 ++++++++ CI.md | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index 1538bf90a5..d7fd806fd6 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -139,7 +139,9 @@ keep their hosted runners. Confirm the runner name in the job details before attributing a result to GKE. For a job-container or PostgreSQL startup failure, check the runner pod's Docker sidecar first. A missing `gh` executable or Cachix's `$USER must be set` error indicates incomplete runner bootstrap. -Rust jobs report shared memcached +For a preloaded image, `setup-nix` verifies its global Cachix substituter and +skips adding it again. A cache-configuration permission failure indicates the +image/setup contract is out of sync. Rust jobs report shared memcached sccache statistics; distinguish backend connectivity errors from compiler/test failures. See `CI.md` for the trial scope and cache setup. diff --git a/.github/actions/setup-nix/action.yml b/.github/actions/setup-nix/action.yml index 0ae11edfe9..a321066770 100644 --- a/.github/actions/setup-nix/action.yml +++ b/.github/actions/setup-nix/action.yml @@ -32,9 +32,17 @@ runs: extra-conf: | http2 = false + - name: Verify GKE image cache configuration + if: ${{ startsWith(runner.name, 'openshell-ci-amd64-') }} + shell: bash + run: | + nix config show --json | jq -e '.substituters.value | index("https://openshell.cachix.org") != null' > /dev/null + - uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17 with: name: openshell + # The image configures the substituter globally before dropping to runner. + skipAddingSubstituter: ${{ startsWith(runner.name, 'openshell-ci-amd64-') }} authToken: ${{ inputs.cachix-auth-token }} skipPush: ${{ inputs.cachix-auth-token == '' }} diff --git a/CI.md b/CI.md index e81f01c314..5fbbaa46d2 100644 --- a/CI.md +++ b/CI.md @@ -17,7 +17,9 @@ in the Actions tab. The GKE scale set maintains five idle runners and permits twenty total. Each runner has an isolated Docker daemon for job containers and Docker-backed tests. Runner bootstrap provides GitHub CLI, compression utilities, and the `USER` -environment variable expected by the existing checks and Cachix. +environment variable expected by the existing checks and Cachix. The custom +image preloads Nix shells and configures the signed Cachix substituter globally; +setup verifies that cache and skips duplicate user-level cache configuration. Rust jobs use the shared memcached sccache backend and report cache statistics; the existing GitHub Rust target/registry cache remains enabled. Inspect the job's runner name to confirm whether it ran on GKE. ARM, macOS, and fork jobs do not From e986dce7b3b7af8c1e82bfeec3c2dd7f0837d1f8 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Fri, 20 Nov 2026 16:57:45 -0800 Subject: [PATCH 04/17] ci: trial workspace artifact caches for gke lint and tests Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 5 ++++- .github/actions/setup-rust/action.yml | 5 +++++ .github/workflows/branch-checks.yml | 10 +++++++--- CI.md | 8 +++++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index d7fd806fd6..79a91a99d8 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -143,7 +143,10 @@ For a preloaded image, `setup-nix` verifies its global Cachix substituter and skips adding it again. A cache-configuration permission failure indicates the image/setup contract is out of sync. Rust jobs report shared memcached sccache statistics; distinguish backend connectivity errors from compiler/test -failures. See `CI.md` for the trial scope and cache setup. +failures. The x86 GKE lint/test jobs also trial separate full Cargo artifact +caches. Confirm the restored key and cache size in setup-rust, and include the +post-job save time when comparing cold and warm runs. A hit does not guarantee +Cargo will reuse every artifact. See `CI.md` for the trial scope and cache setup. ## View Job Logs diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index d8ca8ac0a9..5617e3f4c8 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -12,6 +12,10 @@ inputs: description: Whether this job writes the Rust target cache required: false default: "false" + cache-workspace-crates: + description: Retain workspace build artifacts as well as dependencies + required: false + default: "false" outputs: cache-hit: @@ -49,4 +53,5 @@ runs: save-if: ${{ inputs.save-cache }} cache-on-failure: ${{ inputs.save-cache }} cache-bin: "false" + cache-workspace-crates: ${{ inputs.cache-workspace-crates }} cmd-format: nix develop -c {0} diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index f85b8568a8..7e64f05349 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -312,8 +312,10 @@ jobs: - uses: ./.github/actions/setup-rust with: - cache-key: rust-checks-v2 - save-cache: "false" + # Trial full artifacts only on GKE; retain hosted cache behavior. + cache-key: ${{ matrix.runner == 'openshell-ci-amd64' && 'gke-rust-lint-artifacts-v1' || 'rust-checks-v2' }} + save-cache: ${{ matrix.runner == 'openshell-ci-amd64' && 'true' || 'false' }} + cache-workspace-crates: ${{ matrix.runner == 'openshell-ci-amd64' && 'true' || 'false' }} - name: Lint shell: nix develop -c bash -euo pipefail {0} @@ -360,8 +362,10 @@ jobs: - uses: ./.github/actions/setup-rust with: - cache-key: rust-checks-v2 + # Trial full artifacts only on GKE; retain hosted cache behavior. + cache-key: ${{ matrix.runner == 'openshell-ci-amd64' && 'gke-rust-test-artifacts-v1' || 'rust-checks-v2' }} save-cache: "true" + cache-workspace-crates: ${{ matrix.runner == 'openshell-ci-amd64' && 'true' || 'false' }} - name: Verify crypto backend independence shell: nix develop -c bash -euo pipefail {0} diff --git a/CI.md b/CI.md index 5fbbaa46d2..510274bcbc 100644 --- a/CI.md +++ b/CI.md @@ -21,7 +21,13 @@ environment variable expected by the existing checks and Cachix. The custom image preloads Nix shells and configures the signed Cachix substituter globally; setup verifies that cache and skips duplicate user-level cache configuration. Rust jobs use the shared memcached sccache backend and report cache statistics; -the existing GitHub Rust target/registry cache remains enabled. Inspect the job's +the existing GitHub Rust target/registry cache remains enabled. The x86 GKE +lint and test jobs trial separate `gke-rust-*-artifacts-v1` cache namespaces, +retain workspace crates in the root target directory. Independent-workspace +targets continue using sccache without expanding the artifact cache trial. +Compare a populating run with a same-commit rerun, including restore/save time: +checkout timestamps and build-script invalidation can still trigger rebuilds. +These trial caches are PR-scoped until compatible caches are seeded on `main`. Inspect the job's runner name to confirm whether it ran on GKE. ARM, macOS, and fork jobs do not use the cluster-local cache endpoint. From 112082143e55cca1fa0be3e66b9d8f287198cb85 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Sat, 21 Nov 2026 08:50:02 -0800 Subject: [PATCH 05/17] ci: trial persistent cargo targets on dedicated gke runners Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 11 +++++++---- .github/actions/setup-rust/action.yml | 20 ++++++++++++++++++++ .github/workflows/branch-checks.yml | 14 +++++--------- CI.md | 19 ++++++++++++------- 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index 79a91a99d8..c73ede5b62 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -143,10 +143,13 @@ For a preloaded image, `setup-nix` verifies its global Cachix substituter and skips adding it again. A cache-configuration permission failure indicates the image/setup contract is out of sync. Rust jobs report shared memcached sccache statistics; distinguish backend connectivity errors from compiler/test -failures. The x86 GKE lint/test jobs also trial separate full Cargo artifact -caches. Confirm the restored key and cache size in setup-rust, and include the -post-job save time when comparing cold and warm runs. A hit does not guarantee -Cargo will reuse every artifact. See `CI.md` for the trial scope and cache setup. +failures. The x86 GKE lint/test jobs use single-worker `openshell-ci-amd64-pd-*` +scale sets with separate exclusive persistent disks. Setup reports the target +size before building and skips GitHub Cargo cache restore/save. Compare empty +and warm runs on different runner pods; a PVC surviving pod replacement is the +persistence check. `Pending` pods can be waiting for exclusive disk attachment; +inspect PVC/PV events before treating this as a runner registration failure. +See `CI.md` for trial scope and cache setup. ## View Job Logs diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index 5617e3f4c8..abe075d0f3 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -45,7 +45,27 @@ runs: shell_drv=$(nix eval --raw --impure .#devShells --apply 'shells: shells.${builtins.currentSystem}.default.drvPath') echo "hash=$(nix hash file --type sha256 --base16 "$shell_drv")" >> "$GITHUB_OUTPUT" + - name: Configure persistent Cargo target directory + if: ${{ env.OPENSHELL_PERSISTENT_CACHE != '' }} + shell: bash + env: + NIX_SHELL_HASH: ${{ steps.dev-shell.outputs.hash }} + run: | + set -euo pipefail + test "$GITHUB_REPOSITORY" = ai-openshell/openshell + test "$OPENSHELL_PERSISTENT_CACHE" = /mnt/ci-cache + mountpoint -q "$OPENSHELL_PERSISTENT_CACHE" + cache_root="$OPENSHELL_PERSISTENT_CACHE/ai-openshell-openshell/$NIX_SHELL_HASH" + mkdir -p "$cache_root/target" + echo "CARGO_TARGET_DIR=$cache_root/target" >> "$GITHUB_ENV" + echo "Persistent cache lane: $OPENSHELL_CACHE_LANE" + echo "Runner pod: $RUNNER_NAME" + echo "Target directory: $cache_root/target" + du -sh "$cache_root/target" + df -h "$cache_root/target" + - name: Cache Rust target and registry + if: ${{ env.OPENSHELL_PERSISTENT_CACHE == '' }} id: cache uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f with: diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 7e64f05349..2331cd8634 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -294,7 +294,7 @@ jobs: fail-fast: false matrix: include: - - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64-pd-lint' || 'ubuntu-24.04' }} system: x86_64-linux - runner: ubuntu-24.04-arm system: aarch64-linux @@ -312,10 +312,8 @@ jobs: - uses: ./.github/actions/setup-rust with: - # Trial full artifacts only on GKE; retain hosted cache behavior. - cache-key: ${{ matrix.runner == 'openshell-ci-amd64' && 'gke-rust-lint-artifacts-v1' || 'rust-checks-v2' }} - save-cache: ${{ matrix.runner == 'openshell-ci-amd64' && 'true' || 'false' }} - cache-workspace-crates: ${{ matrix.runner == 'openshell-ci-amd64' && 'true' || 'false' }} + cache-key: rust-checks-v2 + save-cache: "false" - name: Lint shell: nix develop -c bash -euo pipefail {0} @@ -344,7 +342,7 @@ jobs: fail-fast: false matrix: include: - - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64-pd-test' || 'ubuntu-24.04' }} system: x86_64-linux - runner: ubuntu-24.04-arm system: aarch64-linux @@ -362,10 +360,8 @@ jobs: - uses: ./.github/actions/setup-rust with: - # Trial full artifacts only on GKE; retain hosted cache behavior. - cache-key: ${{ matrix.runner == 'openshell-ci-amd64' && 'gke-rust-test-artifacts-v1' || 'rust-checks-v2' }} + cache-key: rust-checks-v2 save-cache: "true" - cache-workspace-crates: ${{ matrix.runner == 'openshell-ci-amd64' && 'true' || 'false' }} - name: Verify crypto backend independence shell: nix develop -c bash -euo pipefail {0} diff --git a/CI.md b/CI.md index 510274bcbc..099cbc8da8 100644 --- a/CI.md +++ b/CI.md @@ -21,13 +21,18 @@ environment variable expected by the existing checks and Cachix. The custom image preloads Nix shells and configures the signed Cachix substituter globally; setup verifies that cache and skips duplicate user-level cache configuration. Rust jobs use the shared memcached sccache backend and report cache statistics; -the existing GitHub Rust target/registry cache remains enabled. The x86 GKE -lint and test jobs trial separate `gke-rust-*-artifacts-v1` cache namespaces, -retain workspace crates in the root target directory. Independent-workspace -targets continue using sccache without expanding the artifact cache trial. -Compare a populating run with a same-commit rerun, including restore/save time: -checkout timestamps and build-script invalidation can still trigger rebuilds. -These trial caches are PR-scoped until compatible caches are seeded on `main`. Inspect the job's +the standard runner jobs retain the existing GitHub Rust target/registry cache. +The x86 lint/test jobs instead use `openshell-ci-amd64-pd-lint` and +`openshell-ci-amd64-pd-test`. Each trial scale set has one worker and an exclusive +200 GiB SSD persistent disk, mounted at `/mnt/ci-cache`. Setup verifies the mount +and selects a repository/Nix-shell-specific target directory shared by that +job's Cargo commands. It skips GitHub Cargo cache restore/save entirely. +Check the initial target size and runner pod name to distinguish an empty-disk +run from a warm run on a replacement pod. Checkout and credentials remain +ephemeral; only Cargo build outputs persist. Cargo still validates artifacts, +and fresh checkout timestamps can trigger workspace rebuilds. These two lanes +serialize concurrent jobs during the trial; the ordinary scale set stays 5–20. +Inspect the job's runner name to confirm whether it ran on GKE. ARM, macOS, and fork jobs do not use the cluster-local cache endpoint. From 4c77341d4defe98760ae6a435b4fb43194532c63 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Sat, 21 Nov 2026 08:53:35 -0800 Subject: [PATCH 06/17] fix(ci): detect persistent cache from runner environment Signed-off-by: Taylor Mutch --- .github/actions/setup-rust/action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index abe075d0f3..d6bacd80b4 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -46,12 +46,17 @@ runs: echo "hash=$(nix hash file --type sha256 --base16 "$shell_drv")" >> "$GITHUB_OUTPUT" - name: Configure persistent Cargo target directory - if: ${{ env.OPENSHELL_PERSISTENT_CACHE != '' }} + id: persistent-cache shell: bash env: NIX_SHELL_HASH: ${{ steps.dev-shell.outputs.hash }} run: | set -euo pipefail + # Pod environment is visible to the shell, not the workflow env context. + if [[ -z "${OPENSHELL_PERSISTENT_CACHE:-}" ]]; then + exit 0 + fi + echo "enabled=true" >> "$GITHUB_OUTPUT" test "$GITHUB_REPOSITORY" = ai-openshell/openshell test "$OPENSHELL_PERSISTENT_CACHE" = /mnt/ci-cache mountpoint -q "$OPENSHELL_PERSISTENT_CACHE" @@ -65,7 +70,7 @@ runs: df -h "$cache_root/target" - name: Cache Rust target and registry - if: ${{ env.OPENSHELL_PERSISTENT_CACHE == '' }} + if: ${{ steps.persistent-cache.outputs.enabled != 'true' }} id: cache uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f with: From c208e58c14e7e1c74b96e9ae56e851dc68942d38 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Sun, 22 Nov 2026 10:14:06 -0800 Subject: [PATCH 07/17] ci: trial native arm runners for linux lint and tests Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 9 +++++---- .github/actionlint.yml | 4 ++++ .github/actions/setup-nix/action.yml | 4 ++-- .github/actions/setup-rust/action.yml | 2 +- .github/workflows/branch-checks.yml | 18 +++++++++--------- CI.md | 17 +++++++++++++---- 6 files changed, 34 insertions(+), 20 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index c73ede5b62..41c1eb5c93 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -134,8 +134,9 @@ gh run list --json databaseId,status,headBranch,url --jq '.[] | {id: .databaseId ## GKE runner trial Branch Checks Linux amd64 jobs from ai-openshell/openshell branches run on the -`openshell-ci-amd64` ARC scale set during the GKE trial. Fork, ARM, and macOS jobs -keep their hosted runners. Confirm the runner name in the job details before +`openshell-ci-amd64` ARC scale set during the GKE trial. ARM Linux lint/tests +use `openshell-ci-arm64-pd-*` on native ARM Ubuntu nodes with ARM64 images. +Fork PRs, other ARM jobs, and macOS retain hosted runners. Confirm the runner name in the job details before attributing a result to GKE. For a job-container or PostgreSQL startup failure, check the runner pod's Docker sidecar first. A missing `gh` executable or Cachix's `$USER must be set` error indicates incomplete runner bootstrap. @@ -143,8 +144,8 @@ For a preloaded image, `setup-nix` verifies its global Cachix substituter and skips adding it again. A cache-configuration permission failure indicates the image/setup contract is out of sync. Rust jobs report shared memcached sccache statistics; distinguish backend connectivity errors from compiler/test -failures. The x86 GKE lint/test jobs use single-worker `openshell-ci-amd64-pd-*` -scale sets with separate exclusive persistent disks. Setup reports the target +failures. The x86 and ARM GKE lint/test jobs use single-worker +`openshell-ci-amd64-pd-*` and `openshell-ci-arm64-pd-*` scale sets with separate exclusive persistent disks. Setup reports the target size before building and skips GitHub Cargo cache restore/save. Compare empty and warm runs on different runner pods; a PVC surviving pod replacement is the persistence check. `Pending` pods can be waiting for exclusive disk attachment; diff --git a/.github/actionlint.yml b/.github/actionlint.yml index d36e985cea..e7557f457f 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -4,6 +4,10 @@ self-hosted-runner: labels: - openshell-ci-amd64 + - openshell-ci-amd64-pd-lint + - openshell-ci-amd64-pd-test + - openshell-ci-arm64-pd-lint + - openshell-ci-arm64-pd-test - ubuntu-26.04 - windows-arm64 diff --git a/.github/actions/setup-nix/action.yml b/.github/actions/setup-nix/action.yml index a321066770..431ef22037 100644 --- a/.github/actions/setup-nix/action.yml +++ b/.github/actions/setup-nix/action.yml @@ -33,7 +33,7 @@ runs: http2 = false - name: Verify GKE image cache configuration - if: ${{ startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} shell: bash run: | nix config show --json | jq -e '.substituters.value | index("https://openshell.cachix.org") != null' > /dev/null @@ -42,7 +42,7 @@ runs: with: name: openshell # The image configures the substituter globally before dropping to runner. - skipAddingSubstituter: ${{ startsWith(runner.name, 'openshell-ci-amd64-') }} + skipAddingSubstituter: ${{ (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} authToken: ${{ inputs.cachix-auth-token }} skipPush: ${{ inputs.cachix-auth-token == '' }} diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index d6bacd80b4..b8fa7f856a 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -26,7 +26,7 @@ runs: using: composite steps: - name: Configure shared sccache on GKE runners - if: ${{ runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} shell: nix develop -c bash -euo pipefail {0} run: | mise install --locked github:mozilla/sccache diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 2331cd8634..8da10c6f0c 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -296,7 +296,7 @@ jobs: include: - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64-pd-lint' || 'ubuntu-24.04' }} system: x86_64-linux - - runner: ubuntu-24.04-arm + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64-pd-lint' || 'ubuntu-24.04-arm' }} system: aarch64-linux - runner: macos-15-xlarge system: aarch64-darwin @@ -333,7 +333,7 @@ jobs: cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings - name: Shared sccache statistics - if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats rust-test: @@ -344,7 +344,7 @@ jobs: include: - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64-pd-test' || 'ubuntu-24.04' }} system: x86_64-linux - - runner: ubuntu-24.04-arm + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64-pd-test' || 'ubuntu-24.04-arm' }} system: aarch64-linux - runner: macos-15-xlarge system: aarch64-darwin @@ -426,7 +426,7 @@ jobs: tasks/scripts/check-conformance-program.sh - name: Shared sccache statistics - if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats rust-postgres-test: @@ -458,7 +458,7 @@ jobs: run: tasks/scripts/run-postgres-tests.sh --locked --profile ci - name: Shared sccache statistics - if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats rust-build-modes: @@ -520,7 +520,7 @@ jobs: fi - name: Shared sccache statistics - if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats rust-feature-alias: @@ -547,7 +547,7 @@ jobs: git diff --exit-code HEAD -- ':(glob)**/Cargo.lock' - name: Shared sccache statistics - if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats rust-gateway-core-features: @@ -576,7 +576,7 @@ jobs: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-podman - name: Shared sccache statistics - if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats rust-gateway-extended-features: @@ -604,7 +604,7 @@ jobs: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-docker,compute-driver-vm - name: Shared sccache statistics - if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && startsWith(runner.name, 'openshell-ci-amd64-') }} + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats python: diff --git a/CI.md b/CI.md index 099cbc8da8..0b263b848f 100644 --- a/CI.md +++ b/CI.md @@ -8,8 +8,9 @@ For local test commands see [TESTING.md](TESTING.md). For PR conventions see [CO `Branch Checks` uses the `openshell-ci-amd64` GKE ARC scale set for Linux amd64 jobs from branches in `ai-openshell/openshell`, manual runs, and merge groups. -Fork PRs use GitHub-hosted runners; ARM and macOS jobs keep their existing -runner labels. This is a branch trial and does not change main until merged. +Fork PRs use GitHub-hosted runners. ARM Linux lint/tests use the dedicated +`openshell-ci-arm64-pd-lint` and `openshell-ci-arm64-pd-test` trial scale sets; +other ARM jobs and macOS keep their hosted labels. This is a branch trial and does not change main until merged. `Branch Checks` and `Helm Lint` trigger on `pull_request` and `merge_group`. Workflow runs from outside contributors wait for a maintainer to approve them in the Actions tab. @@ -33,8 +34,16 @@ ephemeral; only Cargo build outputs persist. Cargo still validates artifacts, and fresh checkout timestamps can trigger workspace rebuilds. These two lanes serialize concurrent jobs during the trial; the ordinary scale set stays 5–20. Inspect the job's -runner name to confirm whether it ran on GKE. ARM, macOS, and fork jobs do not -use the cluster-local cache endpoint. +runner name to confirm whether it ran on GKE. Hosted ARM, macOS, and fork jobs +do not use the cluster-local cache endpoint. + +The ARM trial uses native `t2a-standard-16` Ubuntu nodes (minimum two, maximum +four), an ARM64 runner image with baked Nix shells, and separate 200 GiB SSDs +for lint/tests. Each ARM lane has one ready worker, reserves 12 CPUs for the +runner plus one for Docker, and uses the same exclusive persistent-cache setup +as x86. BuildKit is native ARM too. Compare an empty-disk run with a same-commit +warm run on replacement pods; report queue/startup separately. Full ARM test +coverage is retained, and hosted ARM labels remain the fork fallback. `pull_request` runs from forks get a read-only token and no secrets, so they cannot post statuses. `Required CI Gates` runs from the base repository (`pull_request_target` and `workflow_run`), never checks out PR code, and posts the required `OpenShell / ...` statuses on the PR head SHA. E2E suites are opt-in because they are more expensive. From 69a058c36e576d7cfa55de9c063234dc14b3f62b Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Sun, 22 Nov 2026 10:45:06 -0800 Subject: [PATCH 08/17] ci: balance arm crypto checks across parallel runner lanes Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 3 ++ .github/workflows/branch-checks.yml | 56 +++++++++++++++++++- CI.md | 5 +- 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index 41c1eb5c93..f7c3d168ef 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -150,6 +150,9 @@ size before building and skips GitHub Cargo cache restore/save. Compare empty and warm runs on different runner pods; a PVC surviving pod replacement is the persistence check. `Pending` pods can be waiting for exclusive disk attachment; inspect PVC/PV events before treating this as a runner registration failure. +On native ARM the crypto backend/OpenSSL verification steps run in the lint +job, in parallel with workspace tests; inspect that job for crypto failures. +Hosted/fork and x86 test jobs keep their existing crypto steps. See `CI.md` for trial scope and cache setup. ## View Job Logs diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 8da10c6f0c..50e9e9df2e 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -332,6 +332,58 @@ jobs: cargo clippy --locked --manifest-path tests/suites/features/Cargo.toml --workspace --all-targets -- -D warnings cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings + # Balance ARM crypto checks against the parallel workspace test job. + - name: Verify crypto backend independence + if: matrix.runner == 'openshell-ci-arm64-pd-lint' + shell: nix develop -c bash -euo pipefail {0} + run: | + cargo tree --locked -p openshell-crypto --no-default-features --edges normal,build,dev --target all --prefix none > /tmp/openshell-crypto-dependencies.txt + if grep -Eq '^(ring|aws-lc-rs|aws-lc-sys|aws-lc-fips-sys) v' /tmp/openshell-crypto-dependencies.txt; then + echo "ERROR: backend-free crypto build includes Ring or AWS-LC" >&2 + cat /tmp/openshell-crypto-dependencies.txt >&2 + exit 1 + fi + cargo test --locked -p openshell-crypto --no-default-features --test independent_backend + + - name: Verify OpenSSL backend + if: matrix.runner == 'openshell-ci-arm64-pd-lint' + shell: nix develop .#crypto -c bash -euo pipefail {0} + env: + OPENSSL_NO_VENDOR: "1" + OPENSSL_STATIC: "0" + run: | + cargo tree --locked -p openshell-crypto --no-default-features --features openssl --edges normal,build,dev --target all --prefix none > /tmp/openshell-openssl-dependencies.txt + if grep -Eq '^(ring|aws-lc-rs|aws-lc-sys|aws-lc-fips-sys|openssl-src) v' /tmp/openshell-openssl-dependencies.txt; then + echo "ERROR: OpenSSL-only crypto build includes another backend or vendored OpenSSL" >&2 + cat /tmp/openshell-openssl-dependencies.txt >&2 + exit 1 + fi + cargo clippy --locked -p openshell-crypto --no-default-features --features openssl --all-targets -- -D warnings + cargo test --locked -p openshell-crypto --no-default-features --features openssl + for feature in tls-tonic tls-kube tls-sqlx; do + cargo check --locked -p openshell-crypto --no-default-features --features "openssl,$feature" + done + cargo clippy --locked -p openshell-crypto --features openssl --all-targets -- -D warnings + cargo test --locked -p openshell-crypto --features openssl + + - name: Verify dynamic OpenSSL linkage on Linux + if: runner.os == 'Linux' && matrix.runner == 'openshell-ci-arm64-pd-lint' + shell: nix develop .#crypto -c bash -euo pipefail {0} + env: + OPENSSL_NO_VENDOR: "1" + OPENSSL_STATIC: "0" + run: | + cargo test --locked -p openshell-crypto --no-default-features --features openssl --test openssl_tls --no-run --message-format=json > "$RUNNER_TEMP/openssl-artifacts.jsonl" + executable=$(uv run --no-project python -c 'import json, sys; artifacts = [json.loads(line) for line in sys.stdin]; paths = [a["executable"] for a in artifacts if a.get("reason") == "compiler-artifact" and a.get("target", {}).get("name") == "openssl_tls" and a.get("executable")]; assert len(paths) == 1, paths; print(paths[0])' < "$RUNNER_TEMP/openssl-artifacts.jsonl") + ldd "$executable" > "$RUNNER_TEMP/openssl-linkage.txt" + cat "$RUNNER_TEMP/openssl-linkage.txt" + for library in libssl libcrypto; do + if ! grep -Eq "^[[:space:]]*$library\\.so[^[:space:]]* => /" "$RUNNER_TEMP/openssl-linkage.txt"; then + echo "ERROR: $library did not resolve to a dynamic library" >&2 + exit 1 + fi + done + - name: Shared sccache statistics if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats @@ -364,6 +416,7 @@ jobs: save-cache: "true" - name: Verify crypto backend independence + if: matrix.runner != 'openshell-ci-arm64-pd-test' shell: nix develop -c bash -euo pipefail {0} run: | cargo tree --locked -p openshell-crypto --no-default-features --edges normal,build,dev --target all --prefix none > /tmp/openshell-crypto-dependencies.txt @@ -375,6 +428,7 @@ jobs: cargo test --locked -p openshell-crypto --no-default-features --test independent_backend - name: Verify OpenSSL backend + if: matrix.runner != 'openshell-ci-arm64-pd-test' shell: nix develop .#crypto -c bash -euo pipefail {0} env: OPENSSL_NO_VENDOR: "1" @@ -395,7 +449,7 @@ jobs: cargo test --locked -p openshell-crypto --features openssl - name: Verify dynamic OpenSSL linkage on Linux - if: runner.os == 'Linux' + if: runner.os == 'Linux' && matrix.runner != 'openshell-ci-arm64-pd-test' shell: nix develop .#crypto -c bash -euo pipefail {0} env: OPENSSL_NO_VENDOR: "1" diff --git a/CI.md b/CI.md index 0b263b848f..5778061d4a 100644 --- a/CI.md +++ b/CI.md @@ -43,7 +43,10 @@ for lint/tests. Each ARM lane has one ready worker, reserves 12 CPUs for the runner plus one for Docker, and uses the same exclusive persistent-cache setup as x86. BuildKit is native ARM too. Compare an empty-disk run with a same-commit warm run on replacement pods; report queue/startup separately. Full ARM test -coverage is retained, and hosted ARM labels remain the fork fallback. +coverage is retained, and hosted ARM labels remain the fork fallback. On native +ARM, crypto backend independence, OpenSSL backend, and dynamic-linkage checks run +after lint while workspace tests run in parallel on the test lane. Other runner +configurations retain those checks in the test job. `pull_request` runs from forks get a read-only token and no secrets, so they cannot post statuses. `Required CI Gates` runs from the base repository (`pull_request_target` and `workflow_run`), never checks out PR code, and posts the required `OpenShell / ...` statuses on the PR head SHA. E2E suites are opt-in because they are more expensive. From 8aa6cfcc5c1193b05a71eff7efd77cff4ac4e20b Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Sun, 22 Nov 2026 17:49:53 -0800 Subject: [PATCH 09/17] ci: parallelize gateway core feature checks Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 5 +++ .github/actionlint.yml | 2 ++ .github/workflows/branch-checks.yml | 36 +++++++++++++++----- CI.md | 11 ++++++ 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index f7c3d168ef..c8c48c88e4 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -153,6 +153,11 @@ inspect PVC/PV events before treating this as a runner registration failure. On native ARM the crypto backend/OpenSSL verification steps run in the lint job, in parallel with workspace tests; inspect that job for crypto failures. Hosted/fork and x86 test jobs keep their existing crypto steps. +Gateway core features use parallel `base-kubernetes` and `docker-podman` matrix +jobs on `openshell-ci-amd64-pd-gateway-a/b`, with separate exclusive caches and +eight reserved runner CPUs. Inspect both jobs and all four named feature steps; +measure the later completion rather than summing durations. Fork jobs retain +hosted Ubuntu. A failed lane must fail the Branch Checks workflow gate. See `CI.md` for trial scope and cache setup. ## View Job Logs diff --git a/.github/actionlint.yml b/.github/actionlint.yml index e7557f457f..a432d307a1 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -6,6 +6,8 @@ self-hosted-runner: - openshell-ci-amd64 - openshell-ci-amd64-pd-lint - openshell-ci-amd64-pd-test + - openshell-ci-amd64-pd-gateway-a + - openshell-ci-amd64-pd-gateway-b - openshell-ci-arm64-pd-lint - openshell-ci-arm64-pd-test - ubuntu-26.04 diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 50e9e9df2e..b6ad98ce16 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -605,8 +605,16 @@ jobs: run: sccache --show-stats rust-gateway-core-features: - name: Rust gateway core features - runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} + name: Rust gateway core features (${{ matrix.lane }}) + strategy: + fail-fast: false + matrix: + include: + - lane: base-kubernetes + runner: openshell-ci-amd64-pd-gateway-a + - lane: docker-podman + runner: openshell-ci-amd64-pd-gateway-b + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.runner || 'ubuntu-24.04' }} timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -621,13 +629,25 @@ jobs: cache-key: rust-checks-v2 save-cache: "false" - - name: Verify core gateway compute-driver feature sets + - name: Test gateway without optional drivers + if: matrix.lane == 'base-kubernetes' shell: nix develop -c bash -euo pipefail {0} - run: | - cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features - cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-docker - cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-kubernetes - cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-podman + run: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features + + - name: Test Kubernetes-only gateway + if: matrix.lane == 'base-kubernetes' + shell: nix develop -c bash -euo pipefail {0} + run: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-kubernetes + + - name: Test Docker-only gateway + if: matrix.lane == 'docker-podman' + shell: nix develop -c bash -euo pipefail {0} + run: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-docker + + - name: Test Podman-only gateway + if: matrix.lane == 'docker-podman' + shell: nix develop -c bash -euo pipefail {0} + run: cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-podman - name: Shared sccache statistics if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} diff --git a/CI.md b/CI.md index 5778061d4a..6d92a2eeb4 100644 --- a/CI.md +++ b/CI.md @@ -48,6 +48,17 @@ ARM, crypto backend independence, OpenSSL backend, and dynamic-linkage checks ru after lint while workspace tests run in parallel on the test lane. Other runner configurations retain those checks in the test job. +Gateway core-feature checks run in two parallel matrix lanes: no-driver plus +Kubernetes in `base-kubernetes`, and Docker plus Podman in `docker-podman`. +Trusted jobs use `openshell-ci-amd64-pd-gateway-a` and +`openshell-ci-amd64-pd-gateway-b`, each with an exclusive 200 GiB SSD, eight +reserved runner CPUs, and shared memcached sccache. Fork jobs use hosted Ubuntu. +All four commands keep `--all-targets --no-default-features`; each driver is +checked independently. The matrix keeps running both lanes after a failure, +and the existing Branch Checks workflow gate requires both to succeed. +Compare the later lane completion, including queue time, against the old +sequential job; adding lane durations measures CPU cost rather than latency. + `pull_request` runs from forks get a read-only token and no secrets, so they cannot post statuses. `Required CI Gates` runs from the base repository (`pull_request_target` and `workflow_run`), never checks out PR code, and posts the required `OpenShell / ...` statuses on the PR head SHA. E2E suites are opt-in because they are more expensive. Merge queue validation is a second integration gate for `main`. After a PR has passed the required PR-head statuses, a maintainer adds it to the merge queue. GitHub creates a temporary merge-group branch that combines the latest `main`, the queued PR, and any earlier queued PRs. The same required `OpenShell / ...` status contexts are then published against the merge-group SHA before GitHub merges it. From 0c28fce88f059a65195026079660de3ec911554c Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Sun, 22 Nov 2026 21:04:59 -0800 Subject: [PATCH 10/17] ci: compare combined and parallel linux rust checks Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 5 + .github/actionlint.yml | 2 + .github/workflows/branch-checks.yml | 114 +++++++++++++++++++ CI.md | 12 ++ 4 files changed, 133 insertions(+) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index c8c48c88e4..a6a2a1d029 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -158,6 +158,11 @@ jobs on `openshell-ci-amd64-pd-gateway-a/b`, with separate exclusive caches and eight reserved runner CPUs. Inspect both jobs and all four named feature steps; measure the later completion rather than summing durations. Fork jobs retain hosted Ubuntu. A failed lane must fail the Branch Checks workflow gate. +The opt-in `compare_linux_combined` manual input adds Linux combined lint, +crypto, and test jobs beside the regular controls. Compare each architecture's +later control completion against its combined job, and runner minutes against +the control sum. Confirm cold versus warm target sizes; no Clippy architecture +coverage is dropped in this experiment. Ordinary PR runs skip the comparison. See `CI.md` for trial scope and cache setup. ## View Job Logs diff --git a/.github/actionlint.yml b/.github/actionlint.yml index a432d307a1..1f252bc640 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -6,10 +6,12 @@ self-hosted-runner: - openshell-ci-amd64 - openshell-ci-amd64-pd-lint - openshell-ci-amd64-pd-test + - openshell-ci-amd64-pd-combined - openshell-ci-amd64-pd-gateway-a - openshell-ci-amd64-pd-gateway-b - openshell-ci-arm64-pd-lint - openshell-ci-arm64-pd-test + - openshell-ci-arm64-pd-combined - ubuntu-26.04 - windows-arm64 diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index b6ad98ce16..a4a4561319 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -5,6 +5,12 @@ on: types: [checks_requested] pull_request: workflow_dispatch: + inputs: + compare_linux_combined: + description: Run Linux combined lint/test jobs alongside the parallel controls + type: boolean + required: false + default: false env: CARGO_TERM_COLOR: always @@ -483,6 +489,114 @@ jobs: if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats + rust-linux-combined-trial: + name: Linux combined lint and tests (${{ matrix.system }}) + if: github.event_name == 'workflow_dispatch' && inputs.compare_linux_combined && github.repository == 'ai-openshell/openshell' + strategy: + fail-fast: false + matrix: + include: + - system: x86_64-linux + runner: openshell-ci-amd64-pd-combined + - system: aarch64-linux + runner: openshell-ci-arm64-pd-combined + runs-on: ${{ matrix.runner }} + timeout-minutes: 45 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: ./.github/actions/setup-nix + with: + prepare-shell: "true" + cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} + + - uses: ./.github/actions/setup-rust + with: + cache-key: rust-checks-v2 + save-cache: "false" + + - name: Lint + shell: nix develop -c bash -euo pipefail {0} + run: | + cargo clippy --locked --workspace --all-targets -- -D warnings + cargo clippy --locked --manifest-path e2e/rust/Cargo.toml --all-targets -- -D warnings + cargo clippy --locked --manifest-path examples/governance-interceptor/Cargo.toml --all-targets -- -D warnings + cargo clippy --locked --manifest-path examples/supervisor-middleware-content-guard/Cargo.toml --all-targets -- -D warnings + cargo clippy --locked --manifest-path examples/isolation-backend-v8/Cargo.toml --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/testkit/Cargo.toml --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/tmachine/Cargo.toml --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/runner/Cargo.toml --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/suites/conformance/Cargo.toml --workspace --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/suites/continuity/Cargo.toml --workspace --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/suites/drivers/podman/Cargo.toml --workspace --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/suites/features/Cargo.toml --workspace --all-targets -- -D warnings + cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings + + - name: Verify crypto backend independence + shell: nix develop -c bash -euo pipefail {0} + run: | + cargo tree --locked -p openshell-crypto --no-default-features --edges normal,build,dev --target all --prefix none > /tmp/openshell-crypto-dependencies.txt + if grep -Eq '^(ring|aws-lc-rs|aws-lc-sys|aws-lc-fips-sys) v' /tmp/openshell-crypto-dependencies.txt; then + echo "ERROR: backend-free crypto build includes Ring or AWS-LC" >&2 + cat /tmp/openshell-crypto-dependencies.txt >&2 + exit 1 + fi + cargo test --locked -p openshell-crypto --no-default-features --test independent_backend + + - name: Verify OpenSSL backend + shell: nix develop .#crypto -c bash -euo pipefail {0} + env: + OPENSSL_NO_VENDOR: "1" + OPENSSL_STATIC: "0" + run: | + cargo tree --locked -p openshell-crypto --no-default-features --features openssl --edges normal,build,dev --target all --prefix none > /tmp/openshell-openssl-dependencies.txt + if grep -Eq '^(ring|aws-lc-rs|aws-lc-sys|aws-lc-fips-sys|openssl-src) v' /tmp/openshell-openssl-dependencies.txt; then + echo "ERROR: OpenSSL-only crypto build includes another backend or vendored OpenSSL" >&2 + cat /tmp/openshell-openssl-dependencies.txt >&2 + exit 1 + fi + cargo clippy --locked -p openshell-crypto --no-default-features --features openssl --all-targets -- -D warnings + cargo test --locked -p openshell-crypto --no-default-features --features openssl + for feature in tls-tonic tls-kube tls-sqlx; do + cargo check --locked -p openshell-crypto --no-default-features --features "openssl,$feature" + done + cargo clippy --locked -p openshell-crypto --features openssl --all-targets -- -D warnings + cargo test --locked -p openshell-crypto --features openssl + + - name: Verify dynamic OpenSSL linkage on Linux + shell: nix develop .#crypto -c bash -euo pipefail {0} + env: + OPENSSL_NO_VENDOR: "1" + OPENSSL_STATIC: "0" + run: | + cargo test --locked -p openshell-crypto --no-default-features --features openssl --test openssl_tls --no-run --message-format=json > "$RUNNER_TEMP/openssl-artifacts.jsonl" + executable=$(uv run --no-project python -c 'import json, sys; artifacts = [json.loads(line) for line in sys.stdin]; paths = [a["executable"] for a in artifacts if a.get("reason") == "compiler-artifact" and a.get("target", {}).get("name") == "openssl_tls" and a.get("executable")]; assert len(paths) == 1, paths; print(paths[0])' < "$RUNNER_TEMP/openssl-artifacts.jsonl") + ldd "$executable" > "$RUNNER_TEMP/openssl-linkage.txt" + cat "$RUNNER_TEMP/openssl-linkage.txt" + for library in libssl libcrypto; do + if ! grep -Eq "^[[:space:]]*$library\\.so[^[:space:]]* => /" "$RUNNER_TEMP/openssl-linkage.txt"; then + echo "ERROR: $library did not resolve to a dynamic library" >&2 + exit 1 + fi + done + + - name: Test + shell: nix develop -c bash -euo pipefail {0} + env: + OPENSHELL_TELEMETRY_ENABLED: "false" + run: | + cargo nextest run --locked --profile ci --workspace --features openshell-server/test-support + cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path examples/supervisor-middleware-content-guard/Cargo.toml + cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/testkit/Cargo.toml + cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/tmachine/Cargo.toml + cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/runner/Cargo.toml + cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/support/Cargo.toml + tasks/scripts/check-conformance-program.sh + + - name: Shared sccache statistics + if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} + run: sccache --show-stats + rust-postgres-test: name: Rust PostgreSQL tests # Bare runner: the test script starts a disposable PostgreSQL container diff --git a/CI.md b/CI.md index 6d92a2eeb4..3fcb6a9275 100644 --- a/CI.md +++ b/CI.md @@ -59,6 +59,18 @@ and the existing Branch Checks workflow gate requires both to succeed. Compare the later lane completion, including queue time, against the old sequential job; adding lane durations measures CPU cost rather than latency. +Manual Branch Checks runs can enable `compare_linux_combined` to add one +combined lint/crypto/test job on each Linux architecture alongside the normal +parallel controls. No macOS combined job is added. All Clippy, crypto, workspace, +and independent-workspace commands are retained. Combined jobs use their own +exclusive SSDs and the same image, CPU limits, and memory settings as their +architecture's controls. During this infra trial AMD64 lint/test/combined +workers each reserve eight runner CPUs; ARM64 workers each reserve twelve. +Compare warmed runs on the same commit: parallel completion is the later +lint/test completion; combined completion is one job. Report total runner +minutes separately. The input defaults to false so ordinary PR checks do not +run duplicate suites. + `pull_request` runs from forks get a read-only token and no secrets, so they cannot post statuses. `Required CI Gates` runs from the base repository (`pull_request_target` and `workflow_run`), never checks out PR code, and posts the required `OpenShell / ...` statuses on the PR head SHA. E2E suites are opt-in because they are more expensive. Merge queue validation is a second integration gate for `main`. After a PR has passed the required PR-head statuses, a maintainer adds it to the merge queue. GitHub creates a temporary merge-group branch that combines the latest `main`, the queued PR, and any earlier queued PRs. The same required `OpenShell / ...` status contexts are then published against the merge-group SHA before GitHub merges it. From b6f0b77168226995304af4a252308039ce5d65f6 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Sun, 22 Nov 2026 21:57:28 -0800 Subject: [PATCH 11/17] docs(ci): document comparison worker lifecycle Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 3 +++ CI.md | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index a6a2a1d029..e3a4340f65 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -163,6 +163,9 @@ crypto, and test jobs beside the regular controls. Compare each architecture's later control completion against its combined job, and runner minutes against the control sum. Confirm cold versus warm target sizes; no Clippy architecture coverage is dropped in this experiment. Ordinary PR runs skip the comparison. +Combined workers normally have zero idle pods; prewarm both architectures +through the infra add-ons `combined_trial_idle_runners=1` setting before timing +a run, and restore zero idle workers afterward. Keep their SSDs for reuse. See `CI.md` for trial scope and cache setup. ## View Job Logs diff --git a/CI.md b/CI.md index 3fcb6a9275..f83532b7fc 100644 --- a/CI.md +++ b/CI.md @@ -69,7 +69,11 @@ workers each reserve eight runner CPUs; ARM64 workers each reserve twelve. Compare warmed runs on the same commit: parallel completion is the later lint/test completion; combined completion is one job. Report total runner minutes separately. The input defaults to false so ordinary PR checks do not -run duplicate suites. +run duplicate suites. The optional combined workers normally scale to zero idle +pods while retaining their SSDs. Before measuring, prewarm them in the infra +add-ons workspace with `-var=combined_trial_idle_runners=1`, wait for both +workers to be ready, then run twice on the same commit. Afterward, apply the +default zero-idle setting to release their compute. `pull_request` runs from forks get a read-only token and no secrets, so they cannot post statuses. `Required CI Gates` runs from the base repository (`pull_request_target` and `workflow_run`), never checks out PR code, and posts the required `OpenShell / ...` statuses on the PR head SHA. E2E suites are opt-in because they are more expensive. From ab946dcd52c60de84f4f0d470ffe568a9bdcb554 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Sun, 22 Nov 2026 22:30:48 -0800 Subject: [PATCH 12/17] revert(ci): remove combined linux job experiment Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 8 -- .github/actionlint.yml | 2 - .github/workflows/branch-checks.yml | 114 ------------------- CI.md | 16 --- 4 files changed, 140 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index e3a4340f65..c8c48c88e4 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -158,14 +158,6 @@ jobs on `openshell-ci-amd64-pd-gateway-a/b`, with separate exclusive caches and eight reserved runner CPUs. Inspect both jobs and all four named feature steps; measure the later completion rather than summing durations. Fork jobs retain hosted Ubuntu. A failed lane must fail the Branch Checks workflow gate. -The opt-in `compare_linux_combined` manual input adds Linux combined lint, -crypto, and test jobs beside the regular controls. Compare each architecture's -later control completion against its combined job, and runner minutes against -the control sum. Confirm cold versus warm target sizes; no Clippy architecture -coverage is dropped in this experiment. Ordinary PR runs skip the comparison. -Combined workers normally have zero idle pods; prewarm both architectures -through the infra add-ons `combined_trial_idle_runners=1` setting before timing -a run, and restore zero idle workers afterward. Keep their SSDs for reuse. See `CI.md` for trial scope and cache setup. ## View Job Logs diff --git a/.github/actionlint.yml b/.github/actionlint.yml index 1f252bc640..a432d307a1 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -6,12 +6,10 @@ self-hosted-runner: - openshell-ci-amd64 - openshell-ci-amd64-pd-lint - openshell-ci-amd64-pd-test - - openshell-ci-amd64-pd-combined - openshell-ci-amd64-pd-gateway-a - openshell-ci-amd64-pd-gateway-b - openshell-ci-arm64-pd-lint - openshell-ci-arm64-pd-test - - openshell-ci-arm64-pd-combined - ubuntu-26.04 - windows-arm64 diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index a4a4561319..b6ad98ce16 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -5,12 +5,6 @@ on: types: [checks_requested] pull_request: workflow_dispatch: - inputs: - compare_linux_combined: - description: Run Linux combined lint/test jobs alongside the parallel controls - type: boolean - required: false - default: false env: CARGO_TERM_COLOR: always @@ -489,114 +483,6 @@ jobs: if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats - rust-linux-combined-trial: - name: Linux combined lint and tests (${{ matrix.system }}) - if: github.event_name == 'workflow_dispatch' && inputs.compare_linux_combined && github.repository == 'ai-openshell/openshell' - strategy: - fail-fast: false - matrix: - include: - - system: x86_64-linux - runner: openshell-ci-amd64-pd-combined - - system: aarch64-linux - runner: openshell-ci-arm64-pd-combined - runs-on: ${{ matrix.runner }} - timeout-minutes: 45 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - uses: ./.github/actions/setup-nix - with: - prepare-shell: "true" - cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} - - - uses: ./.github/actions/setup-rust - with: - cache-key: rust-checks-v2 - save-cache: "false" - - - name: Lint - shell: nix develop -c bash -euo pipefail {0} - run: | - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo clippy --locked --manifest-path e2e/rust/Cargo.toml --all-targets -- -D warnings - cargo clippy --locked --manifest-path examples/governance-interceptor/Cargo.toml --all-targets -- -D warnings - cargo clippy --locked --manifest-path examples/supervisor-middleware-content-guard/Cargo.toml --all-targets -- -D warnings - cargo clippy --locked --manifest-path examples/isolation-backend-v8/Cargo.toml --all-targets -- -D warnings - cargo clippy --locked --manifest-path tests/testkit/Cargo.toml --all-targets -- -D warnings - cargo clippy --locked --manifest-path tests/tmachine/Cargo.toml --all-targets -- -D warnings - cargo clippy --locked --manifest-path tests/runner/Cargo.toml --all-targets -- -D warnings - cargo clippy --locked --manifest-path tests/suites/conformance/Cargo.toml --workspace --all-targets -- -D warnings - cargo clippy --locked --manifest-path tests/suites/continuity/Cargo.toml --workspace --all-targets -- -D warnings - cargo clippy --locked --manifest-path tests/suites/drivers/podman/Cargo.toml --workspace --all-targets -- -D warnings - cargo clippy --locked --manifest-path tests/suites/features/Cargo.toml --workspace --all-targets -- -D warnings - cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings - - - name: Verify crypto backend independence - shell: nix develop -c bash -euo pipefail {0} - run: | - cargo tree --locked -p openshell-crypto --no-default-features --edges normal,build,dev --target all --prefix none > /tmp/openshell-crypto-dependencies.txt - if grep -Eq '^(ring|aws-lc-rs|aws-lc-sys|aws-lc-fips-sys) v' /tmp/openshell-crypto-dependencies.txt; then - echo "ERROR: backend-free crypto build includes Ring or AWS-LC" >&2 - cat /tmp/openshell-crypto-dependencies.txt >&2 - exit 1 - fi - cargo test --locked -p openshell-crypto --no-default-features --test independent_backend - - - name: Verify OpenSSL backend - shell: nix develop .#crypto -c bash -euo pipefail {0} - env: - OPENSSL_NO_VENDOR: "1" - OPENSSL_STATIC: "0" - run: | - cargo tree --locked -p openshell-crypto --no-default-features --features openssl --edges normal,build,dev --target all --prefix none > /tmp/openshell-openssl-dependencies.txt - if grep -Eq '^(ring|aws-lc-rs|aws-lc-sys|aws-lc-fips-sys|openssl-src) v' /tmp/openshell-openssl-dependencies.txt; then - echo "ERROR: OpenSSL-only crypto build includes another backend or vendored OpenSSL" >&2 - cat /tmp/openshell-openssl-dependencies.txt >&2 - exit 1 - fi - cargo clippy --locked -p openshell-crypto --no-default-features --features openssl --all-targets -- -D warnings - cargo test --locked -p openshell-crypto --no-default-features --features openssl - for feature in tls-tonic tls-kube tls-sqlx; do - cargo check --locked -p openshell-crypto --no-default-features --features "openssl,$feature" - done - cargo clippy --locked -p openshell-crypto --features openssl --all-targets -- -D warnings - cargo test --locked -p openshell-crypto --features openssl - - - name: Verify dynamic OpenSSL linkage on Linux - shell: nix develop .#crypto -c bash -euo pipefail {0} - env: - OPENSSL_NO_VENDOR: "1" - OPENSSL_STATIC: "0" - run: | - cargo test --locked -p openshell-crypto --no-default-features --features openssl --test openssl_tls --no-run --message-format=json > "$RUNNER_TEMP/openssl-artifacts.jsonl" - executable=$(uv run --no-project python -c 'import json, sys; artifacts = [json.loads(line) for line in sys.stdin]; paths = [a["executable"] for a in artifacts if a.get("reason") == "compiler-artifact" and a.get("target", {}).get("name") == "openssl_tls" and a.get("executable")]; assert len(paths) == 1, paths; print(paths[0])' < "$RUNNER_TEMP/openssl-artifacts.jsonl") - ldd "$executable" > "$RUNNER_TEMP/openssl-linkage.txt" - cat "$RUNNER_TEMP/openssl-linkage.txt" - for library in libssl libcrypto; do - if ! grep -Eq "^[[:space:]]*$library\\.so[^[:space:]]* => /" "$RUNNER_TEMP/openssl-linkage.txt"; then - echo "ERROR: $library did not resolve to a dynamic library" >&2 - exit 1 - fi - done - - - name: Test - shell: nix develop -c bash -euo pipefail {0} - env: - OPENSHELL_TELEMETRY_ENABLED: "false" - run: | - cargo nextest run --locked --profile ci --workspace --features openshell-server/test-support - cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path examples/supervisor-middleware-content-guard/Cargo.toml - cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/testkit/Cargo.toml - cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/tmachine/Cargo.toml - cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/runner/Cargo.toml - cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/support/Cargo.toml - tasks/scripts/check-conformance-program.sh - - - name: Shared sccache statistics - if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} - run: sccache --show-stats - rust-postgres-test: name: Rust PostgreSQL tests # Bare runner: the test script starts a disposable PostgreSQL container diff --git a/CI.md b/CI.md index f83532b7fc..6d92a2eeb4 100644 --- a/CI.md +++ b/CI.md @@ -59,22 +59,6 @@ and the existing Branch Checks workflow gate requires both to succeed. Compare the later lane completion, including queue time, against the old sequential job; adding lane durations measures CPU cost rather than latency. -Manual Branch Checks runs can enable `compare_linux_combined` to add one -combined lint/crypto/test job on each Linux architecture alongside the normal -parallel controls. No macOS combined job is added. All Clippy, crypto, workspace, -and independent-workspace commands are retained. Combined jobs use their own -exclusive SSDs and the same image, CPU limits, and memory settings as their -architecture's controls. During this infra trial AMD64 lint/test/combined -workers each reserve eight runner CPUs; ARM64 workers each reserve twelve. -Compare warmed runs on the same commit: parallel completion is the later -lint/test completion; combined completion is one job. Report total runner -minutes separately. The input defaults to false so ordinary PR checks do not -run duplicate suites. The optional combined workers normally scale to zero idle -pods while retaining their SSDs. Before measuring, prewarm them in the infra -add-ons workspace with `-var=combined_trial_idle_runners=1`, wait for both -workers to be ready, then run twice on the same commit. Afterward, apply the -default zero-idle setting to release their compute. - `pull_request` runs from forks get a read-only token and no secrets, so they cannot post statuses. `Required CI Gates` runs from the base repository (`pull_request_target` and `workflow_run`), never checks out PR code, and posts the required `OpenShell / ...` statuses on the PR head SHA. E2E suites are opt-in because they are more expensive. Merge queue validation is a second integration gate for `main`. After a PR has passed the required PR-head statuses, a maintainer adds it to the merge queue. GitHub creates a temporary merge-group branch that combines the latest `main`, the queued PR, and any earlier queued PRs. The same required `OpenShell / ...` status contexts are then published against the merge-group SHA before GitHub merges it. From 767a970c72018534b4a56199942e68917ad11f74 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Mon, 23 Nov 2026 08:34:43 -0800 Subject: [PATCH 13/17] ci: trial faster amd64 checks and local image builds Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 10 ++++ .github/actions/setup-rust/action.yml | 4 ++ .github/workflows/branch-checks.yml | 53 ++++++++++++++++++++ CI.md | 19 +++++++ 4 files changed, 86 insertions(+) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index c8c48c88e4..a9c20b994b 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -158,6 +158,16 @@ jobs on `openshell-ci-amd64-pd-gateway-a/b`, with separate exclusive caches and eight reserved runner CPUs. Inspect both jobs and all four named feature steps; measure the later completion rather than summing durations. Fork jobs retain hosted Ubuntu. A failed lane must fail the Branch Checks workflow gate. +The AMD64 speed trial selects C3 nodes for persistent-cache lanes and disables +test debug information only on the trusted AMD64 test job. Verify its +`test-debug0` target path, initial size, and C3 node placement. Compare a first +population pass and a warm rerun; both hardware and debug information change, +so avoid attributing gains to either alone. Debug assertions stay enabled. +The manual `local_image_builds` input additionally stages release binaries, +builds all three native AMD64 images, and runs local `--help` smoke checks. +It uses explicit Docker local output and no publication or image artifact +upload. Diagnose binary staging separately from image assembly. Keep optional +image-build timing separate from ordinary branch-check latency. See `CI.md` for trial scope and cache setup. ## View Job Logs diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index b8fa7f856a..aa5a33e8f4 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -61,6 +61,10 @@ runs: test "$OPENSHELL_PERSISTENT_CACHE" = /mnt/ci-cache mountpoint -q "$OPENSHELL_PERSISTENT_CACHE" cache_root="$OPENSHELL_PERSISTENT_CACHE/ai-openshell-openshell/$NIX_SHELL_HASH" + # Keep the no-debug experiment separate from the existing test artifacts. + if [[ "${CARGO_PROFILE_TEST_DEBUG:-}" == "0" ]]; then + cache_root="$cache_root/test-debug0" + fi mkdir -p "$cache_root/target" echo "CARGO_TARGET_DIR=$cache_root/target" >> "$GITHUB_ENV" echo "Persistent cache lane: $OPENSHELL_CACHE_LANE" diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index b6ad98ce16..9fa25704d6 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -5,6 +5,11 @@ on: types: [checks_requested] pull_request: workflow_dispatch: + inputs: + local_image_builds: + description: Build and smoke-test native AMD64 images locally without publishing + type: boolean + default: false env: CARGO_TERM_COLOR: always @@ -403,6 +408,10 @@ jobs: runs-on: ${{ matrix.runner }} timeout-minutes: 45 steps: + - name: Disable test debug information on the AMD64 trial + if: matrix.runner == 'openshell-ci-amd64-pd-test' + run: echo "CARGO_PROFILE_TEST_DEBUG=0" >> "$GITHUB_ENV" + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: ./.github/actions/setup-nix @@ -483,6 +492,50 @@ jobs: if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats + local-image-build-trial: + name: Local image build trial (amd64, no push) + if: github.event_name == 'workflow_dispatch' && inputs.local_image_builds && github.repository == 'ai-openshell/openshell' + runs-on: openshell-ci-amd64 + timeout-minutes: 90 + env: + CONTAINER_ENGINE: docker + DOCKER_PLATFORM: linux/amd64 + DOCKER_PUSH: "0" + DOCKER_OUTPUT: type=docker + DOCKER_BUILDER: openshell-local-trial + IMAGE_REGISTRY: localhost/openshell-ci + IMAGE_TAG: ${{ github.sha }} + PREBUILT_ARCH: amd64 + PREBUILT_AUTO_STAGE: "0" + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: ./.github/actions/setup-nix + with: + prepare-shell: "true" + - uses: ./.github/actions/setup-rust + with: + cache-key: local-image-build-trial + save-cache: "false" + - name: Stage real release binaries + shell: nix develop -c bash -euo pipefail {0} + run: mise run build:docker:prebuilt + - name: Build and verify local images + shell: nix develop -c bash -euo pipefail {0} + run: | + docker buildx create --name "$DOCKER_BUILDER" --driver remote "$BUILDKIT_HOST" + trap 'docker buildx rm "$DOCKER_BUILDER"' EXIT + for component in gateway sandbox supervisor; do + mise run "docker:build:$component" + image="$IMAGE_REGISTRY/$component:$IMAGE_TAG" + test "$(docker image inspect --format '{{.Architecture}}' "$image")" = amd64 + docker run --rm --network none "$image" --help + done + - name: Shared sccache statistics + if: always() && env.RUSTC_WRAPPER != '' + run: sccache --show-stats + rust-postgres-test: name: Rust PostgreSQL tests # Bare runner: the test script starts a disposable PostgreSQL container diff --git a/CI.md b/CI.md index 6d92a2eeb4..19ee7db090 100644 --- a/CI.md +++ b/CI.md @@ -37,6 +37,25 @@ Inspect the job's runner name to confirm whether it ran on GKE. Hosted ARM, macOS, and fork jobs do not use the cluster-local cache endpoint. +The AMD64 speed trial moves the persistent lint/test and gateway core lanes to +`c3-standard-22` Ubuntu nodes in the same zone, retaining their SSDs, images, +and per-runner CPU/memory settings. The general scale set and system pool now use N2 nodes. +Only the trusted AMD64 test job sets `CARGO_PROFILE_TEST_DEBUG=0`; it retains +all crypto/workspace checks and debug assertions, with less backtrace detail. +Setup places these artifacts under a separate `test-debug0` target directory. +Measure the first population pass and a warm rerun separately. This trial +changes hardware and debug information together, so its result measures their +combined effect. ARM64, macOS, hosted forks, and lint debug settings are unchanged. + +Manual Branch Checks runs can enable `local_image_builds` for an additional +native AMD64 gateway/sandbox/supervisor build and `--help` smoke check. It uses +the normal release-binary staging tasks and remote BuildKit, explicitly sets +`DOCKER_PUSH=0` and `DOCKER_OUTPUT=type=docker`, and loads results only into the +runner's ephemeral Docker daemon. No registry login, image upload, or registry +cache export is performed. This optional release/image build is measured +separately from the normal branch-check latency and does not qualify ARM64 +images or release attestations. + The ARM trial uses native `t2a-standard-16` Ubuntu nodes (minimum two, maximum four), an ARM64 runner image with baked Nix shells, and separate 200 GiB SSDs for lint/tests. Each ARM lane has one ready worker, reserves 12 CPUs for the From d73ad3d72521d6d118f69caa20434545e2c885a1 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Mon, 23 Nov 2026 09:29:23 -0800 Subject: [PATCH 14/17] fix(ci): match production nix toolchain for image trial Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 3 +++ .github/workflows/branch-checks.yml | 22 ++++++++++++++++++-- CI.md | 6 ++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index a9c20b994b..ecf06ceabb 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -165,6 +165,9 @@ population pass and a warm rerun; both hardware and debug information change, so avoid attributing gains to either alone. Debug assertions stay enabled. The manual `local_image_builds` input additionally stages release binaries, builds all three native AMD64 images, and runs local `--help` smoke checks. +It builds auditable binaries with the production Nix GNU/musl toolchains, +checks the glibc 2.28 floor/static sandbox, and skips unrelated mise installs. +The local Zig staging helper conflicts with Nix GNU linking for vendored Z3. It uses explicit Docker local output and no publication or image artifact upload. Diagnose binary staging separately from image assembly. Keep optional image-build timing separate from ordinary branch-check latency. diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 9fa25704d6..4ac768dd06 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -520,14 +520,32 @@ jobs: save-cache: "false" - name: Stage real release binaries shell: nix develop -c bash -euo pipefail {0} - run: mise run build:docker:prebuilt + run: | + # Match build-rust-binary's Nix release toolchain. The local Zig + # staging task mixes libc++ objects with Nix's GNU final linker. + for component in gateway sandbox supervisor; do + target=x86_64-unknown-linux-gnu + if [[ "$component" == sandbox ]]; then + target=x86_64-unknown-linux-musl + fi + binary="openshell-$component" + env -u RUSTC_WRAPPER cargo auditable build --locked --release \ + --target "$target" --package "$binary" --bin "$binary" + artifact="target/$target/release/$binary" + if [[ "$component" == sandbox ]]; then + tasks/scripts/verify-static-binary.sh "$artifact" + else + tasks/scripts/verify-glibc-symbols.sh 2.28 "$artifact" + fi + install -Dm0755 "$artifact" "deploy/docker/.build/prebuilt-binaries/amd64/$binary" + done - name: Build and verify local images shell: nix develop -c bash -euo pipefail {0} run: | docker buildx create --name "$DOCKER_BUILDER" --driver remote "$BUILDKIT_HOST" trap 'docker buildx rm "$DOCKER_BUILDER"' EXIT for component in gateway sandbox supervisor; do - mise run "docker:build:$component" + mise run --skip-tools "docker:build:$component" image="$IMAGE_REGISTRY/$component:$IMAGE_TAG" test "$(docker image inspect --format '{{.Architecture}}' "$image")" = amd64 docker run --rm --network none "$image" --help diff --git a/CI.md b/CI.md index 19ee7db090..221029083e 100644 --- a/CI.md +++ b/CI.md @@ -49,10 +49,12 @@ combined effect. ARM64, macOS, hosted forks, and lint debug settings are unchang Manual Branch Checks runs can enable `local_image_builds` for an additional native AMD64 gateway/sandbox/supervisor build and `--help` smoke check. It uses -the normal release-binary staging tasks and remote BuildKit, explicitly sets +the production Nix auditable release-binary build commands and remote BuildKit, explicitly sets `DOCKER_PUSH=0` and `DOCKER_OUTPUT=type=docker`, and loads results only into the runner's ephemeral Docker daemon. No registry login, image upload, or registry -cache export is performed. This optional release/image build is measured +cache export is performed. The trial uses the production Nix GNU/musl toolchain +rather than the local Zig staging helper, verifies the glibc 2.28 floor and +static sandbox linkage, and skips unrelated mise tool installation. This optional release/image build is measured separately from the normal branch-check latency and does not qualify ARM64 images or release attestations. From 4e60f08a2aa91ea872cd14f3c3c79d94e6e87e12 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Mon, 23 Nov 2026 10:01:23 -0800 Subject: [PATCH 15/17] docs(ci): describe n4 and c4 cache workers Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 14 +++++++++----- CI.md | 19 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index ecf06ceabb..f8493b696f 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -158,11 +158,15 @@ jobs on `openshell-ci-amd64-pd-gateway-a/b`, with separate exclusive caches and eight reserved runner CPUs. Inspect both jobs and all four named feature steps; measure the later completion rather than summing durations. Fork jobs retain hosted Ubuntu. A failed lane must fail the Branch Checks workflow gate. -The AMD64 speed trial selects C3 nodes for persistent-cache lanes and disables -test debug information only on the trusted AMD64 test job. Verify its -`test-debug0` target path, initial size, and C3 node placement. Compare a first -population pass and a warm rerun; both hardware and debug information change, -so avoid attributing gains to either alone. Debug assertions stay enabled. +The AMD64 speed trial selects C4 nodes for persistent-cache lanes and disables +test debug information only on the trusted AMD64 test job. General x86 +workers/system nodes use N4. AMD64 caches are Hyperdisk Balanced; ARM still uses +SSD Persistent Disk. The generation-four migration recreates AMD64 caches, so +record initial target size before comparing timings. Verify its +`test-debug0` target path, initial size, and C4 node placement. Compare a first +population pass and a warm rerun. The earlier N2/C3 trial introduced no-debug +tests; N4/C4 retains that setting and changes CPU/storage generation. Avoid +attributing all gains to one factor. Debug assertions stay enabled. The manual `local_image_builds` input additionally stages release binaries, builds all three native AMD64 images, and runs local `--help` smoke checks. It builds auditable binaries with the production Nix GNU/musl toolchains, diff --git a/CI.md b/CI.md index 221029083e..7fbc31a0aa 100644 --- a/CI.md +++ b/CI.md @@ -25,7 +25,7 @@ Rust jobs use the shared memcached sccache backend and report cache statistics; the standard runner jobs retain the existing GitHub Rust target/registry cache. The x86 lint/test jobs instead use `openshell-ci-amd64-pd-lint` and `openshell-ci-amd64-pd-test`. Each trial scale set has one worker and an exclusive -200 GiB SSD persistent disk, mounted at `/mnt/ci-cache`. Setup verifies the mount +200 GiB persistent cache disk, mounted at `/mnt/ci-cache`. Setup verifies the mount and selects a repository/Nix-shell-specific target directory shared by that job's Cargo commands. It skips GitHub Cargo cache restore/save entirely. Check the initial target size and runner pod name to distinguish an empty-disk @@ -38,14 +38,19 @@ runner name to confirm whether it ran on GKE. Hosted ARM, macOS, and fork jobs do not use the cluster-local cache endpoint. The AMD64 speed trial moves the persistent lint/test and gateway core lanes to -`c3-standard-22` Ubuntu nodes in the same zone, retaining their SSDs, images, -and per-runner CPU/memory settings. The general scale set and system pool now use N2 nodes. +`c4-standard-24` Ubuntu nodes in the same zone. The general workers use +`n4-standard-16`, and the system pool uses `n4-standard-8`. Images and +per-runner CPU/memory settings are unchanged. Fourth-generation nodes require +Hyperdisk boot/cache storage. The four AMD64 caches were recreated as empty +200 GiB Hyperdisk Balanced claims (6,000 IOPS, 250 MiB/s), and their old SSD +Persistent Disks were deleted. ARM keeps its T2A nodes and existing SSD claims. Only the trusted AMD64 test job sets `CARGO_PROFILE_TEST_DEBUG=0`; it retains all crypto/workspace checks and debug assertions, with less backtrace detail. Setup places these artifacts under a separate `test-debug0` target directory. -Measure the first population pass and a warm rerun separately. This trial -changes hardware and debug information together, so its result measures their -combined effect. ARM64, macOS, hosted forks, and lint debug settings are unchanged. +Measure the first population pass and a warm rerun separately. The earlier +N2/C3 trial introduced the no-debug setting; the N4/C4 migration keeps it and +changes CPU/storage generation. These trials do not isolate every factor. +ARM64, macOS, hosted forks, and lint debug settings are unchanged. Manual Branch Checks runs can enable `local_image_builds` for an additional native AMD64 gateway/sandbox/supervisor build and `--help` smoke check. It uses @@ -72,7 +77,7 @@ configurations retain those checks in the test job. Gateway core-feature checks run in two parallel matrix lanes: no-driver plus Kubernetes in `base-kubernetes`, and Docker plus Podman in `docker-podman`. Trusted jobs use `openshell-ci-amd64-pd-gateway-a` and -`openshell-ci-amd64-pd-gateway-b`, each with an exclusive 200 GiB SSD, eight +`openshell-ci-amd64-pd-gateway-b`, each with an exclusive 200 GiB Hyperdisk, eight reserved runner CPUs, and shared memcached sccache. Fork jobs use hosted Ubuntu. All four commands keep `--all-targets --no-default-features`; each driver is checked independently. The matrix keeps running both lanes after a failure, From 1864fb2e15731c21a430b1d0d8ee4c7341e6a0bc Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Mon, 23 Nov 2026 10:54:02 -0800 Subject: [PATCH 16/17] ci: run arm build modes on cached c4a runners Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 10 ++++-- .github/actionlint.yml | 1 + .github/workflows/branch-checks.yml | 9 +++--- CI.md | 34 +++++++++++++------- 4 files changed, 36 insertions(+), 18 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index f8493b696f..ac73d21cec 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -160,8 +160,8 @@ measure the later completion rather than summing durations. Fork jobs retain hosted Ubuntu. A failed lane must fail the Branch Checks workflow gate. The AMD64 speed trial selects C4 nodes for persistent-cache lanes and disables test debug information only on the trusted AMD64 test job. General x86 -workers/system nodes use N4. AMD64 caches are Hyperdisk Balanced; ARM still uses -SSD Persistent Disk. The generation-four migration recreates AMD64 caches, so +workers/system nodes use N4. ARM workers now use C4A; all cache lanes use +Hyperdisk Balanced. The generation-four migrations recreate caches, so record initial target size before comparing timings. Verify its `test-debug0` target path, initial size, and C4 node placement. Compare a first population pass and a warm rerun. The earlier N2/C3 trial introduced no-debug @@ -175,6 +175,12 @@ The local Zig staging helper conflicts with Nix GNU linking for vendored Z3. It uses explicit Docker local output and no publication or image artifact upload. Diagnose binary staging separately from image assembly. Keep optional image-build timing separate from ordinary branch-check latency. +Trusted ARM build-mode checks use `openshell-ci-arm64-pd-build-modes` on C4A, +with a separate exclusive cache and one prewarmed worker. ARM lint/tests also +use C4A, preserving all three lanes in parallel. Verify telemetry on/off marker +checks inspect `${CARGO_TARGET_DIR:-target}/debug/...`, plus both dependency +boundaries. Fork build-mode checks and ARM Python stay hosted. Measure the +first empty-cache pass and a same-commit warm pass separately. See `CI.md` for trial scope and cache setup. ## View Job Logs diff --git a/.github/actionlint.yml b/.github/actionlint.yml index a432d307a1..a1251a9643 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -10,6 +10,7 @@ self-hosted-runner: - openshell-ci-amd64-pd-gateway-b - openshell-ci-arm64-pd-lint - openshell-ci-arm64-pd-test + - openshell-ci-arm64-pd-build-modes - ubuntu-26.04 - windows-arm64 diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 4ac768dd06..96fe07a764 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -594,7 +594,7 @@ jobs: include: - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} system: x86_64-linux - - runner: ubuntu-24.04-arm + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64-pd-build-modes' || 'ubuntu-24.04-arm' }} system: aarch64-linux - runner: macos-15-xlarge system: aarch64-darwin @@ -616,12 +616,13 @@ jobs: - name: Verify build modes shell: nix develop -c bash -euo pipefail {0} run: | + target_dir="${CARGO_TARGET_DIR:-target}" cargo build --locked -p openshell-gateway --bin openshell-gateway - tasks/scripts/verify-telemetry-compiled-out.sh present target/debug/openshell-gateway + tasks/scripts/verify-telemetry-compiled-out.sh present "$target_dir/debug/openshell-gateway" cargo build --locked -p openshell-gateway --bin openshell-gateway --no-default-features --features defaults-without-telemetry - tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-gateway + tasks/scripts/verify-telemetry-compiled-out.sh absent "$target_dir/debug/openshell-gateway" cargo build --locked -p openshell-supervisor --bin openshell-supervisor --no-default-features --features defaults-without-telemetry - tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-supervisor + tasks/scripts/verify-telemetry-compiled-out.sh absent "$target_dir/debug/openshell-supervisor" cargo check --locked -p openshell-supervisor --all-targets --no-default-features --features system-ca-roots - name: Verify system CA roots dependency boundary diff --git a/CI.md b/CI.md index 7fbc31a0aa..9e0ffea989 100644 --- a/CI.md +++ b/CI.md @@ -43,14 +43,14 @@ The AMD64 speed trial moves the persistent lint/test and gateway core lanes to per-runner CPU/memory settings are unchanged. Fourth-generation nodes require Hyperdisk boot/cache storage. The four AMD64 caches were recreated as empty 200 GiB Hyperdisk Balanced claims (6,000 IOPS, 250 MiB/s), and their old SSD -Persistent Disks were deleted. ARM keeps its T2A nodes and existing SSD claims. +Persistent Disks were deleted. ARM workers also use C4A and fresh Hyperdisk claims, as described below. Only the trusted AMD64 test job sets `CARGO_PROFILE_TEST_DEBUG=0`; it retains all crypto/workspace checks and debug assertions, with less backtrace detail. Setup places these artifacts under a separate `test-debug0` target directory. Measure the first population pass and a warm rerun separately. The earlier N2/C3 trial introduced the no-debug setting; the N4/C4 migration keeps it and changes CPU/storage generation. These trials do not isolate every factor. -ARM64, macOS, hosted forks, and lint debug settings are unchanged. +ARM64, macOS, hosted forks, and lint debug settings keep their existing profiles. Manual Branch Checks runs can enable `local_image_builds` for an additional native AMD64 gateway/sandbox/supervisor build and `--help` smoke check. It uses @@ -63,16 +63,26 @@ static sandbox linkage, and skips unrelated mise tool installation. This optiona separately from the normal branch-check latency and does not qualify ARM64 images or release attestations. -The ARM trial uses native `t2a-standard-16` Ubuntu nodes (minimum two, maximum -four), an ARM64 runner image with baked Nix shells, and separate 200 GiB SSDs -for lint/tests. Each ARM lane has one ready worker, reserves 12 CPUs for the -runner plus one for Docker, and uses the same exclusive persistent-cache setup -as x86. BuildKit is native ARM too. Compare an empty-disk run with a same-commit -warm run on replacement pods; report queue/startup separately. Full ARM test -coverage is retained, and hosted ARM labels remain the fork fallback. On native -ARM, crypto backend independence, OpenSSL backend, and dynamic-linkage checks run -after lint while workspace tests run in parallel on the test lane. Other runner -configurations retain those checks in the test job. +The ARM trial uses native `c4a-standard-16` Ubuntu nodes (minimum three, maximum +four) for lint/crypto, workspace tests, and build-mode checks. The three +`openshell-ci-arm64-pd-lint`, `openshell-ci-arm64-pd-test`, and +`openshell-ci-arm64-pd-build-modes` scale sets each keep one ready worker and +an exclusive 200 GiB Hyperdisk Balanced cache. Each runner reserves/limits +12 CPUs, plus one reserved CPU for Docker, and reuses the digest-pinned ARM64 +image with baked Nix shells. The T2A pool and two old SSD cache disks are +replaced; AMD64 workers and caches are unchanged by this ARM migration. + +Trusted ARM build-mode checks use the new lane; forks retain hosted ARM. +They retain telemetry-on/off builds, telemetry-marker verification, system CA +root checks, and standalone-prover dependency checks. Verification reads +`${CARGO_TARGET_DIR:-target}/debug/...` so it inspects the binaries Cargo just +built on either a persistent-cache or ordinary worker. Debug profiles and all +feature/dependency assertions are preserved. Compare first population and warm +runs on the same commit, including queue/setup. No ARM image publication is +required. ARM Python checks still use GitHub-hosted runners. + +Crypto verification runs after ARM lint while workspace tests run in parallel +on the test lane. Other runner configurations keep their previous placement. Gateway core-feature checks run in two parallel matrix lanes: no-driver plus Kubernetes in `base-kubernetes`, and Docker plus Podman in `docker-podman`. From aec68bd75ab4a05a37e303e2e571425c64e092e8 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Mon, 23 Nov 2026 11:42:30 -0800 Subject: [PATCH 17/17] ci: consolidate gke runners on architecture labels Signed-off-by: Taylor Mutch --- .agents/skills/watch-github-actions/SKILL.md | 87 +++++-------- .github/actionlint.yml | 8 +- .github/actions/setup-rust/action.yml | 17 ++- .github/workflows/branch-checks.yml | 39 +++--- CI.md | 126 ++++++++----------- 5 files changed, 115 insertions(+), 162 deletions(-) diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index ac73d21cec..cc5ef99097 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -131,63 +131,36 @@ gh run list --json databaseId,status,headBranch,url --jq '.[] | {id: .databaseId `Release Dev` finishes its active run and replaces pending runs when new commits arrive. Other callers retain E2E cancellation. Inspect job annotations for cancellation reasons. -## GKE runner trial - -Branch Checks Linux amd64 jobs from ai-openshell/openshell branches run on the -`openshell-ci-amd64` ARC scale set during the GKE trial. ARM Linux lint/tests -use `openshell-ci-arm64-pd-*` on native ARM Ubuntu nodes with ARM64 images. -Fork PRs, other ARM jobs, and macOS retain hosted runners. Confirm the runner name in the job details before -attributing a result to GKE. For a job-container or PostgreSQL startup failure, -check the runner pod's Docker sidecar first. A missing `gh` executable or -Cachix's `$USER must be set` error indicates incomplete runner bootstrap. -For a preloaded image, `setup-nix` verifies its global Cachix substituter and -skips adding it again. A cache-configuration permission failure indicates the -image/setup contract is out of sync. Rust jobs report shared memcached -sccache statistics; distinguish backend connectivity errors from compiler/test -failures. The x86 and ARM GKE lint/test jobs use single-worker -`openshell-ci-amd64-pd-*` and `openshell-ci-arm64-pd-*` scale sets with separate exclusive persistent disks. Setup reports the target -size before building and skips GitHub Cargo cache restore/save. Compare empty -and warm runs on different runner pods; a PVC surviving pod replacement is the -persistence check. `Pending` pods can be waiting for exclusive disk attachment; -inspect PVC/PV events before treating this as a runner registration failure. -On native ARM the crypto backend/OpenSSL verification steps run in the lint -job, in parallel with workspace tests; inspect that job for crypto failures. -Hosted/fork and x86 test jobs keep their existing crypto steps. -Gateway core features use parallel `base-kubernetes` and `docker-podman` matrix -jobs on `openshell-ci-amd64-pd-gateway-a/b`, with separate exclusive caches and -eight reserved runner CPUs. Inspect both jobs and all four named feature steps; -measure the later completion rather than summing durations. Fork jobs retain -hosted Ubuntu. A failed lane must fail the Branch Checks workflow gate. -The AMD64 speed trial selects C4 nodes for persistent-cache lanes and disables -test debug information only on the trusted AMD64 test job. General x86 -workers/system nodes use N4. ARM workers now use C4A; all cache lanes use -Hyperdisk Balanced. The generation-four migrations recreate caches, so -record initial target size before comparing timings. Verify its -`test-debug0` target path, initial size, and C4 node placement. Compare a first -population pass and a warm rerun. The earlier N2/C3 trial introduced no-debug -tests; N4/C4 retains that setting and changes CPU/storage generation. Avoid -attributing all gains to one factor. Debug assertions stay enabled. -The manual `local_image_builds` input additionally stages release binaries, -builds all three native AMD64 images, and runs local `--help` smoke checks. -It builds auditable binaries with the production Nix GNU/musl toolchains, -checks the glibc 2.28 floor/static sandbox, and skips unrelated mise installs. -The local Zig staging helper conflicts with Nix GNU linking for vendored Z3. -It uses explicit Docker local output and no publication or image artifact -upload. Diagnose binary staging separately from image assembly. Keep optional -image-build timing separate from ordinary branch-check latency. -Trusted ARM build-mode checks use `openshell-ci-arm64-pd-build-modes` on C4A, -with a separate exclusive cache and one prewarmed worker. ARM lint/tests also -use C4A, preserving all three lanes in parallel. Verify telemetry on/off marker -checks inspect `${CARGO_TARGET_DIR:-target}/debug/...`, plus both dependency -boundaries. Fork build-mode checks and ARM Python stay hosted. Measure the -first empty-cache pass and a same-commit warm pass separately. -See `CI.md` for trial scope and cache setup. - -## View Job Logs - -For Branch Checks `Reviewer Roster` failures, the log lists non-collaborators in -`REVIEWERS.md`. Remove those entries or arrange repository access before rerunning. -Lookup errors fail the check rather than treating missing results as eligibility. +## GKE runners + +Trusted Branch Checks Linux jobs use only `openshell-ci-amd64` and +`openshell-ci-arm64`. Fork PRs, ARM Python, and macOS use hosted runners. +AMD64 runs on C4 Ubuntu; ARM64 runs natively on C4A Ubuntu. Each public label +is shared by internal singleton cache slots, with five warm/twenty maximum +AMD64 workers and three warm/four maximum ARM64 workers. Slot names in job +logs are internal identities, not labels to hardcode in workflows. + +Every slot owns an exclusive 200 GiB Hyperdisk mounted at `/mnt/ci-cache`. +Setup separates targets by repository, Nix shell, job, and matrix variant, +reports initial size/slot name, and skips GitHub Cargo archive caches. Claims +survive pod replacement and node scaling. Different runs may use different +slots, so compare actual cache size and shared memcached sccache statistics +before attributing changes to hardware. There is no automatic target pruning; +monitor disk usage. Pending replacement pods can be waiting for exclusive disk +release; inspect PVC/PV events before diagnosing registration failure. + +Check Docker sidecar logs for job-container or PostgreSQL startup failures. +A missing `gh` or `$USER must be set` indicates runner-image/bootstrap drift. +Preloaded Nix runners verify the global Cachix substituter and skip re-adding it. +Separate sccache backend failures from compiler/test failures. AMD64 tests +set `CARGO_PROFILE_TEST_DEBUG=0`; debug assertions remain enabled. ARM crypto +checks run in lint while workspace tests run separately. Gateway core features +retain both parallel matrix jobs and all four independent feature checks. + +Manual `local_image_builds` runs build AMD64 gateway/sandbox/supervisor images +and smoke-test `--help` with pushing disabled. They use production auditable +Nix GNU/musl release commands, verify glibc/static linkage, and load images only +into ephemeral Docker. They do not qualify ARM images or publish artifacts. For Kubernetes app-listener E2E failures during kind setup, inspect the uploaded `results/app-listener/cni-setup/` evidence. It includes node and Calico pod diff --git a/.github/actionlint.yml b/.github/actionlint.yml index a1251a9643..e4548f4707 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -4,13 +4,7 @@ self-hosted-runner: labels: - openshell-ci-amd64 - - openshell-ci-amd64-pd-lint - - openshell-ci-amd64-pd-test - - openshell-ci-amd64-pd-gateway-a - - openshell-ci-amd64-pd-gateway-b - - openshell-ci-arm64-pd-lint - - openshell-ci-arm64-pd-test - - openshell-ci-arm64-pd-build-modes + - openshell-ci-arm64 - ubuntu-26.04 - windows-arm64 diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index aa5a33e8f4..3ff4958f4c 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -8,6 +8,10 @@ inputs: cache-key: description: Rust target cache namespace required: true + cache-variant: + description: Separate persistent targets for matrix variants within one job + required: false + default: "" save-cache: description: Whether this job writes the Rust target cache required: false @@ -50,6 +54,7 @@ runs: shell: bash env: NIX_SHELL_HASH: ${{ steps.dev-shell.outputs.hash }} + CACHE_VARIANT: ${{ inputs.cache-variant }} run: | set -euo pipefail # Pod environment is visible to the shell, not the workflow env context. @@ -60,14 +65,20 @@ runs: test "$GITHUB_REPOSITORY" = ai-openshell/openshell test "$OPENSHELL_PERSISTENT_CACHE" = /mnt/ci-cache mountpoint -q "$OPENSHELL_PERSISTENT_CACHE" - cache_root="$OPENSHELL_PERSISTENT_CACHE/ai-openshell-openshell/$NIX_SHELL_HASH" - # Keep the no-debug experiment separate from the existing test artifacts. + # A slot can run any job. Keep incompatible job/matrix targets separate, + # independent of branch/run IDs so later runs can reuse their artifacts. + cache_namespace="$GITHUB_JOB${CACHE_VARIANT:+-$CACHE_VARIANT}" + [[ "$cache_namespace" =~ ^[a-zA-Z0-9_-]+$ ]] + [[ "$NIX_SHELL_HASH" =~ ^[a-f0-9]{64}$ ]] + cache_root="$OPENSHELL_PERSISTENT_CACHE/ai-openshell-openshell/$NIX_SHELL_HASH/$cache_namespace" + # Keep no-debug artifacts separate from targets with debug information. if [[ "${CARGO_PROFILE_TEST_DEBUG:-}" == "0" ]]; then cache_root="$cache_root/test-debug0" fi mkdir -p "$cache_root/target" echo "CARGO_TARGET_DIR=$cache_root/target" >> "$GITHUB_ENV" - echo "Persistent cache lane: $OPENSHELL_CACHE_LANE" + echo "Persistent cache slot: $OPENSHELL_CACHE_SLOT" + echo "Cache namespace: $cache_namespace" echo "Runner pod: $RUNNER_NAME" echo "Target directory: $cache_root/target" du -sh "$cache_root/target" diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 96fe07a764..5a63c95142 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -299,9 +299,9 @@ jobs: fail-fast: false matrix: include: - - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64-pd-lint' || 'ubuntu-24.04' }} + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} system: x86_64-linux - - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64-pd-lint' || 'ubuntu-24.04-arm' }} + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64' || 'ubuntu-24.04-arm' }} system: aarch64-linux - runner: macos-15-xlarge system: aarch64-darwin @@ -339,7 +339,7 @@ jobs: # Balance ARM crypto checks against the parallel workspace test job. - name: Verify crypto backend independence - if: matrix.runner == 'openshell-ci-arm64-pd-lint' + if: matrix.runner == 'openshell-ci-arm64' shell: nix develop -c bash -euo pipefail {0} run: | cargo tree --locked -p openshell-crypto --no-default-features --edges normal,build,dev --target all --prefix none > /tmp/openshell-crypto-dependencies.txt @@ -351,7 +351,7 @@ jobs: cargo test --locked -p openshell-crypto --no-default-features --test independent_backend - name: Verify OpenSSL backend - if: matrix.runner == 'openshell-ci-arm64-pd-lint' + if: matrix.runner == 'openshell-ci-arm64' shell: nix develop .#crypto -c bash -euo pipefail {0} env: OPENSSL_NO_VENDOR: "1" @@ -372,7 +372,7 @@ jobs: cargo test --locked -p openshell-crypto --features openssl - name: Verify dynamic OpenSSL linkage on Linux - if: runner.os == 'Linux' && matrix.runner == 'openshell-ci-arm64-pd-lint' + if: runner.os == 'Linux' && matrix.runner == 'openshell-ci-arm64' shell: nix develop .#crypto -c bash -euo pipefail {0} env: OPENSSL_NO_VENDOR: "1" @@ -399,17 +399,17 @@ jobs: fail-fast: false matrix: include: - - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64-pd-test' || 'ubuntu-24.04' }} + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} system: x86_64-linux - - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64-pd-test' || 'ubuntu-24.04-arm' }} + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64' || 'ubuntu-24.04-arm' }} system: aarch64-linux - runner: macos-15-xlarge system: aarch64-darwin runs-on: ${{ matrix.runner }} timeout-minutes: 45 steps: - - name: Disable test debug information on the AMD64 trial - if: matrix.runner == 'openshell-ci-amd64-pd-test' + - name: Disable test debug information on AMD64 + if: matrix.runner == 'openshell-ci-amd64' run: echo "CARGO_PROFILE_TEST_DEBUG=0" >> "$GITHUB_ENV" - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -425,7 +425,7 @@ jobs: save-cache: "true" - name: Verify crypto backend independence - if: matrix.runner != 'openshell-ci-arm64-pd-test' + if: matrix.runner != 'openshell-ci-arm64' shell: nix develop -c bash -euo pipefail {0} run: | cargo tree --locked -p openshell-crypto --no-default-features --edges normal,build,dev --target all --prefix none > /tmp/openshell-crypto-dependencies.txt @@ -437,7 +437,7 @@ jobs: cargo test --locked -p openshell-crypto --no-default-features --test independent_backend - name: Verify OpenSSL backend - if: matrix.runner != 'openshell-ci-arm64-pd-test' + if: matrix.runner != 'openshell-ci-arm64' shell: nix develop .#crypto -c bash -euo pipefail {0} env: OPENSSL_NO_VENDOR: "1" @@ -458,7 +458,7 @@ jobs: cargo test --locked -p openshell-crypto --features openssl - name: Verify dynamic OpenSSL linkage on Linux - if: runner.os == 'Linux' && matrix.runner != 'openshell-ci-arm64-pd-test' + if: runner.os == 'Linux' && matrix.runner != 'openshell-ci-arm64' shell: nix develop .#crypto -c bash -euo pipefail {0} env: OPENSSL_NO_VENDOR: "1" @@ -492,8 +492,8 @@ jobs: if: ${{ always() && env.RUSTC_WRAPPER != '' && runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }} run: sccache --show-stats - local-image-build-trial: - name: Local image build trial (amd64, no push) + local-image-builds: + name: Local image builds (amd64, no push) if: github.event_name == 'workflow_dispatch' && inputs.local_image_builds && github.repository == 'ai-openshell/openshell' runs-on: openshell-ci-amd64 timeout-minutes: 90 @@ -502,7 +502,7 @@ jobs: DOCKER_PLATFORM: linux/amd64 DOCKER_PUSH: "0" DOCKER_OUTPUT: type=docker - DOCKER_BUILDER: openshell-local-trial + DOCKER_BUILDER: openshell-local-images IMAGE_REGISTRY: localhost/openshell-ci IMAGE_TAG: ${{ github.sha }} PREBUILT_ARCH: amd64 @@ -516,7 +516,7 @@ jobs: prepare-shell: "true" - uses: ./.github/actions/setup-rust with: - cache-key: local-image-build-trial + cache-key: local-image-builds save-cache: "false" - name: Stage real release binaries shell: nix develop -c bash -euo pipefail {0} @@ -594,7 +594,7 @@ jobs: include: - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} system: x86_64-linux - - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64-pd-build-modes' || 'ubuntu-24.04-arm' }} + - runner: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-arm64' || 'ubuntu-24.04-arm' }} system: aarch64-linux - runner: macos-15-xlarge system: aarch64-darwin @@ -683,10 +683,8 @@ jobs: matrix: include: - lane: base-kubernetes - runner: openshell-ci-amd64-pd-gateway-a - lane: docker-podman - runner: openshell-ci-amd64-pd-gateway-b - runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.runner || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'ai-openshell/openshell' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'openshell-ci-amd64' || 'ubuntu-24.04' }} timeout-minutes: 30 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -699,6 +697,7 @@ jobs: - uses: ./.github/actions/setup-rust with: cache-key: rust-checks-v2 + cache-variant: ${{ matrix.lane }} save-cache: "false" - name: Test gateway without optional drivers diff --git a/CI.md b/CI.md index 9e0ffea989..eb048bb6ee 100644 --- a/CI.md +++ b/CI.md @@ -6,94 +6,70 @@ For local test commands see [TESTING.md](TESTING.md). For PR conventions see [CO ## Overview -`Branch Checks` uses the `openshell-ci-amd64` GKE ARC scale set for Linux amd64 -jobs from branches in `ai-openshell/openshell`, manual runs, and merge groups. -Fork PRs use GitHub-hosted runners. ARM Linux lint/tests use the dedicated -`openshell-ci-arm64-pd-lint` and `openshell-ci-arm64-pd-test` trial scale sets; -other ARM jobs and macOS keep their hosted labels. This is a branch trial and does not change main until merged. -`Branch Checks` and `Helm Lint` trigger on `pull_request` and `merge_group`. -Workflow runs from outside contributors wait for a maintainer to approve them +`Branch Checks` targets two GKE ARC labels for trusted Linux jobs: +`openshell-ci-amd64` and `openshell-ci-arm64`. Same-repository branches, manual +runs, and merge groups use these labels. Fork PRs use GitHub-hosted runners; +ARM Python and macOS also remain hosted. This configuration is on the CI branch +and takes effect on main when merged. `Branch Checks` and `Helm Lint` trigger on +`pull_request` and `merge_group`. Outside contributors may need maintainer approval in the Actions tab. -The GKE scale set maintains five idle runners and permits twenty total. Each -runner has an isolated Docker daemon for job containers and Docker-backed tests. -Runner bootstrap provides GitHub CLI, compression utilities, and the `USER` -environment variable expected by the existing checks and Cachix. The custom -image preloads Nix shells and configures the signed Cachix substituter globally; -setup verifies that cache and skips duplicate user-level cache configuration. -Rust jobs use the shared memcached sccache backend and report cache statistics; -the standard runner jobs retain the existing GitHub Rust target/registry cache. -The x86 lint/test jobs instead use `openshell-ci-amd64-pd-lint` and -`openshell-ci-amd64-pd-test`. Each trial scale set has one worker and an exclusive -200 GiB persistent cache disk, mounted at `/mnt/ci-cache`. Setup verifies the mount -and selects a repository/Nix-shell-specific target directory shared by that -job's Cargo commands. It skips GitHub Cargo cache restore/save entirely. -Check the initial target size and runner pod name to distinguish an empty-disk -run from a warm run on a replacement pod. Checkout and credentials remain -ephemeral; only Cargo build outputs persist. Cargo still validates artifacts, -and fresh checkout timestamps can trigger workspace rebuilds. These two lanes -serialize concurrent jobs during the trial; the ordinary scale set stays 5–20. -Inspect the job's -runner name to confirm whether it ran on GKE. Hosted ARM, macOS, and fork jobs -do not use the cluster-local cache endpoint. - -The AMD64 speed trial moves the persistent lint/test and gateway core lanes to -`c4-standard-24` Ubuntu nodes in the same zone. The general workers use -`n4-standard-16`, and the system pool uses `n4-standard-8`. Images and -per-runner CPU/memory settings are unchanged. Fourth-generation nodes require -Hyperdisk boot/cache storage. The four AMD64 caches were recreated as empty -200 GiB Hyperdisk Balanced claims (6,000 IOPS, 250 MiB/s), and their old SSD -Persistent Disks were deleted. ARM workers also use C4A and fresh Hyperdisk claims, as described below. -Only the trusted AMD64 test job sets `CARGO_PROFILE_TEST_DEBUG=0`; it retains -all crypto/workspace checks and debug assertions, with less backtrace detail. -Setup places these artifacts under a separate `test-debug0` target directory. -Measure the first population pass and a warm rerun separately. The earlier -N2/C3 trial introduced the no-debug setting; the N4/C4 migration keeps it and -changes CPU/storage generation. These trials do not isolate every factor. -ARM64, macOS, hosted forks, and lint debug settings keep their existing profiles. +AMD64 has five warm workers and a twenty-worker limit on `c4-standard-24` Ubuntu +nodes; ARM64 has three warm workers and a four-worker limit on `c4a-standard-16`. +Each architecture label is shared by internal singleton cache slots. GitHub +can dispatch any matching job to a free slot; workflows never select slot names. +Each slot owns an exclusive 200 GiB Hyperdisk Balanced claim, provisioned on +first use, with 6,000 IOPS and 250 MiB/s. At full use this is 4.8 TiB across +24 slots. Claims survive runner replacement and node scaling; deleting a claim +deletes its disk. `ReadWriteOncePod` prevents concurrent mounts, including on +the same node. Replacement runners may briefly wait for disk release. + +Every AMD64 runner reserves/limits eight CPUs, with 16 GiB requested and 32 GiB +maximum memory. ARM64 reserves/limits twelve CPUs, with 32 GiB requested and +48 GiB maximum memory. Each has an isolated Docker sidecar reserving one CPU +and 4 GiB memory, limited to two CPUs and 8 GiB. Runner images contain GitHub +CLI, system dependencies, and preloaded Nix shells with signed Cachix configured. +The system pool uses N4, and the general N4 pool continues to host AMD64 BuildKit +and memcached. + +Rust jobs use shared memcached sccache plus the slot's persistent target directory. +Targets are separated by repository, Nix shell, job, and matrix variant; branch +and run IDs are excluded so subsequent runs can reuse outputs. GitHub Cargo +archive caches are skipped on these workers. Checkout, credentials, and Docker +storage remain ephemeral. A job can land on a different slot with a colder +target cache; shared sccache can still serve compiler outputs. This removes the +old job-specific serialization but does not guarantee a warm target every run. +Check initial target size, runner name, and queue/setup time when comparing runs. +There is no automatic disk pruning; monitor usage and pause workers before +resetting or removing cache directories. + +AMD64 tests set `CARGO_PROFILE_TEST_DEBUG=0` and use a separate `test-debug0` +target directory. All assertions and crypto/workspace checks remain enabled; +backtraces contain less debug information. Other platforms retain their profiles. Manual Branch Checks runs can enable `local_image_builds` for an additional native AMD64 gateway/sandbox/supervisor build and `--help` smoke check. It uses the production Nix auditable release-binary build commands and remote BuildKit, explicitly sets `DOCKER_PUSH=0` and `DOCKER_OUTPUT=type=docker`, and loads results only into the runner's ephemeral Docker daemon. No registry login, image upload, or registry -cache export is performed. The trial uses the production Nix GNU/musl toolchain +cache export is performed. The job uses the production Nix GNU/musl toolchain rather than the local Zig staging helper, verifies the glibc 2.28 floor and static sandbox linkage, and skips unrelated mise tool installation. This optional release/image build is measured separately from the normal branch-check latency and does not qualify ARM64 images or release attestations. -The ARM trial uses native `c4a-standard-16` Ubuntu nodes (minimum three, maximum -four) for lint/crypto, workspace tests, and build-mode checks. The three -`openshell-ci-arm64-pd-lint`, `openshell-ci-arm64-pd-test`, and -`openshell-ci-arm64-pd-build-modes` scale sets each keep one ready worker and -an exclusive 200 GiB Hyperdisk Balanced cache. Each runner reserves/limits -12 CPUs, plus one reserved CPU for Docker, and reuses the digest-pinned ARM64 -image with baked Nix shells. The T2A pool and two old SSD cache disks are -replaced; AMD64 workers and caches are unchanged by this ARM migration. - -Trusted ARM build-mode checks use the new lane; forks retain hosted ARM. -They retain telemetry-on/off builds, telemetry-marker verification, system CA -root checks, and standalone-prover dependency checks. Verification reads -`${CARGO_TARGET_DIR:-target}/debug/...` so it inspects the binaries Cargo just -built on either a persistent-cache or ordinary worker. Debug profiles and all -feature/dependency assertions are preserved. Compare first population and warm -runs on the same commit, including queue/setup. No ARM image publication is -required. ARM Python checks still use GitHub-hosted runners. - -Crypto verification runs after ARM lint while workspace tests run in parallel -on the test lane. Other runner configurations keep their previous placement. - -Gateway core-feature checks run in two parallel matrix lanes: no-driver plus -Kubernetes in `base-kubernetes`, and Docker plus Podman in `docker-podman`. -Trusted jobs use `openshell-ci-amd64-pd-gateway-a` and -`openshell-ci-amd64-pd-gateway-b`, each with an exclusive 200 GiB Hyperdisk, eight -reserved runner CPUs, and shared memcached sccache. Fork jobs use hosted Ubuntu. -All four commands keep `--all-targets --no-default-features`; each driver is -checked independently. The matrix keeps running both lanes after a failure, -and the existing Branch Checks workflow gate requires both to succeed. -Compare the later lane completion, including queue time, against the old -sequential job; adding lane durations measures CPU cost rather than latency. +Native ARM lint/crypto, workspace tests, and build-mode checks all use +`openshell-ci-arm64`. Build-mode checks retain telemetry-on/off builds, +telemetry-marker verification, system CA roots, and prover dependency checks. +Verification reads `${CARGO_TARGET_DIR:-target}/debug/...`. ARM crypto checks +run in the lint job in parallel with workspace tests; AMD64 and hosted test jobs +retain their crypto checks. + +Gateway core features run two matrix jobs on `openshell-ci-amd64`: +`base-kubernetes` checks no-driver and Kubernetes-only configurations, while +`docker-podman` checks Docker-only and Podman-only configurations. Each variant +has its own persistent target namespace. All four commands retain +`--all-targets --no-default-features`, and both matrix jobs must succeed. `pull_request` runs from forks get a read-only token and no secrets, so they cannot post statuses. `Required CI Gates` runs from the base repository (`pull_request_target` and `workflow_run`), never checks out PR code, and posts the required `OpenShell / ...` statuses on the PR head SHA. E2E suites are opt-in because they are more expensive.