You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vm: record the resolved source image ref in the per-VM state dir (charly clean --store cannot see it) #98
A VM's source image is not recorded in host state, so charly clean --store cannot see it
charly clean --store implements D-STORE-7 (DESIGN.md:2488): it keeps the charly image store's
entries that the HOST's charly state still references and evicts the rest. Its inventory is
enumerated and named (candy/plugin-clean/store_eviction.go):
the container engine's containers (podman ps -a — every container, running or stopped, by ref
and by image ID);
the quadlet units ($HOME/.config/containers/systemd/charly-*.container, Image=).
Both are records a BUILT IMAGE ends up in. A kind: vm deploy is not: its disk is the product, and
the container image the disk was built from (source.kind: bootc, or a container_disk boot) is
named only in the authored vm.yml/deploy entity — nothing under ~/.local/share/charly/vm/<domain>/ records the ref, so the sweep cannot tell that a store entry
is a live VM's base image.
Measured on this tree: no kind: bootc VM entity exists today (grep -rn 'kind: bootc' --include=*.yml
matches only candy manifests), so the gap is latent rather than an active hazard, and the
consequence when it does bite is a re-pull from the registry the ref names (recoverable), not a lost
deployment. It is filed rather than fixed here because the fix belongs to the VM substrate, not to charly clean:
write the resolved source ref (and, where it is a locally built image, its digest) into the
per-VM state directory at create/rebuild time — the same place disk.qcow2 and the instance
overlay live;
read it back as a state surface, so a sweep can name it as a reference.
Until then, a store entry that only a VM's authored entity names is classified unreferenced and
evicted, which is exactly why the sweep's scope is stated in its own doc comment and in its --store contract text rather than left implicit.
Activity
feat(clean): implement D-STORE-7 (--store) and route cache sweeps by …