Skip to content

Go bundler: resolve tarballs from npm registry metadata - #2453

Open
qmuntal wants to merge 1 commit into
github:mainfrom
qmuntal:go-bundler-registry-metadata
Open

Go bundler: resolve tarballs from npm registry metadata#2453
qmuntal wants to merge 1 commit into
github:mainfrom
qmuntal:go-bundler-registry-metadata

Conversation

@qmuntal

@qmuntal qmuntal commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Resolve exact npm package-version metadata before downloading Copilot CLI archives.
  • Use each package's dist.tarball URL instead of assuming npm's tarball path layout.
  • Validate that registry metadata matches the requested package and version and includes a tarball URL.
  • Download the umbrella package license once after all platform variants are built, avoiding a duplicate request for Linux glibc/musl bundles.

Rationale

The bundler already determines the CLI version pinned by the selected SDK revision. This change keeps that version-selection behavior while making npm responsible for locating the corresponding platform and license archives. That removes coupling to npm's current archive URL naming convention.

Validation

  • go test ./cmd/bundler -count=1
  • go test ./internal/embeddedcli -count=1
Copilot AI balanced review requested due to automatic review settings September 1, 2026 09:29
@qmuntal
qmuntal requested a review from a team as a code owner September 1, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused implementation matches the stated behavior and includes appropriate unit coverage.

Review tier: Balanced
Findings: None

What changed in this PR

Updates the Go CLI bundler to resolve npm tarballs through registry metadata rather than constructed URLs.

Changes:

  • Adds validated dist.tarball metadata resolution.
  • Downloads the shared CLI license once after platform bundles finish.
  • Adds metadata resolution and validation tests.
File Description
go/​cmd/​bundler/​main.go Resolves tarball URLs and deduplicates license downloads.
go/​cmd/​bundler/​main_test.go Tests metadata URL resolution and missing tarballs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants