Bug: Reindex returns "Indexed" with 0 vectors when target has empty .overview.md
Description
When calling POST /api/v1/maintenance/reindex on a URI where the only file is an empty .overview.md (auto-generated summary file), the API returns a successful "Indexed" response but produces zero vectors.
This gives a false positive — the user believes the reindex succeeded, but no meaningful content was actually indexed.
Steps to Reproduce
- Have a resource directory that only contains an auto-generated
.overview.md file (e.g., a directory that was created but has no actual content files yet)
- Call reindex on that directory:
curl -X POST http://localhost:1933/api/v1/maintenance/reindex \
-H "Authorization: Bearer <token>" \
-H "X-OpenViking-Account: wiki" \
-H "X-OpenViking-User: wiki-user" \
-H "Content-Type: application/json" \
-d '{"uri": "viking://wiki/user/wiki-user/resources/empty-dir/"}'
- Response: Success with "Indexed" status
- Check vectors: 0 new vectors created
Expected Behavior
Either:
- Skip
.overview.md files during reindex (they are metadata, not content), or
- Return a more informative response indicating how many files were actually indexed vs skipped
Additional Context
The index_resource() function in embedding_utils.py already skips hidden files starting with . (line ~368: if file_name.startswith("."): continue), so .overview.md IS being skipped. The issue is that when .overview.md is the only file in a directory, the reindex appears to succeed but indexed nothing. The response should reflect this.
Environment
- OpenViking v0.3.10
- Docker deployment
Bug: Reindex returns "Indexed" with 0 vectors when target has empty .overview.md
Description
When calling
POST /api/v1/maintenance/reindexon a URI where the only file is an empty.overview.md(auto-generated summary file), the API returns a successful "Indexed" response but produces zero vectors.This gives a false positive — the user believes the reindex succeeded, but no meaningful content was actually indexed.
Steps to Reproduce
.overview.mdfile (e.g., a directory that was created but has no actual content files yet)Expected Behavior
Either:
.overview.mdfiles during reindex (they are metadata, not content), orAdditional Context
The
index_resource()function inembedding_utils.pyalready skips hidden files starting with.(line ~368:if file_name.startswith("."): continue), so.overview.mdIS being skipped. The issue is that when.overview.mdis the only file in a directory, the reindex appears to succeed but indexed nothing. The response should reflect this.Environment