Skip to content

fix: recover interrupted installs and correct shell integration - #707

Merged
aooohan merged 6 commits into
mainfrom
codex/fix-issue-batch-20260912
Sep 12, 2026
Merged

aooohan merged 6 commits into
mainfrom
codex/fix-issue-batch-20260912

Conversation

@aooohan

@aooohan aooohan commented Sep 12, 2026

Copy link
Copy Markdown
Member

Fix interrupted-install recovery, Windows MSYS2 zsh PATH serialization, and shell detection through same-name executable shims. Add Fish command and option completion with packaging support and preserve Bash/Zsh completion formats.

Validation: CI and three-platform E2E passed on 563ba7b. Windows tests execute native process/file-lock regressions and MSYS2 zsh; Fish tests run with the real shell. The shim test uses a native process fixture rather than a complete Scoop installation.

Fixes #252
Fixes #490
Fixes #238
Fixes #22

Keep pending installs out of runtime resolution, preserve final plugin paths, and serialize retries with an OS file lock.

Fixes #252
Install Fish completions through release packages and preserve shell-specific completion formatting.

Fixes #22
Copilot AI lite review requested due to automatic review settings September 12, 2026 08:24
@aooohan
aooohan merged commit 70d41d5 into main Sep 12, 2026
11 checks passed

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.

🟡 Changes recommended

Unresolved Windows zsh PATH serialization/cache issues and empty-version runtime detection remain.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR adds interrupted-install recovery, fixes Windows/MSYS2 shell integration, and adds Fish completion support.

Changes:

  • Adds install markers, locking, recovery logic, and tests.
  • Improves shim-based shell detection and zsh PATH handling.
  • Adds Fish completion, documentation, packaging, and CI coverage.
File summaries
File Summary
README.md Documents Fish completion.
README_CN.md Documents Fish completion in Chinese.
internal/shell/shell.go Resolves shells through same-name shims.
internal/shell/open_test.go Tests shim-aware shell detection.
internal/sdk/sdk.go Adds install markers and recovery checks.
internal/sdk/install_windows_test.go Tests Windows locked-payload recovery.
internal/sdk/install_test.go Tests installation recovery and locking.
internal/sdk/install_lock.go Provides shared install locking.
internal/sdk/install_lock_windows.go Implements Windows locking.
internal/sdk/install_lock_unix.go Implements Unix locking.
internal/env/path_windows_test.go Tests Windows/MSYS2 PATH handling.
internal/env/env_win.go Adds zsh PATH serialization.
completions/zsh_autocomplete Preserves zsh completion formatting.
completions/vfox.fish Adds Fish command and option completion.
completions/bash_autocomplete Preserves Bash completion formatting.
cmd/completion.go Handles CLI completion generation.
cmd/completion_test.go Tests shell completion integration.
cmd/cmd.go Registers completion handlers.
AGENTS.md Documents installation invariants.
.goreleaser.yaml Packages Fish completion scripts.
.github/workflows/ci.yml Adds platform-specific regression jobs.
Review details

Suppressed comments (1)

internal/env/env_win.go:33

  • The new zsh branch can be skipped entirely by the persistent env cache: envFlag returns cached output for a cached zsh entry before Paths.String() runs, and ConfigState keys that entry only by shell name, not by PATH serialization format or vfox version. Output generated by the pre-change binary can therefore remain semicolon-separated after upgrade, so this MSYS2 fix is not applied until cache invalidation. Invalidate or version the cache when this format changes and cover a pre-existing zsh cache.
	shell := strings.ToLower(os.Getenv(HookFlag))
	if shell == "bash" || shell == "zsh" {
  • Files reviewed: 21/21 changed files
  • Comments generated: 2
  • Review effort level: Lite

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

Comment thread internal/sdk/sdk.go
Comment on lines +937 to +938
info, err := os.Stat(filepath.Join(b.packagePath(version), name+"-"+string(version)))
return err == nil && info.IsDir() && !b.hasPendingInstall(version)
Comment thread internal/env/env_win.go
Comment on lines +32 to +33
shell := strings.ToLower(os.Getenv(HookFlag))
if shell == "bash" || shell == "zsh" {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants