---
name: sorus-ci
description: Run and inspect Rust checks, builds and tests on Sorus. Use when asked to submit Sorus jobs, connect Sorus to CI or recover an interrupted Sorus submission.
---

# Sorus CI

These instructions assume an existing Sorus account and organization. Use Sorus to run supported Rust jobs from an authorised repository. Preserve the user's command, toolchain, features and test selection. Read the [workload limits](https://www.sorus.run/docs/supported-workloads) before moving a job.

## Read the current contract

Start with the [documentation index](https://www.sorus.run/llms.txt). Documentation pages have a Markdown version at the same URL with `.md` appended. Use the [CLI reference](https://www.sorus.run/docs/reference/cli.md) for exact syntax and JSON fields, and [authentication](https://www.sorus.run/docs/guides/authentication.md) for credentials. The skill supplies the procedure; the references supply details. Check client compatibility before using a command from a newer reference.

## Install and connect

The public client is **0.3.0**, for macOS and Linux. With Homebrew, run `brew install sorus-run/tap/sorus`. The [release page](https://github.com/sorus-run/sorus/releases/tag/v0.3.0) also provides binaries, checksums and an installer:

```sh
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/sorus-run/sorus/releases/download/v0.3.0/install.sh | SORUS_VERSION=0.3.0 sh
export PATH="$HOME/.local/bin:$PATH"
sorus --version
```

People sign in with `sorus login`. An agent uses a scoped credential, supplied through `SORUS_TOKEN` or `SORUS_CREDENTIAL_FILE`. Keep credentials out of messages, source files and logs. Use the client's default endpoint; set `SORUS_ENDPOINT` only for an explicitly chosen endpoint.

Use `sorus.toml` for repository configuration. The [authentication guide](https://www.sorus.run/docs/guides/authentication) explains credential creation, expiry and rotation. For an older installation, check the [compatibility aliases](https://www.sorus.run/docs/release-status#existing-installations). Conflicting old and new settings are refused.

## Submit work

Use `cargo sorus` or standalone `sorus`, with `--json` for machine-readable results. For a locked Rust workspace:

```sh
cargo sorus check --workspace --locked --json
cargo sorus test --workspace --locked --json
```

Choose the requested operation; do not run both merely because they appear here. The client captures tracked and nonignored untracked files. Inspect the source selection before uploading; ignore rules do not remove tracked secrets.

Other operations include `build`, `clippy`, `fmt --check`, `nextest run`, and `exec -- <program> [arguments]`. Formatting changes and `clippy --fix` are refused. `exec` runs a program without an implicit shell. Nextest uses the repository's configuration; whether doctests follow depends on test and target selection. Do not substitute one test command for another or omit tests to obtain a passing result.

Leave `--size` unset for automatic selection, or use `lathe-2cpu`, `lathe-4cpu`, `lathe-8cpu` or `lathe-16cpu` when the user chooses a size. `--wall-clock-ceiling <seconds>` accepts 60–21600 and overrides repository settings for that job. Put Sorus options, including `--json`, before `--`; arguments after it belong to Cargo or the program. Do not add `--offline` to a job that needs dependency downloads.

In GitHub Actions, use `sorus-run/setup-sorus@v0.3.0` with `version: 0.3.0` and inject the credential from a secret. Pair `--check-commit <sha>` with a distinct `--check-name "lathe / <label>"` for each job. Confirm the repository's GitHub App access and keep the existing CI during evaluation. See the [CI guide](https://www.sorus.run/docs/guides/ci).

## Inspect and recover

Retain the job identifier and submission key. Read `exit_code`, `stage`, `refusal`, `failure` and the recorded job result rather than inferring success from a status label or log sentence. Do not treat a missing outcome as a failed test. `cargo sorus status <job>` follows the job; `cargo sorus logs <job>` retrieves output after its attempt ends. Use `cargo sorus jobs get <job> --json` and `cargo sorus jobs test-results <job> --json` for recorded results. `cargo sorus logs <job> --raw <file>` writes verified output to a new file.

Exit codes: **0** success; **1** workload outcome; **2** usage or refusal; **3** authentication; **4** no usable outcome observed or result delivery failed; **5** terminal platform failure; **130** detached follow. On 4 or 130, the job may still be running: inspect it before submitting another. A terminal platform failure can be retried with `cargo sorus jobs retry <job>` within the retry and spending limits of the assigned task. Stop when those limits are reached or the same platform failure recurs; report the existing job IDs instead of retrying indefinitely.

To resume an interrupted submission, repeat the original invocation with `--submission-key <key>`. Use the same endpoint, tenant, invocation directory, command and options; the recovery record reuses the preserved capture even if the working tree has changed. Do not capture the edited tree as a replacement; do not invent a replacement key to work around a conflict. The [recovery guide](https://www.sorus.run/docs/guides/source) explains the preserved capture.

Client 0.3.0 has no built-in command help. Use the [CLI reference](https://www.sorus.run/docs/reference/cli) for exact syntax. The separate MCP server is not included in the public CLI package; see [agent integrations](https://www.sorus.run/docs/guides/agents).
