Skip to content

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

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

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.

@nooga

nooga commented Aug 3, 2026

Copy link
Copy Markdown
Member

Thanks for the PR — the fix itself is correct and complete across all three render copies, and the regression test is genuinely thorough (mocks the exact IE-engine failure, verifies byte-identity across copies). The gap is the same one as #194: the new test isn't wired into install-e2e.yml, so it provides no durable protection going forward — every peer fix in this area (#138, #155) adds that CI step. Closing as inadequate for merge as submitted; would take another look at a version with the workflow wiring added.

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

2 participants