feat(content): add reindex endpoint for re-embedding after manual edits#631
Merged
zhoujh01 merged 4 commits intovolcengine:mainfrom Mar 16, 2026
Merged
Conversation
Adds POST /api/v1/content/reindex that re-embeds existing .abstract.md/.overview.md content via ResourceService.build_index(), or optionally regenerates L0/L1 via LLM using ResourceService.summarize(). Addresses volcengine#468. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests cover: request validation (missing uri → 422), endpoint registration (GET → 405), and schema validation. Integration tests requiring embedding API credentials are deferred to CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
|
reindex should be a transaction and it needs more management |
Contributor
Author
|
Thanks for the feedback @MaojiaSheng! I'll look into wrapping the reindex operation with TransactionManager and adding progress tracking via TaskTracker. Will push an update. |
…ndex
- Wrap reindex in TransactionManager for path locking (prevents concurrent
reindexes on the same URI)
- Add wait=False mode for background execution with TaskTracker
(poll via GET /api/v1/tasks/{task_id})
- Add conflict detection (CONFLICT error if reindex already in progress)
- Follow session commit pattern from sessions.py
Addresses review feedback from @MaojiaSheng on volcengine#631.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
|
@deepakdevp That's cool !! |
zhoujh01
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/v1/content/reindexendpoint that re-embeds existing.abstract.md/.overview.mdcontent into the vector database after manual editsregenerate=truemode that regenerates L0/L1 summaries via LLM before re-embeddingAddresses #468
Changes Made
openviking/server/routers/content.py: AddedReindexRequestmodel andPOST /reindexendpoint. Uses existingResourceService.build_index()for re-embed andResourceService.summarize()for regenerate mode.tests/server/test_api_content.py: Added 3 tests — request validation (missing uri → 422), endpoint registration (GET → 405), and schema validation.API
Type of Change
Testing
pytest tests/server/test_api_content.py— 6/6 pass)Checklist
🤖 Generated with Claude Code