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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .agents/skills/watch-github-actions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,58 @@ 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
Expand Down
8 changes: 8 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@

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
- ubuntu-26.04
- windows-arm64

Expand Down
8 changes: 8 additions & 0 deletions .github/actions/setup-nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@ runs:
extra-conf: |
http2 = false

- name: Verify GKE image cache configuration
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

- 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-') || startsWith(runner.name, 'openshell-ci-arm64-')) }}
authToken: ${{ inputs.cachix-auth-token }}
skipPush: ${{ inputs.cachix-auth-token == '' }}

Expand Down
47 changes: 47 additions & 0 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
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:
Expand All @@ -21,19 +25,62 @@
runs:
using: composite
steps:
- name: Configure shared sccache on GKE runners
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
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
run: |
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
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"
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"
echo "Runner pod: $RUNNER_NAME"
echo "Target directory: $cache_root/target"
du -sh "$cache_root/target"
df -h "$cache_root/target"
Comment on lines +53 to +74

- name: Cache Rust target and registry
if: ${{ steps.persistent-cache.outputs.enabled != 'true' }}
id: cache
uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f
with:
shared-key: ${{ inputs.cache-key }}-${{ steps.dev-shell.outputs.hash }}
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}
Loading
Loading