allmyram: fundamentals¶
Status: approved by Gavin, 2026-11-22. Evidence for every measured
claim below is in docs/experiments/ (experiments 1–15, on smaug, the
Bazzite desktop and Gavin's MacBook Pro), cited as "#n".
This document covers the fundamentals of how anything runs at all: where jobs run, how they're sandboxed and limited, what they can reach, who holds privilege, and how runners share a machine with its owner. If these don't hold, nothing built on them matters (Gavin). What a person or agent touches (the job spec format, job management, job interaction) is a follow-up design; see the end.
Intent¶
allmyram runs development jobs on machines a person already owns and isn't
fully using: a Debian server (smaug), a Bazzite gaming desktop with a GPU,
Mac minis. It is open source. Transpire is the first user: its laptop-side
AI agents each run just check-style suites, and ten of them at once
exhaust the laptop's CPU and memory, which made local checks useless. Those
jobs should run on the idle machines instead, sandboxed, with their output
streamed back as if they had run locally.
The closest existing systems are k3s (people use it for CI/CD, and it does mesh networking) and HTCondor (scavenging idle machines). allmyram differs in being a thin layer over tailcat with no control plane, no cluster to operate, and sandboxes chosen for running other people's (or agents') code on someone's personal machine.
The hoard (Gavin's name): the set of machines one owner's root key ties together: runners, clients and the tracker. Every member joins the same way, with a certificate from that key; none is special. "allmyram runs your jobs on your hoard."
Goals¶
- Run a job (an OCI image, a git snapshot of a working tree, a command, and the services it needs) on a runner machine, streaming output back, with the exit code and failure reasons reported faithfully.
- Run a development service on a runner for as long as the person or agent who asked for it is around, reachable only by them.
- Let jobs talk to each other, across machines, over tailcat.
- Protect the runner's owner: every job sandboxed, every job inside a CPU, memory and process limit, no job able to reach the owner's LAN or tailnet.
- Show at a glance what is going on: which runners exist, when each was last heard from, what is running, what failed and why, including runners that vanished.
-
Install on a runner with one root step by the machine's owner. After that, nothing allmyram ships runs as root (Gavin: "we do not want to run as root").
-
Spend the runner's memory on jobs (Gavin: "we're trying to use the memory for useful things"). allmyram's own processes on a runner (runner, warden, proxy, shipper, tailcat endpoints) keep a small, measured footprint; every MiB they hold is a MiB a job can't use.
Non-goals (v1)¶
- More than one owner. One person's root key signs everything. Pooling machines between people is a later problem (Gavin: "If we don't assume single developer all hell breaks lose").
- Windows runners.
- Native macOS jobs (Xcode builds and the like). macOS runners run Linux arm64 containers.
- Result caching. The same job submitted twice runs twice.
- Scheduling across a fleet, autoscaling, or provisioning machines. Provisioning stays separate, so cloud workers can be added later.
- Native gVisor on macOS (#1270 study): watched, not planned on.
Anti-goals¶
These would make allmyram a failure even if it worked:
- Harming the runner's owner. A job that eats the owner's memory, reaches their LAN, their tailnet or their files, or runs without bound (a service outliving its lease, a batch job with no time limit, a sandbox left behind by a crashed runner), breaks the deal that lets anyone lend a machine.
- Silent failure. A job that vanished, ran against wrong inputs (LFS pointer files, a stale snapshot) or lost its exit code must say so. A confident wrong "passed" is worse than a visible unknown.
- Public exposure. No job, service or runner endpoint is ever reachable from the internet; there is nothing like Tailscale Funnel. The DERP relays tailcat uses are the only internet-facing part, and they only forward end-to-end encrypted WireGuard packets between keys.
- A cluster to operate. No Kubernetes, no Docker, no control plane that must be up for jobs to run (Gavin: k8s is "a configuration nightmare").
- Being precluded from cloud workers or cloud agents later.
Constraints¶
- Transport is tailcat (github.com/tailscale/tailcat, v0.7.0 tested). It
has no API or wire stability promise, ships Linux and Windows binaries but
no macOS release (build with
go install), and by default uses the public, rate-limitedtailcat.devDERP map. v1 uses that default (Gavin: "We don't need to run our own DERP relay to start"). Public relay operators see peers' public keys, not traffic; tailcat's pre-shared key in the address (on by default) adds protection. Moving to our own relay later is a key-generation change:tailcat genkey --region=<relay hostname>bakes the relay into the saved key and the printed address, so clients need no configuration (--derpmap-urlis tailcat's option for a fleet of relays). - A tailcat address is a secret. Its default form carries the pre-shared key, so tailcat's README calls it "a secret bearer capability". Job and service addresses are given only to the keys allowed to use them, and never logged in full or shown by the tracker.
- Linux sandbox is gVisor through containerd's CRI. gVisor supports
containerd (and Kubernetes through it); it does not support Podman or
rootless operation. On this containerd (Debian 13, 1.7.24),
nerdctlandctrboth lose a gVisor job's exit code and output; CRI does not (#7). - macOS sandbox is gVisor inside one Lima VM that the runner owns
(Lima 2.3.0,
vmType: vz, Garden Linux arm64; macOS 27.2.1, Apple Silicon): the Linux sandbox, in a VM the runner starts when there is work, stops when there isn't, and rebuilds whenever it wants (#17). Oneapple/containerVM per container was the first choice and is ruled out (#16). - Runner hosts in v1: smaug (Debian 13, x86-64, no GPU, 12 cores,
27 GiB, ZFS); the gaming desktop as a CPU runner (Bazzite 45, x86-64,
32 threads, 62 GiB, SELinux enforcing, containerd 2.4; limits passed in
#15; forced egress uses the same Linux mechanism as smaug's #13 but
wasn't tested there, and it runs
firewalld, which smaug doesn't. Gavin: "we know it roughly works", so it isn't a spike gate; the runner's own egress self-check, below, is what stops it running jobs if it doesn't); Mac minis and laptops (Apple Silicon). Architectures are mixed, so jobs carry their image's platform and runners advertise theirs. - GPU jobs are beta in v1, on the desktop's RTX 3080 only. Its NVIDIA
driver (620.70.06) is newer than any gVisor supports (620.51.03), and
Bazzite's driver updates will keep outrunning gVisor. Pinning nvproxy to
the newest ABI it knows (
--nvproxy-driver-version) runsnvidia-smi, a CUDA sample and Ollama inference correctly (#19, #20), at 14–29% fewer tokens/s thanrunc. That pin is unsupported by gVisor and can't be checked against NVIDIA's source (#21), so it is beta (Gavin: "beta support"). The Linux install step manages the pin and the self-test (Install, below). A job asks withallmyram run --gpuand is told GPU support is beta; the warden runs it on the GPU handler only while the loaded driver is the one the install step checked, and refuses it otherwise, before pulling anything. - Single owner, single root key.
Approaches considered¶
How to build the system¶
- Thin runner on tailcat (chosen). Each runner is a small daemon reached directly over tailcat; clients pick a runner and talk to it; an optional tracker observes. No control plane in any job's path.
- k3s, with tailcat underneath. Gives scheduling, pods and a familiar API. Rejected: the k3s agent is Linux-only, so Macs can't join; it schedules by pushing work to nodes and takes ~5.5 minutes to evict a vanished one; tailcat can't serve as its network plugin; and it is the cluster to operate that the anti-goals rule out.
- Knative on k3s. Gavin raised it as reducing Kubernetes' wildness. It still needs k3s underneath, and it is built for scaling HTTP request handlers, not batch commands.
What we kept from Kubernetes is its runtime interface: containerd's CRI, with one pod per job, is the path gVisor tests, and needs no Kubernetes (#7,
8).¶
Where privilege lives on a Linux runner¶
containerd itself always runs as root, and anything that can create CRI pods can ask for a privileged one, so whoever holds containerd's socket is effectively root. The question is which of our processes holds it.
- Split runner, two systemd services, neither root (chosen by Gavin).
The network-facing runner holds tailcat, SSH certificates, leases and job
state, and cannot reach containerd. A small warden, running as its own
system user that owns containerd's socket (through containerd's
[grpc] gid) and the delegated job slice, does only job cgroups and CRI pods, over a local socket. Root is used once, at install. - Runner as root. Simplest, but every bug in the network-facing code is a root bug on someone's machine. Rejected.
- Warden as root. Same split as option 1, but bugs in the warden's non-containerd code (parsing, files) would run as root. Rejected: no advantage over option 1.
- One unprivileged runner holding containerd's socket. One process, but then the network-facing code is effectively root. Rejected.
macOS runtime¶
- One Lima VM running containerd and gVisor, owned by the runner (chosen, after #16 and #17). One stack on every host: the Linux backend, warden and forced egress run unchanged inside the VM, and a job's containers share a pod network, which Compose jobs need. This was first rejected because a long-lived VM accumulates state until someone wipes it (as Rancher Desktop's reset shows) and holds memory while idle. Both are answered by the runner owning the VM: it creates the VM from a pinned image it keeps in its cache, recreates it whenever it wants, keeps nothing in it that it can't rebuild, and stops it when there is no work, which returns all of its memory to the Mac (#17: a running VM never hands memory back; a stopped one holds none).
- One
apple/containerVM per container. Clean every time; sub-second warm start; limits enforced by the VM's size (#9, #10). Ruled out by #16: VMs on a shared network can reach the Mac's own services over IPv6 link-local, and the only host rule that closes it covers everyapple/containerVM on the Mac, not just allmyram's (Gavin: allmyram must not affect anything else running on the machine). Guest-side settings are enforced by a kernel the job is root in. A VM with no network is isolated, but then every connection between a job's containers would be a port forward over sockets, and allmyram is to support Compose jobs more or less in full (Gavin). It also costs ~300 MB per container (#9).
Snapshot¶
- git plumbing (chosen): a temporary
GIT_INDEX_FILE,commit-tree,send-packto a runner ref (#3). - jj. Rejected: it mutates the repo, doesn't support git worktrees, and silently skips files over 1 MiB. jj repos may become an input later.
Design¶
Parts¶
allmyrambinary: client and runner in one binary (Gavin's call).- Client mode: snapshot, submit, attach/stream, cancel, list.
- Runner mode: the unprivileged runner service.
allmyram-warden: the job warden, a Linux binary, running as theallmyram-wardensystem user on a Linux runner and inside a Mac runner's VM. A separate small binary so its code can be read in one sitting. It is effectively root through containerd, so it stays tiny.- Tracker: optional, and two programs: a sink that writes what runners ship to disk, and a UI that reads it. See below.
Identity and joining¶
- The owner has one root key (an SSH CA key). Runners and clients get short-lived SSH certificates signed by it.
- A new machine joins by invite: the owner issues a one-time invite; the machine presents it and gets its certificate and the list of runner addresses. Keys are shared ahead of time otherwise (Gavin: "keys are shared somewhat ahead of time, obviously we need a way to join more nodes").
- Runner tailcat endpoints use saved keys pinned to a DERP region and
--allowlists of known clients. - Job protocol is SSH over tailcat (#1: ~50 ms per command on the LAN, about half of Tailscale's throughput, irrelevant for logs and snapshots).
- My call: the runner's SSH server is built into the runner binary with
golang.org/x/crypto/ssh(itsCertCheckerverifies certificates), not a stocksshdas in #1; the job API is a small set of SSH exec commands (submit, attach, cancel, status, list) with a defined framing for output and offsets. No compatibility promise between client and runner versions in v1: one owner upgrades both. - My call: the owner's CA key lives on the owner's laptop. The client there holds a certificate valid for about a day, renewed without a prompt, so agents can submit dozens of jobs unattended. Runner certificates last longer (weeks) so a sleeping Mac doesn't lose its identity, and are renewed by the owner's tool. No revocation in v1; short lifetimes stand in for it.
A job¶
A job is:
- an OCI image (with platform),
- a git snapshot (a commit object on top of the client's HEAD, carrying tracked changes and untracked, non-ignored files),
- a command,
- the services it needs (images, readiness checks),
- limits (CPU, memory, processes) and capability requirements (arch, memory, GPU),
- a kind: batch (runs to exit) or service (runs on a lease).
My call: a job names an image that already exists in a registry the runner
can pull from without credentials; runners don't build images in v1, and
jobs get no secrets or registry credentials in v1. Transpire's just check
needs only public images (a Python/uv image, the Spanner emulator) and public
package downloads.
Each accepted job gets a unique run ID, which everything else (attach, cancel, logs, status) uses. Separately, the job's content hash of its inputs is recorded, so the same job submitted twice can be recognised; it still runs twice (no result caching). A client retrying a submission it isn't sure arrived sends an idempotency key, and the runner returns the existing run for a repeated key instead of starting another.
My call: every batch job has a time limit, set in the job or defaulting to a runner-configured value (for example 2 hours); hitting it stops the job and reports it as timed out.
Snapshot and source transfer¶
- The client snapshots with git plumbing: copy the real index to a
temporary file,
add --allagainst it,write-tree,commit-tree -p HEAD. User state (index, HEAD, branches, stash) is never touched; 0.19 s for ~3,000 files (#3). - The client pushes it with
send-pack(no push hooks) to a ref on the runner's per-repo clone. The first push seeds the clone (91.5 MiB for Transpire with full history); later pushes are kilobytes (#3). - Git LFS: if any path in the snapshot's tree is LFS-tracked, the job refuses to run, saying which paths, until there's a supported way to supply the content. Running tests against pointer files is a silent wrong answer.
Running a job on Linux¶
- The runner asks the warden to create a job: the warden makes a cgroup
under a systemd slice with
Delegate=yesdelegated to the warden's user (no root needed per job; #7 created and limited job cgroups unprivileged in a delegated tree), setsmemory.max,memory.swap.max,cpu.maxandpids.max, and starts a CRI pod with therunschandler and that cgroup ascgroup_parent(#7). - Limits must be on the job's cgroup. Under gVisor a container's own
limit lands on an empty cgroup and does nothing; CRI's pod-level resources
field does nothing either (#7). Limits include gVisor's own overhead
(about 18 MB more than
runcfor the same job, #7). - Services are containers in the same pod, started first; the job waits on their readiness checks, run from inside the pod; everything shares localhost (#8: emulator usable ~1.5 s after the pod starts; ~20 MiB of gVisor overhead per pod).
- The warden's interface is three operations: create-job → id; stop-job; and job status/exit. Nothing else.
- The warden builds the pod spec itself and trusts nothing from the
runner beyond a constrained job description: image references,
commands, environment, limits and service list. It always sets the
runschandler, the job's own cgroup, the forced-egress network, no added capabilities, no privileged mode, no host namespaces and no host mounts other than the job's own workspace. A compromised runner can ask for jobs, but not for a privileged pod; that is the point of the split. - Runners always name the runtime handler; Debian's containerd also installs
runc, which must never run a job by default. - The runner rejects job specs requesting Linux capabilities: with
NET_ADMINa job can add routes inside gVisor (#13).
Running a job on macOS¶
- The runner runs on the Mac, as the owner's user, and owns one Lima VM.
Inside the VM is what a Linux runner's root install sets up: containerd,
gVisor, the forced-egress network and nft table, and
allmyram-warden. Jobs run there exactly as on Linux: one CRI pod per job, limits on the job's cgroup, services in the same pod. Jobs don't need to know which platform they're on. - The VM runs only while there is work. The runner starts it when a job is submitted and it is stopped, and stops it a short while after the last run ends. A stopped VM holds no memory on the Mac; a running one keeps its peak until it stops (#17). A first job after a quiet spell waits for the start: about 6–7 s from stopped to a finished gVisor pod, image cached (#17). How long to wait before stopping is the runner's config.
- It is allmyram's own Lima, separate from any other on the Mac (the
owner's
~/.lima, Rancher Desktop's bundled one): the runner runs alimactlit names by path, never whichever is onPATH, with its ownLIMA_HOMEunder the runner's state directory, so it sees and touches only its own VM and Lima's own config, and other Lima installs never see it. - The VM is Garden Linux, from a pinned image. The image
(
deploy/vmimage) is Garden Linux'slimaplatform plus allmyram's own feature: containerd, runc, the CNI plugins, nftables, gVisor,deploy/linux's units, the egress rules and the CNI network, and users with fixed ids. The runner pins it by URL and sha512, downloads it once and keeps it in<state dir>/cache, looking there first. The image changes when those pieces are bumped, not with allmyram. Theallmyramandallmyram-wardenbinaries and the warden's config come from the runner through the share (<share>/bin): a oneshot unit copies them onto the VM's disk and checks them before the warden and the proxy start. - The VM is disposable. The runner creates it from the cached image and a template it carries, keeps nothing in it that it can't recreate (the job data disk, which a recreate keeps, holds only running workspaces and caches), and recreates it whenever it wants: after a runner upgrade, after a failed egress self-check, after any stop that wasn't a clean shutdown of the guest (a crash, the Mac losing power, a forced stop, or a guest that didn't power off in time and was killed: any of these can leave containerd trusting files its filesystem never wrote), when the VM misbehaves, or on a schedule. A recreate uses the cached image and downloads nothing. Stopping the VM ends every sandbox in it, so after a stop nothing outlives the runner's knowledge of it.
- The egress self-check runs on every VM start, not on a timer, so an
idle runner isn't woken just to check; the runner admits no job into a
VM that hasn't passed it. Pods are confined by the nft table inside the
VM (the
inetfamily, so IPv6 too), which keeps them from the VM's own path to the Mac; nothing on the Mac's own firewall is touched. - What crosses between the runner and the VM (my calls, to settle in the plan):
- Warden calls: the warden's socket, forwarded out of the VM. The warden's peer check then sees the forwarder, not the runner, so who may call it inside the VM is restated for this case.
- Workspaces: one virtiofs mount of the runner's staging root into
the VM, and no other mount of the Mac's files. A running workspace is
not on that mount: gVisor checks mode bits itself and everything on the
share reads
0:0, so a job that isn't root would be refused it. The warden copies each run's staged workspace onto the VM's own disk, owned by the job's uid, and removes it at Stop (Plan 2, Task 9a). That disk is the VM's job data disk (Plan 2, Task 11b): a Lima disk of its own, XFS so scratch pads can be reflink clones beside the workspaces, made when the runner first creates the VM and kept when it recreates it. The warden's start-up sweep removes what a dead run left there; anything else on it is a cache. - Job output: each run's CRI log is in
logs/on the share, the warden's log root in the VM. The backend translates its path to the Mac's side of the share, so attach reads it as on Linux. - The proxy: in the VM, next to the warden, so it judges addresses from where jobs actually are. Its decision log goes to the VM's journal.
- Capacity: the VM's size bounds what it can admit. Its own overhead while running (791 MB idle in #17, likely reducible) counts against the Mac's memory, as gVisor's ~20 MiB per pod does.
- No root on the Mac at all: Lima and the runner as a user launchd agent. Root inside the VM is the VM's own.
Runtime backend interface¶
The runner reaches sandboxes through one narrow interface: run this pod (containers, limits, services), report state and exit, stream logs, stop it. On both platforms the warden serves it; on a Mac the warden is inside the runner's VM. Native gVisor on macOS, if it comes, would let a Mac drop the VM behind the same interface.
Networking¶
- Inbound: a job or service is reachable only through tailcat, by keys
on its
--allowlist. Nothing is ever exposed publicly. - The runner holds each job's tailcat endpoint, outside the sandbox. A job that offers something gets an ephemeral tailcat key and endpoint (#12: ~21 MiB, under a second to start when DNS works) run by the runner, which forwards connections to and from the job's ports. The key never enters the sandbox, and the job needs no direct UDP paths out.
- Between jobs: over those runner-held tailcat endpoints.
- Outbound goes through a forced proxy, from v1 (Gavin: "we have to do
it now"). A job can reach exactly three things: its own services, the
runner's proxy, and the tailcat ports the runner forwards to it. The
sandbox has no other route, so anything that ignores the proxy fails
immediately and visibly. Jobs get
HTTP_PROXYandHTTPS_PROXYset to the proxy, andNO_PROXYlisting only loopback and the job's own service names and addresses. - The proxy is an HTTP CONNECT proxy in the unprivileged runner (on a Mac, inside the runner's VM). It resolves names itself (so jobs need no DNS beyond their services' names) and decides on the resolved address, never the name. v1 policy is deliberately crude: allow the public internet; refuse private ranges, link-local, 100.64.0.0/10, and the owner's tailnet addresses.
- Image pulls are limited to allowed registries (Gavin). containerd pulls as root on the host network, outside the proxy, and by default follows registry redirects anywhere (checked in containerd 1.7.24's source). The warden refuses any image whose registry isn't on the owner's allowlist; redirects from allowed registries are followed as containerd does by default. The list is the owner's policy (Gavin): kept with the owner's CA configuration and installed into each warden's root-owned config when a runner is installed or updated, never taken from a request, since the warden doesn't trust the runner that relays requests. A job can name registries only within it. Lists differ by project, not by job (Gavin): the owner keeps named policies keyed by repo (the repo key, its root commit) plus a default, every warden gets the whole set, and a create request names its repo. The repo comes via the untrusted runner, so a compromised runner gets at most the union of the owner's approved registries; per-project lists keep projects tidy rather than stop an attacker. Plan 1 ships the single default list; per-project policies belong with the job-spec design.
- The proxy is bounded per job, because its memory is the runner's, not the job's: a cap on concurrent connections per job, idle timeouts, and rotated, size-capped logs. Its overhead counts in capacity accounting.
- It logs and denies enough to prove that (Gavin): every decision is logged with job ID, requested host and port, resolved address, and allow/deny with the rule that decided; and the test suite shows a job being refused for each blocked range, a hostname resolving to a private address being refused, and a direct (non-proxy) connection failing.
- The sandbox-with-only-the-proxy-as-exit is shown in #13 (Linux, smaug);
a Mac runs the same mechanism inside its VM. #14 and #16 show why a Mac's
own firewall isn't used for it. Every runner runs the same behavioural
egress check (direct connections fail; the proxy allows public and
refuses private targets) when it starts (on a Mac, whenever its VM
starts), and doesn't advertise capacity unless it passes. That covers hosts the spike didn't
test, like the
firewalld-managed desktop.
Service jobs and leases¶
- My call: batch jobs come first; service jobs follow in v1, since Transpire's checks run their services inside the job's own pod.
- A service job's lease is the requester's live tailcat session to the
runner. A short-lived CLI process that wants a service to outlive it runs
a small holding process (
allmyram hold <job>) that keeps the session open. When that session drops, the service keeps running for a 15-minute grace window (network changes, short sleeps), then stops itself. - A service's tailcat endpoint admits only the requester's key, and only the requester can attach to, extend or cancel it. Sharing a service with another key is a deliberate operation, left to the job-management design.
- The tracker shows each service's lease state and expiry.
Job ownership, resuming and cancelling¶
- The runner owns a job once accepted; a client that disconnects can reattach by job ID and output offset and continue (Eternal Terminal style, not mosh). Batch jobs keep running without a client; service jobs follow their lease.
- A client may cancel, or give up and submit elsewhere.
- A runner that vanishes is a visible failure: its jobs are reported as "runner gone" with the time it was last heard from, never as passed.
- My call: when a runner starts (after a crash, restart or reboot) it asks its backend for every sandbox it owns and stops any it doesn't have a live record for, reporting those runs as "stopped: runner restarted". No sandbox outlives the runner's knowledge of it.
Capacity: grab what's free, give it back when the owner needs it¶
Runner machines are usually idle, so a fixed share would leave capacity unused (Gavin). Runners are opportunistic instead. There is one human, so the owner who needs the machine back is the same person whose job gets preempted; nothing needs protecting between them beyond clear reporting.
- CPU: jobs may use every free core, at idle priority. On Linux each job
cgroup gets
cpu.idle, so the owner's processes always win immediately. On a Mac jobs getcpu.idleinside the VM. Running the VM's process at background priority is not done: nothing sets it, so the VM competes with the owner's processes at normal priority. - Memory admission: admission reserves capacity atomically (concurrent submissions can't all pass the same check) and releases it when the job ends or fails to start. A runner admits a job when the memory available now covers the job's limit, its sandbox overhead (~20 MiB gVisor; on a Mac, also the VM's own overhead while it runs, #17) and a reserve for the owner. On smaug, ZFS's cache counts as available, since it shrinks under pressure, even though it shows as used.
- Preemption: under memory pressure (PSI on Linux, memory-pressure notifications on macOS) the runner stops admitting; if pressure rises further it kills jobs, newest first, batch and service alike, and reports each as preempted with job, runner and time; never as failed or passed. The tracker shows it.
- Choosing a runner (my call, to be checked): the client asks the runners it knows for their capabilities and what they'd admit now, picks one, and submits; a runner that can't admit refuses, and the client tries another or waits. Runners don't queue: with many agents submitting at once, a client needs to see which runners are free now. The tracker can supply the runner list and recent load as a hint, never as a requirement.
Tracker¶
- Optional, in the BitTorrent sense: it helps, it is never necessary, and it never sits in a job's path.
- The tracker is just another member of the hoard: it joins by invite with a certificate like any runner or client; its only difference is what it does.
- It is two programs, not one (Gavin):
- The sink: small and near-zero RAM. It accepts OTLP (logs, metrics, and heartbeats as just another metric) from members of the hoard and appends it to disk, with no interpretation and no indexes. It's the part that is always on (on smaug, say).
- The UI: reads what the sink wrote and works out "what's going on" (runners and when each was last heard from, running jobs, preemptions, runner-gone jobs, leases). It runs only while someone is looking, so it costs nothing otherwise and can be as rich as it needs to be.
- Storage is files, queried with DuckDB (Gavin). The sink appends OTLP's JSON encoding as newline-delimited JSON, one record per line, in time-rotated files: appending lines needs almost no memory (Parquet would query faster but buffers rows to write them). The UI queries the files directly with DuckDB: no import step, no database server, memory used only while the UI is open and capped by DuckDB's memory limit. Old files can later be compressed or compacted to Parquet offline; whether DuckDB reads compressed JSON directly is to verify in the plan.
- Losing either loses visibility, never jobs. How the UI reaches the sink's data (same machine, or a small read interface over tailcat) is for the job-management and interaction design.
- My call: runners push heartbeats to the tracker; if they can't reach it, nothing else is affected. Without a tracker, "runner gone" is reported by the client that lost its session to the runner. Only the owner's certificates can read the tracker. It is built after the runner and client, within v1.
- Runners ship everything to the tracker, blindly (Gavin): every job's output, the runner's own operational logs (including the proxy's allow/deny decisions), and general metrics (host CPU, memory and memory pressure, per-job resource use, proxy counts). No filtering or selection on the runner; the tracker is where it's looked at. Shipping happens in the background, resumes where it stopped after a disconnect, and never slows or holds up a job.
- The tracker is therefore where logs outlive their runner: a preempted job's output, or a sleeping Mac mini's, is still readable there. It holds job output and so sensitive data; acceptable with one owner and no secrets in jobs (my call above). Tailcat addresses are still never stored in full.
- My call: logs and metrics travel as OpenTelemetry (OTLP) over the runner's tailcat connection to the tracker. It's the standard Go has libraries for, and it lets the tracker's storage be any OpenTelemetry backend rather than something we write.
- Shipping must use next to no RAM (Gavin). So: no stock OpenTelemetry Collector on runners (Gavin: the default build's "big go 500mb collector processes of doom" are ruled out, but creative ideas that make a collector light enough are welcome; it has to fit the shipper's budget below), and no in-memory queue of logs. The runner's local log files are the buffer; the shipper reads them sequentially in small, bounded batches and records how far the tracker has confirmed. Metrics are a handful of gauges sampled at a low rate. If the OpenTelemetry Go SDK's exporters can't stay small, the shipper writes OTLP's protobuf over HTTP itself; and if Go can't do it small enough, a small Rust shipping binary that does it in very little memory is an acceptable separate process (Gavin). My call, to be measured in the plan: the shipper's share of the runner's memory stays under about 10 MiB regardless of how much there is to ship.
- Answers "what's going on?": runners with last-heard times, running jobs, recent jobs including runner-gone ones, service leases. Every piece of data shows its age.
- My call, to be checked: look-only in v1 (it observes; it doesn't cancel or schedule).
Install¶
- Linux runner: the owner runs one root install step: containerd, gVisor
(
runscand its shim, root-owned), containerd's CRI runtime entries forruncandrunsc(both must be listed, #7), containerd's socket group set to anallmyram-wardengroup ([grpc] gid, present in containerd 1.7.24's config), two system users, the allmyram slice withDelegate=yesto the warden's user, and two systemd units:allmyram-wardenandallmyram-runner, each as its own unprivileged user. Nothing allmyram ships runs as root after this step. - GPU (Linux, beta): when the host has an NVIDIA GPU and
nvidia-container-toolkit's CDI spec, the install step also checks the
driver against
runsc nvproxy list-supported-drivers. A listed driver is used as is; a newer one within the same major version is pinned to the last listed entry (--nvproxy-driver-version); anything else gets no GPU. It adds arunsc-gpuCRI handler with those flags in its own runsc config file, runs a GPU self-test (a CUDA sample in arunsc-gpupod, the GPU attached by CDI), and records the driver it checked in the warden's config. The warden never starts a GPU pod on a different driver (#19: one that dies at boot leaves a stuck shim); after a driver update it refuses GPU jobs until the owner reruns the install step. On Bazzite every image update can change the driver. This half waits for the single-binary installer (kata 0d5n); until then the warden'sgpusection is written by hand (deploy/linux/README.md). - macOS runner: one command as the owner,
allmyram install, run from the downloaded binary; no root. The binary is what gets signed, so as much as possible lives inside it (Gavin): the install itself, the LaunchAgent, and the linux/arm64allmyramandallmyram-wardenbinaries the VM runs. The VM's operating system is not embedded: the binary pins the Garden Linux image by URL and sha512 and the runner downloads and checks it; whether allmyram ships its own Lima or takes it from Homebrew is open (#17 used Homebrew's 2.3.0). The runner creates its own VM from the image on first start, and an upgrade is a new binary: the VM's build hash changes with it, so the VM is recreated from the cached image. - Client: the binary and a certificate.
Output¶
My call: v1 streams stdout and stderr separately, plus the exit code and failure reason. No TTY or interactive mode, and no artifact download (junit, coverage) in v1; agents need output and the exit code.
Left to the builder¶
- Language: Go (Gavin: "this is very network centric, gVisor and
Tailcat are both Go"). containerd's CRI client and
golang.org/x/crypto/sshare Go too, and Go gives single static binaries for Linux and macOS. - The warden's local socket protocol and its authentication (peer credentials: only the runner's user may connect).
- Image caching and pre-pulling on runners; the runner keeps per-repo clones between jobs.
- Log retention details, within this shape: runners keep logs locally first (attach and reattach read the runner's copy; nothing depends on the tracker), keep each job's logs until the tracker confirms receipt plus a short window (days), and cap by size and age when there's no tracker; the tracker keeps logs and metrics for a period the owner sets (30 days, say).
- The exact invite flow and certificate lifetimes.
- Packaging the forced-egress mechanisms from #13 and #14 for install:
the nft table loaded by allmyram's own systemd unit (never Debian's
nftables.service), inside a Mac runner's VM as on a Linux host.
Open and unverified¶
- Forced egress is shown to work on both platforms (#13, #14). Linux: a CNI network with no route out, an nft table admitting only the proxy port, no pod-to-pod bridging; the firewall holds even if a job adds a route. On a Mac the same mechanism runs inside the runner's VM; that it holds there, IPv6 included, and keeps pods from the VM's own path to the Mac, is still to show (the self-check covers it on every VM start).
- SELinux denials on Bazzite that don't break anything weren't checked (#15: the audit log needs root).
- GPU jobs (beta): the pin is only as safe as the workloads tested
(#19, #20); a driver change that alters an ioctl nvproxy uses could fail
or corrupt a job without the self-test noticing. About 20 s of first CUDA
use in a fresh pod, under either runtime, is unexplained (#20). A GPU
sandbox that dies at boot takes 60 s to fail and leaves a shim
crictlcan't remove (#19), so the runner must not start one it hasn't checked. - Relayed and off-LAN tailcat paths: only same-LAN direct paths were measured. New connections start over DERP until a direct path is found, and stay relayed when NAT traversal fails, so a submit from a hostile network could crawl through the public, rate-limited relays. The client should say when a connection is relayed.
- Our own DERP relay (Gavin, to look into): one node on whatever host is
cheapest, needing IPv4 and IPv6 and little else; adopting it is a
key-generation change (
genkey --region=<host>), not client config. Start from Tailscale's derper README: https://github.com/tailscale/tailscale/blob/main/cmd/derper/README.md - Warm per-repo environments and shared caches over time (Gavin):
building a fresh
.venvwas the biggest share of a short job (#4), and Rust compile jobs will need a cache that persists across jobs (cargo's registry and build artifacts, or a compiler cache like sccache). Gavin's shape: named scratch pads. A job is allowed to use named pad X, which has a soft maximum size Y; pads persist on a runner between jobs. Decided (Gavin): the job's creator specifies which pads a job may use and whether it may write them ("no way around that": with one owner, the creator is trusted to choose); a soft limit means a pad over Y is reported and becomes a candidate for clean-up, never a failed job; and each runner has a hard limit on the total disk all its pads may use. Still to design: how pads appear in the job spec format, and what clean-up removes first when the runner's hard limit is reached. - Git LFS content: detection and refusal are designed; supplying content is not.
Follow-up designs¶
These build on the fundamentals above and get their own brainstorm and document (Gavin, after the first review):
- Job spec format: how a repo describes a job (image, command,
services, limits, capabilities); including whether it reuses Compose
service definitions, since Transpire already keeps its services in
docker-compose.yml. Settled for jobs with services by Jobs from Compose (2026-11-30): a job's environment is described in Compose. - Job management: listing, cancelling, retention of logs and records, retries, and how preempted and runner-gone jobs appear to whoever submitted them.
- Job interaction: attaching and reattaching to output, signals and stdin, reaching service jobs from the laptop, and how agents consume all of this compared with a person at a terminal.