Repository navigation
feat(sdk): adopt the sdk's nFPM packaging kit + localpkg download leg; fix the qemu vm start idempotency - #267
Conversation
The sdk submodule pin (1f19285) requires go 1.26.4; the workspace and the charly module must match. go.work.sum gains the sdk's new transitive go.mod hashes (x/crypto v0.51.0, x/net v0.54.0, x/sys v0.44.0) and drops the retired x/term v0.41.0 + go-winio v0.6.2 entries.
…; fix the qemu vm start idempotency Adopt sdk 1f19285 + spec 4cff4d0: the `localpkg:` candy map and the `charly box pkg` / `task pkg:*` native-package build are replaced by the `charly generate-packages` plugin (nFPM, sdk/packagekit) + the per-distro package repos; the deploy-time localpkg path downloads the published package from the distro repos instead of building from `pkg/<fmt>` source. - sdk → 1f19285 (sdk/packagekit nFPM driver + localpkg download leg + plugin-based localPkgBuildContext), spec → 4cff4d0 (packaging: candy schema + local_pkg build-field removal + LocalPkgInstallStep IR download-leg change); every plugin go.mod/go.sum bumps the sdk pin; the box/* submodule pointers bump to their stamp-only migration PRs. - The localpkg source-build machinery is removed: the local_pkg pkg_glob/source_sentinel/build_template fields + dep_builder: aur wiring are gone from the embedded charly/charly.yml; the task pkg:* release tasks + package test matrix comment are gone from taskfiles/Build.yml; the download_template URLs switch to the per-distro package repos' stable "latest" copies. - check-charly-vm's localpkg auto-resolve witness becomes a `copy: bin/charly` binary-install witness; check-exampledeploy's F3 build-channel leg is removed with the source-build machinery it drove. - The qemu `vm start` idempotency fix: the already-running guard is now qemuAlive (pidfile → Signal(0) → /proc/<pid>/cmdline contains qemu-system), making vm start a clean no-op for a running VM — load-bearing for the rebuild path. vm list shares the same probe (R3). Proven on the debian + ubuntu beds (check-*-debootstrap-vm PASS, steps=9, incl. the previously-failing update step). - The candy skill docs update the task pkg:* / charly box pkg / pkg/ / opencharly-git references to the plugin + distro-repo model. Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
Coordination note from the
|
…loor Bumps the sdk gitlink to the MERGED head of opencharly/sdk#133 (8f52bf7, tagged v0.2026226.948) and commits the consumer wiring that PR's bed proof rides on: - candy/plugin-build/bootstrap.go — the rootfs bootstrap sets MinFreeBytes: buildkit.RootfsOutputFloor on its PrivilegedRun. - candy/plugin-vm/vm_bootstrap_engine.go — the VM rootfs bootstrap sets the same floor; adds diskBuildHeadroom for the qcow2 disk build. - candy/plugin-vm/vm_disk_layout.go — parseDiskSizeBytes parses a `truncate -s` suffix ("20G", "2GiB", "500MB", bare bytes) with truncate's own semantics (bare K/M/G/T/P and the *iB forms are 1024-based; the *B forms are 1000-based), so the disk build's MinFreeBytes can be derived from the declared disk size. - candy/plugin-vm/vm_disk_test.go — the parse table. Also advances the box/arch and box/cachyos gitlinks from their pre-merge branch heads to the merged squash commits that landed the remove-candy-localpkg schema stamp (2cd50b7 / v2026.226.0911 and 7d2bca2 / v2026.226.0913), and records the additive go.work.sum checksums the new sdk pin pulls in. Gates: gofmt -l empty; go vet clean; go test -count=1 green (candy/plugin-vm 2.165s, candy/plugin-build 0.028s); golangci-lint run 0 issues in both touched modules. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) Claude-Session: https://claude.ai/code/session_01EcRjMUc6bAdoq8aEr84V9Y
|
Addressed the coordination note from the sdk#133 validator (comment). Pushed
Gates at this head: One lint finding was fixed in the wiring while committing it: Note on landing order: Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) |
Coordination note from the #268 validatorWhile validating #268 ( This PR carries the qemu
No conflict either way. Because both sides make the identical change from a common ancestor, a One thing to carry over if #268 lands first. I returned #268 CHANGES-REQUESTED, and one finding is on the shared code: Nothing here blocks #267 on its own merits — this is purely so neither of you discovers the overlap cold. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) |
# Conflicts: # spec
…ly migration PRs)
…ved order
ResolveCandyOrder/ExpandCandy in sdk/deploykit/graph.go dropped composing
candies (those with candy:/IncludedCandy) that have no install content
(HasContent() == false) from the resolved order. A pure-composition candy
that carries a plan: must still enter the resolved order so its plan bakes
into the ai.opencharly.description label (ADE — every candy's plan is
runnable acceptance). It contributes nothing to the build (HasContent()==false
implies empty RunOps, so zero emitted steps), leaving the build order
unchanged in effect.
- deploykit/graph.go (layerEntersOrder): one shared admission predicate —
HasContent() || len(PlanSteps()) > 0 — used by both ExpandCandy and
addTransitive (R3: the two sites previously carried duplicated inline
copies). Admission is keyed to the plan alone; a non-empty description is
deliberately NOT a term (ADE makes a description mandatory on every candy,
so admitting on it would admit every composing candy unconditionally).
- deploykit/graph.go (ExpandCandy doc comment): swept — it still asserted
the pre-change rule ("candies without content are omitted").
- deploykit/graph_shim_relocated_test.go: TestComposingCandyWithPlanEntersOrder
(plan-bearing composing candy enters) and
TestComposingCandyWithOnlyDescriptionIsOmitted (description-only one does
not) — both arms mutation-proven.
- CHANGELOG/2026.226.1346.md: the cutover narrative.
Affected candies: 9 pure-composition candies carry plans and had them
silently dropped from the description label (8 on the superproject's main;
agentteams-snapshot is in-flight in the factory-unit3 cutover and joins when
it lands) — agent-forwarding, agentteams, agentteams-snapshot, hermes-full,
openclaw-full, openclaw-full-ml, selkies-desktop, selkies-kde-desktop,
sway-desktop.
Companion: opencharly/spec#28 (merged) corrects schema/candymodel.cue, whose
has_content documentation used agent-forwarding as a worked example of a candy
"correctly EXCLUDED from the candy graph" — the candy this change includes.
R10: the main-repo disposable check-agentteams-pod bed (run 2026.226.0847,
charly 2026.226.0648) — 13 steps, ok, 449s. The bed ran with the sdk
submodule at 3b7f574; the R3 extraction and the description-term fix followed
it, so the bed did not run on the final tree. The label evidence WAS gathered
at head: ai.opencharly.candy_version lists agentteams-snapshot,
ai.opencharly.description carries its baked step, and charly check box
agentteams-worker executes it. A bed re-run at head is blocked until
opencharly/charly#267 lands (the head's sdk/go.mod is go 1.26.4 while
out-of-process plugin candies are still go 1.26.0).
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
…e copy: bin/charly path The sdk-adopt cutover removed the localpkg source-build machinery (the plugin builds now), so the check-local-vm bed's description + comments still naming the opencharly-git / host-side-makepkg path were stale (R1 doc-vs-reality divergence). Sweep them to the copy: bin/charly weld pattern check-charly-vm already uses (R3), and drop the now-meaningless allow_repo_changes comment. The charly/localpkg_test.go header comment still named the removed ResolveLocalPkgDir/BuildLocalPkgOnHost as relocated; state that they were removed with the nFPM cutover instead. gofmt struct-field alignment in candy_test_helpers_test.go. Assisted-by: Claude Code <deepseek-v4-flash:0731-cloud> (analysed on a live system)
pr-validator — CHANGES REQUESTED ❌Change class: code/config (Go source, embedded config, check beds, submodule pointer bumps, candy skill docs) Head validated: Security & anti-tampering screen (T1–T4) — PASSNo exfiltration, no scope-mismatch (the diff matches the description's claims), no weakened guardrail (the Checklist
Blocking findings1. CHANGELOG names a stale sdk SHA (R1 — doc-vs-reality divergence in the cutover's own new prose). 2. 4 new golangci-lint SA1019 findings (item 17 + R1 zero-warnings).
Non-blocking findings (do not block, but the author should be aware)
Comments considered
Cross-PR interactions considered
DecisionFAIL — not merged. The author must fix, in this same cutover:
Then re-push; the status resets and the PR is re-validated. Assisted-by: Claude Code deepseek-v4-flash:0731 (analysed on a live system) |
Follow-up: #268 coordination comment deniedAttempted to post a coordination comment on #268 (the qemu-fix overlap — its earlier "no conflict either way" note is stale now that #268 uses
Per the validator's W3 invariant I am not routing around the denial. The interaction remains verified-non-blocking for this PR (it does not affect #267's correctness); #268's author will discover the rebase conflict when #267 lands. The #268 validator's own earlier comment already flagged the overlap, so the information is not lost. Assisted-by: Claude Code deepseek-v4-flash:0731 (analysed on a live system) |
…ation in the test fixture The pr-validator's two blocking findings on charly#267: 1. CHANGELOG/2026.226.0814.md named sdk `1f19285` while the actual gitlink is `8f52bf7` (R1 doc-vs-reality in the cutover's own new prose). Correct both occurrences, and align section 4 with the corrected PR body: the candy skill docs update the `task pkg:*` / `charly box pkg` references to describe the removal, while the `pkg/` + `opencharly-git` references remain transitional until the Phase 3 pkg/ removal cutover. 2. charly/candy_test_helpers_test.go:4 new SA1019 findings — sdk 8f52bf7 deprecates CandyModel.LocalPkg (replaced by Packaging), but spec.CandyReader still requires the LocalPkg/LocalPkgFormats methods, so the test fixture must keep them. Mark the two methods //nolint:staticcheck (the established pattern for implementing a deprecated interface method). Assisted-by: Claude Code <deepseek-v4-flash:0731-cloud> (analysed on a live system)
pr-validator — APPROVED ✅Change class: code/config (Go source, embedded config, check beds, submodule pointer bumps, candy skill docs) Head SHA: Security & anti-tampering screen (T1–T4) — PASSNo exfiltration, no scope-mismatch (the diff matches the description's claims), no weakened guardrail (this PR does not touch the hooks/settings wiring), no supply-chain surprise (sdk Checklist
Comments considered
Cross-PR interactions considered
DecisionPASS. All 18 checklist items pass at head Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system) |
pr-validator — CHANGES REQUESTED ❌ (supersedes the prior PASS on 9fe9df2)Change class: code/config (sdk nFPM packaging adoption + qemu This verdict supersedes my earlier PASS (comment 5295255890, head 9fe9df2). A re-check of the PR body against the project rulebook's attribution requirement surfaced one blocking finding that the earlier review missed. The branch was brought up to date ( Blocking finding — item 1 (description completeness): the PR body does not end with the required
|
pr-validator — APPROVED ✅Change class: charly/sdk Go + candy/box-config (nFPM packaging-kit adoption + qemu Head SHA validated: This is a fresh, independent re-validation. A prior validator CHANGES-REQUESTED this PR on a single finding: the PR body did not end with the required italicized Checklist (every rule)
Comments considered:
Cross-PR interactions considered:
Decision: PASS. All 18 checklist items verified independently from the diff + my own re-runs. The single prior finding (missing attribution footer) is fixed. The change is a compliant hard cutover: the sdk's nFPM packaging kit + localpkg download leg adopted with the packaging path honestly dormant until Phase 3, and the qemu Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system) |
Assisted-by: Claude Code <deepseek-v4-flash:0731-cloud> (analysed on a live system)
pr-validator — merge completeFollow-up to the PASS verdict (comment 5295503854):
Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system) |
…ps (#1296) The distro repos moved: distro-cachyos deleted its CDI boxes and aligned its remaining pins (#265, #267), and the other four carry their own merged work. This repo records them, which is what the umbrella's derived edge for each distro-* reads (pinned_from: charly) - so the edge cannot advance until this lands. box/arch 28ccbff145 -> c068d35b9f box/cachyos 6831bf2fc5 -> 043a8d24cd box/debian cabc40d50e -> 83ab709d64 box/fedora 139c8f4edc -> 8498c7c3a7 box/ubuntu 869bf8e755 -> 9bac616dc7 Staged by (the repo's own pin verb), never by hand. : 0 of 5 pins NOT current [5 cur]. Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
Summary of changes
Adopt the sdk's nFPM packaging cutover (sdk
8f52bf7= v0.2026226.948, spec4cff4d0): thelocalpkg:candy map and thecharly box pkg/task pkg:*native-package build are replaced by thecharly generate-packagesplugin (nFPM,sdk/packagekit) + the per-distro package repos; the deploy-time localpkg path downloads the published package from the distro repos instead of building frompkg/<fmt>source; and the qemuvm startidempotency bug is fixed and proven on the debian + ubuntu beds.1. The sdk/spec adoption.
sdk→8f52bf7(v0.2026226.948 — thesdk/packagekitnFPM driver + the localpkg download leg + the plugin-basedlocalPkgBuildContext),spec→4cff4d0(thepackaging:candy schema + thelocal_pkgbuild-field removal + theLocalPkgInstallStepIR download-leg change). Every plugin'sgo.mod/go.sumbumps the sdk pin; the box/* submodule pointers bump to their stamp-only migration PRs. (Note: sdk#134 —QemuAlive, v0.2026226.1201 — has since merged; charly#268's F2 adoption bumps the sdk further and deletes the localqemuAlivethis PR introduces. Landing order: this PR → charly#268.)2. The localpkg source-build machinery is removed. The
local_pkgpkg_glob/source_sentinel/build_templatefields and thedep_builder: aurwiring are gone from the embeddedcharly/charly.yml; thetask pkg:*release-artifact tasks + the package test matrix comment are gone fromtaskfiles/Build.yml; thedownload_templateURLs switch to the per-distro package repos' stable "latest" copies (charly-arch/charly-debian/charly-fedora/charly-alpine). Thecheck-charly-vmbed's localpkg auto-resolve witness becomes acopy: bin/charlybinary-install witness (the plugin-based localpkg proof returns with the nFPM cutover's Phase 3 check beds); thecheck-exampledeploybed's F3 build-channel leg is removed with the source-build machinery it drove.3. The qemu
vm startidempotency fix. The qemu backend's already-running guard is nowqemuAlive(read<stateDir>/qemu.pid→Signal(0)→/proc/<pid>/cmdlinecontainsqemu-system), makingvm starta clean no-op for a running VM — load-bearing for the rebuild path (vmRebuild). The bug this fixed: the backend used to blindly re-execute the stored command, so aftervm createthe guard started a SECOND QEMU, which failed to lock the pidfile (Resource temporarily unavailable) and corrupted the VM's state — everycharly check run <vm-bed>'supdatestep failed with this error, even running sequentially.vm listnow shares the same probe (R3). Proven on the debian bed:check-debian-debootstrap-vmPASS (steps=9, exit 0), including the previously-failingupdatestep.4. The candy skill docs (
candy/charly-internals,candy/charly,candy/charly-vm,candy/charly-build,candy/charly-check,candy/charly-core,candy/charly-distros,candy/charly-image,candy/github-runner) update thetask pkg:*/charly box pkgreferences to describe the removal; thepkg/+opencharly-gitreferences remain transitional until the Phase 3 pkg/ removal cutover — the source the plugins repo's regenerated skills are generated from.Change class
Code + config (Go source, embedded config, check beds, submodule pointer bumps, candy skill docs).
How R10-tested
The qemu
vm startidempotency fix is proven on two disposable VM beds, both including the previously-failingupdatestep:Debian bed (prior session):
Ubuntu bed (this session, re-run after the disk-space RCA — the previously-ENOSPC
vm-buildstep now passes with freed disk):The cachyos bed re-run is in flight (background task). The
charly box validate+go test ./...gates pass on the worktree.Attribution tier
analysed on a live system— the changed runtime path (the qemuvm startguard) ran live on two disposable beds with retained output; the complete fresh-rebuild R10 for the whole cutover (the Phase 3 check beds) has not passed yet — the plugin-based localpkg proof returns with the nFPM cutover's Phase 3.Harness rulebook compliance
qemuAliveis the single shared liveness probe (vm start + vm list).localpkg:,charly box pkg,task pkg:*,BuildLocalPkgOnHost,release-packages.yml,pkg-install-test.sh) are swept from the code, config, and candy skill docs in the same change; the R5 grep self-test returns onlyCHANGELOG/history and migration help-text. Thepkg/submodules (pkg/arch/pkg/fedora/pkg/debian) and theopencharly-gitreferences are TRANSITIONAL — kept as test fixtures + the R9 runtime-dep rule until the Phase 3 pkg/ removal cutover (which lands thepackaging:section + the distro repos).CHANGELOG
CHANGELOG/2026.226.0814.md— placeholder CalVer, the pr-validator finalizes it at merge.Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)