Use Copilot CLI release assets in Go bundler by qmuntal · Pull Request #2529 · github/copilot-sdk · GitHub
Skip to content

Use Copilot CLI release assets in Go bundler - #2529

Closed
qmuntal wants to merge 3 commits into
github:mainfrom
qmuntal:go/cli-release-bundler
Closed

Use Copilot CLI release assets in Go bundler#2529
qmuntal wants to merge 3 commits into
github:mainfrom
qmuntal:go/cli-release-bundler

Conversation

@qmuntal

@qmuntal qmuntal commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

This brings the Go bundler in line with the release-based runtime packaging used across the other SDKs. Most of the change establishes parity around artifact provenance, integrity verification, and reliable acquisition; the remaining changes simplify Go's generated embedding and installation paths.

  • download platform artifacts from pinned Copilot CLI releases and verify them against SHA256SUMS.txt
  • add bounded retries, release-mirror support, validated bundle metadata caching, and archive/input hardening
  • retain package-lock version detection as a compatibility fallback for older SDK releases
  • simplify embedded artifact installation and generate a single platform-specific Go source file

Testing

  • go test ./cmd/bundler ./internal/embeddedcli -count=1
  • go vet ./cmd/bundler ./internal/embeddedcli
  • disposable Go 1.24 stub module: generated, built, and ran normal and copilot_inprocess binaries against a local release mirror
  • reran the stub bundler successfully with the release mirror offline to verify cache reuse

Copilot AI balanced review requested due to automatic review settings September 4, 2026 09:34
@qmuntal
qmuntal requested a review from a team as a code owner September 4, 2026 09:34

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review tier: Lite
Findings: 3 Medium severity · 1 Low severity

New issues introduced by this change (4)
Severity Finding
Medium severity go/​cmd/​bundler/​main.gostrings.SplitSeq is a relatively new API and may unexpectedly raise the minimum supported Go…
Medium severity go/​cmd/​bundler/​main.go — This introduces a Go language version requirement (ranging over an integer requires Go 1.22+). If…
Medium severity go/​cmd/​bundler/​main.goreleaseHTTPClient.Get can (in some error cases) return both a non-nil resp and a non-nil err
Low severity go/​cmd/​bundler/​main.goReleaseHash is written and syntactically validated, but it isn’t used to validate/refresh the…
What changed in this PR

This PR updates the Go bundler and embedded installer to source Copilot CLI artifacts from pinned GitHub release assets, verify them via SHA256SUMS.txt, and improve caching/security hardening around downloads and archive handling.

Changes:

  • Switch bundling from npm tarballs to Copilot CLI GitHub release archives with checksum verification and bounded retries.
  • Add validated bundle metadata caching and simplify generation to a single platform-specific embedded Go source file.
  • Refactor embedded installer to use shared verified-file installation helpers and a shared install-dir preparation/lock step.
File Description
go/​internal/​embeddedcli/​embeddedcli.go Refactors installation flow to share install-dir preparation and verified atomic installs for binary/runtime artifacts.
go/​cmd/​bundler/​main.go Implements release-asset download + SHA256SUMS verification, retry logic, bundle metadata cache, and single-file Go embed generation.
go/​cmd/​bundler/​main_test.go Adds unit tests for checksum parsing, version validation, retry behavior, download verification, cache refresh, and embed generation changes.
go/​README.md Documents the new release-asset + SHA256SUMS verification flow and the updated in-process build-tag behavior.

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

Comment thread go/cmd/bundler/main.go
Comment thread go/cmd/bundler/main.go
Comment thread go/cmd/bundler/main.go
Comment thread go/cmd/bundler/main.go
Copilot stopped reviewing on behalf of qmuntal due to an error September 4, 2026 09:55
qmuntal and others added 2 commits September 4, 2026 12:00
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@SteveSandersonMS

Copy link
Copy Markdown
Contributor

@SteveSandersonMS
SteveSandersonMS marked this pull request as draft September 4, 2026 14:35
@qmuntal qmuntal closed this Sep 6, 2026
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.

3 participants