Skip to content

fix: use basic parsing for Windows installer downloads - #259

Closed
ceodaradigu wants to merge 2 commits into
monk-io:mainfrom
ceodaradigu:codex/fix-powershell-basic-parsing
Closed

fix: use basic parsing for Windows installer downloads#259
ceodaradigu wants to merge 2 commits into
monk-io:mainfrom
ceodaradigu:codex/fix-powershell-basic-parsing

Conversation

@ceodaradigu

@ceodaradigu ceodaradigu commented Aug 5, 2026

Copy link
Copy Markdown

Fixes #195.

What changed

  • pass -UseBasicParsing to both Invoke-WebRequest calls in the Windows bootstrap script
  • keep all three shipped copies of the script in sync
  • add a deterministic PowerShell 5.1 regression test using local ZIP and checksum fixtures
  • run the regression in the Windows Install E2E GitHub Actions job

Why

Windows PowerShell 5.1 can attempt to use the legacy Internet Explorer parser when Invoke-WebRequest is called without -UseBasicParsing. On systems where IE is unavailable or its first-launch configuration is incomplete, bootstrap fails before the agent can be installed.

Verification

  • PowerShell parser check passes for all modified scripts and the new test
  • powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/ensure-monk-agent-basic-parsing.ps1
  • result: ensure_basic_parsing_status=pass downloads=2
  • regression is wired into .github/workflows/install-e2e.yml
  • git diff --check passes

@ceodaradigu

ceodaradigu commented Aug 5, 2026

Copy link
Copy Markdown
Author

Revalidated this patch against the current main release v0.1.54 (2a4f9cf) on Windows PowerShell 5.1. Results: ensure_basic_parsing_status=pass downloads=2; PowerShell parser validation passed for 4/4 files; git diff --check upstream/main...HEAD passed. The branch is already based on v0.1.54, so no rebase or code changes are required.

@ceodaradigu

Copy link
Copy Markdown
Author

The Install E2E workflow for the latest commit is currently awaiting approval before any jobs can start (fork contribution). Could a maintainer approve the workflow run when convenient? The Windows PowerShell 5.1 regression passes locally with ensure_basic_parsing_status=pass downloads=2, and it is now wired into that workflow.

@ceodaradigu
ceodaradigu force-pushed the codex/fix-powershell-basic-parsing branch from a726fd8 to 789e809 Compare August 7, 2026 11:07
@ceodaradigu

Copy link
Copy Markdown
Author

Updated this branch onto the current v0.1.55 main release (dbb6ce4) and preserved the Windows Install E2E regression step. Fresh validation on the rebased head (789e809): ensure_basic_parsing_status=pass downloads=2; all three shipped installer copies remain byte-identical; and git diff --check upstream/main...HEAD passes. The PR is now current and mergeable against v0.1.55.

@nooga

nooga commented Aug 9, 2026

Copy link
Copy Markdown
Member

Closing as already fixed — -UseBasicParsing was added to both Invoke-WebRequest calls in commit ac9fe06 (2026-08-07), which landed independently a couple of days after you opened this.

Your diagnosis and your patch were both correct at the time of filing; that's recorded in triage. Nothing further needed here — thanks.

@nooga nooga closed this Aug 9, 2026
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