Repository navigation
Conversation
…n-vm (P8b-rest) The last un-migrated piece of the box-build-engine core-minimization program: charly vm build's privileged pacstrap/debootstrap/bootc-install exec, qemu-img create/resize/convert, and cloud-init seed rendering move from charly/ core into candy/plugin-vm, mirroring the inversion candy/plugin-build's podman drive already went through in an earlier P8b wave. The "vm-build" host-builder shrinks to PREP+RESOLVE only. Also fixes a stale "build-resolve" host-builder-name comment (renamed to "build-prep" in an earlier wave) found via this cutover's R1 sweep in candy/plugin-box/plugin.go and candy/plugin-build/plugin.go. Verified via: go build/vet/test + golangci-lint (0 issues) on charly, candy/plugin-vm, candy/plugin-box, candy/plugin-build; charly box validate exits 0; charly box generate's full .build/ output tree is byte-identical between a clean origin/main build and this branch (zero cross-coupling with the box-build render path); EmitDiskBuildScript's rendered scripts are byte-identical before/after the move. Assisted-by: Claude Sonnet 5 (fully tested and validated)
…ilure The prior commit's git add invocation (candy/plugin-box/plugin.go candy/plugin-build/plugin.go charly/vm_bootc_install.go ...) hit an invalid pathspec for an already-git-rm'd file and silently staged none of the still-existing modified files in that call. Caught before push review by re-running git status --short after committing (R1: never trust a commit without re-checking git status matches intent). This completes the actual P8b-rest change: host_build_vm_build.go's PREP+RESOLVE rewrite, candy/plugin-vm's vm_build.go dispatcher + vm_cloud_image.go additions, the plugin.go comment fixes, and the test-file moves. Assisted-by: Claude Sonnet 5 (fully tested and validated)
Contributor
Author
12 tasks done
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 19, 2026
…er-drop heads (#1219) `./bin/charly task sync` — this repo's own pin verb, which advances EVERY pin this repo declares — moved the two `box/*` gitlinks that were behind the ref their own `.gitmodules` entries name: box/cachyos 7f0c6c15fe5d -> ba2c187a1626 (distro-cachyos main: #209's CDI VM-driver drop, #199, #211 and #212's pod-comfyui offload pins) box/fedora 01887aee5c9a -> e9696d3e85f8 (distro-fedora main: #129 and #131, the same VM-driver drop on the Fedora side) The other three (`box/arch`, `box/debian`, `box/ubuntu`) were already at the tips their `.gitmodules` declare. Both advances are fast-forwards onto merged heads (`git -C box/cachyos merge-base --is-ancestor 7f0c6c15fe5d ba2c187a1626` -> rc=0, and the same for fedora), so there is nothing to reconcile. Control after the wave: currency: 0 of 5 pin(s) NOT current [5 cur] What the `box/*` gitlinks actually govern here, measured rather than assumed (#1218): the `cachyos` namespace is composed by the @github TAG pin (`charly.yml:30`), so `charly box list boxes` exposes the tag's box names and not one `-cdi` box — the distro beds are NOT what this moves. The gitlink is what this repo's OWN gate reads: `charly/cue_kinds_corpus_test.go` (the `../box/*/box/*/charly.yml` corpus), `charly/refs_sweep_test.go` and `charly/build_test.go` (`LoadBuildConfigForBox` over this repo's production box/cachyos distro config). That is where the corpus was run, and it passes on the moved trees. This is the hop that lets the umbrella's `charly:box/cachyos` and `charly:box/fedora` edges become current — until it lands, both report `blocked-by charly:box/...` (behind). Agent: `edge-1182` · DeepSeek Harness session `a8d6ae4d-d0e0-4b37-8e6c-58081b9e6040` Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (fully tested and validated)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
P8b-rest Tier 1 — moves the VM-disk BUILD ENGINE (privileged pacstrap/debootstrap/bootc-install exec, qemu-img create/resize/convert, cloud-init seed rendering) out of
charly/core and intocandy/plugin-vm, the same inversioncandy/plugin-build's podman drive already went through in an earlier P8b wave (HostBuild("build-prep")). This was the last un-migrated piece of the box-build-engine core-minimization program's VM slice.Removed from core (fully superseded):
charly/vm_build.go,vm_bootstrap.go,vm_cloud_image.go,vm_disk_builder.go,vm_bootc_install.go, andfilelock.go's now-unusedacquireVmBuildLock(its sole caller moved plugin-side, replaced there bykit.AcquireFileLockon the identical lock path).resolveBootcImageRefstays host-side inhost_build_vm_build.go— it needsresolveLocalImageRef's local podman-storage inspection, a core-only Mechanism.Added to
candy/plugin-vm:vm_privileged_runner.go(RunPrivileged+renderBootstrapScript),vm_disk_layout.go(EmitDiskBuildScript/DiskLayout),vm_bootc_engine.go(BuildBootcVM, now taking a host-pre-resolved image ref),vm_bootstrap_engine.go(BuildBootstrapVM+ the pacman.conf renderers, taking the host-pre-resolved + inheritance-flattened distro/builder), andBuildCloudImage+ the content-freshness stamp added to the existingvm_cloud_image.go.vm_build.go'sVmBuildCmd.Run()decodes the host's resolve reply and dispatches to these engines directly.host_build_vm_build.go(the"vm-build"host-builder) shrinks to PREP+RESOLVE only: it loads thekind:vmentity, resolves the matched distro/builder + inheritance chain, pre-resolves/builds the bootc and bootstrap-builder image refs, resolves engine/rootful mode, and reads the entity's existing deploy-ledger state — everything a plugin importing onlysdkcannot do itself.R1 finding, fixed in the same commit:
candy/plugin-box/plugin.goandcandy/plugin-build/plugin.goeach had a comment naming the box-build host-builderHostBuild("build-resolve", ...)— renamed to"build-prep"in an earlier P8b wave, but these two comments were missed then (companion fix insdk/spec/deploy_wire.go, see the sdk PR). The plugins-repo skill docs describing this seam were already correct on currentmain(re-verified against the real branch content of both the docs' own repo main AND the in-flightfeat/binary-discipline-docsPR branch — no plugins-repo change needed anywhere for this finding).Non-blocking finding, routed to the P16 tracker (not fixed here):
charly/host_build_render_seam.goexists in current core and is in NEITHERkernelFloorNORresidueOwnerin the P16 kernel-manifest-gate branch's tracker — an unowned file. Recommendation for the tracker:kernelFloor, clause M — it's the render-seam callback dispatcher:sdk/deploykit's wire-basedGeneratorcalls back host-side, in-proc, for the handful of things needing the LIVE core graph (init-fragment generation, builder stage context, candy copy-source resolution) rather than pre-computable wire data; dispatch is by seam-name, never branching on kind.Depends on: opencharly/sdk#57 (must merge first — this branch's
sdkgitlink points at that PR's feat commit for now; re-point to the merged commit once it lands).Landing note: per the Cutover Sizing Law, this PR's own R10 roster (
check-charly-vm+check-local-vm) is exactly the roster consolidated wave-1 PR #127 already runs, with zero file overlap against #127's other members — so this content lands folded into #127 (one roster proves both) rather than as its own solo landing. This PR is being closed with a pointer to #127's P8b-Tier-1 section, which quotes this body.Change class
code/config (build-engine relocation, no schema/behavior change to the emitted artifacts)
How R10-tested
The gate for this change class:
go build/go vet/go test/golangci-lint runon every touched module +charly box validate+charly box generatebyte-parity against a cleanorigin/mainbuild (no bed applies — no runtime deploy behavior changed, only which process runs the disk-build exec).Fresh rebuild:
task build:binaryran against this branch's final committed tree (not a dirty working copy);charly version/box validate/box generateall ran against that fresh binary.Did the CHANGED code path execute live?
charly box generate(which exercisesNewGenerator/loader/render — unaffected by this move, proven byte-identical) ran live. The moved VM disk-build ENGINE itself (privileged podman exec, qemu-img, bootc install) did NOT execute live in this PR — it needs adisposable: trueVM bed (qemu-img/losetup/privileged podman), which is a LONG-class bed. Per the R10 gate-by-change-class matrix, the short gates (build/test/lint/parity) are the author's; the orchestrator owns the long VM bed as a background task once this content is gate-green in #127 — noting all VM disks on the host were purged in a prior cleanup, so that bed run will exercise this moved engine completely from scratch (a genuine fresh-rebuild proof, not a cache hit). This PR's tier reflects that split — see below.Concurrency: N/A — no shared-state path touched (the per-entity build lock moved plugin-side unchanged, same lock path, same blocking semantics).
Process incident (self-caught, fixed before push — recording for the record)
Partway through committing this branch, a multi-path
git addcall (git add candy/plugin-box/plugin.go candy/plugin-build/plugin.go charly/vm_bootc_install.go ...) hit an invalid pathspec —charly/vm_bootc_install.gohad already been staged for deletion by an earliergit rm, so re-listing it as an add target made the whole invocation fail and silently stage NONE of the still-existing modified files in that call (candy/plugin-box/plugin.go,candy/plugin-build/plugin.go,candy/plugin-vm/vm_build.go,candy/plugin-vm/vm_cloud_image.go,charly/debootstrap_test.go,charly/filelock.go,charly/host_build_vm_build.go,charly/vm_bootstrap_test.go). The resulting first commit was pushed with the OLD 38-linehost_build_vm_build.gostill committed — referencing the now-deletedVmBuildCmdtype, which would not compile.Caught it by re-running
git status --shortimmediately after the commit (a standing habit, not luck) and diffinggit show HEAD:charly/host_build_vm_build.goagainst the working-tree file — the mismatch was immediately visible. Fixed with a second, separate commit on the same branch (fix: include the VM-engine-move edits dropped by a partial git-add failure) — never amended, never force-pushed — then re-ran the ENTIRE gate suite (build/vet/test/lint on every touched module,charly box validate, the byte-parity diff) against the corrected final tree before pushing again. All evidence pasted above is from that corrected, re-verified state.Attribution tier
analysed on a live system
Justified: every gate that COULD run without a VM bed actually ran live (pasted above), including the strongest available proxy for "does the moved code work" — full box-generate byte-parity and go test/lint on the actual moved functions. The privileged-container exec itself is unverified until the orchestrator's VM bed run;
fully tested and validatedis reserved for after that bed passes.Rule-compliance checklist
/charly-internals:go,/charly-internals:plugin(placement + the F10 HostBuild seam),/charly-internals:install-plan,/charly-build:build//charly-build:generate(the build-engine dispatch this mirrors),/charly-vm:vm.git statusclean + full rebuild/test/lint against the corrected final commit before push.RunPrivileged/pacman-conf renderers into one sharedsdk/kitfunction instead of duplicating into the plugin" finding is NOT fixed here (it would touchcharly/build.go+charly/privileged_runner.go, both P15-owned residue-tracker territory) — routed to the named P8b-rest Tier-2 batch, not parked indefinitely. Similarly,host_build_render_seam.go's unowned-tracker status is reported above, not fixed here (the orchestrator owns the P16 table edit).RunPrivileged,renderBootstrapScript,renderPacstrapExtraConf,renderRuntimePacmanConfare duplicated (not shared) into the plugin deliberately, per the R2 note above; every ported function verified byte-identical-modulo-import-qualifiers against its core original viadiffagainst git history. R3 debt, explicitly tracked (not smuggled): plugin-vm'sRunPrivilegedduplicatescharly/privileged_runner.go's body; unifying into onekit.RunPrivilegedshared by both box-build and vm-build is deferred to the Tier-2 batch (task fix(build): user-scope the image build lock on the full ref (cross-project race) #14).git grep '"build-resolve"'returns zero live hits repo-wide (only the unrelated "build-resolved" adjective phrase remains); every deleted core file's functions verified to have zero remaining callers before deletion (grepacross the whole tree, symbol by symbol).origin/mainworktree (not a destructive stash) for the before/after parity comparison; removed viagit worktree removewhen done.task build:binary, worktree-local, no system-wide install); no new runtime OS dependency introduced (qemu-img/podman/bootcwere alreadyPKGBUILDdeps for the pre-existing core VM-build engine).plan:/description:changed.resolveBootcImageRef) that a sdk-only candy genuinely cannot perform. No newcharly/*_aliases.go, no newcharly/import of an sdk mechanism kit beyond the pre-existingdeploykitimporthost_build_vm_build.goalready carried.disposable: true.gofmt/golangci-lint(0)/go vet/go testall pasted above.CHANGELOG/2026.197.0700.mdstaged.Assisted-by: Claude Sonnet 5 (analysed on a live system)