Skip to content

Set SWT-bench cache-mode default to max#547

Merged
simonrosenberg merged 1 commit intomainfrom
fix/swtbench-cache-mode-max
Mar 20, 2026
Merged

Set SWT-bench cache-mode default to max#547
simonrosenberg merged 1 commit intomainfrom
fix/swtbench-cache-mode-max

Conversation

@simonrosenberg
Copy link
Collaborator

Summary

Change the default cache-mode for SWT-bench image builds from off to max.

Why

With the ARG ordering fix in SDK PR #2522, registry cache will provide cross-SDK-bump cache hits for apt-get and npm install layers. But this only works if cache is actually exported (cache-mode=max).

The off default was set in PR #541 because registry cache had a 100% miss rate — the ARG before apt-get made every layer hash SDK-specific. With the ARG moved after the expensive layers, the cache tags are stable across SDK bumps and registry cache becomes effective.

Validated

A/B test (#544): cache-mode=max + ARG fix → apt-get CACHED from registry, 2.1x faster per image (154s vs 322s).

Depends on

SDK PR #2522 (ARG ordering fix). Without it, cache-mode=max adds export overhead with no cache benefit.

Once SDK PR software-agent-sdk#2522 lands (ARG ordering fix), registry
cache will provide cross-SDK-bump cache hits for apt-get and npm layers,
cutting per-image build time by ~50%.

Refs: #544
Copy link
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Good taste - This is textbook pragmatic engineering.

What's Right:

  • Solving a real, measured problem (2.1x build speedup: 154s vs 322s)
  • Minimal change (2 lines)
  • Dependency verified (SDK PR #2522 merged 6 minutes ago)
  • A/B tested before changing default

VERDICT: ✅ Worth merging immediately

KEY INSIGHT: This is what good engineering looks like - measure the problem, fix the root cause upstream (ARG ordering), validate the improvement, then flip the default. No complexity, no over-engineering, just results.

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.

Dockerfile ARG ordering causes full rebuild on every SDK commit

2 participants