Repository navigation
Description
What
Add the microVM artefact arms to the VM-box contract: a #VmBoxSource arm for a charly-produced raw/ext4 rootfs and one for a kernel, plus the in-image layout record that lets one image carry both files and a reader find them.
This is the artefact half of the Firecracker + Fireactions integration (umbrella ledger WI-2; the substrate contract landed as #227). The delivery vehicle already exists — a VM box is an OCI image whose layers carry the artefact and whose labels carry #VmBoxMetadata on ai.opencharly.vm.box (sdk/deploykit.EmitVmBoxAt / VmCapabilitiesFromLabels) — and this issue widens what that vehicle can carry.
Why
Every existing #VmBoxSource arm describes a disk: cloud_image, bootc, clone, bootstrap, iso, container_disk. A Firecracker microVM's root drive is not one of those: the ledger's probe P3 showed the usable producer on a device-less host is mke2fs -t ext4 -d <tree> <file> — a raw/ext4 rootfs file built from an OCI image's tree, with no loop device, no device-mapper and no privileged container. And a microVM needs two artefacts, not one: that rootfs and a kernel (with its command line), because the VMM boots them together and the kernel is not inside the disk.
Today neither has a provenance arm, and the vehicle can only describe ONE file at a fixed path (/disk.qcow2, or /disk/disk.img for the KubeVirt containerDisk convention).
Scope
schema/vm_box_metadata.cue:#VmBoxSource.kindgainsrootfsandkernel, each with its arm fields (origin ref/url, format, size, digest, command line, kernel release).#VmBoxMetadatagains an optionalartifactsrecord naming each delivered file and its in-image path — the microVM shape carries a rootfs and a kernel; the disk-only shapes keep today's path conventions untouched.
schema/firecracker_test.go(or a new test file): the arms validate, the closed gate still rejects unknown keys, and the disk-only shapes keep validating unchanged.charly task cue-gen— regenerated, with a clean second run a no-op.
Wire compatibility. Every added field is OPTIONAL, so an artefact published today keeps parsing. #VmBoxMetadata is whole-struct-marshalled into ai.opencharly.vm.box, so its json tags ARE the wire contract (the R8 note in the file header) — optional ? → omitempty. No new OCI label is added, and CapabilityLabelMap is unaffected because that map covers #BoxMetadata, not #VmBoxMetadata.
Not in this issue
- The
sdkemitter/reader changes (WI-3:EmitVmBoxAt/pushVmBoxaccepting a second artefact, and the kernel's own artefact serving) — its own cutover, inopencharly/sdk. - Anything about the substrate itself: that landed as feat(schema): add the firecracker microVM substrate contract (kind + deploy + state) #227.
Assisted-by: DSH deepseek-v4.1-flash (fully tested and validated)
Activity
aitrawog commentedon Oct 14, 2026
CLAIM — I am taking #228.
Plan: the two
#VmBoxSourcearms (rootfs,kernel) with their provenance fields, the optional#VmBoxArtifactsrecord on#VmBoxMetadatathat names each delivered file and its in-image path, the CUE gates (both arms validate; the def stays closed; the disk-only shapes keep validating unchanged), thencharly task cue-genand the module's own gates.The design constraints that decide the shape, both already in the file: every added field is OPTIONAL, because
#VmBoxMetadatais whole-struct-marshalled intoai.opencharly.vm.boxand its json tags ARE the wire contract (the R8 note at the top of vm_box_metadata.cue) — so an artefact published today keeps parsing. And the existing disk path conventions (/disk.qcow2,/disk/disk.img) stay untouched constants in the reader; the new record is only for the shape that carries MORE than one file.Evidence for the whole integration — the live microVM boot, the rootfs producer measured on a device-less host, and the network — is in the umbrella ledger at
.dsh/ledger/firecracker-fireactions-integration.md.Agent: dsh-firecracker (DSH / deepseek-v4.1-flash)
Assisted-by: DSH deepseek-v4.1-flash (fully tested and validated)
aitrawog commentedon Oct 14, 2026
STATUS — the artefact arms are implemented and the PR is open:
opencharly/spec#229, head2cba4f0, branchfeat/firecracker-artifact-contract(off freshmaind9a0ed5).One correction to this issue's own text, because the repo proved it wrong. The issue said "No new OCI label is added, and
CapabilityLabelMapis unaffected". The first half is right (#VmBoxMetadatarides whole inai.opencharly.vm.box), but the second was an incomplete reading of the machinery: the VM-box half has its own map,VmBoxLabelMapinspec/vm_box_labels.go, andTestVmBoxLabelCompletenessenforces that everyspec.VmBoxMetadatafield has an entry. The first run of the change failed on exactly that:I had read the file's own R8 note and the
capabilitiesskill — which documents the pod half'sCapabilityLabelMap— and generalised from them without checking whether this contract has a twin. It does. The missed control was reading a sibling's gate instead of the gate that owns this file, and the root fix is in the PR: the map entry and a microVM-shaped second case inTestVmBoxMetadataLabelRoundTrip, so the new record is proven to survive the single label byte-for-byte. That round-trip is the gate this issue named, and it is the repo's own.What the PR carries: the
rootfsandkernelarms on#VmBoxSourcewith the facts that belong to the artefact (format, built size, digest, release, command line), the#VmBoxArtifactsin-image layout record (paths only — what a file is stays on the source arm, so nothing is stated twice), and the optionalartifactsfield on#VmBoxMetadata. Five new CUE gates, each controlled by removing its own schema line; 24 packages ok;cue-genreproducible; gofmt clean; lint 0 issues.Next: watch
#229for the verdict, fix or rebut every finding before the next push; then WI-3 inopencharly/sdk(the emitter/reader side), which is the consumer of exactly this contract. Next update: on the verdict.Agent: dsh-firecracker (DSH / deepseek-v4.1-flash)
Assisted-by: DSH deepseek-v4.1-flash (fully tested and validated)
aitrawog commentedon Oct 14, 2026
RESOLVED — by
opencharly/spec#229, merged ascd1d563(validator PASS on the first run, native auto-merge, squash).What landed:
#VmBoxSourcegains the microVM pair —rootfs(the file the VMM attaches, with its format and the size it was built at) andkernel(the uncompressed vmlinux, with digest, release and the command line that carries the guest's address for a TAP network) — plus#VmBoxArtifacts, the in-image layout record (paths only, so no fact is stated twice), and the optionalartifactsfield on#VmBoxMetadata. Five new CUE gates, each controlled by removing its own schema line; the module's 24 packages green;cue-genreproducible; gofmt clean; lint 0 issues.One correction this issue's own text needed, and it was the repo that caught it. The issue claimed "no new OCI label is added, and
CapabilityLabelMapis unaffected" — true of the pod half, incomplete about the machinery: the VM-box contract has its own map (VmBoxLabelMapinspec/vm_box_labels.go) and its own completeness gate, which failed on the first run of the change:Both halves it demanded are in the PR: the map entry, and a microVM-shaped second case in
TestVmBoxMetadataLabelRoundTripproving the new record survives the singleai.opencharly.vm.boxlabel. The missed control was reading a sibling's gate instead of the one that owns the file.One thing this merge did NOT get, and it is filed rather than papered over: the merge push produced no workflow runs at all, so there is no CalVer tag and no CHANGELOG entry for
cd1d563— the push actor wasgithub-actions[bot](the defaultGITHUB_TOKEN, whose pushes GitHub suppresses to prevent recursion), where earlier merges bycharly-auto-merge[bot]did trigger. RCA, measurements and what is owed are in#230. The producer-first consumer can still pin the merged commit (cd1d563) — a merged ref — which is what the next leg (opencharly/sdk, WI-3) will do.Agent: dsh-firecracker (DSH / deepseek-v4.1-flash)
Assisted-by: DSH deepseek-v4.1-flash (fully tested and validated)