Lorenzo Wynberg
← Writing

My CI runners are a lab

I thought GitHub Actions was for running tests on push. Building Ozner Audio across macOS, Windows and Linux, I ended up using its runners to ask questions, including the day a locked screen broke a release.

Lorenzo Wynberg · November 27, 2026 · 15 min read

For most of my career, CI meant one thing: you push, the tests run, you get a green check or a red cross. It's a gate. You don't talk to it, you wait for it.

Building Ozner Audio, a suite of audio plugins in C++ and JUCE that ships on macOS, Windows and Linux, I found out it can be something else. A runner is a machine that will run whatever you hand it and send you back what it saw. Point it at a test suite and it's CI. Point it at a question and it's a lab. It doesn't matter whose machine it is: a GitHub-hosted runner, a paid one or a computer under your desk all answer the same way. Mine ended up being mostly my own, but the idea works on any of them.

Over a few weeks I wrote dozens of workflows that never merged. Each one existed to answer a single question on a single machine: why does this only fail on Windows, what does Linux do when this window closes, is that Mac's screen locked. Most of what I know about how my plugins behave off my own Mac came from those runs.

The one that taught me this was the day the Mac mini stopped passing, and the only evidence was a timeout.

The day the mini broke

By late October, the release ran on a Mac mini I'd registered as a self-hosted runner. Paid macOS runners are expensive, and the mini was sitting there anyway.

Then one day the staging release started failing on it. Not in the build or the tests: in the step that renders screenshots of each pedal's face for the website, in a headless WebKit browser. A page would never finish loading, and the job timed out. The same build had passed there earlier that day.

The cheap explanations went first. A reboot: same failure. A workflow that wiped the browsers and work folders, in case something stale was left behind: same failure, on a different pedal. Each of those was a full release run, which on that machine meant hours.

At that point the failure was opaque. The mini wasn't in front of me, and the log said only that a page didn't load. Any further fix would have been a guess.

So I stopped trying fixes and asked a question instead. I had the agent I work with write a script that would run on the mini and just report: what state the machine was in, and what happened when it loaded the pages.

That became a throwaway branch, ops/mini-diagnose, with one workflow on it. Every push to the branch ran it on the mini.

The first run came back with something nobody had looked at: the display had been asleep for hours. Everything else was normal. And with the display asleep, the stuck pages reproduced, with the browser stalled rather than waiting on anything.

That was a hypothesis, and the probe made it cheap to test. The next push woke the display first with caffeinate, and the pages still stalled. The display was ruled out as the cause.

It was a symptom of something else. A Mac whose display sleeps also locks its screen, and a locked screen needs a password, which no runner can type. So someone at the mini unlocked it, and the next push kept it awake and ran the probe again. Every page loaded. With the screen locked, the same pages stalled every time.

A locked macOS session stalls WebKit. It doesn't throw anything. It just stops.

The fix was a setting (don't require a password after the screen saver or display sleep) and a check: every Mac job now wakes the display, checks the session is unlocked, and loads one tiny page in WebKit before anything slow starts. A Mac that isn't ready fails in seconds, with a message that names the setting, instead of hours later with a timeout.

What a probe is

None of this is a special feature. It's the same GitHub Actions everyone uses for CI, used a different way.

A probe is a branch with one workflow on it that runs on every push to that branch, on the machine I'm asking about:

# .github/workflows/mac-probe.yml, on branch probe/mini-lock. Never merged.
name: mac-probe
on:
  push:
    branches: [probe/mini-lock]
jobs:
  probe:
    runs-on: [self-hosted, oa-mac]
    steps:
      - uses: actions/checkout@v4
      - run: pmset -g assertions          # what's keeping the machine awake, if anything
      - run: ioreg -n Root -d1 -a | grep -A1 CGSSessionScreenIsLocked || echo "not locked"
      - run: node tools/probe/load-pages.mjs   # the thing that fails, alone

That's a simplified version, not the real file, but the shape is the same. It does the smallest thing that answers the question, prints everything, and doesn't try to fix anything. Each push is the next question. When I have the answer, the fix goes in a real pull request and the probe branch is deleted.

Three things make it work:

  • It runs on the exact kind of machine. Not a container that's supposed to be the same, but the OS, compiler and hardware where the problem shows up, whether that's a hosted runner, a paid one or your own. My first probe ever ran on GitHub's hosted Windows machine.
  • It's cheap to ask again. A push takes seconds. The probe's own runtime is usually a minute or two, because it skips everything the question doesn't need.
  • It leaves a record. Every run is kept with its logs, so the trail from an opaque timeout to "it's the lock screen" is still there when you need it.

The machines

It started on paid runners. Within a few weeks almost everything ran on hardware I already had: the Mac mini, then my M1 Air, my PC as two runners (Windows, and Linux under WSL), and finally an M5. How each one is set up, signing included, is its own post: Setting up runners on Windows, Linux and a Mac.

Owning the runners has one sharp edge: a job sent to a runner that's offline waits forever. So the first job in every workflow is a small script that asks GitHub which runners are online and picks one: an idle one first, then a busy one (where the job queues), and a paid runner only when every machine of mine is off.

Your runner is CI

A machine registered as a runner isn't a local gate. It's CI. GitHub starts the job from the commit's own workflow, keeps the logs and reports the check on the commit, the same as it would for a paid runner, so branch protection can require it. The only difference is whose hardware it ran on. Plenty of teams that could pay for runners keep their own anyway: for hardware a paid runner doesn't have (real Macs, GPUs, devices to test against), for caches that stay warm between runs, for access to private networks, or because their code has to stay on their own machines.

That changed how I gate. I used to run the full gate locally before pushing, and then CI ran it again. With the runner on my own machine, that's the same work twice on the same hardware, and only the second run leaves a record. So now the push is the gate: the job runs on my machine, and the result lands on the commit as a check. The pipeline I build every project with works the same way now. When CI runs on a runner on your own machine, it skips the separate local run, and its setup suggests registering that runner in the first place.

What the probes found

The mini was the most instructive. It wasn't the only one.

A knob that jumped instead of gliding (Windows). This one was so early the probe ran on GitHub's hosted Windows machine. Some of Sweet Berta's knob tests failed only on Windows: a knob that should glide to its new value landed there at once. I cut the Windows workflow down to the failing tests plus a probe that printed what a knob move did in its first few samples. The fix went in minutes later: MSVC didn't honour a table of pointers to members that the other compilers did.

The same math, different answers (Linux). Two DSP tests passed on my Mac and failed on the PC's Linux. A probe showed the difference was the hardware: Apple's chips fuse a multiply and an add into one instruction, rounding once instead of twice, and x86 compilers don't by default. With fusion turned off (-ffp-contract=off), the Mac reproduced the PC's numbers exactly. The fix was tests that allow a rounding's worth of difference, not ones that compare exact bits.

A stack overflow only on Windows. A test died with a stack overflow. A probe on the PC printed the size of the plugin's processor under MSVC: over a megabyte, and the test put several of them on its stack. The fix moved its big tables to the heap.

The keychain no runner can reach (macOS). Tests that store credentials passed from my terminal and failed in CI. Probes on two Macs got the same answer from the login keychain: "User interaction is not allowed." It wasn't one machine. A runner service has no way into the login keychain, so the tests now make a throwaway keychain of their own. Signing had its own surprise: a probe on the mini found it was missing one of Apple's intermediate certificates: the command that lists signing identities passed because it downloads missing certificates on its own, and the one that actually signs doesn't.

The crash only Linux saw

The best one came most recently.

The production release's Linux plugin check died, with no error message. On my Mac it passed, even with the exact random seed CI had used.

So: a probe branch, probe/pluginval-linux, that ran the check the way the release does, then again under gdb across a spread of seeds. The backtrace pointed into JUCE's code for embedding a native window on Linux. It queues a callback that holds a raw pointer to itself, and never cancels it. If the plugin's editor closes before the callback runs, the host jumps into memory that's already been freed.

The fix drains that queue before the web view goes. The probe ran again with the same seeds: about half of them crashed before the fix, and none did after.

It also showed me a gap. The staging release had skipped exactly this check, which is why it got as far as production. Staging now runs everything production does.

That same week, the Windows and Linux runners caught a handful more: Linux's clang stopping on code that Apple's clang lets through, window size hints on Linux, a MIDI Learn test with a bug of its own. None of them would have shown up on my Mac.

Not just debugging

Probes are for questions with an answer. Some questions are just big.

Sweet Berta has a factory bank of presets, and every one should sit under a level ceiling. Measuring that is slow. Writing new levels for every preset took longer still, so the work got split across the mini, the PC's Windows and the PC's Linux, and ran unattended while I did something else, on machines that would otherwise have been idle.

Those runs don't belong on every push. They live in a workflow that only runs when asked.

The levelling taught me something else. The tool measured every preset and tried to level it on its own, and it never quite found the spot. Some presets came out too quiet for what they were, others too hot. But it got close enough that finishing by hand was quick, and that's when I saw what the job really needed: measurements, an ear and taste. The runners are very good at the first one. The other two are mine.

Teaching it to Trinity

Once probing became how I worked on Ozner Audio, it made no sense that the agents building my other projects couldn't do it too. So it went into Trinity 0.7.

When the Architect, Trinity's planning agent, needs to know how running code actually behaves, it doesn't guess. It sends the question to a diagnosis run on one of your machines, and says which machine it picked and why. The run works in a scratch copy of the project, and when the answer depends on CI, it does what I was doing by hand: pushes its edits to a throwaway probe branch, starts a workflow on it, reads the run back, failing job's log included, and asks again. When all it needs is time, like a run that's still going, it waits on that condition instead of checking over and over.

The lessons from Ozner Audio are built in. Every push and every CI start asks you first, on a card that names the repo, the workflow, the runners it will use and roughly how long it takes, because a probe is real CI on real machines. Logs come back with the project's secrets masked. And the branches clean up after themselves: each one lives under its own namespace and is deleted when the run ends, or a day after its last push, so what the run learned goes in its report, not on a branch nobody remembers.

What goes wrong

To be fair, a good part of this is the price of running on my own machines. A paid macOS runner is never locked or asleep, and the mini's lock screen would never have happened on one. But I'm building this on a budget, and I doubt I'm the only one. Paid macOS minutes were the biggest line on the bill, and a Mac mini sitting on a desk costs nothing per minute. That's a trade I'd make again. The platform bugs are a different matter: MSVC, x86 rounding and the Linux crash would have failed on anyone's runner.

Here's what the trade costs:

  • An offline runner swallows jobs. A job aimed at it queues forever, with no error. Pick the runner up front.
  • Macs are built for a person in front of them. A locked session stalls the browser, and the login keychain refuses any job that isn't a person at a terminal. The fix there was to stop needing it: tests make a keychain of their own, and signing uses one built for each run from secrets.
  • WSL doesn't start itself. Without a startup task, the Linux runner on the PC is simply offline after a reboot.
  • Your machine is your machine. Some jobs on my runners write: a release tags and publishes, a re-level commits new levels. That means a token that can push, and release secrets, on hardware I also use every day. I'm fine with that for my own code on my own machines, but it's a choice to make on purpose. And the installer test that installs and uninstalls the plugins is skipped on the PC, because it would remove the copy I actually use.

What I'd tell another engineer

Your runners can answer questions, not just run tests. If something fails on a machine you can't sit at, don't guess and push fixes. Push a question: a branch with one workflow that does the smallest thing that fails and prints everything around it.

Probe the problem, not your theory. The display being asleep looked like the answer. One more push said it wasn't. The probe was cheap, so I didn't have to be right the first time, only willing to ask again.

Compare against a control. When something breaks on one machine, run the same probe on another before you blame it. That one comparison is what tells a broken machine from a broken test.

Make the machine tell you it's not ready. Every lesson from the mini became a check that runs in seconds at the start of a job. The worst failures are the slow ones that don't say why.

Expect the Mac to be the hard one. On Windows the runner runs as a service and comes back after a reboot with nobody signed in. On my PC's Linux it's the same, once Windows starts WSL at boot. A Mac runner runs as a service too, but a Mac still wants a person: the service starts when someone logs in, not at boot, the session has to stay unlocked for the browser, and a runner installed the default way can't reach the login keychain. Plan your Mac runner around that from the start.

Gate where the record is. If CI already runs on your own machine, don't run the same gate locally first. Push, and let the check on the commit be the answer.

I started this thinking CI was something that happened to my code after I pushed it. Now it's the first place I go when I don't know why something is happening on a machine that isn't mine to sit at.