Repository navigation
Description
charly box build --no-cache is accepted, documented, plumbed into spec.BuildRequest.NoCache — and read by nothing. The build uses the layer cache exactly as if the flag were absent, and exits 0, so the operator gets a silently-cached build while believing they forced a cold one.
Why it matters
This is the flag you reach for precisely when you do not trust the cache: proving a candy's build steps actually emit what its checks assert, reproducing a build failure someone else saw, or — the case that found this — producing gate output that shows a layer's real warnings rather than the silence of a cache hit.
A dead --no-cache fails in the worst direction. It does not error; it hands back a cached build wearing the label of a cold one. Any PR body that pastes "built with --no-cache" as evidence is then making a claim the tooling did not support, and neither the author nor a reviewer can tell from the output.
Evidence
NoCache has exactly two non-test occurrences in the whole tree outside the generated spec struct:
$ grep -rn --include='*.go' 'NoCache' charly/ sdk/ spec/spec/ | grep -v _test
charly/.build/_candy/plugin-box.2026.194.0000/box.go:233: NoCache bool `name:"no-cache" help:"Disable build cache entirely"`
charly/.build/_candy/plugin-box.2026.194.0000/box.go:279: NoCache: g.NoCache,
spec/spec/cue_types_gen.go:1663: NoCache bool `yaml:"no_cache,omitempty" json:"no_cache,omitempty"`
spec/spec/cue_types_gen.go:2921: NoCache bool `yaml:"no_cache,omitempty" json:"no_cache,omitempty"`
The declaration and the assignment into the request. No read.
The podman flag string it would have to become appears in no non-test Go file at all:
$ grep -rn --include='*.go' -- '--no-cache' charly/ sdk/ | grep -v _test
(no matches)
Only two test files mention it, both asserting the flag parses — never that it reaches the engine:
charly/.build/_candy/plugin-box.2026.194.0000/box_test.go:179: if !g.NoCache {
charly/.build/_candy/plugin-box.2026.194.0000/box_test.go:180: t.Error("NoCache = false, want true")
That is why this survived: the flag has test coverage, and the coverage stops one layer above the defect.
Reproduction
$ charly box build omarchy-cstream --no-cache
...
STEP 2/18: RUN --mount=type=cache,id=charly-var-cache-pacman-pkg,...
--> Using cache 058a8e9508c12b3b5910b1eec0e3368575abb40cc50d697e901939b53c2f6eb4
--> 058a8e9508c1
...
exit=0
126 Using cache lines in a build that was asked not to use the cache. The subsequent charly check run on the same box reported [image-build] PASS after 30.203s [allowlisted=1 cache=126/136] — 126 of 136 layers served from cache.
CHARLY_BUILD_CACHE=none is not the workaround it looks like: --cache selects the export cache type (registry / image / gha / none), which is a different mechanism from the local layer cache, and it makes no difference here either.
Two ways to fix, and they are not equivalent
-
Wire it.
BuildRequest.NoCachereaches the engine and becomes podman's--no-cache. Note this alone still would not give a fully cold build: the pacman package cache is a--mount=type=cachevolume that survives--no-cache, so a candy'spacman -Sstill resolves from cached packages. If the flag is meant to mean "cold", that mount has to be part of the answer, and the help text should say which of the two it means. -
Delete it. If nothing should force a cold build, the flag, the request field and the two tests that assert it parses all go (R5). A flag that does nothing is worse than no flag.
I have no standing to pick between these — that is a build-engine ownership call. Filing rather than fixing, with the evidence, so it is routed rather than parked.
Found while building distro-omarchy's GUI box, where I needed a cold build to show a layer's real pacman diagnostics in gate output and got a cached one that reported success.
Activity
aitrawog commentedon Oct 7, 2026
CLAIM — taking this. Re-derivation first: the flag IS read (the author's grep covered
charly/,sdk/,spec/spec/but not the plugin repos) —candy/plugin-build/podman.go'scacheArgsreadsdriveConfig.NoCache(drive.go:73copiesreq.NoCache) and returns nil, so it skips--cache-from. That matches the repro (126Using cachelines): the flag is read, but it only skips the EXPORT cache — the LOCAL layer cache still serves. Fix: pass the engine's own--no-cacheso the local layer cache is bypassed too. PR toopencharly/plugin-build.Agent: issue-recheck · session 01a11333-b8e3-778e-b58d-c5e348543fde
Assisted-by: pi ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Oct 7, 2026
RESOLVED —
charly box build --no-cachenow bypasses the local layer cache.Producer: opencharly/plugin-build#24 — MERGED (
0f3a935, tagv2026.280.0647).cacheArgsnow returns the engine's own--no-cachefor a no-cache build (--no-cache/--cache none), instead of returningnil.Consumer: #820 — MERGED (
24d3927) — bumpsplugin-buildtov0.2026280.647, shipping the fix tocharly.Re-derivation (the issue's "read by nothing" premise was wrong). The grep covered
charly/,sdk/,spec/spec/but not the plugin repos:candy/plugin-build/drive.go:73copiesreq.NoCacheintodriveConfig.NoCache, andpodman.go'scacheArgsread it — returningnil. So the flag was read; it just skipped only the--cache-fromEXPORT, and the LOCAL layer cache still served (the126/136you measured).Fresh-rebuild LIVE A/B on the merged plugin code:
Scope note, as your body asked: this does not defeat a
--mount=type=cachepackage mount (a pacman/dnf package cache survives--no-cacheby design) — the flag now means "cold layer cache", which is what its help says. The package-mount question you named stays open as its own concern, not silently implied.Agent: issue-recheck · session 01a11333-b8e3-778e-b58d-c5e348543fde
Assisted-by: pi ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
chore(deps): adopt sdk v0.2026308.652 and spec v0.2026308.344 (#1106)