Skip to content

[release/13.5] Exclude unused hex1bpty.exe from published CLI archives - #19557

Merged
Jose Perez Rodriguez (joperezr) merged 2 commits into
release/13.5from
backport/pr-19554-to-release/13.5
Aug 21, 2026
Merged

[release/13.5] Exclude unused hex1bpty.exe from published CLI archives#19557
Jose Perez Rodriguez (joperezr) merged 2 commits into
release/13.5from
backport/pr-19554-to-release/13.5

Conversation

@aspire-repo-bot

@aspire-repo-bot aspire-repo-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Backport of #19554 to release/13.5

/cc Mitch Denny (@mitchdenny)

Customer Impact

The Windows CLI archives (aspire-cli-win-{x64,arm64}-*.zip) ship a ~4.9 MB hex1bpty.exe that Aspire never executes. It is Hex1b's out-of-process PTY host, which Hex1b only launches when it owns the pseudo-terminal for a child process — Aspire never takes that path, because DCP creates and owns every PTY we surface and Aspire.TerminalHost only proxies the byte stream DCP is already producing.

Beyond the wasted download (~4.9 MB in the archive, plus the same again inside aspire.exe because Aspire.Managed picks it up and is embedded as the bundle payload), it shows up as an unexplained second executable in the WinGet submission, where every binary in the archive is run through executable and malware checks. That is what stalled the 13.5.0 WinGet publish in microsoft/winget-pkgs#421219. Backporting keeps 13.5 servicing releases publishable without walking an unused binary past store validation each time.

Testing

Verified against real CI-built archives on the source PR (run 32425648015): win-x64 and win-arm64 contain only aspire.exe + Aspire.TypeSystem.xml, while linux-x64 and osx-arm64 still contain libhex1binterop.{so,dylib} (the termios/ioctl shim the TUI does need).

Compared against the same workflow on main (run 32411678172), the sole delta is the removed 4,914,688-byte hex1bpty.exe:

main with fix
aspire.exe 152,848,384 152,843,776
Aspire.TypeSystem.xml 75,719 75,719
hex1bpty.exe 4,914,688 absent

Also A/B verified locally (with and without the new PublishHex1bPtyHost opt-out) that this target is what removes the file, and that Aspire.Managed — the bundle payload embedded in aspire.exe — is covered too. No product code changes, so no new tests.

Risk

Very low. Build-only: a single MSBuild target that drops one never-executed file from ResolvedFileToPublish, scoped to src/ so test projects are untouched (the CLI and deployment E2E tests drive real terminals through Hex1b.Automation, which does need the PTY host). Unix native assets are unaffected. libsodium.*, which is present in 13.5 archives but no longer on main, is not touched by this change. PublishHex1bPtyHost=true restores the old behavior if a shipping project ever needs the helper.

Regression?

Yes — new in 13.5. The shipped 13.4.6 Windows archive contains only aspire.exe, Aspire.TypeSystem.xml, and libsodium.dll, with no hex1bpty.exe. The cause is that src/Aspire.Cli/Aspire.Cli.csproj gained a direct Hex1b PackageReference in 13.5 (there is none on release/13.4), which pulled Hex1b's Windows native asset into the CLI publish output for the first time.

Hex1b ships a hex1bpty.exe PTY host in its win-x64/win-arm64 native assets.
Aspire never takes that path: DCP owns every PTY we surface and
Aspire.TerminalHost only proxies the byte stream DCP already produces, so the
helper is ~5 MB of dead weight in each Windows CLI archive and inside every
Windows aspire.exe bundle payload. It also shows up as an unexplained second
executable in the winget submission, where every binary in the archive is run
through executable and malware checks.

Filter it out of publish for src/ projects. Test projects are untouched because
they drive real terminals through Hex1b.Automation, which does need the helper.
Unix keeps libhex1binterop.{so,dylib}, the termios/ioctl shim the TUI P/Invokes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 20, 2026 23:24
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19557

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19557"

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.

Pull request overview

Excludes Hex1b’s unused Windows PTY helper from published Aspire CLI artifacts.

Changes:

  • Removes hex1bpty.exe during publish.
  • Provides a PublishHex1bPtyHost=true opt-out.
  • Preserves Unix native assets and test behavior.

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

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI review requested due to automatic review settings August 21, 2026 16:23

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.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector (audit mode)

The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement.

Runs the full test matrix + all jobs (ALL) — a rule matching 'eng/Versions.props' selects ALL


Selection computed for commit 1e9d561.

@joperezr
Jose Perez Rodriguez (joperezr) merged commit a22cec2 into release/13.5 Aug 21, 2026
342 checks passed
@joperezr
Jose Perez Rodriguez (joperezr) deleted the backport/pr-19554-to-release/13.5 branch August 21, 2026 16:58
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.5 milestone Aug 21, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

✅ No documentation update needed.

Step 5 branch taken: excluded → base_branch_is_release, head_branch_is_backport, title_release_prefix, body_backport_marker

This PR is a backport (title [release/13.5] ..., body contains Backport of #19554 to release/13.5, and the head is a backport branch) of already-merged PR #19554 on the default branch. Per workflow policy, backport PRs are excluded from docs generation regardless of the underlying signal recommendation — documentation for the underlying change should be authored against the original forward PR (#19554), not duplicated here.

Triggered signals: none (signal_count = 0; recommendation was docs_optional prior to the exclusion override).

Exclusion reasons (from signals.json): base_branch_is_release (base ref is release/13.5), head_branch_is_backport, title_release_prefix (title begins with [release/13.5]), body_backport_marker (body contains explicit Backport of #19554 to release/13.5 marker).

No docs PR drafted.

This was referenced Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants