Repository navigation
feat(vm): own the kind body, and bring the contract pins current - #42
Conversation
…cts 32 vm bodies The additive leg compiles and the plugin suite is green, but the two-arm corpus sweep shows the regression: 32 vm bodies go OK -> FAIL with '#VmValue.source: field not allowed' / 'field not allowed' - the composed unit now carries the base's #Vm (imported) AND this plugin's #Vm (local), each with its own #VmValue twin, and the unified union rejects bodies it accepted before. The extracted block was diffed against the base's: identical after normalisation, so the conflict is in the COMPOSITION (two twins over two structurally-equal but distinct #Vm identifiers), not in the copied text. Not pushed; needs a fresh RCA before the next push. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
… value shape The plugin leg's regression (32 vm bodies) now has a readable cause: composedBodySchema's #Vm resolves to a FOUR-field value-shaped struct [source firmware backend autostart], whose firmware/backend originate in /opencharly/plugin-schema/schema/plugin.cue (the concatenated base), NOT in this plugin's 24-field schema/vm.cue nor in the base's identically-shaped def. The authored body and the base are byte-identical after normalization, so the fault is in the COMPOSITION - the harness pins the observation so the next session starts from it instead of re-deriving it. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
…the composed unit Not a narrowing of #Vm alone: #VmCharlyInstall, #VmChecksum and #VmValue all come back with ZERO fields from schemacompose.ServedText, while the served text (64,071 bytes) carries them intact at lines 1134 and 1229. The loss is in the composer module instance, not the concatenation. Next session starts from that fact instead of the 4-field symptom. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
…bump exposes ROOT CAUSE of the 32-body regression, measured: this plugin pinned spec v0.2026317.51, which predates opencharly/spec#320 (the eight public vocabulary re-exports, tag v0.2026318.1519). schemacompose serves the spec module at the PLUGIN'S pinned version, so every schema.#Vm<X>Word reference in the new vm.cue was unresolvable - which is why every def the file added came back EMPTY from ServedText (not merely narrowed) while the served text carried them intact. The bump is the fix, and it exposes the next one: sdk v0.2026317.18's vmshared still names spec.KubernetesImagesDefaults (deleted in spec#316), so the sdk goes to v0.2026318.602; and this repo's load_pod_substrate_test.go still names spec.Pod (deleted in unit 3), which the next commit adapts. Recorded here so the ordering is visible: spec#320 tag -> plugin spec pin -> plugin sdk pin -> the stale test. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
The spec bump exposes four stale references this repo's suite had been hiding behind its old pin: spec.Kindcluster (unit 5), spec.KubeVirt (unit 6, the capital-V case a case-folded grep misses) and spec.Pod (unit 3), each used only to marshal a body the resolve arm consumes as OPAQUE BYTES. Each site now feeds the wire JSON directly, with a comment naming the deletion, and the unused imports go. Suite: green, 17.3s. The two-arm sweep cannot run yet: the dev build fails on plugin-k8sgen at the umbrella's old pin (k8sgen.go vs the new spec), which is the same cascade one layer up - the pin wave's job, recorded for the next round. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
…the record The harness only logged the composed shape (a test that cannot fail), and its finding is now carried by the commit that measured it plus the ledger's unit-8 entry. The regression it explained is fixed by the pin bump, proven by the two-arm sweep. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: code/config (CUE kind-body move + Blocks
Non-blocking notes
Comments considered: none on the PR thread (0 comments) — nothing to disposition. Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Round 1's two findings, both mine: the extraction carried each def's PRECEDING comment into the block BEFORE it (four comments landed on the wrong defs), and one comment promised 'autostart:true requires the libvirt backend' while the guard admits any backend word - a contradiction that predates the move and was carried verbatim instead of swept. The blocks are re-cut from the contract with a comment-aware brace counter, so each comment sits on its own def; the autostart comment now states what the guard does. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS Comment 6880268072 (github-actions bot, BLOCK @
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
* test(vm): move the body behaviour test with the body opencharly/spec#304 unit 8: the vm body lives in this plugin CUE module since #42, and its one behavioural test - TestVmBackendKrunCrossRules, the krun acceptance shapes plus the libvirt/qemu-only field rejections with their error naming - still called spec defValue against the shipped schema. It moves HERE, before the contract deletes #Vm, so the coverage never lapses. The harness composes base & served unit (composedBodySchema) and compiles every literal in the DEF OWN CUE context; the test, its allErrors flattener and the checker helper are the same three, unchanged in behaviour. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs: state the add-half lifecycle and duplicate honestly (review round) --------- Co-authored-by: aitrawog <[email protected]>
* fix(vm): drop the six defs the contract kept, and cite them The pin wave census named what the split got wrong: six of the defs this plugin copied in #42 (VmBackend, VmBackendName, VmCharlyInstall, VmChecksum, VmInstaller, VmKeyInjection) are ALSO declared in the contract after #321, because the keepers and the generator cite them - D-PAT-2 dup findings at six lines. The plugin deletes its copies and cites schema.#<Name> instead; #Vm and #VmValue remain the only defs whose home is here. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs(vm): the header says what actually came, and what is cited Round 1: my schema.-prefix sweep hit the header's own inventory, leaving it claiming seven defs arrived while marking six schema.-prefixed - the six this leg deletes. The header now says #Vm and the twin are the only defs here, and names the six as keepers this file cites. The blank run the excision left is collapsed too. No generated Go: this plugin generates nothing from its schema (no schemaparams/CandyParams in its Go); the wire types are the contract's, generated there. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: aitrawog <[email protected]>
Summary
opencharly/spec#304unit 8 (vm), the plugin leg:plugin-substratetakes thevmbody, and — because the leg's own measurement exposed it — this repo's contract pins come up to date.The body. Seven defs move into the kind-serving plugin's CUE module:
#Vmitself,#VmBackend,#VmBackendName,#VmChecksum,#VmInstaller,#VmKeyInjection,#VmCharlyInstall, plus the#VmValuetwin and theInputDefdeclaration.#Vmcites the keepers the resolve envelope pins in the contract (schema.#VmSource,schema.#VmNetwork,schema.#VmSsh,schema.#VmCloudInit,schema.#VmKrun,schema.#VmSnapshot,schema.#LibvirtDomain) and the eight public vocabulary re-exportsopencharly/spec#320added (schema.#VmBackendNameWord…schema.#VmKindWord), because a plugin cannot reference a private_<x>Wordand the private tables are shared with the keepers.The RCA, and why the pins are in this PR. The leg first failed its own gate: 32
vmbodies moved from OK to FAIL with#VmValue.source: field not allowed. The chain of measurement:#Vmcame back with four fields; the authored def and the base's are byte-identical after normalising theschema.#…prefixes;schemacompose.ServedText(#VmCharlyInstall0 fields,#VmChecksum0,#VmValue0), while the served text carried them intact at line 1134 of 64,071 bytes;spec v0.2026317.51, which predatesopencharly/spec#320— andschemacomposeserves the spec module at the PLUGIN'S pinned version, so everyschema.#Vm<X>Wordreference was unresolvable. A green suite had been hiding it: this repo was judging an older contract than the org's.The bump (
spec v0.2026318.1519,sdk v0.2026318.602) is the fix, and it exposed four stale references in this repo's own tests —spec.Kindcluster(unit 5),spec.KubeVirt(unit 6, the capital-V case a case-folded grep misses),spec.Pod(unit 3) — each used only to marshal a body the resolve arms consume as opaque bytes. Each site now feeds the wire JSON directly.How tested
The repo's suite, on the bumped pins
The class's gate: two arms, one root
2,014 bodies judged, ZERO verdict classes moved, one differing line (a
vmmessage refinement). The first arm-B run was invalid — its worktree landed atmaininstead of this branch, so it proved nothing; it was corrected and re-run, and only the corrected run is quoted.R10 honesty, premise pasted
This repo declares no check bed; its change-class gate IS its Go suite plus the two-arm corpus sweep, both run above.
Rulebook compliance
plugin,go,cutover-policyandgit-workflowwere loaded; the pins were bumped as a cutover, not a patch.Change classification
Kind: one entity body's home moves into the kind-serving plugin (seven defs + the twin + the
InputDef), and this repo's contract pins come current (spec,sdk), which required adapting four test sites to types the contract had already deleted.Breaking change + rollback: none for this repo's consumers — the wire is unchanged (the body is opaque bytes to every arm; the envelope is the contract's and still cites the contract's keepers), and the pin bump moves to commits the org has merged. Rolling back is reverting this squash: the body returns to the contract, the pins return to their previous versions, and the suite would again be green against an older contract.
Filed issues
opencharly/spec#304— the unit tracker this leg belongs to.opencharly/opencharly#1015's successor), not to a single repo's issue tracker.Files changed
candy/plugin-substrate/schema/vm.cue#Vmbody, six sub-defs, the#VmValuetwincandy/plugin-substrate/plugin.gosubstrateKindInputDefsgainsvmcandy/plugin-substrate/go.modspec v0.2026318.1519,sdk v0.2026318.602candy/plugin-substrate/go.sumcandy/plugin-substrate/load_pod_substrate_test.gospec.Pod(deleted in unit 3) → a local typed bodycandy/plugin-substrate/resolve_test.gospec.Kindcluster/spec.KubeVirt(units 5–6) → wire JSONcandy/plugin-substrate/status_kindcluster_test.gocandy/plugin-substrate/status_kubernetes_test.gocandy/plugin-substrate/status_kubevirt_test.goAgent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)