Skip to content

fix(docker): vendor only the image's platform in the builder stage - #394

Merged
debugmcpdev merged 1 commit into
mainfrom
fix/docker-vendor-current-platform-only
Aug 21, 2026
Merged

fix(docker): vendor only the image's platform in the builder stage#394
debugmcpdev merged 1 commit into
mainfrom
fix/docker-vendor-current-platform-only

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

Problem

pnpm test:coverage's Docker prebuild failed: inside docker build, the builder stage's pnpm run build triggers prebuildvendor:adaptersvendor-codelldb.js, which — with CI unset in the container — defaults to vendoring all five CodeLLDB platforms. The .dockerignore deliberately ships only the linux payloads into the context, so every fresh image build re-downloaded ~450 MB of win32/darwin payloads the Linux image never uses. That made the image build hostage to GitHub reachability for assets it doesn't need; a connectivity blip returned 404s and the build failed (loudly — #389's exit guard working as intended; upstream verified healthy, all pinned v1.11.8 assets return 200).

Fix

One env in the builder stage: CODELLDB_VENDOR_ALL=false flips the vendor script's local default to current-platform-only. The Dockerfile's digest-verified shell vendor step already provides that platform, so the prebuild vendor pass finds it fresh and downloads nothing — deterministic on both amd64 and arm64. (SKIP_ADAPTER_VENDOR=true would be wrong: it also skips the js-debug vendoring the bundle needs.)

Verification

  • docker build passes end-to-end with the vendor step skipping instantly (the identical build failed on this machine minutes earlier on win32/darwin downloads)
  • The built image's vendor tree contains only linux-x64/linux-arm64 + the current symlink; CODELLDB_PATH's engine is present and executable

🤖 Generated with Claude Code

The builder's `pnpm run build` triggers prebuild -> vendor:adapters ->
vendor-codelldb.js, which defaults to all five platforms because CI is
unset inside docker build. The .dockerignore deliberately ships only the
linux payloads into the context, so every fresh image build re-downloaded
~450 MB of win32/darwin CodeLLDB the Linux image never uses — a needless
network dependency that failed the build on a GitHub connectivity blip
(loudly, now that #389's exit guard works). CODELLDB_VENDOR_ALL=false
flips the script's local default to current-platform-only, which the
Dockerfile's digest-verified shell vendor step already satisfied, so the
prebuild vendor pass downloads nothing and the build is deterministic.
(SKIP_ADAPTER_VENDOR would be wrong here: it also skips the js-debug
vendoring the bundle needs.)

Verified: docker build passes with the vendor step skipping instantly;
the built image's vendor tree contains only linux-x64/linux-arm64 +
the current symlink, and CODELLDB_PATH's engine is present/executable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@debugmcpdev
debugmcpdev merged commit a4d5737 into main Aug 21, 2026
10 checks passed
@debugmcpdev
debugmcpdev deleted the fix/docker-vendor-current-platform-only branch August 21, 2026 02:27
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