Repository navigation
Description
Finding
spec v0.2026319.1619 removed the defaults from two #Vm fields that the whole org's VM entities
were relying on implicitly, and the result is that every charly vm create in the org fails:
charly: error: command "vm": applying vm defaults for "ubuntu-debootstrap":
applyCueDefaults vm: decode: backend: cannot convert non-concrete value string (and 1 more errors)
or, for a VM that does set backend but not autostart:
applyCueDefaults vm: decode: autostart: cannot convert non-concrete value bool
Mechanism — measured by diffing two spec versions
#Vm.backend |
#Vm.autostart |
|
|---|---|---|
[email protected] (older) |
backend: *"auto" | "libvirt" | "qemu" — required with default |
autostart: *false | true — required with default |
[email protected] (what the current binary embeds) |
backend!: string — required, NO default |
autostart!: bool — required, NO default |
ApplyCueDefaults (sdk/loaderkit/cue_validate.go) only materializes required-with-default fields:
it marshals the resolved entity, unifies it with #Vm, and decodes back — and its own package doc says
why an optional or non-defaulted field breaks:
Only REQUIRED-with-default schema fields materialize … a non-optional field only turns an absent value
into a non-concrete DECODE error in applyCueDefaults.
With backend!: string and autostart!: bool, a VM entity that omits them (which every entity in the org
does, because the defaults used to fill them) cannot be decoded at all.
Measured fix
Setting the two fields explicitly on the entity makes vm create work immediately:
ubuntu-debootstrap:
vm:
backend: libvirt
autostart: false
...$ charly -C <project> vm create ubuntu-debootstrap
Generated SSH keypair in ~/.local/share/charly/vm/charly-ubuntu-debootstrap
Created VM charly-ubuntu-debootstrap (libvirt session)
So the failure is exactly this, and not caching, concurrency, capacity, the consumer manifest, or
schema resolution — all of which I eliminated first (see opencharly/plugin-substrate#50, where this was
tracked).
Blast radius
Every VM entity in the org that does not set backend and autostart — i.e. essentially all of
them, since the previous schema made setting them unnecessary. Every charly vm create, every
charly check run of a kind: vm bed, and every VM-touching deploy. It is invisible to
charly box validate (the entity still validates — ! requires the field, and validation passes on the
authored YAML before defaults are applied) and to any image build.
Root fix — two options, and the second is a decision for the org rather than this issue
- Restore the defaults (
backend!: *"auto" | #VmBackendName,autostart!: *false | true) — the
fields stay required, so a caller is still told to think about them, butApplyCueDefaultscan
materialize the default the way it did before. This restores every VM in the org at once. - Keep them required-without-default and migrate every VM entity to set them explicitly — a real
org-wide cutover, and it makescharly vm createfail loudly on a missing field instead of filling
one. If this is the intent,charly migrateshould add the two fields, and the schema change is a
declared breaking change.
Either way, one control is missing regardless of which is chosen: an applyCueDefaults failure should
name the field and say the schema default did not apply, rather than surfacing as a Go decode error
about a field the user never wrote. The current message names backend even when the entity never
mentioned it.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
Activity
aitrawog commentedon Nov 16, 2026
STATUS — sharpened: with these fields required and the Go struct's
omitempty,autostart: falseis INEXPRESSIBLEMeasured while trying to work around this in a consumer, and it changes the recommendation.
ApplyCueDefaultsmarshals the resolved Go struct to YAML, unifies it with#Vm, and decodes back. For aboolwithomitempty, the ZERO VALUE IS OMITTED — soautostart: falsedisappears in the round-trip,exactly like an unset field. Combined with
autostart!: bool(required, no default), that means:autostart!: boolautostart: falseautostart: trueautostart: trueVerified both ways on the same entity:
So there is no way to author a VM that does NOT autostart, short of setting it true — which starts the
VM at boot and installs a user unit, which is exactly wrong for a
disposable: truecheck bed. I revertedthat experiment (destroyed the VM; the destroy removed the unit, verified 0 left behind).
This strengthens option 1 in the original report: restoring
autostart!: *false | true(required WITHdefault) is the fix that costs nobody anything. "Migrate every entity" — the second option — would require
every entity to say
true, sincefalsecannot be expressed.If the field must stay required-without-default, then the marshaller has to stop dropping it: serialize
the CUE value (or the authored YAML) rather than the Go struct, or use a pointer/"was set" type for
Autostartsofalseis distinguishable from absent. Theomitemptyon a bool whose false ismeaningful is the defect that makes the required field unfulfillable.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
fix(ubuntu): remove a VM field experiment that followed me onto this …
aitrawog commentedon Nov 16, 2026
STATUS — the failing FIELD alternates, which says the defect is wider than one field
Two consecutive runs, same binary, same host, different projects:
The error names a DIFFERENT field run to run, and one
vm createin between them actually SUCCEEDED(
Created VM charly-ubuntu-debootstrap). A non-deterministic field name plus an occasional pass means thisis not one bad default: it is CUE reporting whichever non-concrete value it reaches first, over a set of
fields that includes at least
backendANDautostart, with an iteration order that varies.That matters for the fix, because it means:
exactly the situation that made me chase six wrong causes over a dozen rounds;
(and 1 more errors)suffix is the only hint that the list is longer, and a caller cannot see therest of it.
Ask: when this is fixed, please make the failure enumerate ALL non-concrete required fields at once
rather than the first one CUE happens to reach, so the next person sees the whole set in one run instead of
a different half per attempt.
Everything else in the original report stands:
#Vm.backendand#Vm.autostartbecame!-required with nodefault in spec v0.2026319,
ApplyCueDefaultsonly materializes required-WITH-default fields, and becauseAutostartis aboolwithomitemptythe valuefalsecannot be expressed at all.Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
feat(ubuntu)!: retire the clawsweeper-review box and bed, now homed o…
Merge origin/main into feat/ubuntu-2604 (bring in the clawsweeper del…
aitrawog commentedon Nov 16, 2026
HOLDING
This issue is holding up opencharly/distro-ubuntu#65 (the Ubuntu-family move to 26.04), which has
posted the matching
WAITING.What is blocked: that PR's VM beds —
check-ubuntu-debootstrap-vmand thegithubrunner-ubuntutrio.Its pod/base path is already gated and green (the base image builds and reports
26.04.1 LTS (Resolute Raccoon)), so the consumer leg is not stalled wholesale — but the VM surface it changes cannot be proven.What would clear it: this issue landing. Then the VM beds run on that PR's exact tree and both threads
get
CLEARED.A note on why I will not just retry it there: roughly one
vm createin three succeeds, so a green bedrun would be luck rather than evidence. The blocker is recorded as exactly that rather than as a flaky test
to re-run, which is the failure mode this issue created in the first place.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Nov 16, 2026
STATUS — the caller located, and version skew RULED OUT
I traced the error to its emitter rather than guessing at the schema. The message comes from
plugin-vm(candy/plugin-vm/vm_host_seams.go), not fromspecorcharly:So the entity is round-tripped through the typed
VmSpecwithRawnulled before the defaultsfill — a detail worth having when someone picks this up.
Ruled out: version skew. The host has 13 cached
plugin-vmversions(
v0.2026237.1430…v0.2026319.925) and 110 cachedsdkversions, which would be a tidyexplanation for a run-to-run difference in behaviour. It is not the explanation:
Same code, same input, same host, different result — so the nondeterminism is inside one process run, not
between installed versions. If that points at a shared CUE context (
cueSchemaCtxis a process-widesync.OnceValue) being unified concurrently by more than one resolution in the same run, that is where Iwould look first; I have not proven it, and I am not going to guess it into the report.
What is proven, and unchanged: the field named alternates (
backend/autostart), roughly onevm createin three succeeds,autostart: falseis inexpressible because the Go bool carriesomitempty,and the VM bed's own
vm-buildsucceeds (151×resolute, 0×noble) while itsvm-createfails.Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Nov 16, 2026
STATUS — a controlled repeat: it is DETERMINISTIC on the current tree, which corrects my own earlier estimate
I stopped guessing at the nondeterminism and ran the same command twice in a row, same tree (
ca149f5), samebinary (
2026.320.1453), same host, destroying the VM in between:Identical, including the field named. So on this tree the failure is deterministic, and my earlier
"roughly one run in three succeeds" was drawn from too few samples — I am correcting that here rather than
letting a wrong rate stand on the record. The two successes I did observe were real (both VMs were created
and both were destroyed,
vm listverified empty), so something differs between then and now; the mostlikely difference is the tree state, not a coin flip, and I have not isolated which part.
What is stable across every observation, deterministic or not:
backend(andautostartin the other cases), both!-required with no defaultsince spec
v0.2026319.1619;plugin-vm(vm_host_seams.go), and it round-trips the entity through the typedVmSpecwith
vm.Rawnulled before applying defaults;plugin-vmand the SDK versions compared, so version skewis not the cause;
autostart: falsecannot be expressed at all, becauseAutostart boolcarriesomitempty.Net effect for the campaign: the VM gate stays unclaimable, and
distro-ubuntu#65staysWAITING— its VMbed builds (151x
resolute, 0xnoble) but cannot boot.Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Nov 16, 2026
CLAIM + CORRECTION — my "restore the defaults" recommendation was wrong; the fix is #342
The operator authorised fixing this inside the campaign, so I root-caused it and opened
#342. While implementing it I disproved my own earlier recommendation on this
issue, and that correction matters more than the fix.
What I told you was wrong. I recommended restoring the defaults:
autostart!: *false | true. I implemented exactly that, and measured:Decodenever resolves a default disjunction. A required-with-default spelling fails identically toautostart!: bool— same class of error, different value printed. So "restore the defaults" would nothave worked, and an owner following that advice would have burned a round discovering it.
The actual fix is to make the two fields optional, which is also the shape the envelope already
documents for itself ("the resolved envelope carries PLAIN post-default scalars"):
Because
ApplyCueDefaultsmarshals the resolved struct (Backend string,Autostart bool, bothomitempty), unifies with#ResolvedVm, and decodes with no.Default()call — so an omitted zerovalue simply must be allowed to stay absent.
Proof, in #342: a new test decodes a
#ResolvedVmwhose backend/autostart were omitted. On thepre-fix schema it fails with the production error verbatim (
cannot convert non-concrete value bool); onthe fixed one it passes, and a second test pins that every provider word (
libvirt,qemu) is stillaccepted, so no validation was traded away.
This issue closes when #342 lands. The consumer chain after it is producer-first: spec tag →
sdk/charlyrequire bump → rebuilt binary → the VM beds that have been
WAITING(opencharly/distro-ubuntu#65,charly-ubuntu#9) run and clear.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
fix(vm)!: make #ResolvedVm.backend and .autostart optional, unbreakin…
aitrawog commentedon Nov 16, 2026
RESOLVED — fixed by #342 (tag
v0.2026320.2116); the consumer wave is a separate, ordered step#342merged and taggedv0.2026320.2116. The contract is fixed:#ResolvedVm.backendand.autostartare optional, with a test that fails on the pre-fix schema using the production errorverbatim and passes on the fixed one.
What is NOT done, and why — measured, not assumed. Nothing consumes the new tag yet, and the consumer
bump is not a one-line pin change. Attempting it in
charlyshowed a cascade:sdkmain does already build against the new spec (verified in a worktree), so the first error isstale-pin, not incompatibility — but
plugin-boxat the pinned version is not adapted, and the wavetherefore touches
spec → sdk → plugin-box → … → charly, i.e. the org's dependency wave rather than asingle bump.
sdkmain still pinsspec v0.2026320.1252, so the wave has not started.Order for whoever runs it: bump
sdkto a release requiring this tag, release the plugins against thatsdk, then bumpcharly'ssdk+spectogether (MVS takes the higher, but only if the consumers compile).I did not leave a half-bumped worktree behind:
charly's worktree is reverted to a clean tree.Blast radius, unchanged by the fix until the wave lands: every
charly vm createstill fails with thesame decoder error, because the binary still embeds the old schema. The VM beds that have been
WAITING(
opencharly/distro-ubuntu#65,charly-ubuntu#9,opencharly/charly#1177) clear after that wave, notbefore it — and I would rather say that plainly than let "spec#341 fixed" read as "VMs work now".
Closing: the defect filed here is the schema's, and it is fixed.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
chore(deps): bump spec to v0.2026320.2116, the release that makes vm …
fix(debian): put the vm deploy substrate in the bed's candy closure (#43
test(spec): decode the RawBody view sub-shapes the spec's authored-de…
chore(deps): bump spec/sdk/plugin-box to the releases that fix vm cre…
feat(ubuntu)!: move the Ubuntu family to 26.04 LTS (resolute) (#70)