Repository navigation
fix(install): a fresh Windows install was broken three ways - #141
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.ps1legitimately contains CJK and removing em dashes alone would not have saved it.Verified against the shell that was failing:
#137 Hooks failed, and the installer said it succeeded
Two bugs stacked.
Hook installers resolved bare
python.install.ps1creates a venv and installs Agentmetry into it, so on a machine with no global install both failed withModuleNotFoundError. They now prefer the venv and fall back to global.Worse:
install.ps1ignored 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 printedInstall 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.2resolves to 2.xLatest on PyPI is 2.1.1. MCP 2.0 removed
mcp.server.fastmcp.FastMCP, whichtools/vault_fs_server.pyimports, so the bundled server broke on every fresh install. Pinned<2with 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, andinstall.ps1checks 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