Skip to content

Restore Rust dual-artifact CLI bundling - #2535

Merged
dmytrostruk merged 3 commits into
mainfrom
dmytrostruk-restore-bundled-sea
Sep 4, 2026
Merged

Restore Rust dual-artifact CLI bundling#2535
dmytrostruk merged 3 commits into
mainfrom
dmytrostruk-restore-bundled-sea

Conversation

@dmytrostruk

Copy link
Copy Markdown
Contributor

Summary

  • restore the real full Copilot CLI/Node SEA as the artifact returned by install_bundled_cli()
  • keep install_bundled_runtime() and normal CliProgram::Resolve on the native copilot-runtime wrapper with adjacent runtime.node and required assets
  • embed separate, independently checksummed CLI and runtime payloads instead of aliasing wrapper bytes under the copilot filename
  • preserve bundled-in-process, no-default-feature extraction, build caches, custom extraction directories, and all eight supported platform variants
  • invalidate the wrapper-as-CLI cache entry from the regression by checking the installed CLI against the embedded SEA size
  • add regression coverage for distinct artifacts and the full CLI --binary-version contract

Fixes the Rust SDK regression introduced by #2463.

Validation

  • cargo +nightly-2026-04-14 fmt --all -- --config-path .rustfmt.nightly.toml --check
  • cargo clippy --all-targets --features test-support,bundled-in-process -- --no-deps -D warnings -D clippy::unwrap_used -D clippy::disallowed_macros -D clippy::await_holding_invalid_type
  • cargo test --test cli_resolution_test — 7 passed
  • cargo test --no-default-features --test cli_resolution_test — 8 passed
  • cargo test --all-features --test cli_resolution_test — 7 passed
  • generated and consumed both publish checksum snapshots, each containing all eight platform hashes

Size impact

For Copilot CLI 1.0.83-5 on Darwin ARM64:

  • full CLI payload: 83,552,873 bytes
  • filtered runtime payload: 40,925,644 bytes with default features, 72,594,661 bytes with bundled-in-process
  • the restoration adds 83,552,873 bytes of compressed embedded payload; normal CliProgram::Resolve still extracts only the runtime bundle, while the SEA remains lazy behind install_bundled_cli()

Embed the full Copilot CLI separately from the managed runtime bundle so explicit callers receive the Node SEA while normal SDK resolution continues to use copilot-runtime.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 4, 2026 16:07
@dmytrostruk
dmytrostruk requested a review from a team as a code owner September 4, 2026 16:07

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

🔵 Needs a closer look

Cross-platform release packaging and extraction across eight artifact variants warrants final human validation.

Review tier: Balanced
Findings: None

What changed in this PR

Restores separate embedded CLI and runtime artifacts in the Rust SDK while preserving runtime resolution behavior.

Changes:

  • Embeds and verifies distinct full-CLI and filtered runtime archives.
  • Adds cache invalidation and cross-platform regression coverage.
  • Updates platform snapshots and documentation.
File Description
rust/​build/​in_process.rs Builds and verifies separate CLI/runtime payloads.
rust/​src/​embeddedcli.rs Extracts each payload through its appropriate installer.
rust/​src/​lib.rs Clarifies public installer behavior.
rust/​tests/​cli_resolution_test.rs Tests artifact separation and CLI version probing.
rust/​scripts/​snapshot-bundled-cli-version.sh Adds musl release checksums.
rust/​README.md Documents dual artifacts and eight platforms.

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

@roji roji left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, fixes unintentional regression introduced in #2463.

@dmytrostruk
dmytrostruk added this pull request to the merge queue Sep 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
@dmytrostruk
dmytrostruk added this pull request to the merge queue Sep 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
@dmytrostruk
dmytrostruk added this pull request to the merge queue Sep 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
@dmytrostruk
dmytrostruk added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit e908560 Sep 4, 2026
53 of 55 checks passed
@dmytrostruk
dmytrostruk deleted the dmytrostruk-restore-bundled-sea branch September 4, 2026 18:53
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