Skip to content

Latest commit

 

History

History
570 lines (502 loc) · 42.3 KB

cli.md

File metadata and controls

570 lines (502 loc) · 42.3 KB

spin-machine-dev, the command

spin-machine-dev is what a person types to work on this machine, and GitHub Actions runs the same verbs. Each verb's --help says what it needs, does, leaves and exits with. This page says how the verbs fit together. spin-machine-dev --help lists them, and task bin builds the command into _output/bin. task is go-tools' task command: go install github.com/spin-stack/go-tools/cmd/task@latest once.

It is not spin-machine. cmd/spin-machine is the machine's own tool: it boots a machine, attaches a disk, saves and restores. The tarball ships it as bin/spin-machine, for a person who boots the release by hand; spin builds the machine package of the release it pins instead, and a checkout builds the tool with spin-machine-dev build spin-machine. cmd/spin-machine-dev builds, measures and releases the machine, and is never shipped.

Principles

They are spin-os's (spin-stack/ami, docs/cli.md), because the two commands solve the same problem:

  1. A verb is a goal, not a step. spin-machine-dev build image builds the image and whatever it is made with that is missing or stale, such as e2fsprogs and the systemd it installs. release builds every part before it packs them. Nobody builds e2fsprogs first.
  2. State is files, never variables. Every verb reads and writes under _output/ (--out). Each part a build makes leaves _output/manifest/<part>.json, which names a digest of its inputs: the build arguments versions.yaml hands its Dockerfile, and every file under its directory. build skips a part whose inputs have not moved and whose output still verifies. A verb can run alone, again, or on another machine with the same _output/.
  3. Two outputs. Progress and the builds' logs go to stderr, for a person. With --json, one JSON document goes to stdout, for a program.
  4. Exit status means something, the same everywhere. 0 is done. 1 is done with something to act on (a verify that failed, a pin behind, a file not attested). 2 means the verb could not do it (no network, a missing input, a build that failed). A workflow branches on the status, never on text.
  5. Flags for choices, the environment for credentials and the runner. --cache-registry, --cache-export and --version are flags. The environment carries only what is secret or the runner's: GH_TOKEN or GITHUB_TOKEN, GITHUB_REPOSITORY, SOURCE_DATE_EPOCH. In a workflow, a verb whose result a later step needs also writes that result to $GITHUB_OUTPUT (build's qemu_version, release version's version, release notes' notes, changed's build), and writes what it made to the run's summary. Both are copies, never the only place the result is.

Nouns

noun is where
part what a build makes: qemu (with qboot and the firmware), kernel, e2fsprogs, systemd, image; and spin-machine _output/{bin,qemu,kernel,e2fsprogs,systemd,image}, _output/manifest/<part>.json
release every part, packed as one tarball with one version, its manifest, SOURCES and SBOM _output/release/
pin an entry of versions.yaml: what a part is built from, by version and hash versions.yaml

Working on the machine

spin-machine-dev build [part...]      what is missing or stale, every part when none is named; each verified
spin-machine-dev fetch qemu           main's published QEMU of the pinned version, in seconds
spin-machine-dev verify [part|args]   assert what _output holds, building nothing; args asks QEMU for the machine's command lines
spin-machine-dev shell                boot it and get a console in the base image, which is checked unchanged after
spin-machine-dev vsock                make /dev/vhost-vsock usable, for the probes and verify args
spin-machine-dev menuconfig           edit the kernel's configuration in place
spin-machine-dev clean [--cache]      remove _output; with --cache, the BuildKit and mkosi caches and the Alpine sources too

A part's build first empties what it writes. --output type=local writes files and removes none, so a file the build stopped producing would otherwise stay, indistinguishable from one it produces. The build ends in its verification: the binaries run here and only the CI QEMU can emulate, the kernel is a vmlinux that randomizes itself through PVH, and the e2fsprogs tools answer the pinned version. verify --help says each.

Keeping the pins current

spin-machine-dev outdated             which pins are behind their upstream (exits 1 when any is)
spin-machine-dev bump <entry> [ver]   move one pin; a QEMU bump prints what newer machine types change
spin-machine-dev osv [--issues]       OSV against the newest release's SBOM; an issue per package with findings
spin-machine-dev cves [--local]       the kernel CNA's CVEs against the newest release's kernel, or _output's
spin-machine-dev qemu-cves [--local]  the CVEs QEMU's commits name against the newest release's QEMU, or _output's

outdated, bump and refresh run go-tools' versions, which every spin-stack repository shares. No go.mod pins it: it is on Task's PATH, so these verbs run under Task, task dev -- bump qemu, and refuse outside it. spin-machine-dev adds what belongs to this repository: the QEMU machine types, the builder images, OSV and the kernel's CVEs.

task versions and task bump NAME=<entry> [TO=<ver>] are the names every spin-stack repository has for the same two (go-tools' common tasks, below). The entries spin-machine-dev bump checks past the pin, qemu and shirudo, say bump: spin-machine-dev bump, so the common bump refuses them and names this command.

Releasing

spin-machine-dev release [--version v]   build every part and spin-machine, then pack the parts; refuses a tree with anything missing
spin-machine-dev certificate             the module signing key's certificate, kernel/module-signing.crt, named in the kernel's config

A release signs the kernel's modules between the kernel's build and the image's, with spin-stack/ci's KMS key (alias/spin-machine-module-signing), and refuses a tree without kernel/module-signing.crt, which the kernel trusts them by (kernel/README.md, "Modules"). Only the release environment may sign with the key, so a release is made by release.yml alone, and certificate by module-certificate.yml, once.

The release is one tarball. It holds QEMU and its firmware, the kernel, the base image, the e2fsprogs tools, spin-machine and the licence texts of the Go code in it, the licence texts of the Alpine libraries the static binaries link (alpine-licenses.txt), guest/shirudo and the licence texts of what it links, LICENSE and NOTICE, every patch each part was built with (a directory ships whole, never as a list), machine.env, SOURCES and a CycloneDX SBOM. machine.env is the manifest: versions and checksums, none of which decides whether checkpoints resume (the machine's record does, machine.CanResume). The SBOM is inside the tarball and beside it. alpine-licenses.txt is read from each package's own source: the APKBUILD at the aports commit the build's apk database records, and the tarball it names, checked against its sha512 before it is read. The tarballs are kept in .cache/alpine-sources and checked again on every pack.

--help hides the verbs that only workflows run. These are under release:

  • version: the next vYYYYMMDD.NN.
  • notes: what changed since the release before, and its manifest.
  • provenance: SLSA.
  • sign: cosign over every file, each bundle checked, then attestgate.
  • tag: through the API, because GITHUB_TOKEN cannot push a ref over a workflow change.
  • pack: pack what _output holds, building nothing.
  • alpine-licenses DB...: what pack reads for alpine-licenses.txt, from the named apk databases alone. parts.yml's QEMU and image lanes run it on their own, so a builder whose source yields no licence text fails in the pull request that changed it (#835).

The other hidden verbs are publish qemu (main's parts.yml), changed (whether a change can reach a part), needs (whether every job a summary job needs passed) and refresh (refresh.yml's proposals).

How GitHub Actions composes it

A workflow is the verbs in order, a step each. Every job that runs task uses spin-stack/go-tools' action first, which puts go-tools' task command on PATH. A job that runs spin-machine-dev runs task bin first, which builds _output/bin/spin-machine-dev and puts it on the job's PATH. Under go run, a step would exit 1 whatever the verb's status. A verb that runs versions (refresh.yml's) is task dev -- <verb>. taskgate (-command spin-machine-dev, in task lint) checks that each step is one invocation or one task.

ci.yml       task lint ; task test ; task coverage ; task mutate ; task bin ;
             spin-machine-dev build spin-machine ; spin-machine-dev fetch qemu ;
             spin-machine-dev vsock ; spin-machine-dev verify args
parts.yml    changed: spin-machine-dev changed --base $BASE --part <part> <paths>, once a part
             qemu:    spin-machine-dev build qemu --cache-registry ; vsock ; verify args ;
                      publish qemu (main)
             kernel:  spin-machine-dev build kernel --cache-registry ;
                      release traceable-kernel --cache-registry
             image:   (after kernel, with its modules) spin-machine-dev build e2fsprogs ;
                      spin-machine-dev build image
             parts:   spin-machine-dev needs
compat.yml   changed: spin-machine-dev changed --base $BASE --part <part> <paths>, for the machine,
                      QEMU and the kernel
             resume:  (when the change reaches the machine) spin-machine-dev vsock ;
                      spin-machine-dev build qemu, or fetch qemu when the change does not reach it ;
                      task boot:buildkit and spin-machine-dev build kernel when it reaches it ;
                      task boot:here ; task boot:record ; task boot:cpu-plug ;
                      spin-machine-dev lab compat ; task boot:lockdown
             compat:  spin-machine-dev needs
release.yml  compat.yml ; spin-machine-dev release version ; release ; release notes ;
             release provenance ; release sign ; release tag ; then the publish action ;
             traceable: spin-machine-dev release traceable-kernel ; release provenance ;
             release sign ; release upload ;
             report.yml ; pause: spin-machine-dev lab check checkpoint-pause|logind|modules|workspace ;
                    on a failure, spin-machine-dev releases failed TAG ;
             task trace ; task ship-it:wake
refresh.yml  task git:app ; task dev -- refresh kernel|systemd|openssh ; spin-machine-dev refresh builders
report.yml   task bin ; task vsock ; spin-machine-dev releases measure TAG... ; then in main's
             checkout: task bin ; spin-machine-dev releases record LADDER_JSON... ;
             spin-machine-dev releases flag LADDER_JSON... ;
             spin-machine-dev releases schema TAG... ; task git:app ;
             spin-machine-dev releases propose
withdraw.yml task bin ; spin-machine-dev releases withdraw|restore TAG ; task git:app ;
             spin-machine-dev releases propose --branch --title
module-certificate.yml  task bin ; spin-machine-dev certificate ; task git:app ;
             spin-machine-dev certificate propose
osv.yml      spin-machine-dev osv --issues ; spin-machine-dev cves ; spin-machine-dev qemu-cves
lab.yml      task vsock ; task lab:ci
pages.yml    task bin ; spin-machine-dev releases site --out _site ; spin-machine-dev docs site --out _site

A build in CI reads BuildKit's cache from GitHub's registry (--cache-registry, internal/build.CacheRegistry) and writes it back only on main (--cache-export). A pull request's, a release's and compat's builds read main's cache, and nobody reads what they compiled after. The cache lives in the registry and not in the Actions cache, because the fleet's runners cannot read the Actions cache, and the Actions cache evicted a lane's layers between a merge and the release that needed them.

The log and the experiments

The log is one file an entry under docs/log, and the rows of docs/boot-time.md's tables are one record each under docs/experiments (internal/docsrec says what each holds). A pull request adds files of its own, so two in flight do not conflict. The pages they make are rendered, never committed (#709):

spin-machine-dev docs log [--out FILE]       the log: docs/log's head, the entries by date under their weeks, rework.md
spin-machine-dev docs tables [--out FILE]    what the machine carries, what was measured and rejected, what is open
spin-machine-dev docs site --out OUT         both as web pages, OUT/log.html and OUT/experiments.html

pages.yml publishes the site's two pages beside the releases' page, at https://spin-stack.github.io/spin-machine/log.html and https://spin-stack.github.io/spin-machine/experiments.html. Each verb refuses a file that does not parse, as gates/docs_test.go does.

The Taskfile

What a person types is spin-machine-dev. The Taskfile is go-tools' gates, the same in every spin-stack repository (test, lint, mutate, coverage), and CI's plumbing: bin, dev (spin-machine-dev with go-tools' commands on its PATH), git:app (git as the release app), trace and ship-it:wake. fuzz runs each Go fuzz target (func FuzzX: a checkpoint's record and QMP's replies) for FUZZTIME each, as ci.yml's fuzz job does; an input one fails on is committed under the package's testdata/fuzz with the fix. The probes' targets (boot:*), lab, lab:ci and vsock run what the verbs built.

versions, bump, release, lint:workflows and consumers are not written here: the Taskfile includes go-tools' own file of them (GO_TOOLS_TASKS, which only go-tools' task command sets), so each means what it means in every repository. lint runs lint:workflows. release and consumers are listed and refuse: the include states RELEASE: {elsewhere: release.yml}, because a release is release.yml's (Releasing, above), and no value on a command line or in the environment makes the task cut one here. Nothing copies from this repository by a consumers.toml.

Measuring

spin-machine-dev lab is how this machine is measured: here, where a laptop finds leads, and on the bench fleet, where a number decides something (AGENTS.md, "The goal"). Its code is internal/lab. Each verb's --help says what it takes.

noun is where
tree a whole machine laid out as a release: QEMU and its firmware, a kernel, the image and a spin-machine, with a manifest.json naming where each part came from and the edits made to every boot's overlay _output/trees/NAME/
probe a measurement of a tree: it boots the tree, records named numbers for each repetition, and says what it lost internal/lab, one file each
experiment a probe over trees, repetitions of each, interleaved, written as result.json: every sample, the options, each tree's manifest, the host _output/lab/results/, or a lab run's artifact

A tree starts from a release (--from release, --from release:v20261119.01) or from a directory laid out as one (--from _output). It replaces what its flags ask for:

  • --kernel run:N: a parts.yml run's kernel, or a Kernel workflow run's from before parts.yml: its vmlinux when it randomizes itself, entered through PVH, otherwise its bzImage. A run from #660 on has no bzImage, and one from before 2026-11-19 has neither, which the lab refuses by name. --kernel also takes the path of either.
  • --kernel traceable:TAG: the lab-only kernel published beside release TAG, its kernel with lockdown forced to none, once its signature is release.yml's (kernel/README.md). Releases from before #536 have none. Its boots pass --lockdown=kernel when the tree's spin-machine would put lockdown=confidentiality on the line (#734), which leaves the kernel at none and its keyrings sealed, and the tree is refused if its spin-machine's command line would carry a lockdown= anyway.
  • --qemu run:N, or a directory with bin/ and qemu/.
  • --spin-machine here: built from this checkout.
  • --spin-machine release: built from the commit the release's machine.env names, fetched by that commit from the checkout's origin, so neither the module path nor the repository's name matters. That is the machine the release defined, and the ladder boots each release with it.
  • --spin-machine commit:SHA: built from that commit, fetched the same way and named by its 40 digits. Trees of several commits in one run find which commit since a release moved a number.
  • Without --spin-machine, the tree keeps the spin-machine of the tree it starts from. A release from before #752 ships none, so a tree from one gets this checkout's, as the boot: targets' :tools dependency gave the probes before.
  • --append ARGS: added to the kernel command line of every boot.
  • --boot FLAG: a spin-machine boot flag for every boot, such as --boot --cpu=Skylake-Server-v4.
  • --cpu baseline: the newest named CPU model the host making the tree can run (machine.QEMU.CPUModels, and internal/lab ranks them).
  • --edit lane: the first login's lane as this checkout builds it, put into a published release's overlays.
  • --edit floor: no systemd before sshd. It is a bound, used with --append init=/usr/local/sbin/spin-floor.
  • --edit pressure: the pressure probe's guest sender, its unit and its enable, as this checkout builds them into the image, put into a published release's overlays.
  • --edit nolinger: spin not lingering, as this checkout builds the image.
  • --edit modules: the tree's kernel's modules in every overlay's /usr/lib/modules, with the image's unit that creates their static nodes and kmod-static-nodes.service masked (docs/image.md, "Kernel modules"). Its kernel is --kernel run:N of a parts.yml run from #736 on, whose artifact carries them.
  • --edit forwarder-early: login=spin's forwarder, which stands for spin's supervisor, without systemd's default dependencies.
  • --edit carry-masks, carry-generators and carry-coldplug: what optimize-systemd.sh and the coldplug filter do for boot time alone, taken back (docs/boot-time.md, "What the machine carries"). Each goes after --edit lane.
  • --edit bootchart: systemd-bootchart as PID 1, spin-stack's fork at the commit versions.yaml pins, compiled here in a container, which samples the boot and execs systemd. On the shirudo machine it is the initrd's PID 1: the tree's shirudo initrd carries it as /init, in an archive after the operator's, and the root's /sbin/init stays systemd. The bootchart probe draws only a tree that carries it (measuring.md, "Boot charts").
  • --edit ledger: sshd at LogLevel DEBUG1 and the ledger probe's two scripts. Its tree also boots a kernel that can be traced and the scheduler's tracepoints from the kernel's start, --kernel traceable:TAG --append '<lab.LedgerAppend>' (measuring.md, "The ledger").
  • --edit carry-journal, carry-docker, carry-lane-logind and carry-keygen: one of the image's deviations from Ubuntu taken back to what Ubuntu ships (docs/image.md, "Measured in this review"). Each goes after --edit lane.
  • --systemd PATCH: systemd built here with a patch from image/systemd/experiments, in every overlay.
  • --openssh: OpenSSH as this checkout builds it (image/openssh), built here, in every overlay.
  • --shirudo here: guest/shirudo and its operator half built here by shirudo/Dockerfile at the commit versions.yaml pins, as a release builds them, reading main's BuildKit cache. Its BPF objects are compiled against the BTF of the tree's kernel/vmlinux, --kernel's when it is given. They replace the release's, the tree's shirudo machine is made with them, and the manifest names the commit.
  • --shirudo commit:SHA: the same at that commit of the fork, versions.yaml's shirudo source, named by its 40 digits as --spin-machine commit:SHA is. Trees of two commits in one run measure a shirudo change. A tree with either is refused on a run that boots no shirudo machine (--opt machine=plain), where its shirudo would never run.

Nothing is written through the tree a tree starts from. Parts are links, and a replaced part is a copy. The lab refuses a tree whose manifest is missing, names no source for a part, or does not match the file, before anything boots. A probe is handed trees, never a path in an environment variable it may not read.

spin-machine-dev lab tree NAME [tree flags]              make _output/trees/NAME
spin-machine-dev lab run PROBE [TREE...] [--tree NAME=SPEC]... [--reps N] [--opt K=V]... [--out DIR]
spin-machine-dev lab show RUN_ID|DIR                     a lab run's result.json, downloaded, as its table
spin-machine-dev lab dispatch PROBE|check:TARGET --tree NAME=SPEC... [--reps N] [--opt K=V]... [--host bench|bench-metal]
spin-machine-dev lab check TARGET [--tree NAME=SPEC]     boot:TARGET on one tree; a second tree, firmware-stages boots beside it
spin-machine-dev lab ladder [--releases N] [--newest vX] the newest releases measured together: ladder.json
spin-machine-dev lab compat [--here DIR] [--releases N]  a checkpoint of every release whose machine is this one, resumed

lab ladder compares releases, and two runs taken apart do not. The ladder boots the --releases newest releases (five unless told) up to --newest, each a tree with --spin-machine release, interleaved on one host. It runs every goal probe over the releases whose spin-machine can run it. A probe says which commands and flags it needs, and v20261119.01's spin-machine has no boot --restore. The ladder's table is the goal's two numbers release by release, each with its Δ against the release above, and the newest against 100 ms. Beside them are the prestarted numbers, save, state, the kernel and QEMU's RSS as diagnostics, and the shape every release booted.

What a Δ says

Every comparison the lab prints is the Δ p50 of two sets of boots taken in one run, interleaved, with its 95% interval. That covers lab run's and lab show's table of trees against the first, a ladder's table, releases compare, and the page's Δ column. The interval is the bootstrap's: each side drawn again with replacement 2000 times from a fixed seed, so the same samples always print the same interval (lab.DeltaP50). The cold first login of v20261119.01 against v20261114.02 reads -54.2 [-62.9, -49.7], and v20261119.02's against it +3.0 [-0.8, +6.6] within noise (lab 44641240861).

One rule decides: a change is a gain only when the interval of its Δ excludes 0. For a number measured in time, the interval lies wholly below 0. An interval that includes 0 is within noise, whatever the Δ's size, and no threshold sits beside the rule. A Δ between two runs has no interval and is not read, because the bench moves between runs by as much as a release does. A side with one boot has no interval either, and the lab prints its Δ bare, saying so.

The shape

Every probe boots the machine spin boots a workspace in, unless a run asks for another: one vCPU of a ceiling of 16, 2048 MiB of a ceiling of 8 GiB through virtio-mem, and 16 targets on the hotplug controller, 4 of them for disks (spin-stack/spin's internal/runner/vmm/vmm.go and internal/runner/qemu/spec.go). The options are cpus, max-cpus, memory, max-memory, hotplug-disks and flags (more spin-machine boot flags). --opt cpus=2 --opt memory=2048 --opt max-cpus=0 --opt max-memory=0 --opt hotplug-disks=0 --opt plugged=0 --opt login=lane is the shape the probes booted before they booted spin's. Every table and record says the shape it measured. A record that names none booted that older shape.

The machine is shirudo's unless a run asks for the plain one with --opt machine=plain (#809): a TPM on the tree's swtpm, a state of its own for each boot, shirudo's initrd and lockdown, and a root with shirudo's images, certificate and units installed, at the plain machine's memory. A release cannot ship that machine: its images and initrd are signed with the operator's key. So each tree makes its own the first time an experiment boots it, in a guest of its release's operator half or the one --shirudo built (internal/shirudo), keeps it under shirudo/ and names it in its manifest, and every later boot of the tree reuses it. The lab unpacks a published release's operator half, its second tarball, beside the first. A tree that cannot make the machine is refused by name before anything boots: a release without an operator half, or a spin-machine without boot --tpm, --initrd, --lockdown, --disk-under and pcrs. It is never booted plain in its place.

A tree takes the same --opt for its own boots, in place of the run's, so that two shapes are two trees of one interleaved run instead of two runs: --tree 'start=--from release' --tree 'plug=--from release --opt memory=128 --opt plugged=2048'. It sets any of the probe's options but login, since one key logs into every machine of a run, and but one that changes the probe's rows, since the table compares the trees row by row. The table lists each tree's options beside its parts.

Two options make a boot spin's after it starts as well. plugged=MIB (default 0) sizes the guest through virtio-mem right after its start, as spin sizes a workspace that holds more than the memory it boots, before handing it its filesystem. The least workspace holds 2048 MiB, the memory it boots, and spin plugs nothing for it (spin-stack/spin#1660). login=spin, the default, logs in as spin does: as root, through a forwarder from vsock to ssh.service on 127.0.0.1:22 (internal/lab/login.go, spinsPath), installed as spin-supervisor.service, the unit it stands for, so the image starts it as it starts spin's, with spin's host key handed over before systemd starts, as spin's vminitd hands it over (spinHandoff), so the image's host-key generation does not run (#515, #575). A shell stands in for vminitd as PID 1: it places the key and execs systemd, and its cost is measuring.md's ("The ledger"). login=lane logs in as the user spin through systemd's vsock socket and one sshd@ for each connection. That is the path the probes took until 2026-11-20, and the one the floor edit's sshd serves, so a floor run passes login=lane.

Each release's own numbers are kept in the repository, one record for each release in docs/releases/. docs/releases.md is the page written from them, with its chart, docs/releases.svg (docs/releasing.md, "The record"). The same page is published at https://spin-stack.github.io/spin-machine/:

spin-machine-dev releases measure [TAG...] [--reps N]            each release with the one before it, here: a ladder.json each
spin-machine-dev releases record LADDER_JSON... [--run URL]       the record of each ladder's newest release, and the page
spin-machine-dev releases missing                                 the published releases with no record, oldest first
spin-machine-dev releases show RELEASE                            a record: its numbers, where, when, in what shape and against what
spin-machine-dev releases compare A B                             two records side by side: B's Δ when it was measured against A
spin-machine-dev releases doc [--check]                           docs/releases.md and .svg from the records; --check exits 1 when either differs
spin-machine-dev releases site --out OUT                          the same as a web page, OUT/index.html, each record beside it in OUT/releases
spin-machine-dev releases schema TAG...                           each release's QEMU's query-qmp-schema, in internal/qmpdef/testdata/released, which go test holds the machine package to
spin-machine-dev releases propose [--branch B] [--title T]        the records and schemas this checkout wrote, as a pull request against main
spin-machine-dev releases flag LADDER_JSON... [--run URL]         an issue for each ladder's newest release whose goal number regressed
spin-machine-dev releases failed TAG --steps JSON [--run URL]     an issue for each functional check, a step in the job's steps context, the release failed
spin-machine-dev releases withdraw TAG --reason TEXT --issue N    mark a release withdrawn on GitHub and in its record, so nothing adopts it
spin-machine-dev releases restore TAG                             undo withdraw

measure runs a ladder of two for each release: the newest published release before it that was not withdrawn, and the release. report.yml does the same when a release is published. measure keeps each ladder.json in _output/lab/measured/TAG (lab show reads that directory), and record writes the record from it. They are two verbs because report.yml runs them at two commits: it measures at the release's tag and records with main's code, and main's test holds the records to main's page. The record is the release's, with an against block: the release before it, its numbers from the same run, and the Δ of each number with its interval. The page's Δ comes only from that block. It is blank for a record measured alone until that record is measured again, and every record was measured alone before records were measured in pairs.

measure over many tags, oldest first, backfills: it measures each tag with its own predecessor. compare A B prints the pair from B's run when B was measured against A. Otherwise it prints both records, each from its own run, with no Δ, and the lab ladder that measures them together. record keeps only each ladder's newest release, against the release before it in that ladder, so a ladder measured some other way records the same. propose commits what git status shows changed under docs/releases, with the page and its chart, on a branch named for those releases. A branch already on origin is a set proposed once, and propose does not propose it again. site writes one HTML file that fetches nothing, from the same rows as the page's tables, with the chart inline so its points' tooltips show. pages.yml runs site on every merge to main that changes a record, and deploys the file to GitHub Pages. Every verb takes --dir for the records' directory (default docs/releases), with the page and its chart beside it as DIR.md and DIR.svg.

flag reads ladders as record does. It opens an issue when the newest release's Δp50 of either goal number has its interval wholly above 0, with the Δs, the run and the commits between the two releases. It opens one issue for each pair and withdraws nothing. withdraw makes the release a prerelease titled "(withdrawn)", opens its notes with the reason and the issue, makes the newest release not withdrawn GitHub's latest, and marks the record (withdrawn) and the page. It refuses a reason without an issue, an issue that does not exist and a release that does not exist. Running it again changes nothing. restore gives the release back its published title and notes. propose --branch --title proposes a withdrawal under a name of its own, because the release's own name was its measurement's. docs/releasing.md, "Withdrawing a release", says what counts as a regression and what skips a withdrawn release.

lab compat resumes a checkpoint of each release here (lab.ResumeHere), newest first, and task boot:compat is lab compat over a built release. It checks that a host that skipped releases still resumes their checkpoints. It checks each release it fetches against its sha256 and its signature, as the lab checks every release a tree is made from. Each release's checkpoint is taken at spin's shape with this tree's spin-machine save, so its record is what that release's QEMU reports. It stops at the first release whose checkpoint this machine refuses (machine.CanResume), and that row names every difference. On the way, it holds CanResume to QEMU's one-way promise against each release's QEMU.

ssh-first and restore-first are the goal's two numbers. prestart is a QEMU started ahead against today's, and initcalls is the kernel's boot by initcall. Every probe takes the shape's options (above) and its own: restore-first takes channels and touched=MIB, prestart takes channels, and initcalls takes top=N. touched writes that many MiB into a tmpfs in the guest after its cold login and before its save, so the checkpoint carries them. A state with more than 1.5 GiB of data loads fast, and a bench runner gives its user /dev/userfaultfd, which spin-machine opens and hands QEMU. The lab refuses an option the probe does not take. A probe that restores (restore-first, prestart, restore-together) hands every restore its tree's machine record (spin-machine restore --target). The record is read once per tree, before anything is measured, from a machine of the tree held for a checkpoint in the probe's shape, as spin reads its host's once. A tree whose spin-machine has no target command, every release before the record, restores as it always did, and its restore asks the machine on its clock. restore-first's cached row reads only the data of the saved state into the page cache (SEEK_DATA). A mapped-ram state is a file as long as the RAM ceiling, and its data is all QEMU loads from it. The row's listening is the restoring QEMU's monitor accepting, not its machine made.

restore-together measures whether a checkpoint's channels hold up when a host restores several workspaces at once. It has a row for each number in together (default 1 4 8) and each count in channels (default 1 8 16). An empty channels means the tree's spin-machine's own count. A measurement saves that many checkpoints, each of its own overlay, and starts a QEMU ahead for each with --restore. It evicts every state from the page cache, as restore-first's evicted row does, and lets every spin-machine restore go at once. The table's login is each measurement's median, and slowest its slowest. Under the table, the probe pools every restore's first login, one sample each, and prints each row's p50 against the same number at once with the first count. Restores let go together are not independent, so that interval is narrower than the truth. A lost restore loses its measurement.

states=cached reads every state into the page cache instead, which takes the disk out of the burst. states=evicted cached runs both, and evicted is the default. defrag names the host's THP defrag policies, each the rows over again. The probe sets /sys/kernel/mm/transparent_hugepage/defrag through sudo for each burst and puts it back after. Under the pooled logins, the table prints for each row what the host counted during its bursts: the memory free and cached going in, CPU busy, MiB read, the PSI stall time of CPU, I/O and memory, and the page allocations that waited on reclaim or compaction or went without a huge page. It also prints where on the host's CPUs the bursts ran: the busiest CPU and its share of the busy time, CPU 0's busy time against the others' mean, the CPU taking most interrupts with its share and its busiest lines, a histogram of the CPUs QEMU's running threads were found on (sampled every 5 ms), the QEMUs' and the job's Cpus_allowed_list, and whether irqbalance runs. result.json holds each burst's counts, with every restore's running.

density is a workspace's first login with others already running on the host. It has a row for each number in crowds (default 0 8 16 32). The running workspaces are idle, or keep their vCPUs busy with load=cpu, and settle for settle seconds (default 10) before the measured boot.

transport says how much of each goal number QMP and vsock are. It boots and restores as restore-first does, with QEMU traced (QMP and the run state, in host time). From the trace it reads which commands each path waits on: cont for a cold boot, and migrate-incoming and what follows it for a restore. It also reads what each command took, and how long QEMU waited for spin-machine's next command. After the cold login it times echoes round trips (default 200) of query-status on the monitor, of a one-byte echo over vsock, and of the same echo through a hop like spin's forwarder. It also counts a warm login's round trips. The detail under its table lists each path's commands by place. A traced cold boot runs a shell more than ssh-first, so its cold_login compares only with another traced boot.

run-delay is the most a higher host priority for QEMU could win: how long QEMU's threads were runnable and waiting for a CPU, from before its exec to the first login, cold and restored. It boots and restores as transport does, traced, and samples every thread's schedstat every 5 ms. It splits the wait at the guest's first run and reads the guest's steal time as a check. Its rows are crowds (default 0 16), workspaces already running as density boots them, busy with the default load=cpu. A row such as 16:nice=10 runs the crowd's QEMUs at that nice value, which gives the measured QEMU the share it would get at the same value below 0. The detail under its table lists each kind of thread's wait.

usage is what reading a running machine's disk counters costs it: DiskUsage, which Usage and the probe's watch of a held disk send (#402). After the cold login it times calls round trips (default 200) of DiskUsage, each beside a query-status, and QEMU's main thread's CPU time across each. It then pins QEMU's threads to one host CPU beside two busy loops and times them again. depth puts that many images in the root disk's chain (default 1, the overlay over the base), as each seal of a workspace's disk adds one.

bootchart draws a tree made with --edit bootchart: systemd-bootchart's chart of every process from PID 1 to the first login, whose command stops the sampler, and systemd-analyze plot's chart of every unit, from the same boot. On the shirudo machine PID 1 is the initrd's, so the chart has the initrd's processes before the root's. It keeps them beside result.json as TREE-REP.bootchart.svg, the chart's samples as TREE-REP.bootchart.json, TREE-REP.plot.svg, the login's critical chains as TREE-REP.chain.txt, and the ordering among the units on them as TREE-REP.order.dot and, where graphviz is installed, TREE-REP.order.svg (lab.yml installs it). It records where the chart starts and ends on the kernel's clock, the samples it dropped and its size. Reading them is in measuring.md.

ledger accounts for a tree made with --edit ledger: from the moment before QEMU is exec'd to the first login, the kernel's start on the host's clock and, from a scheduler trace, each window of the kernel's clock by whose tasks ran and the idle. It keeps TREE-REP.ledger.txt, TREE-REP.ledger.json, the trace as TREE-REP.trace.txt and the journal as TREE-REP.journal.txt beside result.json. Reading them is in measuring.md.

exits counts the VM exits of one cold boot to the first login, by reason. It reads KVM's counters for the guest's vCPUs through QEMU's query-stats when the first login returns. As root on the host, it also arms tracefs histograms before QEMU's exec: kvm_exit by its reason, each exit timed to the vCPU's next kvm_entry, and the MSRs, ports and MMIO addresses behind the exits. The detail under its table lists each reason's count and host time by tree and every non-zero counter. Each boot's histograms are kept as TREE-REP.exits.txt beside result.json, with the host's vmx flags and kvm_intel parameters. On a nested host the time is the L1's handling alone, a floor on what the guest waited. Run it with --host bench and --host bench-metal to see where nesting's cost goes. It needs sudo.

It also keys the MMIO and port exits by guest_rip, and after the first login reads the guest's /proc/kallsyms to name the function each exit's instruction is in. The detail lists them by tree, as EPT_MISCONFIG pci_mmcfg_read and the like. An accessor is a leaf, so for its callers boot --kernel traceable:TAG with the function tracer on the accessors and their stacks, such as --append 'ftrace=function ftrace_filter=pci_mmcfg_read,native_io_apic_read trace_options=func_stack_trace,nooverwrite trace_clock=mono trace_buf_size=8M'. A tree whose command line carries ftrace= has the guest's trace kept as TREE-REP.ftrace.txt (#566). The EPT violations are kept by the guest-physical address they faulted, in 128 MiB buckets: the base memory below 2 GiB, what virtio-mem plugs from 4 GiB, and the first touch of each MMIO page (#568).

lab dispatch starts lab.yml, waits for it, and prints its result. Each run is its own bench instance, so dispatches go at once and the fleet queues past its cap. lab dispatch is the way to compare. Use --host bench (nested, the default) unless the question is nested against metal. --ref names the branch whose lab.yml and probes run (default main). lab run exits 1 when a measurement was lost (a machine that never answered, counted in the table's LOST) and 2 when the experiment could not run. lab dispatch check:TARGET runs one of lab.yml's checks on the bench, on the first tree. A check keeps no result, so dispatch prints the last lines of its step from the job's log, and exits 1 when the run did not succeed.

What is not a probe is a check, pass or fail, and stays a Go test with its boot: target: firmware, record, rollback, checkpoint-pause, cpu-plug, actuators (what SetMemory down and one vCPU cost, docs/machine.md), compat (every release whose machine is this one, through lab compat), hotadd, logind, lockdown, sshd-delay, shell (spin-machine-dev shell reaches a root prompt under systemd), workspace (what a workspace expects of the image, docs/image.md) and finish-migrate (a checkpoint continued at once on two busy CPUs, which a qemu bump runs). Two probes not yet ported stay Go tests too: firmware-stages and waits. lab check TARGET runs one on any tree here, with the lab's scratch as the target's SCRATCH, where pressure writes its io.max disk: on the bench, the instance store, as the checkout there is on no block device (#685). lab.yml's check:TARGET runs firmware, firmware-stages, waits, record, rollback, checkpoint-pause, cpu-plug, actuators, sshd-delay, shell, logind, workspace, pressure (the pressure probe, Adopt's included, docs/machine.md) and fastload-reads (qemu/patches/0011), the targets its probe input lists.

lab.yml's experiment is one step, task lab:ci, after task vsock. The step makes the trees its trees input names (NAME=SPEC; NAME=SPEC), runs the probe, puts the table on the run's summary, and keeps result.json, with what the probe kept beside it, as the artifact lab-RUN_ID, which lab show RUN_ID reads.