fix(server): provider updates recognize Volta's Windows script shims#25448
Problem
On Windows, a provider CLI installed with Volta 2 gets the provider's own updater instead of volta install. For OpenCode, "Update now" runs ...\Volta\bin\opencode.CMD upgrade. opencode upgrade doesn't know about Volta, so the copy Volta runs never updates. Fixes #24873.
Volta 2 on Windows doesn't link bin\<tool> to volta-shim.exe. It writes a two-line script instead (@echo off / volta run %~n0 %*). isVoltaPackageInstall only accepts a real path named volta-shim, so it rejects the script before checking the package image.
Change
On win32, isVoltaPackageInstall also accepts a command whose script body runs volta run. The existing tools\image\packages\<name> check still proves ownership. The script read uses the same size-capped read as the mise wrapper check, now shared as readWrapperScript. POSIX behavior is unchanged.
Scope and approval
Fixes #24873, a focused bug with the root cause in the issue. One function in the provider maintenance resolver changes, plus a test beside the existing Volta test.
Verification
New test
updates Volta installs from the Windows \volta run` script shimsfails onmain(updateisnull) and passes with the fix.maintenanceResolver.test.ts`: 36 passed, 17 skipped (symlink/POSIX cases on this Windows host).Native repro on Windows 11 (26300) with portable Volta 2.0.2 in a sandboxed
VOLTA_HOME, aftervolta install node@22andvolta install @opencode/cli. Volta wrotebin\opencode.cmdcontaining@echo off/volta run %~n0 %*, and createdtools\image\packages\@opencode\cli. I resolvedopencodefrom that PATH with the same resolver definition asopenCodeUpdateFor("v2"):1 main: C:\...\t3-24873\home\bin\opencode.CMD upgrade (lockKey opencode-native) 2 fix: volta install @opencode/cli@latest (lockKey volta) Ran the resolved command against an install pinned to 2.1.2:
opencode --versionwent from v2.1.2 to v2.1.4.vp run check:changed upstream/main: format, lint, knip, typecheck (21 packages), and tests beside the change all pass.
Claude Opus 5.5 via Claude Code (T3 Code)
🤖 Generated with Claude Code
Fixes pingdotgg/t3code#24873
Checks
Added 1 commit
- fix(server): provider updates recognize Volta's Windows script shimsf22a228
Approvability
Verdict: Approved at f22a228
Macroscope's review found this PR approvable — This focused bug fix adds Windows-only recognition for Volta 2 script shims while retaining the existing package-ownership check, and includes targeted coverage. Other platforms and updater paths remain unchanged; no defaults or static-analysis suppressions are modified.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
Walkthrough
-
The resolver now recognizes Windows Volta command scripts that run
volta runand checks the Volta package image before selecting an update. Wrapper-script reading uses a shared 16 KiB limit. A Windows-specific test covers package absence and presence.Changes: Windows Volta shim detection
Layer / File(s) Summary Wrapper-script and Volta detection
packages/provider-core/src/server/maintenanceResolver.ts,packages/provider-core/src/server/maintenanceResolver.test.tsThe resolver uses a bounded wrapper-script reader for Mise detection and recognizes Windows scripts that run volta run. The package-image check remains in place. The test checks that an update is unavailable when the package is absent and expects avolta install ...@latestcommand with lock keyvoltawhen it is present.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
maria-rcks
Merge Risk: External image Minimal · up to f14c3
-
This change lets provider updates recognize Volta's Windows script shims and offer the Volta install command instead of the provider's own upgrade. POSIX behavior is unchanged. The change is narrow and guarded by the existing package-ownership check, so it looks safe to merge.
Pre-merge checks: Passed 4
-
Check name Status Explanation Title check Passed The title names the main change: provider updates now recognize Volta's Windows script shims. It follows the conventional commit form and matches the changeset, which accepts a Windows wrapper script … Description check Passed The description follows the template sections: Problem, Change, Scope, and Verification. It explains the Windows Volta 2 script shim cause and the fix, links issue #24873, and gives specific test and …Linked Issues check Passed [ #24873] requires T3 Code to recognize a Volta-installed provider CLI on Windows and offervolta install <package>@latestinstead of the provider's own updater. The current summary and PR descriptio…Out of Scope Changes check Passed The described changes connect to [ #24873]. The rename toWRAPPER_SCRIPT_MAX_BYTESand the sharedreadWrapperScripthelper let the Volta Windows check and the existing mise wrapper check use one si…Full details: Title check
-
Explanation
The title names the main change: provider updates now recognize Volta's Windows script shims. It follows the conventional commit form and matches the changeset, which accepts a Windows wrapper script that runs
volta run.
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. It explains the Windows Volta 2 script shim cause and the fix, links issue
#24873, and gives specific test and manual repro results. It does not state the model used in the template's agent footer, but it names Claude Opus 5.5 via Claude Code. The Scope section explains the focused bug fix and links the issue.
Full details: Linked Issues check
-
Explanation
[
#24873] requires T3 Code to recognize a Volta-installed provider CLI on Windows and offervolta install <package>@latestinstead of the provider's own updater. The current summary and PR description describeisVoltaPackageInstallinpackages/provider-core/src/server/maintenanceResolver.tsaccepting, on win32, a command whose script body runsvolta run. The existingtools\image\packages\<name>check still runs after this gate. The head file confirms the shared size cap is renamed toWRAPPER_SCRIPT_MAX_BYTES(16 KiB). Thevolta runbranch itself could not be read at head: the whole-PR diff and changed blobs were unavailable, and the file read was truncated. The prior PASS was based on the whole-PR diff at d9483e6. The summary of the current change still describes the same logic, so the conclusion is carried forward. The issue's optional case-insensitive.exematch is not in the described change. The reproduction uses a.CMDscript, so this does not block the stated expected behavior. Test results are author-reported and were not rerun.
Full details: Out of Scope Changes check
-
Explanation
The described changes connect to [
#24873]. The rename toWRAPPER_SCRIPT_MAX_BYTESand the sharedreadWrapperScripthelper let the Volta Windows check and the existing mise wrapper check use one size-capped read. The Volta change adds the win32-onlyvolta runscript-body branch, and the package-image ownership check is unchanged. The test change is one Windows-shaped test beside the existing Volta test. No unrelated product behavior appears in the current summary. The changed hunks at head could not be read directly, so this verdict relies on the current summary and the prior whole-PR review.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 83ee1f5
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3dfde75b-e265-4fd8-b195-f5ef55fe0992
External image Commits
-
Reviewing files that changed from the base of the PR and between d9483e6b442ee72cec4c7e85b02c24f1a973eaac and f14c384f248835c9d27f3eb8c1ce631d806124f7.
External image Files selected for processing: 2
-
packages/provider-core/src/server/maintenanceResolver.test.tspackages/provider-core/src/server/maintenanceResolver.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 83ee1f5
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3dfde75b-e265-4fd8-b195-f5ef55fe0992
External image Commits
-
Reviewing files that changed from the base of the PR and between d9483e6b442ee72cec4c7e85b02c24f1a973eaac and f14c384f248835c9d27f3eb8c1ce631d806124f7.
External image Files selected for processing: 2
-
packages/provider-core/src/server/maintenanceResolver.test.tspackages/provider-core/src/server/maintenanceResolver.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
Added 1 commit
- Merge remote-tracking branch 'origin/main' into fix/volta-windows-cmd-shimsfac9f36
The automated pipeline stopped on this pull request and will not merge it:
the fix is written and reviewed, but proving it needs something no worker has:
- Permanent blocker: Windows with Volta 2.x is required to install an older @opencode/cli release, reproduce opencode.CMD upgrade on base, and verify that head selects volta install @opencode/cli@latest and advances the detected version. Windows is unavailable in this environment; Linux simulation would not prove the requested behavior.
It stays open for a person to finish or close.
Added 2 commits
The automated pipeline stopped on this pull request and will not merge it:
the capture step could not show the problem on the base commit, so there is nothing to prove fixed.
Installed Volta 2.0.2, installed Node 22 and @opencode/cli@2.1.2, verified opencode reported v2.1.2, and inspected the generated Windows shim containing volta run %~n0 %*. Launched both app revisions on the first Windows lease. The first inspected browser capture showed pairing rather than Providers settings. The machine became unreachable during the corrected driver run. Repeated setup on a replacement lease, launched the base app, verified HTTP 200, and added a synthetic project through its CLI. The replacement also became unreachable during browser startup. Neither run reached inspection or execution of Update now.
It stays open for a person to finish or close.
Added 1 commit
- Merge commit '83ee1f5d48' into fix/volta-windows-cmd-shimsf14c384
Thanks for this. Main has the change since #36917.
Compared both changed files in #25448 with main: main recognizes Volta’s generated Windows forwarding scripts, requires the matching package image, and selects volta install <package>@latest with the Volta lock. It covers your regression case and additionally rejects custom or unreachable forwarding scripts.
Closing as superseded.