This is the multi-page printable view of this section.
Project
- 1: Platforms and Limits
- 2: Design
- 3: Security and Trust
- 4: Contributing
- 5: Shipping the Mac Component
- 6: Validation History
- 7: Barn 0.9.3 Changes
- 8: Barn 1.1.0 Local Acceptance
Barn is open source under the Apache-2.0 license and developed on GitHub. Bug reports and pull requests are welcome; please report security vulnerabilities privately through the security policy.
Understand Barn
- Platforms and Limits — Supported hosts and guests, and the limits to plan around.
- Design — Why one inventory, explicit destruction, two NICs, and identity checks.
- Security and Trust — What runs as root, what happens to your SSH config, and how images are verified.
Contribute
- Contributing — Repository map, build and test gates, docs, and catalog maintenance.
- Mac Release — Maintainer runbook for signing, notarizing, and publishing
Barn.app.
Records
Version changes are in the release notes, and longer design discussions in design essays. Dated verification records are kept here for maintainers: Validation History, 1.1.0 Local Acceptance, and 0.9.3 Changes.
1 - Platforms and Limits
Check here whether Barn runs on your machine, which guest systems it can boot, and which limits might matter for your lab. Barn is built for local development and testing, not for hosting production services.
Version covered
The platform tables below apply to Barn 1.5.0. Run barn version to check your installation. The Linux image catalog can change independently through barn update. See the 1.5.0 release notes and version history of CLI options.
Hosts
| Host | Linux guests | macOS guests |
|---|---|---|
| macOS on Apple Silicon | Yes — QEMU 8.2.1+ with HVF | Yes — macOS 27 or later on the host, Barn.app |
| macOS on Intel | Yes — QEMU 8.2.1+ with HVF | No |
Linux on amd64 or arm64 | Yes — QEMU 6.2+ with KVM, NetworkManager or systemd-networkd | No |
| Windows | No native release; run Barn on a Linux host instead (options) | No |
Release binaries cover all four macOS and Linux targets. Day-to-day testing on real hypervisors runs on Apple Silicon Macs and amd64 Linux. barn doctor checks a host’s readiness, and barn setup --dry-run shows what Barn would install.
Linux guests
The built-in image catalog offers nine distribution families, each built for both CPU architectures unless noted. New labs in 1.5.0 default to Debian 13. On Barn 1.4.0, select it with barn init -I d13.
| Family | Name | Architectures | Notes |
|---|---|---|---|
| Debian 13 | d13 | amd64, arm64 | Default in 1.5.0 |
| Debian 12 | d12 | amd64, arm64 | |
| Ubuntu 26.04 LTS | u26 | amd64, arm64 | |
| Ubuntu 24.04 LTS | u24 | amd64, arm64 | |
| Ubuntu 22.04 LTS | u22 | amd64, arm64 | Deprecated |
| Rocky Linux 10 | el10 | amd64, arm64 | |
| Rocky Linux 9 | el9 | amd64, arm64 | |
| Rocky Linux 8 | el8 | amd64, arm64 | Deprecated; on Apple Silicon the arm64 image runs under emulation, because its 64 KiB page kernel cannot run on HVF |
| CentOS 7 | el7 | amd64 | Deprecated, end of life; native amd64 Linux hosts only |
Deprecated images still run, for compatibility testing, but support for them is being phased out. Exact versions, aliases, and how the catalog is updated are in Linux Images.
Limits:
- One lab per user. All nodes live on one private
/24, so a lab can hold as many nodes as that subnet has addresses and your host has memory for. - One guest architecture per lab. A guest of the other architecture runs under QEMU’s TCG emulation. It works for compatibility testing but is much slower, so do not use it for performance numbers.
- Host shares need 9p.
vm_sharesmounts host directories over Virtio-9p, which needs 9p support in both QEMU and the guest kernel. Where that is missing, copy files over SSH instead (Storage and Access). - No snapshots or suspend.
barn stopshuts the guest down;barn startboots it again. Guest memory is not saved.
macOS guests
barn mac needs an Apple Silicon Mac running macOS 27 or later, a logged-in desktop session, and Barn.app from the same release as the CLI. It does not use QEMU or the Linux lab’s host network, and it does not need sudo. Guests run macOS 27. On a fresh installation, Barn 1.5.0 selects macOS 27.2.1 (26B131) by default. You can choose a compatible local IPSW or select a newer base with barn mac image update.
Limits:
- Two running VMs per Mac. Apple’s framework allows at most two macOS VMs running at once, across all apps on the Mac, including a base image being installed. You can keep any number stopped.
- Disk space. The first VM needs about 65 GiB free for Apple’s restore image and the base installation. Details
- Framework features. USB passthrough, VM snapshots, and suspend/resume are not available. macOS may restrict Apple Account sign-in inside a virtual machine.
Mac VMs are separate from the Linux lab: barn status, barn destroy, and barn purge never touch them. Use barn mac ls and barn mac doctor instead. macOS VMs guide
Your data
Barn VMs are meant to be rebuilt. Root disks are replaced by recreate and deleted by destroy; only data disks marked persistent: true survive both. Keep anything you cannot regenerate on the host or in version control. What survives each operation
2 - Design
Barn’s behavior follows from a handful of decisions. Each one answers a concrete problem that comes up when you run multi-node labs on a workstation. Knowing them makes the rest of the documentation predictable: why barn up never deletes anything, why every node has two network interfaces, why there is no “project” to switch between.
Barn has two workflows that share a CLI and nothing else:
Linux labs (barn …) | macOS VMs (barn mac …) | |
|---|---|---|
| Hypervisor | QEMU with HVF or KVM; TCG emulation for a foreign architecture | Apple Virtualization.framework |
| Configuration | One Ansible inventory (barn.yml or pigsty.yml) | Named VMs set up with command-line flags |
| State | $BARN_HOME (default ~/.barn) | $BARN_HOME/mac (default ~/.barn/mac) |
| Network | NAT management interface plus a shared fixed-IP /24 | One private /24 NAT subnet per VM, guest at .10 |
| Typical use | Database clusters, Ansible playbooks, multi-node testing | macOS builds, GUI testing, a clean desktop to reproduce bugs |
The rest of this page covers Linux labs. The macOS side is explained in native Mac lifecycle.
One inventory, one lab per user
Problem. A Pigsty or Ansible inventory already names every node and its IP address. A per-directory “project” layer on top of it raises questions with no good answers: which file owns a node’s address, whether moving a checkout creates a second lab, and which project owns the single host bridge.
Decision. The inventory is Barn’s configuration, and each user has exactly one Linux lab, stored under BARN_HOME. Barn reads only the host addresses, a few identity fields (nodename, admin_ip, pg_cluster, pg_seq, …), and the vm_* variables. It validates vm_* strictly and ignores everything else, so a typo in vm_mem fails barn validate while PostgreSQL settings in the same file change freely.
What you notice. barn status, barn ssh, and barn stop work from any directory, and barn up in a directory without an inventory resumes the same lab instead of starting a second one. Why Barn has no projects
Creation is declarative, destruction is explicit
Problem. An inventory gets edited for debugging, switched with a git branch, or loses a group in a bad merge. If a missing node meant “delete this VM”, one typo would wipe a database node.
Decision. The inventory authorizes creation, never deletion. Barn hashes each node’s resolved specification and compares it with what was applied:
barn upcreates new nodes, starts stopped ones, and finishes interrupted guest setup without restarting healthy VMs.- In 1.5.0, new labs inherit Debian 13 from the embedded catalog. Each lab records its default image in the applied specification. Upgrading Barn keeps that default, so starting the lab or adding a node preserves its distribution unless the inventory or a command selects another. Upgrade acceptance
- A changed node is reported as drift and left alone. CPU and memory changes apply with
barn resize; other changes needbarn recreate. - A node removed from the file keeps running until you run
barn destroyon it, and a whole-labrecreaterefuses an inventory that omits an existing node.
What you notice. barn plan always tells you what up would do, and the commands that delete data are the ones named after it. Declarative does not mean destructive
Native speed, or a clear failure
Problem. QEMU can silently fall back to software emulation when hardware acceleration is unavailable. The VM still boots, but runs far slower, and nothing tells you why.
Decision. When guest and host architectures match, Barn uses HVF on macOS or KVM on Linux, and fails if that accelerator does not work. It uses TCG emulation only when you ask for a different architecture, or when the image catalog marks a guest as incompatible with the host accelerator (Rocky Linux 8 on Apple Silicon, whose 64 KiB page kernel HVF cannot run).
What you notice.
- The guest architecture is one setting for the whole lab (
vm_arch, or-Afor one command). It defaults to the host’s. An architecture-suffixed image alias such asel10aord13xalso selects it. Precedence rules barn statusshows each node’s architecture and accelerator.- Before
recreatedeletes a working VM, Barn checks that the QEMU binary, network backend, base image, and firmware for the replacement are all present.
Two network interfaces per node
Problem. Cluster software identifies peers by IP address: replication, consensus, load-balancer backends, a keepalived VIP, and Prometheus targets all expect 10.10.10.11 to be the same machine across reboots and reachable from the other nodes. Port forwarding to the host gives you a way in, but nodes cannot form a cluster through it. At the same time, a freshly booted VM needs internet access to install packages, ideally without you editing host firewall rules.
Decision. Every Linux VM gets two NICs with separate jobs:
| Interface | Provided by | Used for |
|---|---|---|
| Management | QEMU user-mode NAT with DHCP | Internet access, DNS, and the SSH port forwarded to 127.0.0.1 on the host |
| Lab | A host bridge, static address from the inventory | Host-to-node and node-to-node traffic, Ansible, cluster services, VIPs |
The bridge lets QEMU run as your user: macOS hosts use a pinned socket_vmnet daemon; Linux hosts use a barn0 bridge managed by NetworkManager or systemd-networkd, with the distribution’s qemu-bridge-helper. Creating it is a one-time sudo step during barn setup.
What you notice. Nodes reach each other and your host at the inventory addresses, and they reach the internet without any NAT rules on your machine. Why every node has two NICs
Images, disks, and configuration change independently
Problem. A base image download is large, a lab’s root disks are disposable, and test data on a data disk can take an hour to regenerate. Tying their lifetimes together means either redownloading constantly or losing data by accident.
Decision. Each layer has its own lifetime:
- Verified base images are cached read-only under
$BARN_HOME/imagesand shared by all nodes; each node’s root disk is a thin copy-on-write overlay on top. barn updaterefreshes the image catalog without touching existing root disks. New and recreated nodes get the newer images.- Data disks marked
persistent: truesurvivedestroyandrecreate. barn image pruneremoves only images that nothing references.
What you notice. Creating a node is fast and nearly free in disk space, and you choose when a node moves to a new image. What survives each operation
Check identity before acting
Problem. A PID file records a number. After a crash or a reboot, that number may belong to an unrelated process, and a path in a damaged state file may point somewhere it should not. Trusting either can kill the wrong process or delete a disk still in use.
Decision. QEMU and image downloads run as your user; root is used only by setup, network install/uninstall, and hosts install/uninstall. Before Barn signals a process or deletes a node’s files, it checks file ownership, that the path is inside the deployment, the VM’s name and UUID over QEMU’s control socket (QMP), and the process start time and command line. If any check is ambiguous, it stops and reports instead of guessing.
What you notice. An interrupted command can be rerun safely, and an occasional “identity mismatch” error means Barn refused to act on something it could not prove was its own. A PID is not a virtual machine · Security and trust
3 - Security and Trust
Read this before letting Barn run VMs on your workstation: what it does as root, what it does with your SSH setup and files, and how to check that a download is genuine.
Barn assumes a single-user development machine. Its ownership and process-identity checks keep it from damaging unrelated files and processes by mistake; they are not a barrier against another hostile user on the same host. Inside a Linux lab the nodes trust each other: they share a private subnet, and the control node holds a key to every peer.
What Barn runs as root
Run barn as your normal user. QEMU processes, Barn.app VMs, the image cache, disks, keys, and state all belong to your account under $BARN_HOME. Only three host-wide changes need sudo, and each prints its plan before asking:
| Command | What runs as root |
|---|---|
barn setup (Linux) | The system package manager (apt-get or dnf) installs QEMU, firmware, and OpenSSH. On macOS, Homebrew runs as your user |
barn network install / uninstall | Creates or removes the host-wide fixed-IP network: the barn0 bridge on Linux, the socket_vmnet launchd service on macOS |
barn hosts install / uninstall | barn-hosts-helper rewrites only Barn’s marker-delimited block in /etc/hosts |
They are separate commands so you can review and run each one yourself. On a terminal, up, start, restart, and reload offer the same setup plan when a dependency or the Barn network is missing; without a terminal they only report it. Unattended preparation is covered in barn setup.
barn-hosts-helper is the only component that writes /etc/hosts, so keep it and barn from the same build. The CLI runs /opt/barn/libexec/barn-hosts-helper only if its SHA-256 matches the digest compiled into the CLI, and the helper checks the file’s ownership, permissions, link count, and content digest before and after writing. A substituted helper never gets root, and a plan reviewed against an older /etc/hosts cannot overwrite newer edits.
barn mac needs no root at all: each macOS VM’s private network is created in user space by its own runner process.
Your SSH keys and ~/.ssh/config
Barn generates its own keys and leaves yours alone:
- A Linux lab uses one Ed25519 deployment keypair under
$BARN_HOME, shared by all nodes. - Each macOS VM has its own Ed25519 keypair in its directory under
$BARN_HOME/mac.
Every SSH session Barn opens (barn ssh, barn exec, barn mac ssh, and the rest) runs OpenSSH with -F /dev/null, Barn’s key, and Barn’s own known_hosts. Your ~/.ssh/config, personal keys, and ~/.ssh/known_hosts play no part.
So that plain ssh meta or ssh mac1 also works, Barn adds one marked Include block to ~/.ssh/config pointing at a fragment it owns: ~/.ssh/barn_config for the Linux lab and ~/.ssh/barn-mac_config for Mac VMs. Each block is edited only by its owner. If ~/.ssh/config is a symlink or hard link, as with many dotfile managers, Barn leaves it untouched, writes the fragment, and prints the Include line for you to add. A Host you already defined with a Mac VM’s name keeps your definition; Barn publishes that VM by IP address only.
Whole-deployment destroy and purge remove the Linux integration. To remove either one yourself:
Guest accounts and host keys
Every guest accepts SSH public keys only: password authentication and root login are disabled, and the admin account has passwordless sudo.
- Linux: the login account defaults to
dbaand can be set withnode_admin_username. Its password is locked. Barn also installs the deployment private key on the control node (admin_ip) so Ansible and Pigsty playbooks can reach every peer. Anyone with a shell on the control node can therefore administer the whole lab. - macOS: each VM also gets a random login password for the lock screen and GUI administrator prompts, kept in a mode
0600passwordfile next to the VM’s SSH key;barn mac passwordshows it. It stays out of Keychain because the key beside it already grantssudo, so Keychain would add signing and lock-state failures without protecting anything more (design note).
Each connection path pins host keys differently:
| Connection | Host-key policy |
|---|---|
Host → Linux guest (barn ssh, ~/.ssh/barn_config) | StrictHostKeyChecking accept-new against Barn’s private known_hosts, keyed by the VM’s UUID. The first connection pins the key and a later mismatch is rejected. recreate gives the VM a new UUID, so a rebuilt node never hits a stale entry |
| Linux control node → lab peers | StrictHostKeyChecking no and UserKnownHostsFile /dev/null for Barn-managed peer aliases, so playbooks keep working after nodes are recreated |
Host → macOS guest (barn mac, ~/.ssh/barn-mac_config) | StrictHostKeyChecking yes against the VM’s own known_hosts, keyed by barn-mac-<instance_id>, with agent forwarding off. The first key is accepted only over the runner’s private network, with the runner’s identity checked before and after the connection, and is then pinned |
What a guest can reach on your host
| Channel | Linux guest | macOS guest |
|---|---|---|
| Host directories | vm_shares entries over Virtio-9p, read-only unless readonly: false (shares) | --share entries over VirtioFS, writable unless suffixed :ro (shared folders) |
| Clipboard | None; Linux guests run headless | Plain text up to 1 MiB each way, while the VM window has focus; on by default (clipboard) |
A writable share lets guest processes change the host directory directly, and those changes outlive the VM. Share a dedicated project folder, and use read-only shares when the guest only needs to read. The clipboard never sends items that password managers mark as concealed or transient, and it never carries images or files. Turn it off for a VM with barn mac configure <name> --clipboard off (from its next start), or for the current session with Machine → Share Clipboard.
Each Linux node’s management SSH port is forwarded on host 127.0.0.1 only. Data disks hold test data: during recovery Barn may reformat a corrupted filesystem, persistent disks included, so keep anything valuable on the host (when Barn resets a data disk).
Verify releases and images
Each object Barn downloads has its own check:
| Object | Verification |
|---|---|
| Release assets | The installer checks the archive against checksums.txt. Verify the detached ML-DSA-87 signature checksums.txt.sig with the official release key to authenticate the checksum list. |
| Apple Silicon binaries | The release CLI, helper, and Barn.app carry Developer ID signatures and Apple notarization, and the app has a stapled ticket. Local native builds use ad-hoc signing by default |
| Image catalog | Official and plain HTTP repositories require a signature from a key embedded in barn. The highest accepted revision is tracked per repository. An intentional rollback requires barn image sync --allow-downgrade |
| Image files | Downloads must match the catalog’s byte size, SHA-256, and virtual size. Local imports compute the file’s digest and compare it with --sha256 when supplied. Both paths validate the standalone qcow2 format |
To check downloaded release assets yourself, run this in the download directory:
Because the signed catalog pins every image by digest, a mirror cannot substitute an image, and the revision check stops it from replaying an older catalog. The official repositories, https://repo.pigsty.io/barn and https://repo.pigsty.cc/barn, always require a valid signature, even when named with --repo. A custom HTTPS or local repository may serve an unsigned catalog, but only when you select it with --repo or BARN_REPO, so add only sources you trust (Linux Images).
The draft records signed:false. The release owner signs the final checksum manifest, which covers release.json with signed:true. Verify the signature · Release gates
Report a vulnerability
Report vulnerabilities privately through GitHub private vulnerability reporting or by email to [email protected], not in a public issue. Include barn --json version, your host OS and architecture, and the smallest reproduction you have, with private keys and passwords removed. You should get an acknowledgement within five working days.
Security fixes ship in the latest 1.x patch release. Only the latest 1.x release is supported; 0.x releases receive no further fixes. The full policy is in SECURITY.md; ordinary bugs go to GitHub Issues.
4 - Contributing
Start here to change Barn: find the code, run the checks a pull request must pass, and edit these docs. The last two sections are for maintainers cutting a release or refreshing the image catalog. Barn is Apache-2.0; for a large change, open an issue first to agree on the design.
Choose a repository
| What you want to change | Where to work |
|---|---|
CLI behavior, VM lifecycle, native macOS component (Barn.app), installer, and packages | pgsty/barn |
| Documentation site, guides, command reference, and translations | pgsty/barn.pgsty.com |
| Official Linux image definitions or offline normalization rules | packaging/image-repository/ and packaging/image-pipeline/ in pgsty/barn |
A useful bug report has barn version, the host OS and architecture, the exact command, and the error output with private keys and passwords removed. Report security problems privately. Coding style, error-message rules, and commit conventions are in CONTRIBUTING.md.
Keep the product model
Barn keeps a deliberately small product model, and changes should preserve it:
- One Linux deployment per
BARN_HOME: no projects, leases, or workspaces (scope, rationale). - One inventory format: a Pigsty-compatible Ansible inventory; an unknown
vm_*key is an error. - Absence never destroys: removing a host from the inventory does not delete its VM; destruction is always an explicit command.
- One privileged path: root work goes through
barn-hosts-helperor the reviewed network plan, nowhere else. barn macstays separate: it never reads the Linux inventory and runs entirely as the invoking user.
Find the implementation
| Subsystem | Source paths |
|---|---|
| CLI commands, flags, JSON/YAML output, and error rendering | cmd/barn/, internal/failure/ |
| Inventory parsing, defaults, and resolved node specs | internal/config/, internal/spec/ |
| Linux lifecycle: convergence, journals, disks, and SSH readiness | internal/linuxvm/ (internal/private/ in v1.3.0 and earlier), internal/vm/, internal/cloudinit/, internal/state/ |
| Host platform and QEMU arguments | internal/platform/, internal/qemu/ |
Host preparation, networking, process identity, and /etc/hosts | internal/setup/, internal/network/, internal/process/, internal/hostconfig/, cmd/barn-hosts-helper/ |
Deployment SSH keys and the ~/.ssh/config integration | internal/sshkeys/, internal/sshconfig/ |
| Guest clock checks and scheduled sync | internal/timesync/, internal/timejob/ |
Image catalog trust, qcow2 verification, and catalog tools | internal/image/, tools/catalogcheck/, tools/catalogexport/, tools/catalogsign/ |
| Native macOS VMs and the desktop app | internal/macvm/, native/mac-runner/ |
| Packaging, image pipeline, CI workflows, and integration tests | packaging/, .github/workflows/, tests/ |
Read each package’s tests alongside the code: they pin down which failures Barn recovers from automatically and which ones must stop safely.
Build and test
Install Go 1.27.4 and the linters pinned in packaging/toolchain.env; CI asserts these exact versions:
Put GOBIN (or $(go env GOPATH)/bin) on your PATH. make check also needs Python 3, jq, and a C compiler for the race detector.
| Target | What it does | Run it |
|---|---|---|
make build | Builds bin/barn and its matching bin/barn-hosts-helper for this host | While iterating (details) |
make test | go test ./... | While iterating |
make race | go test -race ./... | For concurrency changes |
make check | Everything CI runs (below) | Before every pull request; it must pass |
make mac-native-test | C and Swift tests for the native runner; needs Apple Silicon, macOS 27+, and Xcode 27+ | For native Mac changes |
make release-snapshot | Builds and verifies a complete snapshot release without uploading anything | For changes under tools/, packaging/, .goreleaser.yaml, or the Makefile |
make check runs module verification (go mod verify, go mod tidy -diff), shell syntax checks, the maintenance-ownership check, unit and race tests, go vet, Staticcheck, the four-target deadcode intersection, errcheck through golangci-lint, govulncheck, cross-compilation for darwin/arm64, darwin/amd64, linux/amd64, and linux/arm64, the image-pipeline and installer tests (including tests/mac-release-test.py), and the dependency-license check. The maintenance check fails when a new file under tools/ or packaging/ is not referenced by a Make target, a workflow, or CONTRIBUTING.md.
Changes to virtualization, networking, or disk behavior also need a live run on the target host (Linux KVM, macOS HVF, or Virtualization.framework for barn mac); name the host in the pull request.
Packaging changes also run the packaging workflow. To reproduce it locally, install GoReleaser, nFPM, and Syft at the versions in packaging/toolchain.env, then run:
release-snapshot first runs make release-check (toolchain versions and goreleaser check), then builds and verifies archives, .deb/.rpm packages, SBOMs, and checksums. SNAPSHOT_DIST (default .goreleaser-snapshot) must name one new directory directly under the repository root. To include the native Mac payload, see Mac Release.
Edit the documentation
The site is Hugo with the OINK theme, in pgsty/barn.pgsty.com; the source repository keeps no docs/ directory.
| Content | Location |
|---|---|
| Task guides | versions/manuals/1.5/docs/start/ for 1.5-specific changes |
| Command and configuration reference | versions/manuals/1.5/docs/reference/ for 1.5-specific changes |
| Project pages (this section) | versions/manuals/1.5/docs/about/ for 1.5-specific changes |
| Design decisions and research, with date and implementation status | content/blog/design/ |
| Release notes | content/release/ |
Every page is an English/Chinese pair, page.md and page.zh.md, with the same front matter routing fields and the same explicit {#id} on every heading, which OINK’s Duo View uses to align the two languages. Follow STYLE_GUIDE.md. Check CLI examples against barn <command> --help, and inventory examples with barn validate and barn plan under a temporary BARN_HOME.
Validate the site before committing:
The check verifies Go modules and builds both editions with the pinned OINK theme. It checks internal links, anchors, assets and search indexes before replacing public/. Use make dev to live-edit the 1.5 manual with a sibling ../oink checkout, or make preview to browse both editions with the pinned theme.
Release outputs and gates
Each release publishes:
.tar.gzarchives fordarwinandlinuxonamd64andarm64, each withbin/barn,bin/barn-hosts-helper, andlicenses/. Since 0.9.2 the Darwin arm64 archive also carriesbin/Barn.app, with the CLI, helper, and app signed with Developer ID and notarized.- Linux
.deband.rpmpackages that install/usr/bin/barnand/opt/barn/libexec/barn-hosts-helper. checksums.txt, its detachedchecksums.txt.sig,release.json, SPDX SBOMs, the Homebrew formula, and the installer.
Stable versions from 1.0.0 on become GitHub’s latest release. Versions below 1.0.0 and versions with a prerelease suffix are GitHub pre-releases, and the installer needs an explicit BARN_VERSION for them.
Cut a release in this order:
- Move the
Unreleasedentries inCHANGELOG.mdinto a dated section, update the README installation links, and add an English release note without a top-level heading at.github/releases/<version>.md. - Pass the catalog gate with
make catalog-check, synchronizing the embedded catalog first if it changed (below). - Require source CI to pass on the release commit, and a packaging snapshot to pass on the latest packaging changes.
- Build the assets from the tag: push
v<version>to run the tag workflow, which needs all six Apple signing secrets, or use the local release path. Both verify archives, packages, SBOMs, checksums, and CLI/helper pairing before creating a draft release. - Run live Linux VM acceptance, plus Mac acceptance when shipping
Barn.app. - Sign the draft checksum manifest, upload the final metadata and signature, and run
make release-publish RELEASE_TAG=v<version>. Update Homebrew and the bilingual site after publication. Signing procedure - Verify anonymous downloads, the installer, and the Homebrew upgrade against the published bytes.
Maintain the image catalog
The catalog embedded in barn and the one published on the mirrors must be byte-identical at every revision; Barn rejects two different catalogs with the same revision as signed equivocation. Never republish a revision with different bytes.
Build and normalize candidate qcow2 images with the Image Pipeline (packaging/image-pipeline/build-official.py --list shows the ten-image matrix). The pipeline produces an unsigned candidate repository for barn repo build and barn repo verify; it never edits repo.yaml, signs, or publishes, so promotion stays a separate step. Promote an image only after native startup and SSH checks on each changed architecture.
Sign the same catalog.json bytes twice. Barn 1.5.0 verifies the ML-DSA-87 .sig sidecar. Barn 1.4.0 verifies .minisig with the existing Minisign key. Maintainer commands and key fingerprints
When the published catalog changes, bring the source in line before the next release:
Verify the new signed catalog, then copy it to
internal/image/default-catalog.json.Update
EmbeddedManifestVersionininternal/image/catalog.goand the embedded catalog date ininternal/image/manifest.go; updatepackaging/image-repository/repo.yamlif the repository sources changed.Run the catalog tests (
go test ./internal/image/...), andbarn updatewith a fresh temporaryBARN_HOMEto confirm the remote catalog verifies and activates.Run the online gate:
make catalog-checkactivates each official mirror’s signed catalog in a fresh temporary data root, requires exact byte agreement with the embedded catalog, and checks every stable artifact’s availability and size.-verify-bytesalso downloads and hashes every stable image (several GB, nothing kept). Formal native builds and both release paths runcatalog-checkautomatically; never bypass it to ship references to removed images.
Client-side verification and the repository format are in Linux Images.
5 - Shipping the Mac Component
Only maintainers cutting a Barn release need this page: it builds, signs, notarizes, and verifies the native macOS payload (the CLI, barn-hosts-helper, and Barn.app) inside barn_VERSION_darwin_arm64.tar.gz. To build Barn.app for your own use, see Build from Source; for the overall release order, see release gates.
Payload and signing order
packaging/mac-release.py build produces the payload: MACOS.md, MACOS.json, bin/barn, bin/barn-hosts-helper, and bin/Barn.app. MACOS.json records the version, source commit, file modes, digests, and signing state; the version and commit must match the GoReleaser archives the payload joins.
The app’s bundle identifier is com.pgsty.barn and its executable is barn-mac-runner. The CLI checks the runner’s versioned protocol and still recognizes the v0.9.0 bundle, Barn Mac.app (io.pgsty.barn.mac-runner). Replacing the app keeps VM state under $BARN_HOME/mac.
Because the CLI embeds the helper’s SHA-256, the payload builder signs in this order and the archive verifiers reject any other result:
- Build and sign
barn-hosts-helper. - Build
barnwith the signed helper’s SHA-256 embedded, then sign the CLI. - Sign
Barn.appwith hardened runtime and a secure timestamp. - Submit the CLI, helper, and app to Apple together for notarization. After acceptance, staple the app, validate its ticket, and check Gatekeeper.
- Export the payload, extract it again, and recheck the signatures and the stapled ticket.
- During release assembly, replace the CLI and helper in the Darwin arm64 archive with these exact signed bytes, and regenerate its SPDX document and the checksums.
Signing the helper again after the CLI is built changes its digest and breaks the pair.
Build a formal release locally
Use this path when the tag workflow has no signing secrets, or to produce release assets on a maintainer’s Mac.
Prepare the Mac. You need Apple Silicon with macOS 27+ and Xcode 27+, the toolchain pinned in
packaging/toolchain.env, andgoreleaser,syft,rpm,ruby,bsdtar,jq, andpython3onPATH. Find your Developer ID Application identity withsecurity find-identity -v -p codesigning, and store a notarization profile withxcrun notarytool store-credentials. Keep certificate private keys and passwords outside the repository.Check out the release tag.
release-localrequiresHEADat tagv<version>, a clean working tree and index with no untracked files, and anoriginremote.Synchronize the catalog if it changed. The formal payload build and
release-localboth runmake catalog-checkfirst and stop on any mismatch; see Maintain the image catalog.Build the signed payload and assemble the release into a new directory outside the source tree:
Variable Effect BARN_CODESIGN_IDENTITYDeveloper ID identity used to sign the helper, CLI, and app; unset means ad-hoc signing BARN_NOTARY_PROFILEStored notarytoolprofile; the payload is submitted to Apple for notarizationBARN_MAC_REQUIRE_NOTARIZATION=1Fails the build unless it is Developer ID signed and notarized; mac-release.py buildalso runs the catalog gate firstCheck the output.
release-localaccepts only a Developer ID signed, notarized payload built from the same commit, so a snapshot oruncommittedpayload fails here. It verifies archives, packages, SBOMs, checksums, and CLI/helper pairing, and writes the assets to$RELEASE_DIR/assets. Continue with acceptance.
Test packaging with a snapshot
In a checkout based on a stable release tag, use the same version helper as CI to select the next patch snapshot (for example, 1.4.1-next after v1.4.0). The packaging check compares the native payload’s version and commit. A dirty checkout uses uncommitted as the commit identifier.
Snapshots accept ad-hoc signatures; only formal release verification requires a notarized Developer ID payload.
Configure automated signing
The tag workflow uses these six repository secrets:
| Secret | Value |
|---|---|
MAC_CERTIFICATE_BASE64 | Base64-encoded Developer ID Application .p12, including the private key |
MAC_CERTIFICATE_PASSWORD | Password protecting the .p12 |
MAC_CODESIGN_IDENTITY | Imported identity name or certificate fingerprint |
MAC_NOTARY_KEY_BASE64 | Base64-encoded App Store Connect API .p8 key |
MAC_NOTARY_KEY_ID | API key identifier |
MAC_NOTARY_ISSUER | API issuer identifier |
| Secrets configured | Tag workflow behavior |
|---|---|
| None | Skips automatic release creation; use the local path |
| Some | Fails immediately |
| All six | Builds, signs, and notarizes the payload; any failure blocks release assembly |
The Mac workflow imports the signing material into an ephemeral runner keychain and removes it when the job ends; pull requests and snapshots use ad-hoc builds. The release workflow creates the draft release only after verifying the assembled payload.
Verify installation and publish
Run the gates:
make check,make mac-native-test, and a full snapshot with the native payload.Test installation in an isolated directory: first install, repeat install, and upgrade.
Run live acceptance on a supported physical Mac with the packaged app. Check startup, SSH, the desktop window, and normal shutdown; replacing the app must keep instance IDs, machine IDs, SSH keys, and host pins. The harness automates this:
Option Meaning --barnAbsolute path to the packaged barn--homeDedicated, disposable BARN_HOME;mac1is recreated and destroyed--outputNew or empty evidence directory, separate from --home--allow-test-rootRequired the first time; marks --homeas a destructive test root--planPrint the phases without running Barn or touching files --guiAdd desktop and clipboard checks --allow-downloadLet updownload macOS from Apple (about 26 GB) when no base is preparedA failed run keeps the VM state and the evidence. When testing SSH integration, isolate the process’s home directory as well as
BARN_HOME, because the managed~/.ssh/configentries live outside the VM state root.Sign and publish the draft. Stage the verified assets in the tag workflow or local draft. Sign the checksum manifest and upload
release.json,checksums.txtandchecksums.txt.sigtogether.make release-publish RELEASE_TAG=v<version>verifies the staged inventory and digests before publication. Signing stepsUpdate Homebrew. Release assembly generates
barn.rbfrompackaging/homebrew/barn.rb.tmpl, which installsbarnintobinand the helper and app intolibexec; keep its install and test logic aligned with the tap. Once the assets are public, update all four platform URLs and checksums. Versions with a suffix keep an explicitversionline, because Homebrew may otherwise infer64from the architecture suffix; plain versions omit it.Verify the public release. Install from the public archives, the installer, and a Homebrew upgrade against the released bytes, and record signing, notarization, VM acceptance, and public installation results separately in Validation History.
6 - Validation History
This page collects documentation, source, packaging, VM, and public-installation checks through 2026-12-02. Each entry identifies the source build or release tested. For current host support and release behavior, see Platforms and Limits and the release notes.
Documentation and release archive
The English and Chinese command references were compared with --help from CLIs built at tags v1.1.0 through v1.4.0. For 1.4.0, the tables cover all 63 operational commands and 181 visible command-specific options, counted per command. Isolated data directories were used to validate and plan the inventory examples, check image architecture selection, and build and verify the sample image repositories. 1.4.0 source · Command reference
The embedded catalogs were checked at all 17 version tags. The archive uses the original tag dates for Farrow 0.1.0–0.8.0 and GitHub publication dates from Barn 0.9.0 onward, all in UTC+8. For the nine GitHub Releases from 0.9.0 through 1.4.0, release.json identified the tagged commit and release channel. All 19 hashes in each checksums.txt and the hash of the checksum file itself matched the SHA-256 digests published by GitHub. Release archive · Public releases
Four official macOS arm64 archives were downloaded and checked against their published SHA-256 hashes. The 0.9.0 and 0.9.1 archives contained the CLI and helper. Both 0.9.2 and 1.4.0 also included Barn.app. In those two releases, codesign --verify --strict passed for the CLI, helper, and app, and xcrun stapler validate verified the app’s notarization ticket. 0.9.2 release · 1.4.0 release
On both official mirrors, make catalog-check verified the signature of revision 2026112601, activated it in a fresh data directory, compared it byte for byte with the 1.4.0 embedded catalog, and checked the availability and size of all 17 stable images. Catalog checker at the release tag
Barn 1.4.0 public release
The annotated tag v1.4.0 points to 9382a996cf56b9c486bdb210a1b8dd00ecda2b6d. This commit passed the macOS and Linux source checks and the full packaging snapshot. Apple accepted notarization submission 57772859-4d6a-4059-9d95-f8cd33a2f7ba. In the final Apple Silicon archive, the CLI, hosts helper and app passed signature verification. The app’s stapled ticket validated, and Gatekeeper reported Notarized Developer ID. Source CI · Packaging CI · Tag workflow
Both official image repositories served revision 2026112601, signed by key B848292042883667. Each activated in a fresh data directory and matched the embedded catalog byte for byte. The release check verified all 17 stable artifact sizes on each mirror. The LAN mirror also passed the SHA-256 check for all 31 images and both network-helper archives. Image catalog and guest checks · Pre-release fixes and verification
GitHub published release 460427007 as the latest stable version at 2026-11-27T10:08:20Z. All 20 draft attachments and all 20 anonymous public downloads matched the locally assembled files in size and SHA-256. The 19 entries in checksums.txt verified, and the public latest redirect selected v1.4.0. Release and downloads
On Apple Silicon and Linux amd64, the public latest installer passed a fresh installation, upgrade from 1.3.0, and repeated installation. Both upgrades retained the test data marker and the runnable 1.3.0 executable. The new executables reported the tagged commit. The Apple Silicon app booted macOS 27.2.1 from the final archive. With the native window open, the runner reported a visible desktop and a ready guest. SSH returned build 26B131. The isolated guest was destroyed and its base was preserved. Installation guide
On Linux amd64, the CLI extracted from the release DEB previewed and downloaded Debian 13.8 (d13@20261123.2671.1). A separate SHA-256 calculation over the cached file matched the signed catalog. A second preview with --prune reported the cached image as unchanged. The Intel Mac and Linux arm64 release archives passed build and package verification. Image update command
In an isolated Apple Silicon Homebrew prefix, brew upgrade pgsty/infra/barn upgraded 1.3.0 to 1.4.0. The installed CLI reported the tagged commit and passed brew test, including the CLI, helper and app signature checks. All four archive digests in the published formula matched the public release files. Homebrew formula update
The Barn formula passed brew style and brew audit --strict --online. The first tap CI run flagged two single-use methods in the shared updater. The fix reads each platform’s URL and digest block once. The updater passed 168 assertions, and a before-and-after render of 32 formulae produced identical results for all 128 platform entries. Tap CI passed on Linux, Intel macOS and Apple Silicon. Updater fix · Three-platform tap CI
Barn 1.3.0 public release
The annotated tag v1.3.0 points to ef58e770e43e7d80e060c077bb80cf1943c6bf6b. Before tagging, this commit passed source and native Mac CI and packaging CI, including the full GoReleaser snapshot. The repository keeps its Apple signing credentials on the release Mac, so the tag workflow skipped remote assembly. Apple accepted the local build as described in local release verification.
GitHub marked release 454853556 as the latest stable version at 2026-11-23T00:21:05Z. For each of the 20 attachments, the authenticated draft download and the anonymous public download matched the local file in size and SHA-256. All 19 entries in checksums.txt verified. The public releases/latest link resolved to v1.3.0. Barn 1.3.0 release and downloads
The public latest installer completed fresh installations on Apple Silicon and Linux amd64. On each host a GitHub connection timeout or disconnect interrupted the first attempt to upgrade from 1.2.0. After retrying the public download, both installations reported 1.3.0 at ef58e77, retained a runnable 1.2.0 CLI and the test data marker, and activated signed catalog 2026112101 from the LAN mirror. The upgraded Mac app passed stapler validate and Gatekeeper reported Notarized Developer ID. Installation and platform downloads
Homebrew upgraded an existing Apple Silicon installation from 1.2.0 to 1.3.0. The installed CLI reported the tagged commit and passed brew test, including signature checks for the CLI, hosts helper, and Barn.app. The formula passed brew style and brew audit --strict --online. Each of its four archive URLs served the size and digest recorded for the release. Homebrew formula update
The first tap CI run flagged Ruby expressions in the shared updater and its tests. After the style fix, the updater passed 168 assertions and produced the same 128 asset names across 32 formulae and four platforms. Tap CI passed on Linux, Intel Mac, and Apple Silicon. Tap CI
Barn 1.3.0 local release verification
The release build at ef58e770e43e7d80e060c077bb80cf1943c6bf6b passed make check and make mac-native-test. make release-local produced four platform archives, four Linux packages, eight SPDX files, the installer, the Homebrew formula, release metadata, and checksums.txt. All 19 entries in the checksum file verified. Apple accepted notarization submission 8ced9387-3265-41ec-ac15-d515c3a7912f. The app extracted from the final Darwin arm64 archive passed stapler validate, and Gatekeeper reported Notarized Developer ID. Release source
On Apple Silicon the installer passed first installation, repeated installation, and upgrade from the published 1.2.0 archive using local copies of the assets. The upgrade retained the earlier executable and the data marker. The generated Homebrew formula installed the same archive in an isolated prefix and passed all 11 assertions. Both official mirrors and the LAN mirror activated signed catalog 2026112101 in fresh data roots. Its bytes matched the embedded catalog. All 29 image files on the LAN mirror matched their listed SHA-256 digests.
On a Linux amd64 KVM host, the packaged CLI booted el10x as Rocky Linux 10.3. The guest loaded the six kernel modules in the image recipe, created a bridge with a veth pair and an nftables NAT chain, and passed barn time status and barn time sync. Its data marker survived stop and start. The test deployment was then destroyed. Rocky image verification
On Apple Silicon, two macOS 27.2.1 guests covered all 15 headless lifecycle phases across the original run and a continuation with the same guest disks. SSH to the second guest timed out during its initial boot under load. After a normal restart, a temporary change from 2 vCPUs and 4 GiB to 4 vCPUs and 8 GiB, and time for the guest to settle, both original instance IDs, SSH identities, and disk markers were verified. The remaining checks covered shared folders, network isolation, normal stop/start, and identity rotation on recreate. A final test at 2 vCPUs and 4 GiB recovered the original marker, opened the native desktop, and verified build 26B131 over SSH with the window visible. One SSH command also exited 255 during that last startup before two consecutive reads of the original marker succeeded. Native Mac acceptance harness
Barn 1.3.0 pre-tag checks
The 1.3.0 candidate passed make check, make mac-native-test, and make release-snapshot on Apple Silicon. Both official mirrors served signed catalog 2026112101 with the same bytes as the candidate, and all 17 stable artifacts matched their signed sizes. A macOS regression test exercised the system plutil with an unset subnet address and a configured mask. Separate preview tests checked that a protected plist could be deferred for a free subnet and that a live overlap still blocked setup. Candidate source
The snapshot was built as 1.2.1-next from the preceding v1.2.0 tag and the candidate commit. Verification covered four platform archives, four Linux packages, eight SPDX documents, and 19 final checksums. The Darwin arm64 archive included the ad-hoc signed Barn.app. With downloads served from the local snapshot, the installer passed fresh installation, repeat installation, and upgrade from a copy of the published 1.2.0 installation. Formal signing, notarization, and public download checks belong to the tagged release. Mac release procedure
A follow-up pre-release audit extended protected sharing-preference deferral to macOS network repair (checking both keys as root before restarting socket_vmnet and preserving clean host-unchanged reporting), aligned explicit --arch native conflict handling across image info/pull and lifecycle commands, and updated golang.org/x/crypto to 0.59.0, golang.org/x/net to 0.63.0, and actions/setup-go to v7.1.0. The updated candidate passed make check (including zero-vulnerability govulncheck and the updated 11-module license check), make mac-native-test, make catalog-check, and fresh BARN_HOME barn update checks against both official mirrors; packaging snapshot and CI gates run after pushing main. Updated candidate source
Before tagging v1.3.0, 8a58fdf refreshed compression dependencies (github.com/klauspost/compress 1.20.5 and github.com/pierrec/lz4/v4 4.1.34) and pinned release tools (GoReleaser 2.20.3 / embedded nFPM 2.49.0, Syft 1.57.2, deadcode 0.53.0, and govulncheck 1.10.0), followed by a full pre-release audit aligning README.md, CHANGELOG.md, .github/releases/1.3.0.md, and the bilingual documentation site (62 operation commands and 176 local option entries). Re-verification passed make check, make mac-native-test, make release-check, make catalog-check, and fresh BARN_HOME barn update checks on both official mirrors; the public release record documents the tag, CI, signing, public downloads and Homebrew checks.
macOS 27.2.1 guest image
On an Apple Silicon host running macOS 27.2.1, Apple’s restore service offered build 26B131. The 25,595,954,706-byte IPSW matched Apple’s SHA-256 233e85a09887579d47d0b195e7db72be7f204261059c6946f719acf6b300814f. Restoring it to a 100 GiB base took 438 seconds. The source build selects this image on first use. Barn 1.2.0 also reused the new base with barn mac image update, while the existing stopped VM kept its original instance ID and 26A428 base. Mac image selection
In an isolated BARN_HOME, barn mac exec mac1 -- sw_vers on a freshly cloned guest returned macOS 27.2.1 and build 26B131. The first run exposed a case-sensitive check for SSH configuration keywords in the harness. OpenSSH 10.5p1 reported PasswordAuthentication no, KbdInteractiveAuthentication no, and PermitRootLogin no. After the parser accepted both keyword styles, two fresh guests passed all 15 headless lifecycle phases in 390 seconds, including SSH and sudo, shared folders, stop/start, and identity rotation on recreate. After both test VMs were removed, all 10 checks in barn mac doctor passed in the original store. Native Mac acceptance harness
Barn 1.2.0 final acceptance
| Item | Recorded identity |
|---|---|
| Tag and commit | v1.2.0 → 90f615804b823b4eb491101e642073dcd37a9700 |
| Build time | 2026-11-11T23:38:07Z; SOURCE_DATE_EPOCH=1794440287 |
| GitHub Release | ID 442314866; published 2026-11-12T00:05:32Z as stable/latest |
| Apple notarization | Accepted submission 165b486b-5055-4eca-a595-54bed6bdd6c1 |
| Signed catalog | Revision 2026110502; SHA-256 d41e46d20bc57cb1b071e3919a27a8f7f703df2addca879970a528e7ab004065 |
- CI and packaging: Source/Mac CI and complete packaging CI passed the release commit. The tag workflow passed its signing-configuration check and skipped remote assembly; the documented local signing path produced the formal release.
make release-local, signatures, notarization, staple, and Gatekeeper passed. - Final artifacts and catalog: All 20 draft and all 20 anonymous public downloads matched the verified local sizes and SHA-256 digests. Both official catalogs verified, activated in fresh roots, and matched the embedded bytes; each mirror’s 17 stable artifacts passed reachability/size checks. Selected runtime image downloads also verified their payload digests.
- Final runtime: The downloaded Linux archive passed 18 KVM operations covering ext4/XFS root growth, idempotence, shrink rejection, guest-tool failure, CLI interruption, identity/data retention, concurrency, and teardown. The downloaded native Mac bundle completed all 15 lifecycle phases plus desktop, two-way clipboard, close-window background execution, SSH, and normal shutdown. One Apple HTTPS timeout was preserved and retried successfully after identity/base checks; no product bytes changed.
- Public delivery: Public latest and pinned installers passed on
darwin/arm64andlinux/amd64. Isolated installer upgrade from 1.1.0 and repeated installation passed. The Homebrew update passed a real 1.1.0 → 1.2.0 upgrade,brew test, style, and strict online audit. The bilingual reference now documents 57 commands and 174 local option entries per language against 1.2.0.
Physical runtime coverage was darwin/arm64 and linux/amd64; darwin/amd64 and native linux/arm64 received cross-build and artifact checks. The historical 1.1.0 homepage recording is explicitly labelled. See the complete release review for candidate upgrade evidence, retained retries, and scope limits.
Barn 1.2.0 preparation
The 1.2.0 readiness review preserves the uncommitted candidate’s source, catalog, full snapshot, Linux/KVM and native Mac checks, followed by the completed commit, CI, signing, and publication gates.
Barn 1.1.0 final acceptance
| Item | Recorded identity |
|---|---|
| Tag and commit | v1.1.0 → b2cc8da8983e710255d504bf26bf5d7b3f182790 |
| Build time | 2026-11-09T01:28:55Z; SOURCE_DATE_EPOCH=1794187735 |
| GitHub Release | ID 438656123; published 2026-11-09T01:46:13Z as stable/latest |
| Signed catalog | Revision 2026110502; SHA-256 d41e46d20bc57cb1b071e3919a27a8f7f703df2addca879970a528e7ab004065 |
- Source and packaging: The release commit passed source/Mac CI and complete packaging CI before tagging. Local
make check,make mac-native-test, andmake release-snapshotalso passed. The tag workflow passed its signing-configuration check; the complete release used the documented local signing path because repository signing secrets were absent. - Downloaded assets: All 20 draft attachments were downloaded again and matched the local sizes and SHA-256 digests. The 19-entry checksum manifest, archive/package parity, four binary architectures, file permissions, helper pairing, and SPDX documents passed verification. Apple accepted notarization submission
cabe1b9c-fc54-4f07-b8bf-d834f0226013; the downloaded app passed signature, staple, and Gatekeeper checks. The relocated Homebrewbin/libexeclayout found the matching native component. - Catalog: Both official catalogs passed signature verification, activation in fresh data roots, and byte comparison against the embedded catalog; all 17 stable artifacts passed HTTP availability and size checks on both mirrors. The final downloaded binary also activated the official catalog in a fresh
BARN_HOME. - Linux runtime: The downloaded
linux/amd64binary created a Debian 13 guest using-I d13 -A x86_64without rewriting its inventory. CPU/memory changes2/2 GiB → 3/3 GiB → 2/2 GiB, stop/start, remote arguments, and exit17passed. VM UUID, SSH public key, machine ID, and the persistent-disk sentinel survived resizing and restart. A second Debian 13 guest booted asarm64through-A aarch64, using QEMU TCG withcortex-a72; SSH reportedaarch64. Both test guests were removed after verification. - Mac runtime: A new isolated macOS 27 guest passed creation, SSH, remote exit
17, stop/start, identity and data retention, and destruction. Existing user SSH files were unchanged and the user’s running Mac VM was left in place. The signed public installer and repeated installation also passed in a separate directory. - Public delivery: Anonymous downloads of all 20 public attachments matched the verified draft. Both the default installer and explicit
BARN_VERSION=1.1.0installed the published release. The Homebrew update sets all four archive URLs and digests. The initial Ubuntu 26.04 recording verified public installation and a first Linux VM on a prepared host network; the homepage recording now shows a real Apple Silicon macOS run (brew install pgsty/infra/barn,./configure -c full, a four-nodebarn up, andbarn statuson macOS 27.0.1 with QEMU 11.1.3). A subsequent 16-stage in-place upgrade and multi-distro acceptance run on Apple Silicon is recorded in Barn 1.1.0 Local Acceptance.
Physical hosts covered darwin/arm64 and linux/amd64, with an additional linux/arm64 guest under TCG. darwin/amd64 and native linux/arm64 received cross-build and artifact checks. GUI and clipboard evidence retains its earlier dated scope. Initial harness retries corrected unsupported timeout flags, a test write requiring guest sudo, and a TCG assertion that did not accept the thread=multi option; their logs were retained alongside the successful runs.
Barn 1.0.0 final acceptance
The final acceptance record binds the downloaded artifacts and public installation checks to this release identity:
| Item | Recorded identity |
|---|---|
| Tag and commit | v1.0.0 → 69ef7f1d6ffc7c6fbffffe178b2fa48e799dc02d |
| Build time | 2026-11-04T17:54:45Z; SOURCE_DATE_EPOCH=1793814885 |
| GitHub Release | ID 434268111; published 2026-11-04T23:18:10Z as stable/latest |
| Signed catalog | Revision 2026110502; SHA-256 d41e46d20bc57cb1b071e3919a27a8f7f703df2addca879970a528e7ab004065 |
- Source and downloaded assets: The final commit passed source/Mac CI and packaging CI. The release used local Developer ID signing because automated signing secrets were absent. All 20 uploaded attachments were downloaded again, matched their original sizes and SHA-256 digests, and passed the 19-entry checksum manifest plus archive/package, CLI/helper, architecture, permission, SBOM, and identity checks.
- Catalog bytes: Both official catalogs verified and matched the embedded bytes. Streaming all 17 stable artifacts from each mirror produced 34 successful size/digest checks. A fresh
BARN_HOMEactivated the catalog withbarn update. - Packaged Mac acceptance: The downloaded CLI/helper/app passed Developer ID, notarization, staple, and Gatekeeper checks, including after installation and relocation into the Homebrew layout. An isolated
0.9.3 → 1.0.0installer upgrade retained the old release and existing VM identities, SSH keys, and data sentinels. A new VM passed SSH, write, stop/start, identity/data retention, and destruction checks. - Linux acceptance: On
linux/amd64, the downloaded binaries created two Debian 13 guests in a fresh state root. Fixed IPs, accounts, XFS data disks, stop/start/restart, argument boundaries, and remote exit17passed. Missing-node recreation failed before stopping VMs; control-node deletion elected a successor; destruction followed byuprotated machine identity while preserving a persistent-disk sentinel. - Public channels: After publication, both the default installer and explicit
BARN_VERSION=1.0.0installed the public release. Real Homebrew upgraded0.9.2 → 1.0.0and passedbrew test, online audit, and tap tests. The tap update and site update were published, and the public bilingual release and installation pages were checked.
Physical runtime coverage was darwin/arm64 and linux/amd64. darwin/amd64 and linux/arm64 received cross-build and artifact checks. GUI, clipboard, and fault-injection experiments from the preceding candidate run retain that earlier identity below.
Hardening and candidate rehearsals — 2026-11-04–05
The hardening checkpoint at 377061c passed source checks and a 0.9.4-next packaging snapshot without a native Mac payload. Subsequent physical-host tests began with 0.9.4-next; fixes received focused retests, followed by a signed and notarized 1.0.0-rc.1 build using catalog 2026102802. The candidate run covered disk-preservation checks, lock release after cancelled sudo work, shared-networkd uninstall, the 15-stage Mac lifecycle, GUI/clipboard, and interrupted-recreate recovery. Final release assembly later used catalog 2026110502 and the identity above.
The record retains failed attempts as well as successful reruns. A short SSH probe needed bounded retry; a resource-constrained build and a shared module-cache failure needed environment corrections; one acceptance assertion incorrectly required a stdout field when successful empty output could omit it. The dm-error experiment was rejected by the whole-disk guard before reaching the filesystem checker. These observations identify which product path actually ran and which failure belonged to the harness or environment.
Barn 0.9.1 local candidate acceptance
The 0.9.1 record reports make check, native component tests, four-platform packaging, and an ad-hoc native payload. The CLI candidate was 0.9.1-dev.1; the complete snapshot was 0.9.1-next. An isolated upgrade from a real 0.9.0 archive used a local download fixture and verified repeated installation, retained releases, helper pairing, and app discovery. Homebrew checks covered the bin/libexec layout; native tests and mac doctor did not start a VM. The public 0.9.1 assets contained CLI/helper archives and Linux packages, without Barn.app; the original record’s public-release checklist describes the subsequent process, not completed runtime evidence.
Pre-0.9.0 checkpoint
At the 2026-09-29 checkpoint, Barn 0.9.0 was the first release candidate prepared under the barn name prior to publication. For current installation commands, use the Quick Start.
Documentation baseline
| Component | Identity at the 2026-09-29 checkpoint | Scope notes |
|---|---|---|
| Application and docs | Barn 0.9.0 release candidate | Built from the renamed source tree prior to public tag release |
| CLI and configuration | barn, barn.yml, BARN_* | Clean break from earlier internal names |
| State and host resources | ~/.barn, Barn networking, and barn-hosts-helper | Uses fresh ~/.barn state without migrating pre-rename development directories |
| Image repository | /barn on the official endpoints | Requires valid minisign catalog signatures |
macOS guests
At the 2026-09-29 checkpoint, barn mac ran macOS 27 guests on Apple Silicon via Barn Mac.app (io.pgsty.barn.mac-runner; subsequently renamed to Barn.app / com.pgsty.barn in Barn 0.9.1) with state under $BARN_HOME/mac (see the current macOS Guests guide and Mac Commands reference).
Following the rename on 2026-09-29, local CLI and barn-hosts-helper unit suites, native bridge/image/exit-prompt/menu tests, the runner bundle build, ad-hoc code-signature verification, and probe checks all passed, building on the full 16-phase live macOS VM acceptance run recorded earlier that day.
The rename record explicitly limits the renamed build’s evidence to those checks: its VM lifecycle was not replayed. The 2026-10-03 archive correction retained the original dates, versions, commits, and test scope rather than attributing earlier VM runs to the renamed build.
Remaining pre-0.9.0 release checks
At the 2026-09-29 checkpoint, the remaining pre-publication gates for 0.9.0 were:
- Full source, archive, DEB/RPM, installer, and four-platform checks on the final tagged commit.
- Fresh host setup and Linux/macOS VM lifecycle and cleanup verification under the renamed binary and paths.
- macOS Developer ID signing, notarization, and release publication.
- Verification of the public GitHub repository, Homebrew tap, official
/barnimage endpoints, andbarn.pgsty.com.
Earlier Mac implementation records
- 2026-09-26–27: The initial implementation log records a full IPSW download and CLI restore, base-image immutability, dual-guest lifecycle tests, and installer rejection of a modified package. The final 12-stage run took
140.305 sstarting with already initialized guests. It used the retired fixed-slot/shared-network implementation and an ad-hoc development signature. - 2026-09-28: The complexity review retained identity, locking, and recovery safeguards while simplifying the implementation. Regression checks verified that readiness did not rewrite SSH material. An initial shutdown timeout coincided with high guest load; the full rerun passed without forced power-off or timeout changes. The record treats the load as an observation, not a proven cause.
Barn Mac native record
On 2026-09-29, the pre-rename development tree was validated on an Apple Silicon Mac running macOS 27.0 (26A428) using an ad-hoc signed development build and APFS clones of a base image prepared on 2026-09-26 from Apple’s pinned 27.0 restore image:
- Source and bundle checks: Full
make check, native Swift component tests, and the Mac bundle build with extracted-archive checksum, signature, andprobechecks passed. - Automated 16-phase live acceptance (244.9 s): Verified VM creation from the base image, named VM creation with a VirtioFS shared folder, independent machine identities,
sshdhardening, disk and per-VM subnet isolation, DNS, outbound HTTPS, exit-code propagation,execargument boundaries, bidirectional shared-folder writes, cleanstop/start,configure, enforcement of the two-VM running limit,recreateidentity rotation, desktop window display, two-way plain-text clipboard sync, idempotentup, anddestroy. - Manual timing and recovery checks: First boot from a prepared base image reached SSH readiness in
22 s; clean shutdown completed in6.5 s; subsequent starts reached SSH readiness in6–12 s; forced power-off completed in0.7 s. Also verified booting into macOS Recovery (--recovery), changing--subnetwhile preserving the pinned SSH host key, and connecting viassh mac1through installed~/.ssh/barn-mac_configentries.
Items deferred to subsequent release milestones at that checkpoint:
- Developer ID signing, Apple notarization, and public distribution of the app bundle.
- End-to-end IPSW download + base preparation via first-time
barn mac uporbarn mac image update. - Desktop menu Restart… and Shut Down… actions, additional Apple Silicon models, and host reboot persistence.
The same named-machine record includes a later 07ebfd4 candidate rerun: all 16 phases passed in 298.9 s after an initial five-second SSH probe failed and the guest answered on a later observation. Both runs reused an existing 26A428 base; fresh download and restore remained outside that checkpoint’s coverage.
Pre-rename Linux validation summary
| Host or artifact | Path | Last verified | Result |
|---|---|---|---|
Two Linux amd64 hosts (m0, m3) | KVM, 7 guest distributions per host | 2026-09-21 (0.8.0) | Clean initialization, first SSH, in-place candidate upgrade, repeated up, stop/start, disk identity, and Ansible inventory reads passed |
Two macOS arm64 hosts (m1, m5) | HVF, 7 guest distributions per host | 2026-09-21 (0.8.0) | Full 7-distro lifecycle checks plus 7-node ansible all -m ping passed |
Catalog 2026092001 | 9 families, 37 artifacts (September Debian/Ubuntu refresh) | 2026-09-21 | Embedded, local, LAN, and public catalog bytes matched (23e8dbf6...); 10 new image objects verified at both public endpoints and booted across the 4 hosts |
Ubuntu 26.04 amd64 | KVM, QEMU 10.2.1, Ubuntu 24.04 guest | 2026-09-16 (0.7.0 recovery) | Corrupt data-disk reset, failed probes, busy mounts, retained-disk recreation, share recovery, and idempotent up passed |
macOS arm64 | HVF, Ubuntu 24.04.4 guests | 2026-09-05 (0.6.0 lifecycle) | Create, scale-out, control-to-peer SSH, stop/start, reload, recreate, degraded status, and scale-in passed |
macOS 26.6.2 arm64 | HVF, QEMU 11.1, socket_vmnet | 2026-09-01 (v0.2.0) | Selected node create/SSH/stop/start, incremental cached create, full status, and full destroy passed |
macOS 26.6.2 arm64 | HVF, QEMU 11.1, socket_vmnet | 2026-08-27 | Single-node and additive four-node lifecycle passed |
Ubuntu 26.04 amd64 (mx) | KVM, QEMU 10.2.1, NetworkManager | 2026-09-01 (v0.2.0) | Audited a live four-node deployment and connected to its control guest |
Ubuntu 26.04 amd64 (mx) | KVM, QEMU 10.2.1, NetworkManager | 2026-08-27 | Host setup, single-node, additive four-node, and network uninstall passed |
macOS arm64 | HVF host, TCG rule for Rocky Linux 8.10 arm64 | 2026-08-28 | Boot, stop/start, and SSH readiness in 44.2 s passed |
Published Catalog 2026090501 | 9 families, 27 qcow2 artifacts | 2026-09-05 | Artifact verification, embedded/public byte equality, and signed barn update against both official endpoints passed |
Published Catalog 2026082903 | 9 families, 27 signed qcow2 artifacts | 2026-08-29 | Full 19 GiB SHA-256 sweep and clean-client d13:stable pull passed |
In the 0.8.0 four-host acceptance run, each host booted Rocky Linux 9.8 and 10.2, Debian 12.15 and 13.7, and Ubuntu 22.04.5, 24.04.5, and 26.04.1 (28 guest VMs total, all passing and cleaned up afterward). Both official endpoints served catalog 2026092001 with SHA-256 23e8dbf6c19bd192d56c6d71eb30901f17945b3487e427a43abe108463780306, verified via isolated barn update runs and HTTP HEAD content-length checks on the 10 new image objects.
Open test items at the earlier checkpoint
- Rocky/EL9 hosts with NetworkManager +
firewalld, and a freshsystemd-networkdhost replay. - Physical host reboot persistence across active deployments.
- Live hypervisor runs on
darwin/amd64andlinux/arm64hosts beyond cross-build and package verification. - End-to-end
el7VM lifecycle replay on nativelinux/amd64. - Full Pigsty
configure → barn up → install.ymlplaybook execution. - Fresh-host
setupand VM creation driven end-to-end from the public download installer, Homebrew formula, or published DEB/RPM packages.
Barn verification history
Farrow 0.8.0 — 2026-09-21
- Release CI and assets: Tag
v0.8.0(320a32afa8f6fca02592215aa0d5607ca4e852b2) passed source CI, the packaging snapshot workflow, and the release tag workflow, publishing 20 release assets (19 checksummed payloads). All 20 assets were downloaded anonymously, the 19 payloads matched the entries inchecksums.txt, and isolated user-prefix installs ondarwin/arm64andlinux/amd64verified0.8.0(320a32a). - Homebrew tap: Commit
9c34019updatedpgsty/infra/farrowto0.8.0across all four targets and passed localbrew fetch, audit, and tap CI. - Four-host 7-distro acceptance: Clean initialization was run at baseline commit
6d7870e26cb2f4082a00c188f746783fc027687eacross two Linuxamd64hosts (m0,m3, installed from the.debpackage) and two macOSarm64hosts (m1,m5, installed from the verified archive), booting the 7-distroproinventory from a local LAN repository. Runtime candidate1c054a027420b5410c6f6feb344e27e001ae1af1(adding the macOS Homebrew authentication-order fix) was then installed in place on all four hosts and verified across idempotentup(preserving running QEMU processes, VM UUIDs, and disk inodes), two rounds of guest SSH,stop/start,/datadisk mounts, Debian locale/XFS checks, control-to-peer SSH, and Ansible inventory reads (ansible all -m pingon both Macs). See the 0.8.0 Release Notes for per-host timings.
Farrow 0.7.0 release — 2026-09-17
- Release CI and assets: Commit
9c6d4896d93733d1cb60a7e5d8591e9a06659c9d(v0.7.0) passed source CI, the packaging snapshot workflow, and the release tag workflow. All 20 public release assets passed anonymous download and SHA-256 verification, public installer checks passed ondarwin/arm64andlinux/amd64, andpgsty/infra/farrowpassed localbrew upgradeandbrew test. - Ubuntu
amd64/KVM storage & bootstrap recovery: Tested corruptext4/XFSdata-disk resets (3.2 srecovery while keeping the QEMU process alive), persistent disk retention acrossrecreate, transient probe failures and busy mounts (preserving existing disk data and UUIDs), read-only 9p share fallback, and resuming a0.6.0VM whose initial egress probe had failed (3.3 srecovery, surfacing the expectedcontrol-sshwarning where0.6.0had already removed the staged control key; see the 0.7.0 Release Notes). Catalog2026090501remained unchanged.
Farrow 0.6.0 release — 2026-09-05
- Release CI and assets: Following lifecycle, UX, release-metadata, and CI fixture reviews, commit
057774e3a13477782a2ae07bd71127d03c0f1ae7(v0.6.0) passed Go1.27.1source CI, packaging checks (13d9d70), and the release tag workflow, producing 20 verified release assets. An isolateddarwin/arm64installation verified upgrading from0.5.0to0.6.0via the public installer, plusfarrow initandfarrow plan. - macOS
arm64/HVF lifecycle acceptance: Verified initial boot, scale-out without restarting the control node, control-to-peer SSH,stop/start,reload, selectiverecreate, scale-in, guest/etc/hostsrefresh, preflight rejection of invalidreloador conflicting partialrecreatebefore stopping existing VMs, degradedstatusreporting, and SSH exit code255passthrough. - Catalog
2026090501: Switched the default image tou24:stableand incorporated the Debian/Rocky updates from2026090302across all 27 verifiedqcow2artifacts on both official endpoints.
Farrow 0.5.0 release — 2026-09-03
Commit fc85b65ff6a24b0933b56ae1179be9ada2ba91b1 (v0.5.0) passed Go 1.27.1 source and GoReleaser packaging gates and published the 20-asset pre-release. 0.5.0 introduced confirmation-free whole-deployment farrow purge, set https://repo.pigsty.io/farrow as the global default repository with --mirror for https://repo.pigsty.cc/farrow, removed implicit upstream URL fallback during artifact downloads, and added packaging/image-pipeline/build-official.py for the eight digest-pinned Debian/Rocky targets.
Farrow 0.4.0 release — 2026-09-02
Passed make check and all release archive, DEB/RPM, SBOM, checksum, installer, and Homebrew formula gates. farrow up gained automatic interactive host setup when run on an unprepared terminal host, vm_disks[].fs defaulted to auto, readiness errors began surfacing the last guest error line, and CLI output formatting was unified across commands.
Farrow 0.3.0 release — 2026-09-02
Passed make check and all release packaging gates. Made catalog refreshes explicit via farrow update and farrow image sync, and added per-node failure stages and log inspection hints to guest readiness error messages.
Farrow 0.2.0 release — 2026-09-01
Commit 59d1b62aebb3d044a317e4006cc8a0bf56f4feaf (v0.2.0) passed source CI, packaging workflows, and local four-platform archive, DEB/RPM, and SPDX verification. Live darwin/arm64 HVF acceptance verified selective u24-1 create/SSH/stop/start, incremental cached el9-1 creation, whole-deployment status, and destroy with SSH config cleanup. On Ubuntu 26.04 amd64/KVM, the Linux binary audited a running four-node deployment and connected to its control guest.
Schema-3 Catalog closure — 2026-08-29
Catalog 2026082903 (9 families, 27 artifacts, SHA-256 571b1ff9c7d4d42355df3392ea62a339471c2d01d868669a7625fac8b93f245d, signed by key 4686B39A40F9B562) passed byte-for-byte equality checks between the embedded catalog and published endpoints, a full SHA-256 sweep across all 27 qcow2 artifacts (19 GiB), and a clean-client d13:stable (409.3 MiB) download and qemu-img check on darwin/arm64.
0.1.0 candidates — 2026-08-28 and 2026-08-29
Validated two targeted fixes prior to 0.2.0:
- Targeted QMP recovery: When QMP sockets were externally removed from two of four running nodes on
darwin/arm64, Barn restarted only the two affected nodes (13.7 sto readiness) while keeping the two healthy nodes’ boot IDs unchanged. - QEMU-free catalog inspection: Decoupled
farrow image listandmake checkfrom requiringqemu-imgonPATHwhen no local cachedqcow2files need inspection.
EL7/EL8 compatibility — 2026-08-28
Commit 7c666c7 restored el7 and el8 support with regression tests covering pre-recreate runtime preflight ordering and signed-catalog baseline migration. Catalog 2026082801 (9 families, 17 image artifacts, plus 2 socket_vmnet archives) passed full SHA-256 and signature checks, and an isolated darwin/arm64 run booted Rocky Linux 8.10 arm64 under the built-in TCG rule to SSH readiness in 44.2 s (verifying NetworkManager, fixed IP, dba UID/GID 88, and guest markers).
Native replay — 2026-08-27
Verified fixed-IP networking, SSH readiness, default CPU/memory/root/data disks, cloud-init, stop/start, cross-directory CLI invocations, control-node uptime preservation during scale-out, control-to-peer SSH, ignoring upper-layer Pigsty variables, and explicit-only node destruction across darwin/arm64 and linux/amd64 (mx). On Linux, also verified passwordless sudo automation, Debian qemu-bridge-helper group permissions, unprivileged bridge attachment, refusal to uninstall an active bridge with four attached tap interfaces, and clean network teardown after destroy.
7 - Barn 0.9.3 Changes
This page records the user-visible changes in Barn 0.9.3, tagged on October 31 and published on November 1, 2026 (UTC+8). The workflow changes began in source commit 27f17bb and were completed by the commits leading to the release. Check barn version when auditing another build.
See the Barn 0.9.3 release notes for the upgrade summary and the complete bilingual release note.
Resource changes and recovery
Edit vm_cpu or vm_mem and run barn resize [node...]. QEMU hot-plugs supported increases when the running VM has reserved capacity; decreases, older VMs, and unsupported backends use a stop/start fallback. The VM identity, disks, and SSH keys remain unchanged. resize refuses image, disk, network, share, creation, removal, and deployment-wide changes; use recreate, up, destroy, or a full selected operation as indicated by its next: field.
Linux and macOS lifecycle, persistent-disk, and replacement operations journal their transition state. If a process is interrupted or receives SIGINT or SIGTERM, the next lifecycle command can recover the operation; cancelled commands report the structured cancelled result. On macOS, barn mac up --no-wait returns when the VM process starts and may leave first-boot SSH and sudo provisioning running. Run barn mac up NAME again to wait for readiness.
Paths
barn init and setup work through directory symlinks. init -o ./lab/config/barn.yml also creates missing parent directories. Existing files still require --force, and writes never follow or replace an output-file symlink.
User-selected paths now accept normal development layouts:
| Input | Resolution |
|---|---|
BARN_HOME | Relative paths, ~/, and directory symlinks; may also be the working directory |
Inventory and provision --script | Symlinks to regular files; each file retains its 4 MiB limit |
Linux vm_shares.host | Relative to the inventory’s real file, or an absolute/~/ path; directory symlinks work |
Local image repository and image import | Relative paths, ~/, and symlink inputs |
catalogexport output | Relative paths and ~/, directory aliases, and automatic parent creation; target must be absent |
BARN_MAC_RUNNER and local socket_vmnet archive | Relative paths and ~/; archive inputs may be symlinks and still undergo digest verification |
CLI-relative paths, including a relative BARN_HOME, are interpreted from the current working directory. Use an absolute BARN_HOME to reach the same deployment from different directories. Barn still rejects / and the user’s home directory as data roots and checks the ownership and structure of its managed state. An owned ~/.ssh directory may be reached through a directory symlink; a linked ~/.ssh/config is still left for manual Include integration.
Shared folders and mount paths
Linux guests use QEMU Virtio-9p, now supported on macOS hosts as well as Linux hosts. QEMU and the guest kernel must support 9p. Native macOS guests use VirtioFS. In 0.9.3, both barn mac up and barn mac configure accept --share.
- Linux share sources use the invoking user’s actual filesystem permissions. A directory may belong to another user, overlap another source, or be writable by multiple guests. Coordinate concurrent writes as you would between host processes.
- Source paths support spaces, Unicode, and commas. Linux guest mount paths are normalized and escaped for shell commands and
fstab, including spaces, Unicode, and shell punctuation. - Mac share names support spaces and Unicode: valid UTF-8, 1–255 bytes, excluding
.,..,/, and ASCII control characters. Share sources may be directory symlinks. - The eight-share limit is removed. Backend device and host resource limits still apply. Linux sources must not overlap
BARN_HOME, and mount targets must not overlap each other, system directories, data-disk mounts, or the guest SSH directory.
See Storage and Access for Linux shares and Mac Commands for native macOS shares. Barn never changes host ownership to make a share writable.
Apply only the selected node changes
Explicit selections in plan, up, reload, and recreate preserve unselected peers’ applied definitions, even if those peers were edited or omitted in the current inventory. Uncreated, unselected nodes do not require image resolution. This allows a multi-node edit to be applied in batches:
The entire inventory must still parse correctly. Conflicts with applied addresses, aliases, control-node roles, or shared deployment settings are checked before stopping or deleting nodes. Omitting selectors evaluates the whole inventory; removing a YAML entry never deletes its VM. See Daily Operations.
Generated template image selection
barn init [template] --image <reference> writes an explicit vm_image under all.vars for every generated node. barn setup [template] --image <reference> uses the same behavior while preparing a generated template. References may be aliases, channels, or version selectors; the flag does not download an image. Existing inventories selected with -f or discovered automatically are never rewritten by this option.
Images and development limits
| Area | New behavior |
|---|---|
| Linux node count | No separate 20-node ceiling; nodes need distinct usable addresses in the deployment’s /24 and sufficient host resources |
| External inventory hosts | vm_skip: true entries may use hostnames or IPv6 keys; managed VMs still use IPv4, and at least one managed node is required |
| Linux capacity strings | Case-insensitive units; K/M/G/T and KiB/MiB/GiB/TiB are binary, while KB/MB/GB/TB remain decimal |
| Provisioning | --parallel accepts positive integers and uses at most the selected node count; --timeout accepts any positive duration, without the old four-worker or 24-hour ceilings |
| Image size | No 8 GiB artifact ceiling for local imports or catalog artifacts with declared sizes; downloads without a declared size retain the legacy 8 GiB bound |
| Image imports | Arbitrary source filenames; new cache entries use local/<sha256>.qcow2, so same-name files with different contents coexist and identical contents reuse the cache |
| Local aliases | No 256-alias ceiling; updates exceeding the 1 MiB registry metadata limit fail before writing. Reimporting an existing alias preserves its old cache path |
| Local repositories | Relative or linked roots and shared writable directories work; repo.yaml may be a symlink to a regular file |
| Mac logs | Any positive --lines count; requested lines are no longer silently clipped at 1 MiB or 10,000 lines |
| Fallback ports | Try preferred + n × 10000 through port 65535, rather than stopping after five candidates |
Provisioning still defaults to one worker and a one-hour deadline, with 1 MiB of captured stdout and stderr per node. These user-facing limits are separate from the internal VM startup scheduler. Image digests, declared sizes, qcow2 structure, retained-disk compatibility, and process identity are still verified. The contributor image pipeline retains its own recipe bounds.
8 - Barn 1.1.0 Local Acceptance
This run starts with the installed Barn 1.0.0, installs the public 1.1.0 Homebrew formula, checks upgrade and everyday workflows, then rebuilds the test environment. The script was written before execution. This run has ended: core checks passed, one recovery gap was found, and clipboard/privileged-host checks remain incomplete. The owner authorized deletion of existing local Barn VMs.
Environment and evidence
- Host: macOS 27.0.1, Apple Silicon, 18 logical CPUs, 128 GiB RAM; QEMU 11.1.3.
- Initial state: eight running Linux VMs and one running macOS VM named
mac1; the normal executable is/opt/homebrew/bin/barn. - Upgrade target: public tag
v1.1.0, commitb2cc8da8983e710255d504bf26bf5d7b3f182790. - Recordings, raw output, assertions, and executable scripts live in a separate acceptance directory outside Git. Each stage produces an asciicast v2 recording with original timing and a viewing copy with shortened waits.
- Linux checks use the actual user’s
~/.barn. Detailed native Mac checks reusetests/mac-live-acceptance.pywith a dedicated test root and an APFS clone of the prepared base; final checks cover the normal user path. - Terminal recordings capture output without keyboard input, passwords, or private SSH keys. Desktop checks use native application controls; the screenshot is in the acceptance chat. Clipboard status is recorded below.
Execution order
| Stage | Operations | Pass condition |
|---|---|---|
| U01 Upgrade baseline | Record the old version, node identities, public SSH fingerprints, and data sentinels; stop Linux and Mac VMs | Reviewable baseline; every target stops cleanly |
| U02 Local installation | brew upgrade pgsty/infra/barn; check version, helper, signatures, notarization, and brew test | Normal PATH resolves to public 1.1.0; CLI, helper, and App match |
| U03 Upgrade recovery | Start existing VMs and compare identities, data, and SSH; then remove old VMs | Upgrade preserves identities and data; explicit disposal succeeds |
| L01 First run | Run barn up from an empty directory; check generated inventory, confirmation, progress, and SSH | Default native Ubuntu 24.04 guest becomes ready |
| L02 Inventory and catalog | Four templates; valid/invalid YAML; -I/-A and aliases; both signed official repositories; metadata and cache | Valid input resolves consistently; failures have correct classification and exit codes; overrides leave inventory unchanged |
| L03 Two nodes and storage | Ubuntu/Debian pair; persistent ext4, temporary data, XFS, space/Unicode paths, read-only and writable 9p shares | Filesystem types, permissions, and bidirectional reads/writes match the inventory |
| L04 Network and access | Fixed IPs, control-node SSH to its peer, DNS/HTTPS, SSH config, exec argument boundaries and remote exit codes | Correct addresses, targets, output streams, and exits |
| L05 Lifecycle | Repeated up, selected stop/start/restart, CPU/memory increase/decrease, reload, selected recreation | Idempotent calls retain PIDs; resources change in the guest; peers and persistent data remain intact |
| L06 Failures and deletion | Omitted nodes, missing share paths, interrupted guest process recovery, provision success/failure/timeout, purge cancellation | No implicit deletion; actionable failures; retries recover; cancellation preserves state |
| L07 Retention | Recreate, selected and whole destroy, create again, purge | Root/temporary data resets; persistent data follows each command’s retention rules |
| L08 Image matrix | Eight supported arm64 image families and Debian amd64 under TCG | SSH, architecture, OS identity, and data disk work; el8 arm64 uses expected TCG |
| M01 Multiple Macs and identity | Automated two-VM checks, independent identities and disks, immutable shared base | Identities differ; cloning and lifecycle operations preserve the base |
| M02 Mac networks and shares | Separate subnets, host access, guest isolation, DNS/HTTPS, VirtioFS, remote arguments | Network and sharing behavior matches the reference |
| M03 Mac lifecycle | Stop/start, resource configuration, third-running-VM limit, recreate identity rotation, selected destruction | Identity retention/rotation matches the operation; the peer remains intact |
| M04 Desktop and clipboard | Open desktop, verify login, copy text both ways, close the window, check SSH | Usable desktop; exact text transfer; window closure keeps the VM running |
| F01 Final state | Remove dedicated test VMs; check normal installation, state, diagnostics, and SSH config; index recordings | No leftover test processes; every result has output or visual evidence |
Assertions and retries
Every command records arguments, exit status, duration, and raw output. Failed assertions preserve the environment. Script corrections create separate retry records; product defects are recorded independently. Failed footage remains available. Only viewing copies shorten waits.
The existing host network is checked and reused first. Operations requiring host sudo inspect actual authorization and the execution plan; unavailable checks are marked blocked. Apple OS image updates, physical Intel Macs, and Linux KVM are separate environment coverage.
Results and playback
This run ended at 11:08 on 2026-11-09 (Asia/Shanghai). The normal PATH resolves to public Barn 1.1.0. Upgrade recovery passed for the original eight Linux VMs and one Mac VM before their authorized deletion. All test VMs, the dedicated Mac data root, and the additional 120 GiB base were removed; the original default macOS base remains.
Stage results
| Area | Result and evidence |
|---|---|
| Homebrew installation and upgrade | Passed; matching CLI/native components, signatures, notarization, and brew test; existing VM identities and persistent-path data survived |
| CLI, inventory, and catalogs | Passed; first run, four templates, architecture aliases, invalid inputs, both signed official sources, local catalog build/verification/import/pruning |
| Linux pair and lifecycle | Passed; fixed IPs, control-node SSH, DNS/HTTPS, arguments/exits, ext4/XFS, read-only/writable 9p, resource changes, recreation, persistent disk reattachment |
| Failures and recovery | Missing shares, provision failure/timeout, cancelled purge, and process interruption after disk sync passed; immediate power-loss readiness issue below |
| Native Mac automated suite | All 15 phases passed; separate identities/disks/networks, unchanged base, resource settings, running-VM limit, recreation, selected destruction |
| Normal Mac data path | Passed; complete installation of a new 120 GiB base from the existing IPSW, read-only/writable VirtioFS, SSH Include, original default base retention, extra-cache pruning |
| Interactive terminals | Linux and Mac passed; real guest TTY allocation and interactive shell exit 17 propagated; all three Linux log sources parsed as JSON |
| Desktop | Logged-in Finder desktop visually confirmed; closing the window kept the same VM process and SSH available; bidirectional clipboard remains unverified |
| Source checks | make check and make mac-native-test passed on the release commit |
| Final state | Zero Linux or Mac VMs and no remaining test VM processes; barn doctor, barn mac doctor, and network status healthy |
Deleting the control node promotes a remaining node. After updating admin_ip in the inventory as instructed, creating the former node again reattached its retained disk and preserved the peer’s PID and data. With the old inventory requesting a control-role reversal, up correctly refused implicit recreation.
Image matrix
All nine configurations passed image acquisition, boot, SSH, OS/architecture checks, data writes, stop/start, and cleanup. -I/-A left the inventory file unchanged. EL7/arm64 returned usage / 2 because the catalog has no matching artifact. EL7/amd64 on this host returned capability / 3 without creating a deployment.
| Image | Guest architecture | Accelerator | Result |
|---|---|---|---|
u22@20261020.0.1 | arm64 | hvf | Passed |
u24@20261017.0.1 | arm64 | hvf | Passed |
u26@20261016.0.1 | arm64 | hvf | Passed |
d12@20261026.2643.1 | arm64 | hvf | Passed |
d13@20261103.2651.1 | arm64 | hvf | Passed |
el8@8.10.20240528.3 | arm64 | tcg,thread=multi | Passed |
el9@9.8.20260525.2 | arm64 | hvf | Passed |
el10@10.2.20260525.0 | arm64 | hvf | Passed |
d13@20261103.2651.1 | amd64 | tcg,thread=single | Passed |
Readiness marker after forced termination
Immediately after successful recreation of an Ubuntu 24.04 arm64/HVF node, its verified QEMU process was forcibly terminated. The next up booted the guest, but both /var/lib/barn/ready.json and error.json were absent. SSH and persistent data worked and cloud-init had finished; up timed out after 180 seconds with exit 5. This observed recovery gap is preserved in 03-linux-lifecycle-r3 and 03-power-loss-investigation.
The following recovery restored readiness while preserving the running VM PID, its peer, and persistent data:
In a second trial, the guest ran sudo sync before the process was terminated, again after checking its command line and QMP UUID. up recovered automatically. The immediate-interruption behavior was observed once under the stated conditions; persistence timing and other images need further investigation. Relevant 1.1.0 code is the readiness probe and guest-setup retry entry.
Checks not completed
- Bidirectional clipboard: native UI automation did not reliably inject the host system clipboard, and the browser tool has an isolated clipboard. Manual host input had not arrived when this run ended, so this remains unverified.
- Privileged host changes:
sudo -nrequired a password, including access to root-owned network planning state. Existing network reuse, privilege-error classification, and read-only hosts plans were checked; network reinstall/uninstall and/etc/hostswrites were not executed. - This host is Apple Silicon. Physical Intel Macs, Linux/KVM, and Apple OS image updates remain separate environment coverage.
Local evidence
Evidence lives at ~/barn-acceptance/1.1.0-20261109-101029/. Open player/index.html for offline playback of 23 asciicasts: approximately 58.9 minutes of original timing or 12.1 minutes in the viewing copies. Viewing copies change timestamps only; output bytes and SHA-256 are checked per recording. Terminal recordings do not contain desktop frames; the desktop screenshot is in the acceptance chat.
evidence/plan-before-execution.md and .zh.md preserve the original plan. Stage directories contain script snapshots, commands, exit codes, and raw output; findings.json records the recovery gap and incomplete checks. Initial footage and retries remain for script corrections involving Homebrew prompts, SSH aliases, create/recreate plan categories, control-role promotion, TCG parameters, and error classification. Full recordings stay local; this site contains the acceptance account.