proposal: resolve relative CLI paths to absolute before sending to server#233
Open
ZaynJarvis wants to merge 1 commit intovolcengine:mainfrom
Open
proposal: resolve relative CLI paths to absolute before sending to server#233ZaynJarvis wants to merge 1 commit intovolcengine:mainfrom
ZaynJarvis wants to merge 1 commit intovolcengine:mainfrom
Conversation
Both Python and Rust CLIs were passing relative paths as-is to the server, which resolved them relative to its own CWD instead of the caller's. Fix by canonicalizing any path that exists on the local filesystem before sending. Covers add-resource, add-skill, export, and import in both CLIs.
d5747ad to
ca75fa1
Compare
This was referenced Feb 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When running
ov add-skill ./my-skillorov add-resource ./my-filefrom any directory other than the server's working directory, the command fails because relative paths are sent as-is to the server, which resolves them relative to its own CWD.add-skillerror:(Server can't find the path, falls through to treating the string as raw content)
add-resourceerror:Root Cause
Both the Python CLI (
openviking_cli) and Rust CLI (ov) send the raw path string directly to the server via HTTP. The server resolves it using Python'spathlib.Path()relative to its own working directory, not the caller's CWD.Fix
Resolve any path that exists on the local filesystem to its absolute path before sending to the server. URLs and raw content strings are passed through unchanged.
Files changed
openviking_cli/cli/commands/resources.pyadd-resource,add-skillopenviking_cli/cli/commands/pack.pyexport,importcrates/ov_cli/src/main.rsadd-resource,add-skill,export,importTest