Repository navigation
Add a runner ops audit that compares runners - #1124
Merged
Merged
Conversation
epompeii
added this pull request to stack #1115
October 7, 2026 14:56
Contributor
|
| Project | Bencher |
| Branch | u/ep/runner/ops-audit |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold | 5.19 µs(-0.09%)Baseline: 5.20 µs | 5.83 µs (89.07%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 5.02 µs(+0.20%)Baseline: 5.01 µs | 5.54 µs (90.66%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 24.39 µs(-8.86%)Baseline: 26.77 µs | 31.66 µs (77.05%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 4.47 µs(-2.71%)Baseline: 4.60 µs | 5.86 µs (76.40%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 4.47 µs(-2.73%)Baseline: 4.59 µs | 5.85 µs (76.33%) |
epompeii
marked this pull request as ready for review
October 8, 2026 04:20
- `cargo ops audit <runner> [--against <reference-runner>]` collects a read-only snapshot of each runner over one SSH connection, with each section's exit status, and prints how many sections and lines it audited - Health checks: every section has output and its command succeeded, the runner service is active, no reboot is pending, RAID arrays are active and neither syncing nor degraded, no packages are auto-removable, and the isolation boot args are set - The diff of the normalized snapshots reports differing lines, reordered or repeated lines, and exit statuses per section - The runner unit is read through an allowlist of its lines, never `systemctl cat`, and any line holding a runner key is dropped on the server and again on parse - Exits non-zero on a failed health check or any difference - Document adding a runner, which takes no jobs until its RAID1 initial sync completes
epompeii
marked this pull request as draft
October 9, 2026 09:17
epompeii
force-pushed
the
u/ep/runner/ops-audit
branch
from
October 9, 2026 09:18
d043375 to
63046d5
Compare
epompeii
marked this pull request as ready for review
October 9, 2026 14:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add
cargo ops audit <runner> [--against <reference-runner>], which takes a read-only snapshot of each runner over one SSH connection and checks it.--against, it prints the differing lines of each section, lines that are reordered or repeated, and non-zero exit statuses, after normalizing what must differ: the runner name, the root UUID, and the RAID member order.systemctl cat, and any line holding a runner key is dropped on the server and again on parse.AGENTS.mddocuments the audit and the steps to add a runner, which takes no Jobs until its RAID1 initial sync completes.Why
Runners drift apart in ways that change benchmark results or break Jobs: a newer kernel installed by unattended upgrades and waiting on a reboot, a package that autoremove took from one runner, a missing boot arg, or a RAID array that is degraded or still syncing. Without the audit, comparing runners means reading each one by hand. The audit only reads, so it is safe to run against a live runner.
Verification
runner_unit_command_reads_only_allowlisted_linesruns the real section command withshagainst a fixture unit and drop-in, and asserts the exact output: the allowlisted lines stay, and the key lines are dropped, plain, quoted, and asExecStart ... --key. It fails if the key filter matches nothing or the allowlist matches every line.normalizer_strips_runner_keyfails if the parse stops dropping lines that hold the key prefix./proc/mdstat, an empty or failed section, auto-removable packages, and missing isolation args. The diff tests ignore normalized values and package order, and report differing, reordered, and repeated lines and exit statuses.runner_opsunit tests pass in 20 of 20 runs,cargo ops --helpand every subcommand's--helprun, and clippy passes with-D warningsfor Linux x86_64, Linux aarch64, and macOS.