ci: route Linux build/test jobs through CI_LINUX_RUNNER (StarSling) + pinned Landlock guard

Merged
KJ
2mo ago
+53-10

What

Moves relay's Linux build and test jobs to vars.CI_LINUX_RUNNER, falling back to ubuntu-latest, so they can run on StarSling (starsling-ubuntu-24.04):

WorkflowJobChange
rust-ci.ymlRust Tests (ubuntu-latest), Clippy (ubuntu-latest), Cross-compile check (aarch64-unknown-linux-gnu)matrix: only the ubuntu-latest entry switches
rust-ci.ymlFormatvariable
test.ymltest (ubuntu-latest, 22.14.0)matrix: only the ubuntu-latest entry switches
test.ymlCoverage (upload), lintvariable
test-build.ymlTest build-bun.sh (ubuntu-latest)matrix: only the ubuntu-latest entry switches
test-build.ymlTest edge casesvariable
publish.ymlBuild & Versionvariable

Matrix jobs use ${{ matrix.os == 'ubuntu-latest' && (vars.CI_LINUX_RUNNER || 'ubuntu-latest') || matrix.os }}. The matrix values stay the same, so check names do not change.

Unchanged: macOS and Windows jobs, all trunk-gating if: expressions, and trunk-guard.yml.

Rollback: gh variable delete CI_LINUX_RUNNER -R AgentWorkforce/relay.

Landlock / devpts / no_new_privs sandbox tests

The spike (run 35805921355) found 6 tests in tests/fixtures/pr-proof-contract.test.ts that skip on StarSling's 6.1 kernel via it.skipIf(!HAS_TRUSTED_LANDLOCK_RUNTIME). They run inside the broad npm test (and test:coverage) job. Rather than restructure that job, I added a dedicated sandbox-proof job in test.yml:

  • It is pinned to ubuntu-latest with no variable and uses the same trunk/node_changed gate as test.
  • It runs that test file with the vitest JSON reporter.
  • It fails if any test in the file is skipped or not run (on ubuntu-latest the spike showed 0 skips in this file).

So the tests keep running on GitHub's runners, and a runner or kernel change can't make them disappear silently. On StarSling they still self-skip inside test and coverage, as before.

Fork safety (public repo)

Every moved job is reachable only from same-repo trunk → main PRs, pushes to main, or workflow_dispatch:

  • rust-ci, test and test-build jobs all carry the trunk gate.
  • publish.yml is workflow_dispatch only.
  • None of these files use pull_request_target.

Local validation (no CI runs on feature PRs)

  • actionlint on the 4 changed workflows: 54 findings, identical to origin/trunk (all pre-existing shellcheck infos). test.yml has 0 before and after.
  • prettier --check on the 4 changed workflows: clean.
  • Guard proven locally: npx vitest run tests/fixtures/pr-proof-contract.test.ts --reporter=default --reporter=json --outputFile.json=pr-proof-results.json on macOS gives 116 passed, 6 skipped. The guard step then exits 1 and names exactly the 6 Landlock/devpts/no_new_privs tests, the same set StarSling skipped.

šŸ¤– Generated with Claude Code


[!NOTE]
Low Risk
CI-only runner routing and a new guard job; no application runtime changes. Main risk is misconfigured CI_LINUX_RUNNER affecting Linux CI until rolled back.

Overview
Routes Linux CI jobs through the repo variable vars.CI_LINUX_RUNNER (fallback ubuntu-latest) so builds and tests can run on StarSling runners. Matrix jobs only swap the ubuntu-latest leg via ${{ matrix.os == 'ubuntu-latest' && (vars.CI_LINUX_RUNNER || 'ubuntu-latest') || matrix.os }}; macOS/Windows and job names stay the same.

Touched workflows: rust-ci (tests, cross-compile, clippy, fmt), test (main test matrix, coverage, lint), test-build, and publish (Build & Version).

Adds a sandbox-proof job in test.yml pinned to GitHub ubuntu-latest (not the variable). It runs tests/fixtures/pr-proof-contract.test.ts and fails if any test is skipped or not run, so Landlock/devpts/no_new_privs PR-proof tests cannot silently disappear when the main Linux job moves to kernels that self-skip via HAS_TRUSTED_LANDLOCK_RUNTIME.

Reviewed by Cursor Bugbot for commit 65bf077b985f8a3df4985fbf2db344fa84b20998. Bugbot is set up for automated code reviews on this repo. Configure here.


Agent Relay sessions

  • claude session aa884a72 Ā· opened via gh pr create Ā· last active 2026-10-09