Skip to content

feat(cli): add ov doctor diagnostic command#851

Open
mvanhorn wants to merge 2 commits intovolcengine:mainfrom
mvanhorn:osc/feat-ov-doctor-diagnostic-command
Open

feat(cli): add ov doctor diagnostic command#851
mvanhorn wants to merge 2 commits intovolcengine:mainfrom
mvanhorn:osc/feat-ov-doctor-diagnostic-command

Conversation

@mvanhorn
Copy link
Contributor

@mvanhorn mvanhorn commented Mar 21, 2026

Description

Adds ov doctor, a local diagnostic command that validates all OpenViking subsystems and reports pass/fail with actionable fix suggestions. Unlike ov health (which requires a running server), ov doctor works offline and checks prerequisites before the server even starts.

Why this matters: After installing OpenViking v0.2.8 via pip on Python 3.13, the native vector engine (PersistStore) was missing from the wheel. The only feedback was 50+ ERROR log lines. Filesystem operations (ls, tree, add_resource) all worked fine, but search and find silently returned nothing. ov doctor catches this immediately with a clear fix suggestion.

Related issues:

  • #420 - integration test coverage for all API commands
  • #693 - user couldn't run on VM without AVX instructions, no diagnostic told them why
  • #737 - SSE3 variant contained AVX-512 instructions, crash with no clear error

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

  • Created openviking_cli/doctor.py with 7 isolated checks: config, Python version, native engine, AGFS, embedding, VLM, disk space
  • Modified openviking_cli/rust_cli.py to intercept doctor as a Python-native subcommand before exec'ing the Rust binary
  • Added 17 unit tests in tests/cli/test_doctor.py

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

Screenshots

All checks passing (installed from modified branch, ran ov doctor via CLI entry point):

ov doctor - all pass

Failure state (native engine missing + no VLM API key):

ov doctor - failures

Each failing check shows a specific fix suggestion. Checks are isolated so one failure doesn't block others.

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
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes

This contribution was developed with AI assistance (Claude Code). The feature was proposed after dogfooding OpenViking locally and discovering the PersistStore gap firsthand.

Adds a new `ov doctor` command that validates all OpenViking subsystems
and reports actionable diagnostics without requiring a running server.

Checks: config file, Python version, native vector engine (PersistStore),
AGFS, embedding provider, VLM provider, and disk space. Each check is
isolated so one failure doesn't block others, and every failure includes
a specific fix suggestion.

This addresses a real pain point: when the native engine is missing from
a pip wheel (e.g., Python 3.13), the only feedback is 50+ ERROR log
lines with no actionable guidance. `ov doctor` catches this immediately:

  Native Engine: FAIL  No compatible engine variant
    Fix: pip install openviking --upgrade --force-reinstall
    Alt: Use vectordb.backend = "volcengine" instead of "local"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

Failed to generate code suggestions for PR

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant