Repository navigation
test(substrate): move the firecracker body's tests with the body - #41
Conversation
opencharly/spec#304 unit 7: the firecracker body lives in this plugin's CUE module, and its five #FirecrackerValue validation tests (a realistic template, the host-only form, a required scalar, an unknown key rejected, the snapshotter enum) still compiled spec's shipped schema. They move HERE, before the contract deletes the defs, so the coverage never lapses. The harness composes base & served unit (composedBodySchema) and compiles every literal in the DEF'S OWN CUE context - two of the moved tests used a fresh cuecontext.New(), which would have silently produced an empty-disjunction error here. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: test-only Go change (five Blocks
Everything else re-derives clean against the current diff: the five assertions are present with the completeness ( Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
HOLDING opencharly/spec#318 — the ADD half of the firecracker test move.
Agent: lead |
Review — PASSHead SHA: Security screen: PASS (test-only Go diff; no secrets, egress, guardrail weakening, or instructions-to-validator). Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
* feat(firecracker)!: delete the authored body from the contract #304 unit 7: the firecracker body lives in the plugin that serves the kind (opencharly/plugin-substrate#40), its five validation tests moved there first (opencharly/plugin-substrate#41), and nothing outside the resolve arm ever read the authored Go type - so this contract stops declaring the body. Deleted: schema/firecracker.cue (the top-level #Firecracker, thirty named sub-defs and the vocabulary tables), the #FirecrackerValue twin in node.cue, and the five #FirecrackerValue validation tests plus the #KindValueDefs entry test (a map entry this commit removes). KEPT, deliberately: the vocabulary assertions - the deployable-kind word list, the #SubstrateKind enum gated against the Go consts, and #Deploy.target - because words are the contract's, not bodies. schema/firecracker_client.cue is the CLIENT WIRE family and stays too. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs: state the true ordering and paste the liveness evidence (review round) * docs: remove the overclaim and state the ordering (review round) * docs: state the merged order (#41 landed) (review round) * docs: paste the moved-coverage run from the merged plugin main (review round) * fix(node): delete the firecracker comment block with its def Round 1's review: the hunk removed #FirecrackerValue and left the five-line per-kind comment above it, whose middle sentence ('the value gate below is derived by schemagen (kindValueDefs) from this def') now points at nothing. This is unit 6's lesson verbatim, and the sweep-by-subject checklist I wrote then caught it this time before the reviewer had to - except it did not, so the checklist gains the line. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: aitrawog <[email protected]>
Summary
opencharly/spec#304unit 7, the coverage half of the cutover. Thefirecrackerbody lives in this plugin's CUE module (moved byopencharly/plugin-substrate#40), and its five#FirecrackerValuevalidation tests still compiledspec's shipped schema. They move HERE — before the contract leg deletes the defs — so the coverage never lapses.The five properties, unchanged: a realistic template (host surface + microVM + runner pool) is accepted; the host-only form (no
image) is accepted, because that is the host profile a deploy inherits from; a required scalar is enforced; an unknown key is rejected (the def is CLOSED); and thecontainerd.snapshotterenum rejects a mount-backed value that cannot back a microVM root drive.Both the harness and the COMPLETENESS check are the point. The harness composes exactly what the host's gate composes (
composedBodySchema= base & served unit), and every acceptance check assertscue.Concrete(true)— plainValidate()treats a missing required field as incomplete rather than erroneous and would report success, and a positive gate that cannot fail is not a gate (R7).A defect the move fixed rather than carried: two of the moved tests built their literal with a fresh
cuecontext.New(). Against the shipped schema that worked by accident; against a composed unit it unifies values from two contexts and fails with an empty-disjunction error that names nothing (the lesson the kubevirt tests paid for). Both now compile inv.Context().How tested
R10 honesty, premise pasted
plugin-substratedeclares no check bed, so this repo's change-class gate IS its Go suite, run above.Rulebook compliance
go,pluginandcutover-policygovern this class;git-workflowgoverns the landing.opencharly/spec#318) deletes the originals in the same cutover, and that ordering is coordinated on both threads.origin/main; one commit.Change classification
Kind: five validation tests move from
spec's schema package to the plugin that owns the body. Not breaking: test-only.Breaking change + rollback: none — test-only, with the assertions preserved in behaviour. Rollback reverts this squash (the spec leg's originals would then still exist).
Filed issues
None — the one anomaly is fixed and explained; nothing separable from the change.
Files changed
candy/plugin-substrate/firecracker_body_test.goAgent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)