You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(loader): prove a REAL kind (vm) is filled through the served gates, and drop the literal injection #1158
The kind-gate seam has a test for a PROBE unit (TestKindGatesDriveTheDefaultsFill, two arms:
resolves through the threaded gate; fails with an empty spec.Threaded), but nothing proves the
REAL vm kind's body is filled from the served schema through the same seam. And charly/cue_tighten_test.go's ACCEPT cases still hand-injectautostart/backend/firmware,
so the suite stays green if ApplyCueDefaults/KindGates stop filling them.
Mechanism. The tightening harness validates the authored body directly
(ValidateEntityCUE, which passes nil gates by design), while the load path fills defaults first.
Injecting the literals was the cheapest way to keep those cases meaningful, and it also removed the
only place that would have caught a broken fill.
Missed control. No test asked "which case fails if the fill stops working?" for a REAL kind —
the probe test answers it for a synthetic one.
Blast radius. A regression in kindGates() or in the sdk's gate resolution could ship green:
plugin-owned bodies would silently lose their schema defaults.
Root fix (proposed). A test that decodes a minimal vm body into spec.VmSpec, runs requireProjectLoader().ApplyCueDefaults("vm", &v, loaderThreaded()), and asserts the filled
scalars equal the SERVED schema's own defaults; then remove the literal injection from the ACCEPT
cases so that test is the only thing keeping them green.
RESOLVED — implemented in #1157 (commit 6d43fa76).
TestKindGatesFillTheRealVmKind fills a real vm body (concrete cloud_image source) through ApplyCueDefaults("vm", &v, loaderThreaded()) and asserts the SERVED schema's defaults land: firmware=bios, backend=auto, autostart=false. Its negative arm runs the same fill with an
empty spec.Threaded and requires an error, so the test cannot pass if the gate stops serving the
served def.
cue_tighten_test.go's ACCEPT cases no longer hand-inject literals: the fill is derived from that
same seam (the values are the ones the fill produced), so a broken fill fails the harness instead of
being masked.
Activity
aitrawog commentedon Nov 15, 2026
RESOLVED — implemented in #1157 (commit
6d43fa76).TestKindGatesFillTheRealVmKindfills a realvmbody (concretecloud_imagesource) throughApplyCueDefaults("vm", &v, loaderThreaded())and asserts the SERVED schema's defaults land:firmware=bios,backend=auto,autostart=false. Its negative arm runs the same fill with anempty
spec.Threadedand requires an error, so the test cannot pass if the gate stops serving theserved def.
cue_tighten_test.go's ACCEPT cases no longer hand-inject literals: the fill is derived from thatsame seam (the values are the ones the fill produced), so a broken fill fails the harness instead of
being masked.
Gate:
go vet ./...= 0,go test ./...= 0.charly agent, session
owui-qdranttest(loader): fill a REAL vm body through the served gates, and deriv…
feat(loader)!: thread the served kind gates, and advance sdk/spec + p…