Native updater paths preserved by #9850 were copied from Settings without shell quoting. A path containing spaces worked with Update now, but Copy update command produced a command that failed in the terminal.
Quote the executable in the copied command using the environment's platform. POSIX paths use single quotes; Windows uses the existing PowerShell default and its call operator when quoting is needed. The executable and argument array used by one-click updates stay unchanged. Package-manager command strings stay unchanged too.
This follows up #9850. The broader installation-discovery report #6115 remains open.
Before and after#
The tests create disposable executable stubs, obtain the exact versionAdvisory.updateCommand copied by Settings, and run that string through /bin/sh with an empty PATH. No provider is installed or updated.
| Native path | Before | After |
|---|
| Plain path | Exit 0, upgrade | Exit 0, upgrade |
| Path with spaces | Exit 127, truncated executable not found | Exit 0, upgrade |
Path with apostrophes and $ | Exit 127 | Exit 0, upgrade |
The failure was reproduced on 2d5464a. The original fix was based on 896fe82. It is now refreshed onto ce4712d5, including the upstream CI mirror repair; no additional workflow changes were made. The changed behavior is copied command text, so executable before/after evidence is provided instead of layout screenshots.
Verification#
- 42 focused maintenance, runner, and Cursor driver tests pass, including all three shell executions, PowerShell path formatting, apostrophe escaping, and injected environment-platform handling.
- A disabled Cursor driver fixture reproduces the missing injected-platform handoff before its fix and passes afterward. It rejects any process spawn or HTTP request.
- Server typecheck, targeted lint, formatting, and
git diff --check pass.
- Actual shell execution was tested on Linux. PowerShell formatting is covered by fixtures; native Windows execution was not available.
- Web and desktop copy the server-provided advisory string. Formatting follows the environment platform, not the connecting client's OS. No mobile UI or wire schema changes.
Review limitation#
The Effect Service Conventions check concluded NEUTRAL, not success. It flags the synchronous helpers' ambient-platform fallback. Current production drivers acquire and forward the environment platform; six focused Windows/platform controls pass on this head, including the actual disabled Cursor driver. The orchestrator reviewed the concern and deferred a broader required-parameter refactor as nonblocking for this scope. Future synchronous native callers must supply their intended platform explicitly. All executed CI tests pass; the neutral check is not described as green.
GPT 6 Astra via Codex in T3 Code.
Note
Low Risk
Changes only the copied command string for provider maintenance; one-click updates and package-manager commands are untouched, with a minor requirement that effectful resolution paths provide HostProcessPlatform.
Overview
Copy update command for native provider updaters now quotes the executable when the path needs shell escaping, so pasted commands work in terminals (paths with spaces, quotes, or $ no longer break on POSIX; Windows gets PowerShell-style & '...' with doubled apostrophes).
makeProviderMaintenanceCapabilities builds the display command via new quoteUpdateExecutable using an optional platform on maintenance resolution options. resolveProviderMaintenanceCapabilitiesEffect supplies HostProcessPlatform when callers omit it, and native/Cursor resolvers forward platform so formatting matches the server host—not the UI client. Update now still uses unquoted executable + args; npm/brew-style command strings are unchanged.
Tests add POSIX shell runs of the copied advisory string, Windows command fixtures, platform injection through the effect resolver, and a disabled CursorDriver case for a spaced Windows binary path.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e589282ab156ff69b4f523343dc88cce99d9884a. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Note
Quote copied native provider update commands for target platform#
- Adds
quoteUpdateExecutable to providerMaintenance.ts, which quotes executable paths containing spaces or shell-significant characters using POSIX single-quote escaping or PowerShell call-operator syntax with doubled apostrophes
- Introduces an optional
platform field on ProviderMaintenanceCapabilityResolutionOptions and threads it through resolveProviderMaintenanceCapabilitiesEffect, resolvePackageManagedProviderMaintenance, and makeNativeProviderMaintenanceCapabilities so update descriptors format commands for the requested platform instead of always joining the raw path with arguments
- Adds tests covering Windows paths with spaces and apostrophes, POSIX paths with shell-significant characters, and platform injection through the effectful resolver in providerMaintenance.test.ts and CursorDriver.test.ts
- Risk:
resolveProviderMaintenanceCapabilitiesEffect now requires HostProcessPlatform when the caller does not supply a platform explicitly; callers that previously relied on the resolver without this service available will fail
Macroscope summarized e589282.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed