⚡ Sangsakala Proxy 🏠 Home
Skip to content

Fix release automation test defects - #28285

Open
Justin Chung (jshigetomi) wants to merge 3 commits into
PowerShell:masterfrom
jshigetomi:jshigetomi-fix-rc-test-defects
Open

Justin Chung (jshigetomi) wants to merge 3 commits into
PowerShell:masterfrom
jshigetomi:jshigetomi-fix-rc-test-defects

Conversation

@jshigetomi

Copy link
Copy Markdown
Collaborator

PR Summary

Fixes six confirmed defects found while triaging the PowerShell 7.7.0-rc.1 release-automation test failures:

  • fail the startup assembly test only for unexpected additions, while retaining diagnostics for missing historical assemblies
  • bound and clean up timed-out external clipboard helpers before reading process state
  • preserve ModulePath setup errors and normalize logical paths without requiring them to exist
  • retain job state, import errors, verbose output, paths, and hashes for executable-manifest tests
  • make remote-session creation terminate and prevent null-session setup cascades
  • calculate the expected MSIX PATH from package identity, including loose MSIX registration

The unconfirmed macOS SSH exception-mapping failure is intentionally unchanged pending reproducible SSH/DNS evidence.

PR Context

The 7.7.0-rc.1 release-automation comparison reported 19 new failures. Several were false failures or setup/diagnostic defects that prevented the tests from validating product behavior. The clipboard failure also exposed a product bug where Process.ExitCode was read after a timed wait returned false.

Validation:

  • Import-Module .\tools\ci.psm1; Start-PSBuild -CI — Debug build passed; the optional Pester restore reported that PSGallery was unavailable.
  • Import-Module .\tools\ci.psm1; Start-PSBuild -Configuration Release -NoPSModuleRestore — passed.
  • Focused Pester 5 run for falls back when the clipboard helper times out — passed, 1/1.
  • Focused Pester 5 run for pwsh updates PATH correctly even if PATH is not defined — passed, 1/1.
  • Pester 4 run of Import-Module.Tests.ps1 — both changed executable-manifest cases passed; 25 passed and one unrelated existing GAC expectation failed.
  • Focused startup assembly test — the revised assertion correctly rejected separate unexpected assemblies in the local Windows build; the reported RC defect involving only missing historical assemblies is no longer a failure condition.
  • PowerShell parser validation for all changed .ps1 and .psm1 files — passed.
  • ModulePath.Tests.ps1 and the affected implicit-remoting Describe were not run because this session is not elevated.

PR Checklist

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jshigetomi
Justin Chung (jshigetomi) requested a review from a team as a code owner October 29, 2026 19:53
Copilot AI balanced review requested due to automatic review settings October 29, 2026 19:53

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.

🟡 Changes recommended

Set-Clipboard can still hang on Linux when a background clipboard owner retains redirected pipes, and the regression test can pass without establishing helper startup or verifying termination.

2 open issues
What changed in this PR

This PR addresses release-automation test defects and adds clipboard timeout handling to improve validation and diagnostics.

Changes:

  • Update startup assembly and MSIX PATH expectations.
  • Preserve module setup and import errors, and stop remoting setup after session-creation failures.
  • Add clipboard helper timeout cleanup and a regression test.
File Description
test/​tools/​Modules/​HelpersRemoting/​HelpersRemoting.psm1 Make remote-session creation errors terminating.
test/​powershell/​Modules/​Microsoft.PowerShell.Utility/​Implicit.Remoting.Tests.ps1 Reject null sessions before remote setup.
test/​powershell/​Modules/​Microsoft.PowerShell.Management/​Clipboard.Tests.ps1 Add clipboard helper timeout coverage.
test/​powershell/​Modules/​Microsoft.PowerShell.Core/​Import-Module.Tests.ps1 Capture job failures, verbose output, paths, and hashes.
test/​powershell/​Host/​Startup.Tests.ps1 Fail only for unexpected loaded assemblies.
test/​powershell/​Host/​ConsoleHost.Tests.ps1 Derive expected MSIX PATH from package identity.
test/​powershell/​engine/​Module/​ModulePath.Tests.ps1 Surface setup errors and normalize paths without requiring existence.
src/​Microsoft.PowerShell.Commands.Management/​commands/​management/​Clipboard.cs Handle helper timeouts and read redirected output asynchronously.

Review effort: Balanced

Justin Chung and others added 2 commits October 29, 2026 15:32
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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