Skip to content

fix(cli): upload local files for dockerized localhost servers#961

Merged
zhoujh01 merged 1 commit intomainfrom
fix/docker-local-upload
Mar 25, 2026
Merged

fix(cli): upload local files for dockerized localhost servers#961
zhoujh01 merged 1 commit intomainfrom
fix/docker-local-upload

Conversation

@qin-ctx
Copy link
Copy Markdown
Collaborator

@qin-ctx qin-ctx commented Mar 25, 2026

Description

Fix localhost file uploads for Dockerized OpenViking servers.
The CLI no longer assumes that localhost or 127.0.0.1 means the server shares the caller filesystem, so local files are uploaded before add-resource, add-skill, and import-ovpack requests.

Background:
A common deployment pattern is running OpenViking server inside Docker while exposing it to the host as http://localhost:<port>. In that setup, the CLI runs on the host, but the server process runs inside the container and cannot read host filesystem paths such as ./SKILL.md. The old localhost heuristic treated this as a shared-filesystem deployment, skipped temp upload, and sent host paths directly to the containerized server.

Related Issue

Fixes #959

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Remove the localhost hostname heuristic from both Python and Rust CLI HTTP clients.
  • Upload client-visible local files whenever the input path exists locally, including .ovpack imports.
  • Add localhost upload tests in the Python HTTP client layer and a real SDK localhost add_skill regression test.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Ran locally:

  • python -m pytest -o addopts='' tests/client/test_http_client_local_upload.py -q
  • cargo check -p ov_cli

Not run locally:

  • python -m pytest -o addopts='' tests/server/test_http_client_sdk.py -q currently fails in this environment because argon2 is not installed.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Notes

This specifically fixes host-CLI to Docker-server localhost deployments where host paths are not visible inside the container.

Stop guessing shared filesystem access from localhost URLs and always
upload client-visible local files before calling add-resource,
add-skill, and import-ovpack.
@zhoujh01 zhoujh01 merged commit 0392e67 into main Mar 25, 2026
10 checks passed
@zhoujh01 zhoujh01 deleted the fix/docker-local-upload branch March 25, 2026 09:01
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 25, 2026
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bug: ov add-skill misclassifies localhost Docker servers as local filesystem access

2 participants