Skip to content

Route shell commands through PowerShell -EncodedCommand to fix paths with spaces - #712

Merged
aooohan merged 2 commits into
version-fox:mainfrom
linghengqian:windows
Oct 2, 2026
Merged

aooohan merged 2 commits into
version-fox:mainfrom
linghengqian:windows

Conversation

@linghengqian

Copy link
Copy Markdown
Member

@linghengqian linghengqian left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @Chance-fyi @aooohan @bytemain . Could you help approve the CI run?

@aooohan
aooohan requested review from aooohan and a balanced review from Copilot September 30, 2026 11:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The Windows Lua overrides break existing shell and file-handle contracts and contain incorrect pipe, EOF, and status handling.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Routes Windows shell execution through PowerShell encoded commands to support paths containing spaces.

Changes:

  • Adds shared encoded PowerShell execution helpers.
  • Updates junctions, upgrades, shims, and Lua command execution.
  • Adds Windows-focused regression tests.
File Description
internal/​shared/​util/​shell.go Adds cross-platform shell helpers.
internal/​shared/​util/​shell_test.go Tests command encoding and construction.
internal/​shared/​util/​file.go Creates Windows junctions through PowerShell.
internal/​shared/​util/​file_windows_test.go Tests junction paths containing spaces.
internal/​shared/​shim/​shim_windows.go Escapes paths in generated shims.
internal/​plugin/​luai/​vm.go Installs Windows Lua execution overrides.
internal/​plugin/​luai/​exec.go Implements overridden Lua process APIs.
internal/​plugin/​development_output.go Uses the shared shell helper in development mode.
cmd/​commands/​upgrade.go Launches the upgrade script through PowerShell.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/plugin/luai/vm.go
Comment thread internal/plugin/luai/exec.go
Comment thread internal/plugin/luai/exec.go Outdated
Comment thread internal/shared/util/shell_test.go Outdated
@aooohan

aooohan commented Sep 30, 2026

Copy link
Copy Markdown
Member

Could you help approve the CI run?

Where is CI... I remember there was one before.

@linghengqian linghengqian left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you help approve the CI run?

Where is CI... I remember there was one before.

  • I’ve opened #713; I will address the review comments on the current PR after that one is merged.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 31.00000% with 138 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.00%. Comparing base (930f5be) to head (96f9c8f).

Files with missing lines Patch % Lines
internal/plugin/luai/exec.go 25.51% 102 Missing and 6 partials ⚠️
internal/shared/util/file.go 0.00% 15 Missing ⚠️
internal/shared/util/shell.go 65.71% 10 Missing and 2 partials ⚠️
internal/shared/util/shell_notwindows.go 0.00% 2 Missing ⚠️
cmd/commands/upgrade.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #712      +/-   ##
==========================================
- Coverage   35.09%   35.00%   -0.09%     
==========================================
  Files          92       95       +3     
  Lines        6514     6702     +188     
==========================================
+ Hits         2286     2346      +60     
- Misses       3922     4043     +121     
- Partials      306      313       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@linghengqian linghengqian left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@aooohan
aooohan merged commit 5a54885 into version-fox:main Oct 2, 2026
6 checks passed
@linghengqian
linghengqian deleted the windows branch October 2, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants