Skip to content

perf(sandbox): zstd image layers, 60-day transcripts and a Docker Engine 24 check - #4629

Merged
yannickmonney merged 4 commits into
mainfrom
perf/sandbox-image-zstd-cjk
Oct 9, 2026
Merged

yannickmonney merged 4 commits into
mainfrom
perf/sandbox-image-zstd-cjk

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

The owner-approved image defaults:

  • zstd layers. Release images are pushed with zstd-compressed layers (level 3, force-compression, OCI media types), and the release registry cache keeps those zstd blobs, so an unchanged layer keeps its bytes and digest from one release to the next. PR and main builds compress new layers with zstd without re-encoding what their GHA cache holds. Sources for the expected gain are in the runtime README: zstd's own benchmark and AWS's Fargate measurement. Neither was measured on this image.
  • Minimum engine. zstd pulls need Docker Engine 23.0+ or containerd 1.5+. tale doctor now reports the engine as its own check, and the deploy/dev launch path refuses an engine older than 24 before it pulls any image. Only Docker's own Engine component is judged, since Podman numbers its releases its own way. The install docs (EN/DE/FR) state the requirement.
  • Claude Code transcripts. Retention drops from 365 to 60 days (managed-settings.json cleanupPeriodDays). A task resumed after its transcript is pruned relaunches fresh on its preserved workspace.

Not done: texlive-lang-chinese → texlive-lang-cjk. I checked the swap on the image's bookworm base: it saves about 127 MiB installed (650,842 → 520,535 KiB). But on TeX Live 2022, xeCJK loads ctexhook.sty, which only the ctex bundle in texlive-lang-chinese ships. With texlive-lang-cjk alone, a plain xeCJK document and pandoc's CJKmainfont path both stop with "File `ctexhook.sty' not found"; the current set typesets both. The package stays, and the Dockerfile now says why.

Tests

  • setup-checks.test.ts, deploy-preflight.test.ts, dev/index.test.ts (engine check).
  • build-ci.test.ts, ci-build-optimization.test.ts (zstd outputs and cache).
  • managed-settings.test.ts (60 days).
  • CLI type-check is clean.

The runtime's managed settings set cleanupPeriodDays to 365, so every
agent session's store on the organization's /agent volume kept a full
year of Claude Code transcripts, plans and file history. The owner
chose 60 days: twice the CLI's own 30-day default, so a standing
session's recent tasks still resume, at one sixth of the retention
window. A task resumed after its transcript is pruned is not lost: the
CLI answers the dead --resume handle with an empty errored window, and
the task runner relaunches fresh on the preserved workspace files.

A daemon unit test now holds the period, and the daemon's test task
hashes managed-settings.json so an edit to it re-runs that test.
Tale is about to publish its images with zstd-compressed layers, which
Docker pulls only from Engine 23.0 on (moby/moby#41759, #42862). The
repository already names Engine 24 as the oldest engine it supports
(the sandbox README and the generated Compose health checks), but
nothing checked it: an older engine would fail only once the image
download reached a zstd layer, with no word about the engine.

tale doctor now reports the engine as its own check and fails below
24.0; tale dev and tale deploy refuse such an engine before downloading
any image, with the zstd reason below 23.0 and the upgrade as the fix.
The verdict reads the server's Engine component (Docker Desktop reports
its own release number in Platform), falls back to the server version
for engines too old to list components, and only reports an engine
whose version cannot be read or that is not Docker's (Podman numbers
its releases its own way), so no other runtime is refused by number.

The install docs (EN/DE/FR) state the 24.0 floor and the zstd reason.
Release images are pushed with zstd-compressed layers (level 3, forced,
OCI media types) and the release build cache keeps those zstd blobs, so
an unchanged layer is never re-encoded and keeps its digest. Pull
request and main builds compress new layers with zstd too, without
forcing a re-encode of what their GHA cache holds as gzip.

zstd unpacks several times faster than gzip at a slightly better ratio.
Pulling needs Docker Engine 23.0+ (the CLI already requires 24) or
containerd 1.5+; the install docs say so in EN/DE/FR.
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.

1 participant