outerlayer runner, is the
process on that host that builds your factory’s items. Together they are a
self-hosted runner: the platform stays at app.outerlayer.ai, and each build
and its code stay on your machine. Self-hosting the platform itself is a
different thing, and is coming soon.
The runner takes items from two queues:
implementbuilds an item from its issue.amendanswers the review threads on an item’s open pull request.
What happens to one build
- Claim. The runner claims an item someone queued with
outerlayer work buildor Build on the Work page. An item added withouterlayer work build --localor Build locally is never queued for a runner. If a report hook is set, it runs now withOUTERLAYER_PHASE=start. - Provision. The provision hook makes the working directory, such as a clone inside a container of its own.
- Command. Your command starts the agent in that directory. The runner renews its claim while the build runs. A claim it stops renewing expires after fifteen minutes.
- Judge. When the command exits 0 and the repository has a judge check, the runner starts a fresh agent to judge the criteria. See The judge stage.
- Host checks. When the command exits 0, the runner runs the repository’s host checks and records their results.
- Sync. The runner runs
outerlayer sync, so the build’s sessions upload. - Cleanup. The cleanup hook runs, however the command ended.
- Verdict. When the command exited 0, the runner reads the item’s
checks to decide between
okandincomplete. See When the command exits 0. - Report. If a report hook is set, it runs again with
OUTERLAYER_PHASE=endand the outcome the release carries. - Release. The runner releases the claim with the outcome.
When the command exits 0
An exit of 0 says only that the agent’s session ended normally. So after the checks, the sync and the cleanup, the runner reads the item’s evidence verdict, theevaluation that GET /v1/work-items/{workItemId} returns. It reads it before the report hook, so that hook sees the outcome
the release carries.
- The item has a pull request and passes, or waits only on a person’s
review: the release is
ok. - The item has no pull request: a build that opens no pull request is
released
incomplete, saying so, whatever the checks say. A runner build opens its pull request withouterlayer work open-pr. - A check failed or has no result: the release is
incomplete. Its reason names each such check and marks the ones with no result, for examplechecks not passing: Migration must run: Migrations ran against a local database (no result). While the build held the claim, a required check with nothing recorded was only waiting. The build has ended, so the runner counts it as missing. - The item has no verdict yet, or still waits on session links to be
confirmed: the release is
incomplete, and its reason says so. - The read fails: the release is
incomplete, and its reason says the item’s status could not be read.
incomplete uses up the build request, as ok does. No runner takes the
item again until a person asks for another build. To ask, run
outerlayer work build --item <n>, or select Rerun on a host in
the item page’s Last build block. The control appears when the build
ended with no open pull request. It also appears when the build ended with
one whose review waits on an agent. Then the rerun starts an amend. It appears only for a
member who can run outerlayer work build.
With an older gateway or runner, the verdict can be skipped; see
Mixed versions.
Give a build instructions
A person starting a build often knows something the issue does not say. Instructions are text for the agent that runs that one build. It reads them as guidance from the person who asked. They never change which issue is built or which checks run, and the issue’s criteria win if the two disagree. The agent names any conflict, and what it did about it, in the pull request description. You can give instructions, up to 2000 characters, in three places:- Add work. Select Build on an issue. A step opens with an Instructions for the agent field. Build locally has no field, because you build that item in your own session.
- Rerun. Select Rerun on a host in the item page’s Last build block. A dialog opens with an empty field, and the rerun starts when you select Rerun. When the item has an open pull request, the rerun is an amend, and the dialog says it does not use instructions.
- CLI. Pass
--instructions <text>toouterlayer work build. See the CLI reference.
/build skill that
outerlayer init writes reads them, so a repository whose skill is older
needs outerlayer init --update.
Choose how a build is isolated
The hooks you name decide what a build can reach on the host.outerlayer runner init picks the strongest isolation the machine
supports: builtin:vm on x86_64 Linux whose account can open /dev/kvm,
else builtin:container. The full rule is in
outerlayer runner init.
Where to go next
- Set up your first host: build your first item.
- Run the runner as a service: run it unattended, move it, upgrade it or remove it.
- Container and microVM builds: what a build gets and can reach.
- Destinations and secrets: private registries and test APIs without handing a build the secret.
- Write your own hooks: your own provision, cleanup and report hooks.
- Run builds on macOS and Run builds on Windows.
- Build a repository’s image from its devcontainer file.
- Troubleshoot builds.
- Security and limits.