Skip to content

W3.1 consumer surfaces are absent: deploy rootful:, containerd.namespace, and an emitted VmBackend vocabulary #273

Closed

Description

@aitrawog

What

The W3.1 selection model (sdk/deploykit: ResolvePodEngine, ResolveVmBackend, ResolveContainerdTarget) cannot implement the plan's one precedence rule — flag > deploy entity > env > settings file > built-in default — against the current contract, and cannot validate the VM-backend vocabulary without word literals. Three consumer surfaces are absent:

  1. No per-deploy rootful: — spec.Deploy has Engine, Backend and Namespace, but no rootful field.
  2. No containerd.namespace settings key — hostenv.RuntimeConfig has engine.run, engine.rootful and vm.backend, but no containerd/namespace section, and ResolvedRuntime carries no namespace.
  3. No emitted VM-backend vocabulary — #VmBackend is a closed CUE union, but schemagen emits no spec.VmBackends (contrast #EngineName → spec.EngineNames).

This is the spec producer leg that must land before sdk W3.1 (the plan's own rule: a spec change is a separate producer leg and goes first).

Evidence (measured 2026-10-23, opencharly/spec origin/main = 3099d05, released pin v0.2026295.2356)

1. Deploy entity has no rootful

$ git -C spec show origin/main:schema/deploy.cue | grep -c rootful
0
$ grep -n 'Engine EngineName\|Backend VmBackend\|Namespace string' \
    /home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/spec/cue_types_gen.go | sed -n '1,6p'
4581:	Engine EngineName `yaml:"engine,omitempty" json:"engine,omitempty"`
4587:	Backend VmBackend `yaml:"backend,omitempty" json:"backend,omitempty"`
4591:	Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`

DeployConfig.Deploy is map[string]DeployNode (= spec.Deploy), so the persisted deploy entity and the per-host overlay entry have the same three fields and no rootful either (spec/deploy_config.go:34). The plan's table (W3.1) names rootful: as a per-deploy entity field with engine.rootful / CHARLY_ENGINE_ROOTFUL as its lower levels and auto | machine | sudo | native as its values; only the lower levels exist.

2. No namespace settings source

$ git -C spec show origin/main:hostenv/runtime_config.go | grep -in 'namespace\|containerd'
(no output)
$ grep -n 'valid:' plugin-settings/candy/plugin-settings/config.go
269: ... engine.run, engine.rootful, run_mode, ... vm.image_dir, vnc.password.<image>

The plan names containerd.namespace as the settings key (default default, no env var). Neither hostenv.RuntimeConfig, hostenv.ResolvedRuntime, nor plugin-settings has it. spec#265 item 5 said namespace resolution is "deploy > config > default" — the config arm does not exist.

3. No VM-backend vocabulary emitted

$ grep -rn 'VmBackends' /home/atrawog/go/pkg/mod/github.com/opencharly/[email protected]/spec | wc -l
0
$ git -C spec show origin/main:internal/schemagen/main.go | grep -n 'enumValues(schema'
205: contexts ...
213: engineNames, err := enumValues(schema, "#EngineName")
221: engineRunModes, err := enumValues(schema, "#EngineRunMode")

#VmBackend generates only type VmBackend string (spec/cue_types_gen.go:4786). A resolver that validates the --backend flag, CHARLY_VM_BACKEND, or vm.backend against the closed union — without spelling "libvirt"/"qemu"/"krun" in code — has no Go source for the vocabulary. #EngineName has spec.EngineNames; #VmBackend has no equivalent.

Why this blocks W3.1

  • ResolveContainerdTarget's rootful precedence loses its deploy-entity level; its namespace precedence loses its settings-file level. Implementing either by dropping a level silently would make the resolver's central claim false.
  • ResolveVmBackend cannot reject a typo in the flag/env/settings value without word literals, and the brief forbids literals for exactly this vocabulary.
  • ResolvePodEngine alone is implementable today (spec.EngineNames, #EngineBinaries, the capability row, and spec.Deploy.Engine all exist); the other two are not.

RCA

  • Mechanism: spec#265 scoped the producer leg to the CUE vocabulary and the #Deploy.backend/.namespace fields. Its acceptance list never asserted the consumer-side selection surfaces (deploy rootful, namespace settings) or the generated VM-backend vocabulary, and the plan table at W3.1 was not reconciled against the generated Go types.
  • Missed control: spec#265's acceptance only exercised schema acceptance/rejection; no check asserted that every W3.1 precedence level has a schema-owned source.
  • Blast radius: sdk W3.1 (all three resolvers), W3.7 (the image resolver consumes ResolveContainerdTarget), and every per-deploy selection consumer (plugin-deploy-pod, plugin-pod, plugin-fleet, the VM launch path).
  • Root fix: add the three surfaces in CUE/Go here, regenerate, then bump sdk and implement W3.1.

Proposed shape (needs operator sign-off — this is a schema contract)

  1. #RootfulMode: ("auto" | "machine" | "sudo" | "native") (the exact vocabulary plugin-settings already accepts for engine.rootful), and rootful?: #RootfulMode on #Deploy, admitted only where #DeployTraits.selectors includes rootful (the existing data-driven selector mechanism).
  2. A contained settings surface: RuntimeConfig.Containerd.Namespace (default default), resolved into ResolvedRuntime.Namespace; plugin-settings gains the containerd.namespace key as the consumer leg.
  3. #VmBackendName: ("libvirt" | "qemu" | "krun") with #VmBackend: *"auto" | #VmBackendName; schemagen emits spec.VmBackends from #VmBackendName (the provider words only — auto stays a selector, mirroring #EngineName).

Alternative for (1)/(2), if per-deploy rootful is not wanted: say so explicitly, and W3.1 will implement only the levels that exist — but then the plan table at W3.1 must be corrected in the same wave.

Acceptance

  • grep -c rootful schema/deploy.cue > 0 and the generated spec.Deploy has Rootful.
  • RuntimeConfig/ResolvedRuntime expose the namespace setting and its resolved value.
  • spec.VmBackends is emitted; a drift test asserts it equals #VmBackendName and excludes auto.
  • charly task cue-gen twice: the second run is a no-op.
  • GOWORK=off go build ./... && GOWORK=off go vet ./... && GOWORK=off go test ./..., gofmt -l clean on the committed tree.
  • The tag is minted; then sdk bumps its require github.com/opencharly/spec and W3.1 lands.

Agent: containerd-crabbox-program/w31 · session 8b1c01cf-7f79-4a75-bff8-240415a06208
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

Activity

  1. self-assigned this
    on Oct 23, 2026
  2. aitrawog commented on Oct 23, 2026

    @aitrawog
    ContributorAuthor

    CLAIM — W3.1 producer leg. I filed this after measuring spec origin/main (3099d05) and the released pin v0.2026295.2356 against the plan's W3.1 precedence table; the three missing surfaces are the body above.

    Scope claimed: the three CUE/Go surfaces + the spec.VmBackends emission + the no-op regeneration proof. I will not touch the sdk W3.1 resolvers until this lands and tags, and I will not invent the rootful:/namespace shapes without operator sign-off — the proposal in the body is the decision I need confirmed (per-deploy rootful as a closed #RootfulMode, containerd.namespace in hostenv.RuntimeConfig, and #VmBackendName → spec.VmBackends).

    Blocked side of the coordination: opencharly/opencharly#589 (the containerd consumer-legs tracker) is held by this leg until W3.1 can consume the resolved selection.

    Agent: containerd-crabbox-program/w31 · session 8b1c01cf-7f79-4a75-bff8-240415a06208
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

  3. aitrawog commented on Oct 23, 2026

    @aitrawog
    ContributorAuthor

    STATUS — the producer leg is in review.

    • PR: opencharly/spec#275
    • Head: 74c8bc1e3ee89e0d4202b63d6293bb1f5b087170 (tree 41e7a66ae8f6e9b2c19c65c21459cf3a77564e72)
    • Scope: #RootfulMode + #Deploy.rootful + the rootful selector, #VmBackendName (emitted as spec.VmBackends), #RootfulMode (emitted as spec.RootfulModes), and ContainerdConfig.Namespace / ResolvedRuntime.Namespace.
    • Gate on the committed tree: gofmt -l 0 files, go build/go vet/go test rc 0, golangci-lint 0 issues, charly task cue-gen twice byte-identical, charly box validate 0 warnings / 0 errors.
    • Fail-without: the new schema arms are red on origin/main (field not allowed, def missing, selector rejected) and the namespace test does not compile there.
    • Non-blocking finding filed: opencharly/spec#274 (pre-existing cue fmt drift).

    Next: the sdk W3.1 leg bumps to this merge's tag and implements the three resolvers; consumer legs follow. I am watching the validator and will post the tag here the moment tag-on-merge mints it.

    Agent: containerd-crabbox-program/w31 · session 8b1c01cf-7f79-4a75-bff8-240415a06208
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

  4. aitrawog commented on Oct 23, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — the producer leg landed.

    • PR: opencharly/spec#275
    • Merge: a431987ebfae232f1dc34abf2c1b060d98d02a98 (squash), 2026-10-23T10:36:49Z
    • Tag: v0.2026296.1036 at the merge commit (verified with git tag --points-at)
    • CHANGELOG: written by tag-on-merge at merge time

    Settled: #RootfulMode + #Deploy.rootful + the rootful deploy selector, #VmBackendName emitted as spec.VmBackends, and #RootfulMode emitted as spec.RootfulModes; hostenv.ContainerdConfig.Namespace + ResolvedRuntime.Namespace. The sdk W3.1 leg now pins v0.2026296.1036.

    The pre-existing cue fmt drift (non-blocking) stays open as opencharly/spec#274.

    Agent: containerd-crabbox-program/w31 · session 8b1c01cf-7f79-4a75-bff8-240415a06208
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions