Skip to content

feat(cli): add live embedding validation and reindex dry-run planner#1559

Open
yeyitech wants to merge 1 commit intovolcengine:mainfrom
yeyitech:feat/issue-1523-embed-migration-ux-mvp
Open

feat(cli): add live embedding validation and reindex dry-run planner#1559
yeyitech wants to merge 1 commit intovolcengine:mainfrom
yeyitech:feat/issue-1523-embed-migration-ux-mvp

Conversation

@yeyitech
Copy link
Copy Markdown
Contributor

Summary

  • add optional live embedding validation to openviking-server doctor for real endpoint/model checks
  • add ov reindex --all --dry-run planner support in the Rust CLI
  • cover the new doctor flow and CLI parsing with focused tests

Testing

  • tmpdir=/var/folders/sg/8wz47vrs179fbyw479ssxhh00000gn/T/tmp.Fv8vNEN2XU && printf 'class Ark:\n pass\n' > "/volcenginesdkarkruntime.py" && PYTHONPATH=":" python -m pytest -q tests/cli/test_doctor.py
  • cargo test -p ov_cli cli_reindex -- --nocapture

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Codex seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🏅 Score: 90
🧪 PR contains tests
🔒 No security concerns identified
✅ No TODO sections
🔀 Multiple PR themes

Sub-PR theme: Add live embedding validation to openviking-server doctor

Relevant files:

  • openviking_cli/doctor.py
  • tests/cli/test_doctor.py

Sub-PR theme: Add ov reindex --all --dry-run planner in Rust CLI

Relevant files:

  • crates/ov_cli/src/commands/content.rs
  • crates/ov_cli/src/handlers.rs
  • crates/ov_cli/src/main.rs

⚡ Recommended focus areas for review

Dead Code

The _CHECKS constant is no longer used since run_doctor now defines a local checks list. This is dead code that should be removed.

_CHECKS = [
    ("Config", check_config),
    ("Python", check_python),
    ("Native Engine", check_native_engine),
    ("AGFS", check_agfs),
    ("VLM", check_vlm),
    ("Ollama", check_ollama),
    ("Disk", check_disk),
]
Config Inconsistency

The Rust dry-run code reads ov.conf directly without expanding environment variables, while the Python doctor code uses os.path.expandvars(). This may lead to incorrect values in the embedding summary if the config uses env vars.

let content = match fs::read_to_string(path) {
    Ok(content) => content,
    Err(err) => {
        return EmbeddingConfigSummary {
            provider: None,
            model: None,
            dimension: None,
            config_path: Some(config_path),
            note: Some(format!("Failed to read ov.conf: {}", err)),
        };
    }
};

let parsed: Value = match serde_json::from_str(&content) {
    Ok(value) => value,
    Err(err) => {
        return EmbeddingConfigSummary {
            provider: None,
            model: None,
            dimension: None,
            config_path: Some(config_path),
            note: Some(format!("Failed to parse ov.conf: {}", err)),
        };
    }
};

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

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.

2 participants