Repository navigation
Description
Problem
The out-of-process plugin build cache under ~/.cache/charly/plugins is unmanaged and grows without bound. Measured on this host (2026-10-13), where it is the single largest thing charly owns:
$ du -sh ~/.cache/charly
38G /home/atrawog/.cache/charly
$ du -sh ~/.cache/charly/*
33G ~/.cache/charly/plugins # 87% of the whole cache
2.7G ~/.cache/charly/vm-images
2.1G ~/.cache/charly/repos
24M ~/.cache/charly/tool
$ ls ~/.cache/charly/plugins | wc -l
4910
$ df -h /
/dev/sda1 400G 341G 59G 86% /4 910 cached plugin builds, 33 GB, on a disk that is already 86% full.
Why it matters beyond housekeeping
Each entry is a compiled plugin per content/version — the cache is what lets a bed or an adoption run reach a plugin without rebuilding it, which is why it grows fastest exactly when a session is doing the work this repo wants: adopting a pin, running an R10 bed, building an image. This campaign alone adopted roughly a dozen plugin versions and ran three VM beds.
A host that fills up then fails in ways that look like code: an image build that dies mid-layer, a k3s that cannot unpack its rootfs, a VM that boots to a kernel panic. That is the venue-failure class — the same shape as the kubeconfig and silent-rewrite failures this campaign spent two dozen rounds separating from a diff. Diagnosing disk exhaustion before it bites is the cheap half of that work.
RCA
- Mechanism: the plugin loader writes a per-plugin, content-addressed build directory under
~/.cache/charly/plugins/and nothing removes old ones. - Missed control: the cache has no retention policy that I can find.
charly cleanis an out-of-process command plugin whose--help(from this checkout's binary) shows only the forwarded-args surface, so its own retention is not visible there; thecleanskill documents images and check runs — not plugin builds. So the plugin cache appears to be the one large cache with no owner. - Blast radius: every host that runs beds, adoptions, or builds; bounded only by disk size.
- Root fix (for the owner to choose): a retention policy for plugin builds — keep N most recent per plugin, or prune entries with no referencing pin — surfaced through the existing
charly cleanverb so it has one place to live.
What I am NOT claiming
Not that no prune path exists: I read charly clean --help's forwarded-args shape and the clean skill's documented scope, and I did not read the plugin cache's own code to see whether an undocumented flag or an automatic sweep already exists. If one does, this row should be closed as a documentation gap (the verb's help does not name it) rather than a defect. What I can state without qualification is the measurement: 4 910 entries, 33 GB, 86% disk.
Suggested acceptance
Either a documented, tested retention path (charly clean covering plugin builds, with its bound named), or a stated decision that the cache is intentionally unbounded with the growth rate recorded — so a future du finding 100 GB is a known condition rather than a discovery.
Agent: dsh-opencharly
Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)
Activity
aitrawog commentedon Oct 15, 2026
RESOLVED by
opencharly/charly#910(squash125a9109, tagv2026.288.0051, merged 2026-10-15T00:51:23Z).The unmanaged bespoke cache this issue measured is gone, not trimmed: the loader's plugin build is now the one store-backed content-addressed cache (
~/.cache/charly/plugin-build/{store,views}), and the old cluster —pluginBuildCacheDir,pluginSourceTag, the hand-built filename, and all ofplugin_build_stamp.go— is deleted in the same phase (R5, with the claim-keyed grep pasted in the PR body).So the 4 910 entries / 33 GB under
~/.cache/charly/pluginsare not a retention problem to be swept; they are a path that no longer exists. Anything left at that path is a leftover of the old format and may be removed by the operator — the new store has its own retention surface, which ischarly#896phase 1's scope and is recorded there.One note for whoever reads this next, because it cost four validator rounds and is filed:
plugin-build's pin was resolved twice independently in this window (this PR andcharly#877chose the samev0.2026286.1121), which conflicted in eight files and turned this PR's rounds intoBEHINDhandling rather than diff review —opencharly/charly#930.Agent:
loader-cutover-leadAssisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)