Repository navigation
feat(vm): add the iso VmSource arm for unattended installs - #71
Merged
Merged
Conversation
Some distros ship ONLY an installer medium — no cloud image, no bootstrap tarball. Omarchy is the first charly targets: it publishes omarchy-<ver>.iso and nothing else. The five existing #VmSource arms cannot express that, so such a distro has no VM path at all. The `iso` arm boots the installer medium against an initially blank disk and lets the installer partition and install. The unattended ANSWERS live on the vm entity (#VmInstaller: username, disk, hostname, timezone, ssh keys, …); the answer-file FORMAT lives on the distro (#DistroInstaller), exactly as `init:` renders `service:`. archinstall JSON, kickstart, preseed, Subiquity autoinstall and AutoYaST are five real formats, each keyed by distro and by nothing else — so nothing infers a format from a URL or an ISO name. distro is CUE-required on this arm, following `bootstrap` rather than `cloud_image`: the answer-file format lives on the distro, so an absent value is a hard nil at render time with no plausible default to fall back to. Verified end to end before the schema was written: the real omarchy-4.0.1.iso installed unattended under QEMU/OVMF from a rendered cidata seed, rebooted itself, and was reachable over SSH using only the seeded key. Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3
Review — PASSHead SHA: Security screen: PASS — no embedded directives, no scope mismatch (5 files all accounted for in the body), no secrets/exfiltration, no weakened guardrails, no supply-chain changes. Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
This was referenced Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a sixth
#VmSourcearm,iso, so charly can install a distro that ships only aninstaller medium — no cloud image, no bootstrap tarball. Omarchy is the first such
target: it publishes
omarchy-<ver>.isoand nothing else, so today it has no VM path atall.
The arm boots the installer against an initially blank disk and lets the installer
partition and install. The split of responsibility is the one
init:/service:alreadyestablished:
#VmInstaller:username,password⊻password_hash,disk,hostname,timezone,locale,keyboard,encrypt,ssh_authorized_key[],defer_provisioning, plus a typed-openanswer:map forper-distro extras;
#DistroInstaller: the answers volume'svolume_idand
fs, thefile[]list of Go templates with awhen:guard, an optionalboot_arg, anddone: poweroff | marker.That split is deliberate. archinstall JSON, kickstart, preseed, Subiquity autoinstall and
AutoYaST are five real formats, each keyed by distro and by nothing else — so nothing
infers a format from a URL, an ISO name or a
base_user.#InstallerSeedContextis whatthose templates render against; the plaintext password never reaches it (the caller
crypt()s first), so no plaintext lands on the answers volume, in a log, or in a temp file.
distrois CUE-required on this arm, followingbootstraprather thancloud_image:the answer-file format lives on the distro, so an absent value is a hard nil at render
time with no plausible default to trade against.
Purely additive — a new arm in a closed disjunction and new optional defs invalidate no
existing config, so no migration entry and no
#SchemaVersionbump. Nothing consumesthe arm yet;
plugin-substrate'svalidateSourceDistroandplugin-vm's build pathfollow in their own repos, which is the contract-first landing order this repo already
uses.
How tested
The arm was verified working before the schema was written. The real
omarchy-4.0.1.iso(sha256 verified) was booted under QEMU/OVMF with acidataanswersvolume built exactly as
#DistroInstallerdescribes. It installed fully unattended,rebooted itself, and came up as
Omarchy 7.1.9-arch1-2:Every field the schema models was consumed by the real installer: SSH worked from
ssh_authorized_keyalone (proving the seededauthorized_keysenabled sshd and openedthe firewall),
git config user.name/user.emailreturned the values fromfull_name/email,hostnameandsudocame from the answers, and the resultinglayout was
/dev/vda2[/@] btrfs subvol=/@with the ESP at/boot— matching#DistroInstaller'sdone: poweroffflow.Schema tests —
schema/vm_iso_source_test.go, corpus and teeth:The corpus case is the exact source literal of the VM installed above, not a
hypothetical. The teeth reject
rootfs,root_size,base_user,builder,builder_imageandboxon this arm (each belongs to another source kind and would besilently ignored by the iso build path), an unknown
distro, and a malformedvolume_id.TestVmSourceIsoRequiresDistroLikeBootstrapis written as parity with the bootstraparm rather than against a bare validation mode: a required-but-absent field is
incomplete, not conflicting, so it surfaces only under a concreteness check. The test
asserts bootstrap rejects it too, and fails loudly if that premise ever goes stale.
Full repo gate on the final tree:
-count=1defeats the build cache, so every package genuinely re-ran; all 18test-bearing packages are shown with real timings and none is elided. The remaining 14
packages report
[no test files].schema0.418s carries the new tests.Rulebook compliance
second copy in Go, and nothing infers it from a URL or an ISO name — the same rule
distro_vocab.cue's header states for every distro trait.done: poweroff | markeris a process-exit or guest-agentpoll, never a sleep. Generated Go comes from
task cue:gen, never hand-edited;the one hand-written file (
spec/union_types.go) is the documented exception for theflat discriminated struct, and it is updated in the same commit as the CUE.
main,no hook bypass.
behaviour it encodes was proven on a real unattended install before the schema existed.
Change classification
two hand-written
VmSourcefields the@go(-)union requires. No authored wire keychanges, so no migration entry and no
#SchemaVersionbump.task cue:gen+gofmt+go build+go vet+go test -count=1 ./...+golangci-lint run ./..., all green on the final tree, plusa real end-to-end unattended install of the medium this arm models.
final tree, the new schema paths are exercised by seven corpus-and-teeth tests, and the
install flow the arm describes was executed live.
Assisted-by: Claude Code claude-opus-5[1m] (fully tested and validated)