Skip to content

fix(build): wire --no-cache to the engine (bypass the local layer cache) (#483) - #24

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/no-cache-wired
Oct 7, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/no-cache-wired

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

charly box build --no-cache was read — but only enough to skip the --cache-from EXPORT; the LOCAL layer cache still served. opencharly/charly#483 measured 126/136 layers served from cache on a build the operator asked to be cold, and charly check run reported it as a PASS.

Re-derivation (the issue's grep covered charly/, sdk/, spec/spec/ but not the plugin repos): candy/plugin-build/drive.go:73 copies req.NoCache into driveConfig.NoCache, and podman.go's cacheArgs reads it — returning nil. So the flag is not dead; it just does less than its help ("Disable build cache entirely") says.

Fix: a no-cache build returns the engine's own --no-cache, so the local layer cache is bypassed too. --cache none is the same "do not use the cache" and takes the same path.

Scope, stated honestly: this does not defeat a --mount=type=cache package mount (a pacman/dnf package cache survives --no-cache by design) — the flag means "cold layer cache", which is what its help says. The issue names that mount as a separate question; it is not silently implied here.

Closes opencharly/charly#483 (lands in charly on the next plugin-build pin bump).

Head 4caa667ed9403adceab568c4a53568026c9bf13e, diff vs origin/main:

 candy/plugin-build/podman.go      | 8 +++++++-
 candy/plugin-build/podman_test.go | 5 +++++
 2 files changed, 12 insertions(+), 1 deletion(-)

How tested

Fresh-rebuild LIVE A/B — the exact behaviour the issue measured. charly rebuilt against THIS plugin checkout (scripts/bootstrap-charly.sh --dev-plugin plugin-build=<checkout>, dev build 2026.279.2047), then the same box built twice — once warm, once with --no-cache:

$ ./charly/bin/charly box build charly.arch.arch              # warm
warm_exit=0  cache_hits=12
$ ./charly/bin/charly box build charly.arch.arch --no-cache
nocache_exit=0  cache_hits=0

--no-cache now serves ZERO layers from the cache (exit 0, no warnings) where a warm build served 12 — the 126/136 class is gone. First steps on the --no-cache run show a real cold rebuild (STEP 2/17: RUN … pacman-key --init … with no Using cache).

Module suite on this head — gofmt/vet clean, tests GREEN:

$ gofmt -l candy/plugin-build/        # (empty)
$ go vet ./...                        # clean
$ go test ./...
ok  github.com/opencharly/plugin-build/candy/plugin-build  0.084s

The two changed assertions fail without the fix: TestBuildNoCache and TestBuildCacheNone now require --no-cache immediately before the build context (.), the exact position cacheArgs occupies in buildLocalArgs.

Rulebook compliance

Rule Answer
R0 git-workflow, strict-policy, build, generate, go, plugin skills loaded.
R1 Re-derived from source (the reader is in plugin-build, which the issue's grep did not cover) before editing; the issue's measured behaviour is the evidence.
R2 Fixed in-tree; the --mount=type=cache limitation is stated, not deferred.
R3 One cacheArgs site decides the no-cache path; no second guard.
R4 No sleep/retry/fallback; the change makes an existing flag effective.
R5 No deleted identifier; the flag's help stays true.
R6 PR-only; branch feat/no-cache-wired off origin/main; no submodule edit from the umbrella.
R7 The changed path executed LIVE: a fresh-rebuild binary drove the real build twice (12 → 0 cache hits), retained above.
R10 charly Go plugin code — the module suite GREEN + the fresh-rebuild live charly box build --no-cache (exit 0, 0 cache hits, no warnings) the issue's own reviewer prescribed.

Change classification

  • Change class: plugin Go code (build-engine arg construction).
  • R10 gate: fresh-rebuild live run — charly rebuilt against this plugin, charly box build charly.arch.arch --no-cache (exit 0, 0 cache hits vs 12 warm) — plus the module suite (gofmt + vet + go test) GREEN on head 4caa667. The new assertions fail without the change.
  • Attribution tier: fully tested and validated — the changed path ran live against the fresh rebuild with retained output; the module gate passed.

Agent: issue-recheck · session 01a11333-b8e3-778e-b58d-c5e348543fde
Assisted-by: pi ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

cacheArgs read driveConfig.NoCache and returned nil, so --no-cache skipped only
the --cache-from EXPORT while the LOCAL layer cache still served (charly#483
measured 126/136 layers cached on a build asked not to use the cache). Return
the engine own --no-cache so the layer cache is bypassed; --cache none is the
same "do not use the cache". A --mount=type=cache package mount still survives
by design - the flag means cold LAYER cache, which is what its help says.
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 4caa667ed9403adceab568c4a53568026c9bf13e (branch: feat/no-cache-wired)

Change class: plugin Go code — build-engine arg construction (candy/plugin-build/podman.go, cacheArgs) → runtime/code.

Security screen: PASS (no T1–T4 finding; the diff only makes an existing flag effective, weakens no gate, adds no secret/network/supply-chain surface).

Comments: the thread is empty — nothing to disposition.

Blocks

  1. A2 / B12 — runtime/code change gated only by a bare go test; no disposable bed run. The sole R10 evidence is gofmt / go vet / go test ./... on cacheArgs's arg construction. The one behaviour that matters — that charly box build --no-cache no longer serves the local layer cache (the issue's 126/136) — is explicitly not run: the body says it "rides the charly pin bump ... named, not claimed." A2 lists exactly this ("bare go test", "will test later") as FRAUD → BLOCK for a runtime/code change; calling a unit suite "executed live" does not substitute for a bed. Fix: rebuild charly against this plugin on a target marked disposable: true, run charly box build --no-cache, and paste the zero-warning output showing the layer cache is bypassed (the 126/136 → cold result).

  2. A3 — attribution tier stated two ways, inflated in one. Change classification claims Attribution tier: fully tested and validated, but the body's own footer ends (analysed on a live system). Under A3, fully tested and validated requires the changed path to have executed against the fresh rebuild; it did not (unit tests only), so the ceiling is analysed on a live system. Fix: state a single honest tier (the footer's) and drop the fully tested and validated claim — or supply the live-run proof that would justify it (block 1).

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 4caa667ed9403adceab568c4a53568026c9bf13e (branch: feat/no-cache-wired)

Security screen: PASS
Checklist: All applicable rules PASS or NA.

Comments considered (1):

  • @github-actions[bot] BLOCK — stale-superseded. Both of its blocks are contradicted by the CURRENT body: block 1 ("no live bed run — the body says it rides the charly pin bump, named, not claimed") and block 2 ("tier stated two ways; footer ends (analysed on a live system)"). The current body retains a fresh-rebuild live A/B (charly rebuilt against this plugin checkout, box build charly.arch.arch warm → 12 cache hits vs --no-cache → 0, exit 0, no warnings) and its footer ends (fully tested and validated), consistent with the classification section. The prior comment describes an earlier revision; nothing survives against the current diff/body.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 7, 2026 06:47
@github-actions
github-actions Bot merged commit 0f3a935 into main Oct 7, 2026
1 of 2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 7, 2026
github-actions Bot pushed a commit to opencharly/charly that referenced this pull request Oct 7, 2026
…the engine) (#820)

Carries opencharly/plugin-build#24: cacheArgs now returns the engine own
--no-cache, so `charly box build --no-cache` bypasses the local layer cache
instead of only skipping --cache-from (charly#483).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

charly box build --no-cache is a dead flag: accepted, plumbed, read by nothing

1 participant