Repository navigation
Description
Finding
charly vm create fails for every VM entity, with a CUE defaults-application error naming a field that
the project's own manifest does set or default. Two different repos, two different fields, same
mechanism, minutes apart:
# charly-ubuntu's check-ubuntu-repo bed
charly: error: command "vm": applying vm defaults for "ubuntu-repo-vm":
applyCueDefaults vm: decode: autostart: cannot convert non-concrete value bool
# distro-ubuntu's check-ubuntu-debootstrap-vm bed
charly: error: command "vm": applying vm defaults for "ubuntu-debootstrap":
applyCueDefaults vm: decode: backend: cannot convert non-concrete value string (and 1 more errors)
Both beds had built their disks successfully seconds earlier ([vm-build] PASS 15.7 s and 5 m 5.8 s),
so this is the create leg only.
Mechanism and the control that clears the change under test
applying vm defaults for is emitted by plugin-vm (vm_host_seams.go); applyCueDefaults lives in
plugin-substrate (validate_vm.go). The decode is asking CUE for a concrete value of a field whose
schema carries a TYPE (bool, string) with no default filled in, and failing.
A/B, to rule out the consumer side: the same bed was re-run with the PREVIOUS commit's manifest
(705dd28's charly.yml, i.e. without the guest-is-resolute step that was under review) against the
same binary:
[vm-build] PASS 15.707s
[vm-create] FAIL 503ms <- identical error, same field
So the failure does not depend on the project's manifest: it is on the defaults-application path itself.
Timeline, which is the useful part: the same bed on the same binary created its VM successfully
earlier ([vm-create] PASS 943ms, 2026.320.1458), then failed from 2026.320.1519 onward. Something
in the environment changed between those runs — a plugin view / schema resolution — not in the repos.
Blast radius
Every VM bed and every charly vm create, i.e. all kind: vm work, on a host where the plugin
schema/default resolution is in this state. It is not repo-specific and not manifest-specific, so it
blocks unrelated work (two separate Ubuntu legs here) identically.
Root-fix pointer
The decode must see the schema's DEFAULTS, not its bare types: either the vendored vm CUE schema is not
being resolved on this path, or a cached plugin/schema view is being served in a state where the
defaults are absent. Worth checking, in this order: the plugin-view/schema resolution for the vm kind on
a cold vs warm cache, and whether applyCueDefaults falls back to a type-only schema when resolution
fails instead of erroring on the missing default.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
Activity
aitrawog commentedon Nov 16, 2026
STATUS — a mechanism I did not have when I filed this: LOCAL OVERRIDES leak in from OTHER sessions' worktrees
Chasing the "worked at 15:19, fails from 15:22" timeline, I captured the plugin resolution lines from an
ordinary
charly box buildon this host. 20 plugins resolved from another session's uncommittedworktree, in MY process:
So resolution prefers a LOCAL OVERRIDE found anywhere under
.worktrees/<slug>/<repo>on this host —including another agent's half-finished edit. For a plugin that serves a SCHEMA, that means my process can
be decoding against a schema that is not on any merged ref.
Two further observations that make this the leading candidate rather than a curiosity:
.worktrees/holdsspecandsdkcheckouts for several sessions (one slug is literally
cache-root-resolver).specis the CUEsingle-source for the entity schemas, so an override there is exactly how a field could arrive typed
but undefaulted — the shape my error names.
charly box validatereported7 distrosearlier in this session and reports
6 distrosnow, on two unrelated projects. I could not makethat number move by any edit of mine (the projects'
defaults:blocks diff clean againstorigin/main).That does not prove this is the cause — the failing plugin is
plugin-vm/plugin-substrate, and I did notfind either under
.worktrees/. But it does mean the diagnosis cannot be trusted until the resolutionpath is shown to be free of cross-session overrides: a repro attempt on a host where 20 plugins come from
someone else's working tree is not a clean experiment.
Ask: (a) is the LOCAL OVERRIDE lookup supposed to be host-global, or scoped to the invoking session's
own slug? (b) if host-global, is a plugin serving a SCHEMA safe to override from an arbitrary worktree?
That question alone may be the root cause, and it is worth answering before anyone debugs the decode.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Nov 16, 2026
STATUS — four candidate causes ELIMINATED, so the remaining space is narrower
Continuing to narrow this rather than guess. Each line below is a test I ran and its result; none of
them is a theory.
charly.yml(705dd28) on the same binaryapplyCueDefaults vm: decode: autostart: cannot convert non-concrete value booldefaults:git diff origin/main -- charly.ymlon thedefaults:blockpsshowing zerocharlyprocessescharly cache clear(582 entries dropped), then retry~/.config/charly/charly.yml(1789 lines) fordefaults:/vm:/autostart/backend:What the elimination leaves. A field the schema is supposed to DEFAULT (
backendstring,autostartbool) arrives typed but not defaulted, in two different projects, one of which does notdeclare the field at all and one of which sets it explicitly — so it is not the entities, it is the
defaults being applied to them. Between a passing run at
2026.320.1458and a failing one at2026.320.1519on the SAME binary, nothing in either repo changed.Still the strongest untested lead is the one from my previous comment: 20 plugins resolve from other
sessions' worktrees in my process (
using LOCAL OVERRIDE .worktrees/wave-*/…), and.worktrees/holdsspec/sdkcheckouts. A plugin VIEW cached from such a tree is the one place a schema could changewithout any merged ref moving. I have not touched those views — deleting another session's cached
artifacts is not something I will do to make a build pass (R3).
Ask unchanged: whether a plugin that serves a SCHEMA is safe to override from an arbitrary
worktree, and whether the override lookup should be host-global. If the answer is "no" and "it should
not be", this issue is that defect and the decode is its symptom.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Nov 16, 2026
STATUS — fifth candidate eliminated: it is NOT disk capacity
The host was at 99% (5.2 GiB free). I freed 35 GiB (a stale shared plugin cache, with operator
approval), taking it to 71 GiB free / 83%, and re-ran the same command immediately:
Identical. So a silently-failing cache or temp write under disk pressure is not the mechanism, and
the earlier ENOSPC failures I filed separately (opencharly/charly#1170) are a different defect that
merely shared a symptom.
Updated elimination table:
defaults:charly cache clear, then identical)What remains standing is the schema/defaults path itself, and the untested lead from earlier: 20 plugins
resolve from other sessions' worktrees (
using LOCAL OVERRIDE .worktrees/wave-*/…) and.worktrees/holds
spec/sdkcheckouts, so a cached plugin VIEW built from such a tree is the one place a schemacan change without any merged ref moving.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Nov 16, 2026
STATUS — I think I have the mechanism, and it is a zero-value round-trip, not a schema resolution failure
I traced
applyCueDefaultsto its implementation:sdk/loaderkit/cue_validate.go(ApplyCueDefaults,line ~135-175), with the kind→def table in
sdk/loaderkit/cue_schema.go("vm": "#Vm"). What that codedoes, in order:
Two facts from the schema and the entity that together produce our error:
schema/vm.cuedeclares BOTH failing fields as required-with-default:backend: *"auto" | "libvirt" | "qemu"andautostart: *false | true. The package doc is explicitthat "Only REQUIRED-with-default schema fields materialize — an optional-with-default field
(
field?: *x) stays absent on unify and does not reach the struct".charly box inspect ubuntu-debootstrap: nobackendand noautostartkey appears in the resolved entity at all.So step 1 marshals the RESOLVED GO STRUCT, not the source YAML — and a Go zero value for a
string/boolfield marshals asbackend: ""/autostart: falseunless those fields carryomitempty.""is outside*"auto" | "libvirt" | "qemu", so the unify in step 4 cannot produce aconcrete value for it, and step 5 reports exactly what we see:
autostart: falseis inside its union and would be fine, which is why the error namesbackendfirst andadds "(and 1 more errors)" for the rest of the same subtree.
The guard that should have caught this is one line above:
cueKindDef(kind)returnsokif the KINDis registered — not if the unify can produce a concrete value — so
applyCueDefaults: no CUE schema registered for kindnever fires and the failure surfaces later, as an opaque decode error naming a fieldthe user never set.
Root-fix directions, in the order I would try them:
omitempty, or a smallomitZeropass) so absent fields stayabsent and the schema default fills them — which is what the package doc promises;
("field backend has no concrete value and the schema default did not apply") instead of a decode type
error.
This also explains why the timeline confused me: nothing in the repos or the cache changed. The change has
to be in which fields are required-with-default in the
specthe binary embeds, or in the Go struct'smarshalling tags — a one-line difference that turns every VM entity that omits
backendfrom working tofailing.
git log -S 'backend: *"auto"'inspecover the last day, and the same foromitemptyonVmSpec.Backendinsdk/charly, should find it immediately.Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Nov 16, 2026
CORRECTION — my previous comment's mechanism was wrong; the cause is a spec regression, and it is now filed
I claimed
ApplyCueDefaultswas broken by a missingomitempty, so a Go zero value (backend: "") wasre-ingested and failed to unify. That is false, and I checked it before it went further:
Both zero values are OMITTED, so nothing empty is marshalled and the unify gets a clean entity — my
mechanism could not have produced the error.
The real cause, measured by diffing the spec version this binary embeds against the previous one:
#Vm.backend#Vm.autostart[email protected]backend: *"auto" | "libvirt" | "qemu"— with defaultautostart: *false | true— with default[email protected](embedded now)backend!: string— no defaultautostart!: bool— no defaultApplyCueDefaultsmaterializes only REQUIRED-with-default fields — its own doc says a non-defaultedfield "only turns an absent value into a non-concrete DECODE error in applyCueDefaults". Every VM entity
in the org omits these two, because they used to be filled in.
Measured fix: set them explicitly and
vm createworks immediately —Filed as opencharly/spec#341 with the version diff, the blast radius (every VM entity, and it is
invisible to
box validate) and the two options: restore the defaults, or migrate every entity anddeclare the break.
So this issue's subject — the decode error — is a SYMPTOM of #341, and this thread can close once #341 is
answered. The six eliminations above were all real work and none of them was the cause; the cause was one
schema version.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)