OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Bug]: Directory vectors (L0/L1) retain temp URIs after SyncDiff, causing search to return 0 results

Open takeshi-zhou710 opened this issue 8 months ago • 3 comments

Bug Description

Bug Report

OpenViking Version: v0.2.7
Deployment: Docker (ghcr.io/volcengine/openviking:v0.2.7)
Triggered by: Uploading files via temp_path to a remote server


Summary

When uploading a file via the temp_path API flow (i.e., the client is not localhost), directory-level vectors (L0/L1, i.e. .abstract.md and .overview.md) are written to the vector store after SyncDiff completes. As a result, they retain viking://temp/xxx/... URIs instead of the intended viking://resources/... URIs. All subsequent searches return 0 results.

Steps to Reproduce

1. Start OpenViking server

docker run -p 1933:1933 ghcr.io/volcengine/openviking:v0.2.7

2. Upload temp file (simulates remote client flow)

TEMP_URI=$(curl -s -X POST http://localhost:1933/api/v1/temp/upload
-H "X-API-Key: your-key"
-F "[email protected]" | jq -r '.result.uri')

3. Add resource via temp_path

curl -X POST http://localhost:1933/api/v1/resources
-H "X-API-Key: your-key"
-H "Content-Type: application/json"
-d "{"temp_path": "$TEMP_URI", "to": "viking://resources/test/doc", "wait": true}"

4. Search — always returns 0 results

curl -X POST http://localhost:1933/api/v1/search/find
-H "X-API-Key: your-key"
-H "Content-Type: application/json"
-d '{"query": "test", "target_uri": "viking://resources/test", "limit": 5}'

→ {"result": {"resources": [], "total": 0}}

Expected Behavior

After uploading a file via temp_path, all vectors (L0/L1 directory-level and L2 file-level) should be stored with the final viking://resources/... URI. Specifically:

  • .abstract.md and .overview.md vectors for every directory node should have URIs like
    viking://resources/xxx/xxx (not viking://temp/xxx/xxx)
  • search/find with target_uri="viking://resources/xxx" should return relevant results
  • The behavior should be identical to uploading via path= on localhost

Actual Behavior

Actual Behavior

After uploading via temp_path, SyncDiff only renames the L2 file vectors. The L0/L1 directory vectors are written after SyncDiff completes and retain stale viking://temp/... URIs:

Minimal Reproducible Example


Error Logs


OpenViking Version

v2.7.0

Python Version

3.12.3

Operating System

Linux

Model Backend

None

Additional Context

No response

takeshi-zhou710 avatar Mar 18 '26 12:03 takeshi-zhou710

感谢反馈!这个问题已经确认,是 Docker 版本 v0.2.7 中的一个已知问题。我们正在发布新版本来修复它,请关注后续的 release。

qin-ctx avatar Mar 18 '26 13:03 qin-ctx

I can help fix this. I’ll submit a PR once it’s done.

gilangjavier avatar Mar 18 '26 13:03 gilangjavier

fixed by #773

qin-ctx avatar Mar 20 '26 08:03 qin-ctx