loopx icon indicating copy to clipboard operation
loopx copied to clipboard

[Bug]: pip-owned doctor and update guidance prints a POSIX-quoted interpreter path on native Windows

Open JasonBuildAI opened this issue 1 month ago • 0 comments

Issue origin: Observed or reproduced in a real environment (native Windows).

Problem

For a pip-owned LoopX installation, three printed guidance surfaces name the owning interpreter with POSIX-only quoting:

  • loopx doctor install-freshness upgrade_command (rendered in the "## Install Freshness" block)
  • the loopx doctor Fix hint sentence
  • loopx update plan backup rollback_command (rendered under "## Rollback Command")

On native Windows the printed line therefore starts with '<venv>\Scripts\python.exe' -m pip install .... PowerShell reads a quoted path as a string literal rather than a command, so the line does not parse; cmd.exe reads the single quotes as part of the filename. An operator who follows the first repair instruction these surfaces print is led to a command that fails. Other Windows guidance is already PowerShell-spelled (pwsh -NoLogo ... from the doctor checkout route), and the sibling PR #6122 prints & '<interpreter>' -m pip install --upgrade loopx for the no-clone fallback once merged, so these three pip-owned surfaces disagreed with the rest of the Windows guidance. PR #6122 deliberately scoped out this pip-owned quoting gap.

Minimal reproduction

  1. On a native Windows host, build and install the wheel into a fresh venv so INSTALLER is pip (uv build --wheel, then <venv>\Scripts\python.exe -m pip install dist\loopx-<version>-py3-none-any.whl).
  2. Run loopx doctor --format json and read install_freshness.upgrade_command and fix.
  3. Run loopx update plan --format json (with explicit --registry/--runtime-root if needed) and read plan.backup.rollback_command.
  4. Run the printed first line in PowerShell 7 (swap -m pip install ... for -c "print('witness-ok')" to keep it harmless).

Version: commit 5fb256a4d (v1.4.0) Host: Codex CLI (native Windows) Area: Build, packaging, installer, or CI

Expected behavior

The printed interpreter token should follow the same host rule the rest of the Windows guidance uses: & '<interpreter>' -m pip ... in PowerShell, unchanged POSIX quoting elsewhere, so the printed line parses and runs on the printing host.

Actual behavior

All three surfaces print '<venv>\Scripts\python.exe' -m pip install .... Executing that first line in PowerShell 7.6.5 fails before anything runs:

ParserError: ...:1
Line |
   1 |  … \Scripts\python.exe' -c "print('witness-ok')"
     |                        ~~
     | Unexpected token '-c' in expression or statement.

cmd.exe prints The filename, directory name, or volume label syntax is incorrect. and exits 1. The same installed wheel with this fix prints & '<venv>\Scripts\python.exe' ..., which parses with zero errors and executes (exit 0).

Diagnostics

loopx doctor --format json (pip-owned install, native Windows, local paths shortened to <venv>):

"upgrade_command": "'<venv>\\Scripts\\python.exe' -m pip install --upgrade loopx
loopx workflow-skills --install
loopx slash-commands --install
loopx doctor"
"fix": "Run loopx workflow-skills --install, then loopx slash-commands --install, and rerun doctor. Upgrade this installation with '<venv>\\Scripts\\python.exe' -m pip install --upgrade loopx."

loopx update plan --format json:

"rollback_command": "'<venv>\\Scripts\\python.exe' -m pip install loopx==1.4.0
loopx workflow-skills --install
loopx slash-commands --install
loopx doctor"

Additional context

Follow-up to #6121 / PR #6122, which fixed the connect/fallback hint and explicitly left python_install_owner.python_distribution_upgrade_command as a separately owned pip-quoting gap.

JasonBuildAI avatar Oct 11 '26 07:10 JasonBuildAI