Repository navigation
Description
What
Add the firecracker microVM substrate to the contract: a kind: firecracker entity + a deploy: firecracker node, its persisted deploy state, and the two hand-maintained vocabulary lists that must name it.
This is the first leg of the Firecracker + Fireactions integration into charly (the full plan and its RDD proofs are in the umbrella's ledger, .dsh/ledger/firecracker-fireactions-integration.md).
Why the schema first (SDD)
A substrate is registered by its plugin, but recognized by the contract: the deployable-kind vocabulary, the per-kind value gate the host consults, the persisted-state field, and the template/resolve envelope are all CUE-owned here. kubevirt is the precedent and the shape to mirror — it cost 15 files in spec and zero edits in charly core, because a substrate reaches the kernel only by resolving to a VenueDescriptor + InstallPlan.
Scope (this issue)
schema/firecracker.cue— the closed#Firecrackerdef: the host surface (vmmincl. the jailer posture,kernel,networkwith TAP/CNI + forwarding + resolver,containerd,fireactionswith its pools) and the per-instance surface (image,machineincl. drives and rate limiters,mmds,cloud_init,vsock,serial/logger/metrics,snapshots).schema/node.cue—#ResourceKindgainsfirecracker;#FirecrackerValue: (#Firecracker | #DeployValue).schema/firecracker_client.cue— the host↔plugin internal wire family.schema/substrate_template.cue+schema/resolvedproject.cue— the resolve-to-envelope form and the template map arm.schema/deploy.cue—firecracker_state+#FirecrackerDeployState.schema/firecracker_test.go— the same gateskubevirthas: the derivedKindValueDefsentry,ResourceKindsmembership, a realistic template accepted through the value gate, and an unknown key rejected.- Regenerate with
charly task cue-gen(a clean second run must be a no-op).
Venue decision, stated here because it is the load-bearing one: a Firecracker microVM is reached over SSH, so it reuses venue: "ssh" and adds no new venue value. It must therefore omit exclusive_venue — otherwise the libvirt arm of IsVmVenue (ssh ∧ exclusive) would misroute it into charly vm build/vm create, which is exactly the bug fe624e5 fixed for kubevirt.
Two residue gaps fixed in passing
While touching these enums, two kubevirt leftovers get closed, each proven by a claim-keyed grep in the PR:
schema/deploy.cue's closedtarget?:enum still lists six words (kubevirt was never added).schema/status.cue's#SubstrateKindstill lists six while the hand-written Go const inspec/status_types.goalready hasSubstrateKubevirt.
Not in this issue
- The image/kernel artefact contract (a
#VmBoxSource/#VmBoxMetadataarm for a raw rootfs + a separate kernel) — that is its own cutover. - The plugin, the host-install layer and the beds — they follow, producer-first, in their own repos.
Assisted-by: DSH deepseek-v4.1-flash (analysed on a live system)
Activity
aitrawog commentedon Oct 14, 2026
CLAIM — I am taking #226.
Plan, in the order I will do it: the
#Firecrackerdef and its nested blocks, the#FirecrackerValuegate +#ResourceKindmembership, the client wire family, the resolve-to-envelope form and the template map arm,firecracker_state, the four gates infirecracker_test.go, thencharly task cue-gen(a second run must be a no-op) andGOWORK=off go test ./.../go build ./....The venue decision is the load-bearing one and is stated in the issue: a Firecracker microVM is reached over SSH, so it reuses
venue: "ssh"and adds no venue value, and it must omitexclusive_venue— otherwiseIsVmVenue(ssh ∧ exclusive) would misroute it intocharly vm build/vm create, the exact bugfe624e5fixed for kubevirt.Also closed in passing, each proven by a claim-keyed grep in the PR body: the
target?:enum inschema/deploy.cueand#SubstrateKindinschema/status.cue, neither of which was extended when kubevirt was added.Evidence for the whole integration — including the live microVM boot, the network, and the fireactions guest contract — 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 (analysed on a live system)
aitrawog commentedon Oct 14, 2026
STATUS — the contract is implemented and the PR is open:
opencharly/spec#227, head4a02503, branchfeat/firecracker-substrate-contract(off freshmainad8ccff).Done in this PR: the closed
#Firecrackerdef (host surface + per-instance surface), the#FirecrackerValuegate and#ResourceKindmembership, the host↔plugin wire family, the resolve-to-envelope form + template-map arm,firecracker_stateon#Deployand#DeployState, and the substrate discriminator on both the CUE and the hand-written Go side. Seven gates, three of them controlled by removing their own schema line;cue-genreproducible, 24 packages ok, lint 0 issues.The two residue gaps named in the issue are fixed here, and the grep that proves them is pasted in the PR body with an exact anchor —
grep -m1 'target?: (', because a baretarget?:also matchesbed_target?:and misreports the count.Two authoring-side anomalies, root-caused and fixed before the commit rather than left in the history:
devmapper,blockfile) accepted AND both unusable ones (overlayfs,native) refused.git checkout -- <file>, which discards uncommitted edits and silently reverted three schema files mid-round. Recovered in full and re-verified (grep + full suite + regen) before the commit, and the control method is now snapshot-and-restore instead of git-checkout-to-HEAD. Control: commit before running any mutation control.One ledger correction this work produced, per R1: the ledger listed a
version.cuebump for this work item, but the repo's ownAGENTS.mdstates the#SchemaVersionstamp, thecharly.ymlversion:field and the equality gate were deleted (CHANGELOG/0.2026270.938.md) — there is nothing to bump, and the ledger line is being corrected rather than followed.Next: watch
#227for the validator verdict and fix or rebut every finding before the next push; then, producer-first, the consumer pin bump and the plugin leg. 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#227, merged asada497aand taggedv0.2026287.1134(tag-on-mergewroteCHANGELOG/0.2026287.1134.mdfrom the PR body).What landed: the closed
#Firecrackerdef (host surface + per-instance surface),#FirecrackerValueand the#ResourceKindmembership, the host↔plugin wire family, the resolve-to-envelope form and the template-map arm,firecracker_stateon#Deployand#DeployState, and the substrate discriminator on both the CUE and the hand-written Go side — plus the two residue gaps this issue named (target?:and#SubstrateKind, which had drifted from the Go consts), each with a gate that fails without it.Nine gates, every acceptance gate asserting completeness;
charly task cue-genreproducible; 24 packages ok; lint 0 issues. Two review rounds: the first found the def's header contradicting the def (imagerequired while the comment permitted a host-only template), and controlling that fix exposed a defect in my own acceptance gates — plainValidate()accepts a missing required field as incomplete, so those gates could not fail. Both are fixed, with the measured controls in the PR.The consumer leg is not in this PR and is the next step: the umbrella pins
specthrough a gitlink (Policy B), socharly task sync+ a pin-bump PR takesv0.2026287.1134, after which the plugin legs (WI-3sdk, WI-4plugin-substrate, WI-5plugin-firecracker) can be built against it.Agent: dsh-firecracker (DSH / deepseek-v4.1-flash)
Assisted-by: DSH deepseek-v4.1-flash (fully tested and validated)