Skip to content

the charly-invoked pixi stage leaves its cache mount unpopulated where an identical controlled build retains it #1289

Backlog

Description

@aitrawog

Category

category:delivery

Type

type:fix

Remedy / files the remedy will touch

the pixi builder stage invocation (cache-mount id/flags, candy staging path, builder env) — after the Step R spike names the variable; sdk/kit/builder_resolve.go and spec/deploy/deploy_ops.go CandyStageDirName are the candidates

Cited design decision or org-rulebook rule (or none)

AGENTS.md R2, R7

Classification

Non-blocking — genuinely separable; left unclaimed for a later session to pick up.

Evidence (verified: commands with output, file:line, measurements)

# 2400 s cold bed build (2026.330.1322), pixi stage: 36.5 min, 1.9 % CPU, 79 established sockets
# cache-mount snapshots found on disk afterwards:
#   .../snapshots/34917/fs/cache -> pkgs (43 packages), 219M   (no repodata: --frozen solves nothing)
#   .../snapshots/34869/fs/cache -> empty                      (the RATTLER_CACHE_DIR mount pixi never writes)
# controlled buildkit builds with the IDENTICAL mount flags retained content across builds:
#   build 1 wrote pkgs/repodata/uv-cache; build 2 (fresh layer, same id/flags) read them back, SIZE=4.4M
# image-build durations: 2400 s cold -> 90 s same tree -> 683 s new ref
$ buildctl --addr unix:///run/user/1000/charly/buildkitd.sock du --verbose | grep -A4 'cached mount /tmp/pixi-cache'
Usage count:	10
Last used:	2026-11-26 13:58:47 UTC
Type:		exec.cachemount

Mechanism

In a 2400 s image build the charly-invoked pixi install --frozen stage ran 36.5 min network-bound and left its cache mount without content that could be found on disk (one cache snapshot held 43 packages/219 M, another was empty), while controlled BuildKit builds using the identical --mount flags and PIXI_CACHE_DIR retained pkgs/repodata/uv-cache across builds (4.4 M read back). The variable that differs — the shared path-derived cache id under concurrent builds, the builder image's pixi config, or the ref-keyed candy staging path — is not yet isolated.

Missed control

Nothing asserts that a pixi build's cache mount RETAINS content; the cache's health is inferred from wall-clock time, and a ref change re-copies the candy under .build/_candy/., invalidating the layers regardless of the mount.

Blast radius

Every pixi-based image build: cold builds measured 2400 s, a same-tree rebuild 90 s, and a new ref 683 s — the last is the case a ref-keyed stage makes expensive.

Root fix

After the spike names the variable, make the stage's COPY source content-addressed (CandyStageDirName) and/or scope the cache mount per project, and assert the mount's retained content in the build summary.

Spike (its result, or none with the reason)

Controlled buildkit builds with the exact stage flags retained the cache across builds; the charly-invoked stage did not. That is the reproduction boundary the spike from here narrows.

Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

Activity

  1. added
    category:delivery
    type:fix
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:deliverytype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions