Skip to content

feat(vm)!: delete the authored body from the contract - #321

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/vm-contract-final
Nov 14, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/vm-contract-final

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

#304 unit 8, the contract leg. Everything the authored body needed has landed and merged — the body (plugin-substrate#42), its four vocabulary tables (#46), its tests (#43, #45), the envelope-direct arm (#44), the loader (sdk#514) and the two plugin-check collectors (plugin-check#149) — so this contract stops declaring the body.

Deleted (the chain is complete):

  • #Vm's seventy-three-line body in schema/vm.cue;
  • the #VmValue twin in node.cue;
  • the four vocabulary tables only the body cited (_backend, _machine, _vmFirmware, _vmKind) with their four public re-exports spec#320 added for it;
  • the spec-side copies of the four tests that moved: TestVmBackendKrunCrossRules, TestVmKrunDefaultsMaterialize, TestVm_MCPProvideSchemaParse, TestVm_MCPProvideYAMLRoundTrip;
  • VmSpec repoints from the deleted Vm to the surviving ResolvedVm.

KEPT, deliberately and measured: the resolve envelope #ResolvedVm and EVERY def it cites — #VmSource, #VmNetwork, #VmSsh, the #VmCloudInit family, the sixty #Libvirt* domain defs, #VmKrun, #VmSnapshot — plus #VmBackend/#VmBackendName (cited by #Deploy.backend and by the spec.VmBackends generator) and every table those keepers cite. A wire type's citations pin their defs in the contract; that is why only the body moved.

The assembled proof, which is what decides this leg: a workspace of charly + this contract (with #Vm deleted) + sdk + all 63 compiled plugins at their merged mains + the plugin-check branch builds clean:

$ GOWORK=/tmp/ws33/go.work go build ./...
$ echo build_rc=$?
build_rc=0

Before plugin-check#149 the same build failed on exactly two lines (undefined: spec.Vm at checkproject.go:322 and live_gather.go:360) — that is the check that the consumers landed first.

How tested

$ go build ./... && go vet ./...
$ # (no output)
$ go test -count=1 ./...
$ # every package ok, 0 FAIL
$ charly task cue-gen
  [pass] check — regen is reproducible — TestGenReproducible passes on the committed tree

The three vocabulary tests that outlived their file stay green, TestVmVocabularyReExports now pins the four re-exports that remain (the other four moved with their tables), and TestEveryTableIsCitedAndEveryCitationResolves passes because the deleted tables left with their only citer.

R10 honesty, premise pasted

$ ls | head -6
AGENTS.md
bin
cache
calver
capability
CHANGELOG
$ grep -c 'check:\|disposable:' charly.yml
3

spec is the contract module and owns no deployment bed; its change-class gate is its own Go suite plus the regeneration check, both pasted above. The DESIGN census runs in the umbrella on the pinned tree — this leg's census impact is measured when the pin advances (unit 8's wave).

Rulebook compliance

  • R0 - skills first; go, plugin and cutover-policy govern this class.
  • R1 - every anomaly was RCA'd in the leg that owned it: the body's move (unit 8's producer), the four orphaned tables (the contract leg's own measurement, which named them by test), and the two plugin-check collectors (the assembled build). Nothing is deferred and nothing is filed away.
  • R2 - no duplication: the body has one home, the envelope is the one projection, the four tables left with their only citer.
  • R3 - no workaround: no compatibility copy of #Vm, no alias left behind.
  • R4 - product before prose: the surviving defs' comments state what stays and why.
  • R5 - legacy deleted completely, by SUBJECT: the body, the twin, the four tables, the four re-exports, the four test copies and the alias, in one squash.
  • R6 - a worktree off fresh origin/main; one commit.
  • R7 - the assembled build is the behavioural proof, and it failed without the consumer legs.
  • R8 - live or skip: no service boundary in this change.
  • R9 - binary equals source: charly task cue-gen proves the generation reproducible on the committed tree.
  • R10 - fresh disposable proof: the assembled build and the suite above, on the committed tree.

Change classification

Kind: a contract deletion — the vm body with its four vocabulary tables, the twin, the four public re-exports, and the spec-side test copies; VmSpec repoints to the envelope. The defs that REMAIN for this kind are the resolve envelope, every def it cites (including the sixty-strong libvirt domain family) and the backend vocabulary the deploy and the generator use.

Breaking change + rollback: anything naming spec.Vm or #Vm/#VmValue breaks — and the org's consumers are adapted ahead of it: the body and its arm (plugin-substrate#42/#44), the loader (sdk#514), the two collectors (plugin-check#149), and the assembled build proves the whole graph. Rolling back is reverting this squash: the body, the tables, the twin and the generated types return, and the plugin's schema still serves because the wire never changed.

Filed issues

None — the unit's remaining work is its pin wave, tracked on opencharly/opencharly#1015's successor and on the ledger.

Files changed

file what changed
schema/vm.cue deleted #Vm, the four body-only tables and their four re-exports
schema/node.cue deleted the #VmValue twin
schema/engine_vocab_and_vm_backend_test.go deleted the two moved body tests
schema/vm_vocab_reexports_test.go pins the four re-exports that remain
spec/charly_names.go VmSpec repoints to ResolvedVm
spec/vm_mcp_provide_test.go deleted the two moved body tests
spec/cue_types_gen.go regenerated (the deleted body's Go types are gone)
spec/vocab_gen.go regenerated

Agent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

#304 unit 8, the contract leg. The vm body lives in the plugin that serves
the kind (plugin-substrate#42/#46), its tests moved there first (#43/#45), the resolve arm
decodes straight into the envelope (#44) and loaderkit names the envelope (sdk#514) - so
this contract stops declaring the body.

Deleted: #Vm's seventy-three-line body, the #VmValue twin in node.cue, the four
vocabulary tables only the body cited (_backend, _machine, _vmFirmware, _vmKind) with
their four public re-exports, and the spec-side copies of the tests that moved
(TestVmBackendKrunCrossRules, TestVmKrunDefaultsMaterialize, TestVm_MCPProvideSchemaParse,
TestVm_MCPProvideYAMLRoundTrip).

KEPT, deliberately and measured: the resolve envelope #ResolvedVm and every def it cites
(#VmSource, #VmNetwork, #VmSsh, #VmCloudInit family, the sixty #Libvirt* defs, #VmKrun,
#VmSnapshot), #VmBackend/#VmBackendName (cited by #Deploy and the spec.VmBackends
generator), and the tables the keepers cite. VmSpec repoints to ResolvedVm.

Proven by the ASSEMBLED build: charly + this contract + sdk + all 63 plugins at their
merged mains builds clean (rc=0), where it failed on spec.Vm before the consumers landed.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 84a1d1a6adfc5649d482e3bff32a7615f344263b (branch: feat/vm-contract-final)

Security screen: PASS — pure contract deletion; no secrets, no exfiltration, no guardrail/spec/rulebook edits, no supply-chain changes, no instruction-injection content.
Checklist: All applicable rules PASS or NA. Generated files (cue_types_gen.go, vocab_gen.go) change in lockstep with their CUE sources (vm.cue, node.cue) — SDD holds; every deleted table/re-export/test is accounted for and internally consistent; the #ResolvedVm keep-list explicitly excludes #Vm, so the repoint of VmSpec = ResolvedVm is coherent; the assembled-workspace build_rc=0 is real pasted proof; the four deleted tests move with the body to plugin-substrate; no surviving legacy/alias path; footer (Agent: then Assisted-by: AI form) correct; no comments on the thread to disposition.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

The go CI job's golangci-lint named two unused functions (allErrors in the engine-vocab
test, loadSchema in the mcp-provide test) and the compiler then named the imports those
deletions orphaned. All removed; the suite is green and the generation reproducible.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 432445f2bbe8f380a5704137c2c929ba651adcbd (branch: feat/vm-contract-final)

Security screen: PASS — pure contract deletion in spec; no secrets/egress, no guardrail/spec/rulebook edits, no supply-chain or @github ref changes, no instruction-injection content. T4 n/a (touches no security machinery).

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3: body accounts for all 8 files, classifies as contract-deletion (no bed exists — stated with pasted charly.yml premise), real assembled-build output pasted (build_rc=0), tier fully tested and validated justified by the compiled+tested+regen'd tree.
  • SDD: cue_types_gen.go / vocab_gen.go change in exact lockstep with vm.cue/node.cue (Vm, VmBackendWord, VmMachineWord, VmFirmwareWord, VmKindWord, #VmValue, KindValueDefs["vm"] all removed together); charly_names.go is a listed hand-written exception.
  • R5/R7: #Vm/#VmValue/the 4 tables/4 re-exports/4 test copies swept in one squash; TestEveryTableIsCitedAndEveryCitationResolves is the invariant that forces the table deletion, so coverage would fail without it.
  • ARCH: placement: CORRECT — the authored body's capability moves OUT to plugin-substrate; the spec module keeps only the resolve envelope + its cited defs. No capability into core, no alias growth.
  • QUAL: second commit (432445f2) drops the imports/helpers the moved tests orphaned — tree is build/vet/gofmt clean.

Comment disposition:

  • Comment 6881841786 (bot PASS) — stale-superseded on SHA: it reviewed 84a1d1a6, current head is 432445f2; re-derived independently, its substantive claims still hold on the current state (the fix commit only removes dead imports/helpers).

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 14, 2026 18:12
@github-actions
github-actions Bot merged commit 8f99255 into main Nov 14, 2026
4 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant