Repository navigation
test(vm): move the body behaviour test with the body - #43
Conversation
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)
Review — BLOCKHead SHA: Change class: code — one Go behavioural test added in a cross-repo move (opencharly/spec#304 unit 8). Blocks
Comment dispositionsNo comments were posted (thread is empty); nothing to disposition. Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
HOLDING opencharly/spec#304 unit 8, the contract leg (deletes #Vm) - this PR must land first. The vm body moved into plugin-substrate (plugin-substrate#42) and its one behavioural test moves into the same module HERE, BEFORE the contract stops declaring #Vm. The spec-side copy of TestVmBackendKrunCrossRules stays in schema/engine_vocab_and_vm_backend_test.go until that leg deletes the def it compiles against.
Agent: lead |
Review — PASSHead SHA: Security screen: PASS Comments:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
opencharly/spec#304 unit 8, the coverage half. The vm body lives in this plugin CUE module since plugin-substrate#42, and its ONE behavioural test still called the spec package defValue against the shipped schema. It moves HERE, before the contract leg deletes the vm body, so the coverage never lapses. Its lifecycle in full: the
speccopy (TestVmBackendKrunCrossRulesinschema/engine_vocab_and_vm_backend_test.go) stays where it is until the contract leg deletes the#Vmit compiles against; that leg is tracked as the next unit-8 item onopencharly/spec#304, and the coordination pair is posted on this PR and on that issue.The test, unchanged in behaviour: TestVmBackendKrunCrossRules - three accepted krun shapes (container_disk, the krun knobs, and a bootc source), five libvirt/qemu-only fields that must be rejected NAMING the field they reject (libvirt, autostart reported at the backend rule, firmware, machine, cloud_init), a non-OCI source rejected, and a positive control proving the same fields are legal under backend libvirt - so the rejections are about the backend, not the fields.
The harness is the point. It composes exactly what the host gate composes - the spec base and this plugin served unit - and compiles every literal in the def own CUE context. The allErrors flattener moves with it because the assertion is about the error NAMING, and the CUE top-level Error() truncates to (and N more errors).
Why only one test: measured, this kind has no value-gate tests in spec (unlike pod/local/kubevirt), and its other vm-named test files - vm_iso_source_test.go, vm_container_disk_source_test.go, vm_box_metadata_test.go - exercise the KEEPERS (VmSource, VmBoxSource) that stay in the contract, so they stay with them.
How tested
R10 honesty, premise pasted
This repo declares no check bed; its change-class gate IS its Go suite, run above.
Rulebook compliance
Change classification
Kind: one behavioural test moves from the spec schema package to the plugin that owns the body. Not breaking: test-only, assertions preserved.
Breaking change + rollback: none - test-only; rolling back reverts this squash and the contract originals would then still exist.
Filed issues
None - nothing separable.
Files changed
candy/plugin-substrate/vm_body_test.goAgent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)