Skip to content

perf(container): remove npm cache from runtime image - #65

Merged
WH-2099 merged 1 commit into
mainfrom
perf/runtime-image-cache
Jul 24, 2026
Merged

perf(container): remove npm cache from runtime image#65
WH-2099 merged 1 commit into
mainfrom
perf/runtime-image-cache

Conversation

@Yevanchen

Copy link
Copy Markdown
Collaborator

What changed

  • remove npm's download cache from the existing runtime-package image layer
  • keep all installed Claude, Codex, OpenCode, Python, pip, and Driver artifacts unchanged

Why

The cache is build-time residue that is never read at runtime. Keeping it inflates every cold image transfer without adding a runtime capability.

Before / after

Measured on linux/amd64 from Driver main 0db020a, with a byte-identical Driver bundle:

  • uncompressed image: 2,360,829,157 B -> 1,788,930,473 B (-24.22%)
  • docker save | gzip -n -1: 1,068,600,282 B -> 693,094,196 B (-35.14%)

Verification

  • vp fmt --check
  • vp run lint
  • vp run tc
  • vp run test (1,063 passed, 20 live-provider tests skipped)
  • vp run build and executable artifact checks
  • image smoke: Driver, Claude, Codex, OpenCode, Python, and pip

This PR makes an image-size claim only; it does not claim a causal TTFT improvement.

@Yevanchen

Copy link
Copy Markdown
Collaborator Author

Clean-context review (delegated): APPROVE. Same-RUN-layer cache clean (real layer shrink, after all install verifications); runtime touches only ~/.npm/_cacache — installed trees and the mosoo-claude-code symlink untouched; no npx/--offline usage repo-wide; claims match staging measurements (pull/disk win, no boot-floor claim). Measured −24.2% uncompressed / −35.1% gzip. CI 3/3 green. Follow-up: superproject pin bump (currently d179ed2) to reach production.

@WH-2099
WH-2099 merged commit da74654 into main Jul 24, 2026
3 checks passed
@WH-2099
WH-2099 deleted the perf/runtime-image-cache branch July 24, 2026 10:17
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.

2 participants