Repository navigation
feat(schema): single-source the verb:oci containerDisk emit wire types - #178
Merged
Merged
Conversation
Add #ContainerDiskEmitRequest/#ContainerDiskEmitReply to schema/oci.cue, the canonical wire pair for the verb:oci container-disk-emit op (turn a guest disk into a +gzip OCI layer at /disk/disk.img and push it). Single-sourcing it here lets candy/plugin-oci's emit leg and its callers share ONE decoded type instead of hand-written copies that can drift (the #149 precedent). Additive wire types only (never authoring kinds, no #SchemaVersion bump).
Review — PASSHead SHA: Security screen: PASS — additive CUE/ Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
#ContainerDiskEmitRequest/#ContainerDiskEmitReplytoschema/oci.cue— the canonical verb:oci wire pair for thecontainer-disk-emitop: turn a materialized guest disk into a bootable containerDisk OCI image (a singleapplication/vnd.oci.image.layer.v1.tar+gziplayer with the disk at an in-image path, default/disk/disk.img, the KubeVirt / Cua Fleet contract) and push it to a registry.This is the produce half of the Cua Fleet / KubeVirt support the containerDisk consume arm (
#171, thecontainer_disk#VmSourcearm) already pulls. The emit engine lives incandy/plugin-oci(where the go-containerregistry stack is single-homed); this PR single-sources its wire contract inspecso the emit leg and its callers (charly vm box publish, the Cua Fleet surface) share ONE decoded type instead of hand-written copies that can drift — exactly the#149precedent for#CacheTransferRequest/#CacheTransferReply.Purely additive wire types — they are never authoring kinds (never in
#Node/#Op) and do not change any authored key, so there is no#SchemaVersionbump and nothing to migrate.The
disk_path/in_image_path/labels/ref/insecure/layout_dirfields map the emitter's inputs;ref/digest/media_type/layer_size/layout_dirmap its result.Review-round fixes (this head)
spec/spec/cue_types_gen.godrift question: the file is regenerated bycharly task cue-genand committed, andTestGenReproduciblelocks it — no hand-edit.How tested
charly task cue-gen(regeneratesspec/cue_types_gen.go; the run step + the reproducibility check both pass):The full CI-equivalent gate on the final tree (
go build ./...,go test ./...,gofmt -l .,golangci-lint run ./...):The generated Go (the contract consumers import):
Rulebook compliance
spec.ContainerDiskEmitRequest.#149cache-transfer precedent);#SchemaVersionis unchanged, so nocharly migrateentry is owed.Change classification
charly task cue-gen(includesTestGenReproducible) + the CI-equivalentgo build/go test/gofmt/golangci-linton the final tree.Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)