Skip to content

fix: use basic parsing for Windows agent downloads - #196

Open
qtcqtc wants to merge 1 commit into
monk-io:mainfrom
qtcqtc:fix/windows-basic-parsing-downloads
Open

fix: use basic parsing for Windows agent downloads#196
qtcqtc wants to merge 1 commit into
monk-io:mainfrom
qtcqtc:fix/windows-basic-parsing-downloads

Conversation

@qtcqtc

@qtcqtc qtcqtc commented Jul 30, 2026

Copy link
Copy Markdown

Closes #195.

Windows PowerShell 5.1 delegates Invoke-WebRequest response parsing to the Internet Explorer engine unless -UseBasicParsing is explicit. On Server Core and fresh profiles where that engine is unavailable or uninitialized, the native Windows bootstrap fails before it can download either the checksum or monk-agent.exe.

This change:

  • adds -UseBasicParsing to the checksum and archive downloads in all three shipped PowerShell installer copies;
  • adds a regression harness that simulates the headless PowerShell 5.1 failure;
  • exercises the full mocked download, checksum verification, ZIP extraction, install, and output-path flow;
  • verifies the generated PowerShell installer copies remain byte-identical.

The regression test fails against v0.1.52 with:

The response content cannot be parsed because the Internet Explorer engine is not available.

After the fix, both Windows PowerShell 5.1 and the current host pass:

ensure_basic_parsing_status=pass downloads=2
Windows block-monk fallback tests passed.

git diff --check also passes.

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.

[Bug bounty] Windows bootstrap relies on unavailable IE parser in PowerShell 5.1

1 participant