Skip to content

feat(vm)!: per-deploy VM domain + qcow2-overlay isolation — collision-free eval VM beds (#33) - #87

Merged
atrawog merged 3 commits into
mainfrom
feat/p33-vm-naming
Jul 13, 2026
Merged

atrawog merged 3 commits into
mainfrom
feat/p33-vm-naming

Conversation

@atrawog

@atrawog atrawog commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

The superproject half of #33 (VM naming: the libvirt domain is keyed by the DEPLOY, not the shared kind:vm entity) — the runtime that lands atop the sdk (#35) + plugins (#41) halves of this chain.

Several disposable vm: check beds reference ONE shared kind:vm entity via from: (e.g. check-builder-vm / check-substrate / check-group-vm / check-structkind-vm all from: eval-vm). Keying the libvirt DOMAIN by that shared ENTITY collided them on one domain + one disk + one host SSH port. This cutover keys the domain — and every per-domain resource (state / NVRAM / ssh key / seed ISO / ssh-port / instance-id) — by the DEPLOY name (vmshared.VmDomainIdentity), with a per-deploy qcow2 overlay over a read-only entity base, so sibling beds are collision-free by construction and the long VM beds run CONCURRENTLY.

  • --domain on charly vm create/start/stop/destroy/console; destroy-by-domain.
  • Read side per-deploy (bedVmDomains / checkVmTarget / Runner.vmTargetName) so the libvirt:/spice: check verbs address charly-<deploy>.
  • Base-build FLOCK + content-signature idempotent skip-if-fresh (acquireVmBuildLock + the .build.stamp) makes the concurrent vm build <entity> preflight safe — RDD-proven (two concurrent builds → one builds, one skips, qemu-img check clean).
  • Fixes the nested-child SSH-alias seam (deploykit.VmChildExecutor caller) the concurrent R10 caught (the fix itself is the sdk half).
  • R2 fold-ins: plugin-vm (14) + plugin-preempt (3) tabwriter-errcheck + dead-code lint cleanup; the --domain-aware post-create console hint.

Submodule pointers

Change class

Go code + config + submodule pointers (runtime class).

BREAKING CHANGE

deploykit.VmChildExecutor signature drops the *BundleNode param — the sole caller (charly/bundle_add_cmd.go) is updated in this PR.

#33 R10 verdict (verbatim)

  • check-builder-vm: PASS (steps=9), 192s, ok:true — vm-build(skip-if-fresh) / vm-create / deploy-add / deploy-check-builder-member ✓ / bring-up-members / check-live / check-live-member ✓ / update ✓ (fresh rebuild) / cleanup ✓. CHARLY_EXIT=0
  • check-substrate: PASS (steps=9), 178s, ok:true — same shape, deploy-check-substrate-member ✓ + check-live-member ✓ + update ✓ + cleanup ✓. CHARLY_EXIT=0
  • CONCURRENT: both launched simultaneously, fully-overlapping (178s / 192s) — two same-from: eval-vm beds → distinct domains (charly-check-builder-vm ∥ charly-check-substrate), independent overlays, distinct cloud-init identities, both to steady-state, both torn down clean (0 leftover domains / stanzas).

Verification

Attribution

Assisted-by: Claude (fully tested and validated).

https://claude.ai/code/session_01K8sisEzaiAnFuMBRVfQ7P5

…-free eval VM beds (#33)

The superproject half of #33 (VM naming: the libvirt domain is keyed by the DEPLOY, not the shared kind:vm entity). Keys the libvirt domain / per-domain state / NVRAM / ssh key / seed ISO / ssh-port / instance-id per DEPLOY (via vmshared.VmDomainIdentity), with a per-deploy qcow2 overlay over a RO entity base, so sibling eval VM beds sharing one entity via 'from:' get distinct, collision-free domains and run CONCURRENTLY. Adds --domain to vm create/start/stop/destroy/console; the read side (bedVmDomains / checkVmTarget / Runner.vmTargetName) is per-deploy so the libvirt/spice check verbs address charly-<deploy>. Base-build FLOCK + content-signature idempotent skip-if-fresh makes the concurrent vm-build preflight safe. Fixes the nested-child SSH-alias seam (deploykit VmChildExecutor caller) the R10 caught. Also: plugin-vm/-preempt tabwriter + dead-code lint cleanup (R2); the --domain-aware post-create console hint.

Submodule pointers: sdk -> 2977d5c (v0.2026194.659, incl. VmDomainIdentity + the deploykit seam fix), plugins -> 55800b2 (the skill claim-sweep). charly/go.mod require bumped to v0.2026194.659.

R10: the concurrent-boot VM-bed pair check-builder-vm || check-substrate PASS (distinct domains, independent overlays, distinct cloud-init identities, both to steady-state + fresh update + clean teardown). Delta re-gate on top of #86 (1a7e62a): go test ./... + golangci-lint 0 (empty code overlap — sdk gitlink only).

BREAKING CHANGE: deploykit.VmChildExecutor signature drops the *BundleNode param.

Assisted-by: Claude (fully tested and validated)
Claude-Session: https://claude.ai/code/session_01K8sisEzaiAnFuMBRVfQ7P5
@atrawog

atrawog commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly/sdk Go + config + submodule pointers (runtime class).

Validated adversarially by a FRESH evaluator on the assembled tree @606ea97. One blocking finding; everything else is green and the placement is correct — this is a single, fast fix.

❌ BLOCKING — R10 concurrent roster ran 2 of 4 eval-vm-sharing beds

The cutover's claim is that EVERY disposable bed sharing the eval-vm entity is collision-free by construction. The CHANGELOG itself (lines 3-5) names four: check-builder-vm, check-substrate, check-group(-vm), check-structkind(-vm) — all from: eval-vm. But the R10 concurrent roster ran only the pair check-builder-vm ∥ check-substrate (0629, corroborated on disk, ok:true). check-group and check-structkind have no run on disk — .check/ holds only the two.

They are not redundant with the pair. Each nests vm: {from: eval-vm} at a deeper 3-level nesting (group/structkind → vm → local), so they exercise two code paths the top-level pair does not:

  1. the nested-vm-member per-deploy domain derivation (vmDomainIdentity(memberKey) for check-group-vm/check-structkind-vm), and
  2. the nested-child SSH hop INTO that per-deploy domain — the exact seam that failed round-1 (Could not resolve hostname charly-eval-vm), now reached via a nested vm member.

The concurrency mandate ("run the disposable roster concurrently at maximum parallelism, never one-bed-at-a-time; a subset does not prove concurrency-safety") requires the full same-entity roster launched at once — proving 4 distinct domains, the 4-way base-build FLOCK contention, and the deeper nested-member seam. 2-of-4 under-covers a change whose entire purpose is collision-free concurrent same-entity beds.

Fix: run check-builder-vm ∥ check-substrate ∥ check-group ∥ check-structkind concurrently on the assembled tree; paste all four per-bed results; push the fix commit (the status resets and I re-validate). (I did not self-run: charly/volumes.go — a #86 rebase file — is newer than the per-worktree binary, so the stale-binary guard needs a shared-binary rebuild, which a validator must not unilaterally do mid-program.)

✅ Everything else — verified green

✅ PLACEMENT REVIEW → placement: CORRECT

  • GOAL-FIT: advances the plugin-host end-state — the VmDomainIdentity derivation lives in sdk (vmshared, a kind-blind reusable kit), the --domain flags + per-deploy orchestration in candy/plugin-vm, the venue lifecycle in candy/plugin-deploy-vm.
  • PLACEMENT/mechanical: the +1 line in charly/vmshared_aliases.go (vmDomainIdentity = vmshared.VmDomainIdentity) is the established zero-churn re-export seam — added to the existing vmshared var() block, not a new import — and the correct minimal way for core call-sites to reference the sdk-homed function (scattering ~8 imports would be strictly worse). Only stdlib encoding/json added.
  • COUNTERFACTUAL: the qcow2 overlay-skip + FLOCK grow the pre-existing core vm-build engine (HostBuild("vm-build"), a K-wave-tracked incomplete seam). They are required concurrency-safety co-located with the disk-build they guard, and move OUT with the engine at its K-wave — not a new engine, correct co-location.

Decision: CHANGES REQUESTED. Land-ready in every dimension except the concurrent R10 roster — run the two missing eval-vm beds (check-group, check-structkind) concurrently with the pair, paste all four results, and re-push. I re-validate + merge on the fix.

Assisted-by: Claude (analysed on a live system)

atrawog added 2 commits July 13, 2026 09:51
…ter (all GREEN)

Replaces the 2-bed R10 reference with the verbatim 4-bed concurrent roster (check-builder-vm + check-substrate + the 3-level-nested check-group + check-structkind, all from: eval-vm, run SIMULTANEOUSLY against a fresh per-tree binary) — the deep-nesting coverage the round-1 roster lacked, exercising the nested-vm-member per-deploy domain + the nested-child SSH hop (the round-1 failure seam), now GREEN. Evidence-only; no code change.

Assisted-by: Claude (fully tested and validated)
Claude-Session: https://claude.ai/code/session_01K8sisEzaiAnFuMBRVfQ7P5
pr-validator version stamp for #33 superproject runtime half (per-deploy VM domain + qcow2-overlay isolation).

Assisted-by: Claude (fully tested and validated)
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