Skip to content

fix(install): a fresh Windows install was broken three ways - #141

Merged
blitzcrieg1 merged 1 commit into
masterfrom
fix/windows-install-broken
Sep 1, 2026
Merged

blitzcrieg1 merged 1 commit into
masterfrom
fix/windows-install-broken

Conversation

@blitzcrieg1

Copy link
Copy Markdown
Owner

Closes #133, closes #137, closes #138.

All three found by @hossainzarif23 while picking up a good first issue. Finding that the project does not install is considerably more useful than the issue they were assigned, and it is the failure mode nobody on the inside ever hits.

#133 The installer did not parse on the default Windows shell

Windows PowerShell 5.1 is what ships with Windows and what the documented command runs. It reads a BOM-less file using the system ANSI code page, so the em dash on line 139 arrived as mojibake inside a string literal:

The string is missing the terminator: ".

A parse error, so the installer body never began executing. Seven of eleven scripts carried the same character.

The house rule already bans em dashes in public copy because they read as machine-written. The better reason turns out to be that one stopped the installer from running.

Fixed by making the prose ASCII and adding a UTF-8 BOM to every script, because install_qoder_hooks.ps1 legitimately contains CJK and removing em dashes alone would not have saved it.

Verified against the shell that was failing:

Windows PowerShell 5.1.26100.8875: 0 parse failures across 11 scripts

#137 Hooks failed, and the installer said it succeeded

Two bugs stacked.

Hook installers resolved bare python. install.ps1 creates a venv and installs Agentmetry into it, so on a machine with no global install both failed with ModuleNotFoundError. They now prefer the venv and fall back to global.

Worse: install.ps1 ignored their exit codes. Every hook installer already checks $LASTEXITCODE, with a comment explaining that a native command's exit code does not trip $ErrorActionPreference. That lesson was learned in the child script and never applied in the parent, so both could fail and this still printed Install complete, told the user to restart their editor, and exited 0.

A recorder whose entire claim is that removal changes what it says about itself cannot ship an installer that reports success after a failure.

#138 mcp>=1.2 resolves to 2.x

Latest on PyPI is 2.1.1. MCP 2.0 removed mcp.server.fastmcp.FastMCP, which tools/vault_fs_server.py imports, so the bundled server broke on every fresh install. Pinned <2 with the reason attached, to be lifted when the import is ported rather than when someone tidies constraints.

Guards

Four tests in test_powershell_encoding.py: BOM on every script, no em dash, hook installers prefer the venv, and install.ps1 checks the hook exit code. All three bugs are invisible until a stranger installs on a clean machine, which is exactly when you cannot afford them.

1158 tests, ruff clean, ruleset fingerprint unchanged at 15846a0915769d4a.

🤖 Generated with Claude Code

All three found by @hossainzarif23 while picking up a good first issue, which
is the most useful thing a new contributor can do and not what the issue was
about.

#133. `install.ps1` did not parse under Windows PowerShell 5.1, the version
that ships with Windows and the one the documented command runs. PowerShell 5.1
reads a file with no byte order mark as the system ANSI code page, so the
em dash on line 139 arrived as mojibake inside a string literal and the file
failed to parse. The installer body never began executing. Seven of eleven
scripts carried the same character.

The house rule already bans em dashes in public copy because they read as
machine-written. The better reason is that this one stopped the installer from
running at all. Every script is now ASCII in its prose and carries a BOM, since
`install_qoder_hooks.ps1` legitimately contains CJK and removing em dashes
alone would not have saved it.

#137. Hook installers resolved bare `python`. `install.ps1` builds a venv and
installs Agentmetry into it, so on a machine without a global install both
hooks failed with ModuleNotFoundError. They now prefer the venv.

Worse, `install.ps1` ignored their exit codes. Each hook installer already
checks `$LASTEXITCODE`, with a comment explaining that a native command's exit
code does not trip `$ErrorActionPreference`. That lesson was learned in the
child and never applied in the parent, so both could fail and this script still
printed "Install complete", told the user to restart their editor, and exited
0. A recorder whose entire claim is that removal changes what it says about
itself cannot ship an installer that reports success after a failure.

#138. `mcp>=1.2` was unconstrained and resolves to 2.1.1 today. MCP 2.0 removed
`mcp.server.fastmcp.FastMCP`, which `tools/vault_fs_server.py` imports, so the
bundled server broke on every fresh install. Pinned `<2` with the reason, to be
lifted when the import is ported rather than when someone tidies constraints.

Four tests guard the encoding, the venv preference and the exit-code check,
because all three are invisible until a stranger tries to install on a clean
machine. Verified against the actual Windows PowerShell 5.1 that was failing:
0 parse errors across 11 scripts.

Co-Authored-By: Claude Opus 5 <[email protected]>
@blitzcrieg1
blitzcrieg1 merged commit 1910ddb into master Sep 1, 2026
9 checks passed
@blitzcrieg1
blitzcrieg1 deleted the fix/windows-install-broken branch September 1, 2026 13:35
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

1 participant