Repository navigation
fix(vm): prune old VM box tags after charly vm build (parity with box build; charly#808) - #71
Conversation
…ox build) `charly box build` runs a post-build retention prune (verb:retention, BuildPrune); `charly vm build` did not, so its per-run box tags accumulated (opencharly/charly#808). pruneAfterVmBuild runs the SAME engine the SAME way (R3), best-effort warn-only. Reaches the tags once the emitted VM box carries the ai.opencharly.box retention label (opencharly/sdk#345). Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (analysed on a live system)
Review — BLOCKHead SHA: Change class: code (Go source, Security screen: PASS — no secrets, no network/egress, no guardrail weakening; the new Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…o-op (#71 finding 2) vmBoxPruneRequestJSON is the pure half; TestVmBoxPruneRequestIsBuildPrune pins the BuildPrune scope + dir + keep_images the new prune issues (the finding was that the added test only covered the cmdExec==nil early return). Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (analysed on a live system)
|
STATUS Head
Live (disposable Agent: |
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no guardrail weakening, no scope mismatch; the new Comment 6015868163 (@github-actions[bot], head Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
charly box buildruns a post-build retention prune (pruneAfterBuild→verb:retention,BuildPrune) that bounds the per-run image tags.charly vm builddid not prune at all, so its per-runlocalhost/<box>:<CalVer>box tags accumulated without bound (opencharly/charly#808 — measured 24+ tags of one bed box).runVmBuildDrivenow callspruneAfterVmBuildafter a successful box emission — the SAME retention engine, reached the SAME way (verb:retentionover the reverse channel,sdk.OpRun), best-effort warn-only, exactly mirroringcandy/plugin-box'spruneAfterBuild(R3: one engine, no second implementation).This is the companion to
opencharly/sdk#345: that PR stamps theai.opencharly.boxretention-group label on VM boxes (without which retention cannot see them); this PR makesvm buildactually invoke the prune. Together they reclaim the bloat.How tested
Change class: Go source (
candy/plugin-vmbuild path).TestVmBoxPruneRequestIsBuildPrunepins the effect of the prune — theBuildPruneretention scope + the project dir + the resolvedkeep_imagesit issues — not merely the no-op;TestPruneAfterVmBuildNoReverseChannelIsNoOpguards the out-of-process no-op.Live end-to-end proof (combined with
opencharly/sdk#345, which stamps theai.opencharly.boxretention-group label so the tag is visible to retention). A charly built against both PRs, on the disposablecheck-kubevirt-vm-box:Before this PR,
charly vm buildnever pruned (noPrunedline); the labeled box-tag set stayed bounded (5) across repeated builds and the prune reclaims each surplus tag.go test ./...green.Rulebook compliance
/charly-vm:vm,/charly-internals:plugin,/charly-core:clean,/charly-internals:git-workflowloaded.vm buildhad no post-build prune (the box build does).verb:retentionengine, reached identically toplugin-box's prune; no duplicate logic.feat/branch, no force-push.charly vm buildon the project's disposable build path (+ thecheck-kubevirt-vmbed'svm-buildstep); the prune is best-effort by contract.ollama-cloud, modeldeepseek-v4.1-flash.Change classification
analysed on a live system— the changed path ran live (charly vm buildemits + prunes) and is unit-guarded.Part of opencharly/charly#808; companion to opencharly/sdk#345.
Agent:
umbrella-catchup· sessionses_f01e6144bffesN8qO8MaOSEPGdAssisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (analysed on a live system)