Skip to content

test(install): preload Compression assembly for PS 5.1 ZipArchiveMode - #138997

Closed
suhas-svg wants to merge 1 commit into
NousResearch:mainfrom
suhas-svg:fix/bundle-smoke-ps51-compression
Closed

suhas-svg wants to merge 1 commit into
NousResearch:mainfrom
suhas-svg:fix/bundle-smoke-ps51-compression

Conversation

@suhas-svg

Copy link
Copy Markdown

What does this PR do?

Refresh of #125295 (closed stale) onto current main.

The bundle-smoke-metadata PowerShell test shells powershell.exe
(Windows PowerShell 5.1), but its asset only preloads
System.IO.Compression.FileSystem. The ZipArchiveMode enum lives in
System.IO.Compression, which 5.1 does not resolve implicitly (PowerShell 7
does) — so every run dies before any assertion with Unable to find type [IO.Compression.ZipArchiveMode]. One-line fix in the test asset; the module
under test uses XML types only and is untouched.

Evidence (Windows 11, Windows PowerShell 5.1.26100.9587)

powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/install/e2e-assets/windows-bundle-metadata.test.ps1
  • base main: TypeNotFound — InvalidOperation: (IO.Compression.ZipArchiveMode:TypeName)
    before any assertion runs.
  • this branch: PASS: MSIX identity/executable and MSIXBUNDLE native-slice admission.

Related Issue

Fixes #125294

Type of Change

  • ✅ Tests (adding or improving test coverage)

Changes Made

  • tests/install/e2e-assets/windows-bundle-metadata.test.ps1: preload
    System.IO.Compression before System.IO.Compression.FileSystem
    (re-loading an already-loaded assembly is a no-op, so PS 7 behavior is
    unchanged).

How to Test

  1. powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/install/e2e-assets/windows-bundle-metadata.test.ps1
  2. node_modules/.bin/vitest run bundle-smoke-metadata.test.mjs -t "PowerShell admits only the pinned package"

Before: TypeNotFound at windows-bundle-metadata.test.ps1:11.
After: PASS: MSIX identity/executable and MSIXBUNDLE native-slice admission
standalone, 1 passed in the harness.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass — N/A (JS/PS asset only; ran the asset standalone instead)
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features) — the fixed test itself is the coverage; it failed before, passes after
  • I've tested on my platform: Windows 11, Windows PowerShell 5.1.26100.9587

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS): re-adding an already-loaded assembly is a no-op on PS 7, and non-Windows runners never execute this asset
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have platform/windows Native Windows-specific behavior or breakage area/install-update Installer, updater, packaging, wheels, doctor sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows labels Oct 15, 2026
@suhas-svg

Copy link
Copy Markdown
Author

Closing — not pursuing this batch.

@suhas-svg suhas-svg closed this Oct 15, 2026
@alt-glitch alt-glitch added os/windows Native Windows behaviour or breakage: PowerShell install, Windows paths, cmd.exe, WSL-vs-native diff and removed platform/windows Native Windows-specific behavior or breakage labels Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install-update Installer, updater, packaging, wheels, doctor os/windows Native Windows behaviour or breakage: PowerShell install, Windows paths, cmd.exe, WSL-vs-native diff P3 Low — cosmetic, nice to have sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: bundle-smoke-metadata PowerShell test fails on PS 5.1 — ZipArchiveMode needs System.IO.Compression preloaded

2 participants