Several routers returned Response(status='error', error=ErrorInfo(...))
directly, so FastAPI shipped them with HTTP 200 instead of the mapped
status from ERROR_CODE_TO_HTTP_STATUS. Web-studio's sessions API only
survived because of a code-based fallback; other clients (e.g. a generic
HTTP retry layer) would treat these as success and never surface the
error.
Switch the seven return sites to error_response() so the canonical
mapping drives the HTTP status, and add the three previously-unmapped
codes (INTERNAL_ERROR, NO_VECTOR_DB, INVALID_FILTER) to the map.
Residual follow-up from PR #1764 (ac9f679a).
Co-authored-by: ming <silverchris@foxmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
* lisence: change the main lisence from Apache-2.0 to AGPL-v3
* lisence: change the main lisence from Apache-2.0 to AGPL-v3
* lisence: change the main lisence from Apache-2.0 to AGPL-v3
---------
Co-authored-by: openviking <openviking@example.com>
* feat(semantic): add embedding task tracker and incremental update support
Implement embedding task tracker to monitor completion of vectorization tasks
Add support for incremental updates with file change status tracking
Optimize vectorization by reducing file reads with pre-computed status
Introduce VectorizeTask structure for better task management
Update semantic DAG executor to handle both full and incremental updates
* fix(semantic_processor): correct directory sync order and rename abstract to overview
Update the directory synchronization process to properly handle vector data files before directory deletion. Also rename 'abstract' parameter to 'overview' for clarity in the embedding utils.
* feat(embedding): add tracker decrement for failed enqueues
refactor(semantic_processor): simplify sync diff implementation
fix(summarizer): improve temp_uris empty check
test(embedding): add tests for tracker decrement cases
style(embedding_tracker): remove dataclass decorator
* fix(semantic_processor): change log level from warning to error for sync failures
refactor(tests): update vectorize methods to include semantic_msg_id parameter
test: add dummy tracker for embedding task tests
chore: remove obsolete test files
* fix: context overview
---------
Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
* feat(resource): implement incremental update with COW pattern
Add support for incremental updates using copy-on-write pattern. Key changes include:
- Add ResourceLockManager for managing concurrent updates
- Introduce EmbeddingTaskTracker to track embedding task completion
- Modify TreeBuilder to support temp URIs and skip conflict resolution
- Update SemanticDagExecutor to handle incremental updates
- Extend memory extractor/compressor to work with temp URIs
- Add exists() method to VikingFS for URI existence checks
- Update Context to include temp_uri field
* refactor(resource_lock): clean up imports and improve code formatting
style: fix code formatting and whitespace issues across multiple files
feat(viking_fs): add copy_directory method for recursive directory copying
refactor(session): simplify temp URI creation and cleanup logic
style(memory_extractor): improve code formatting and line wrapping
refactor(semantic_processor): clean up imports and improve sync diff logic
style(compressor): fix code formatting and line wrapping
refactor(embedding_tracker): clean up code and improve logging
style(session): fix code formatting and whitespace issues
refactor(resource_lock): improve error handling and code organization
* refactor(storage): remove resource lock and improve semantic processing
- Remove ResourceLockManager and related lock handling code
- Simplify semantic processor by removing path locking mechanism
- Improve error handling and logging in sync operations
- Add new test files for storage components
- Clean up unused imports and update dependencies
* style(tests): clean up unused imports in test files
Remove unused imports across multiple test files to improve code cleanliness and reduce potential confusion. This includes removing unused mock objects, context classes, and constants that are not referenced in the tests.
* style: reformat code for better readability and consistency
Refactor long lines and adjust formatting to improve code readability. Changes include:
- Breaking long lines to adhere to line length limits
- Reformatting dictionary and list literals for consistency
- Adjusting indentation in multi-line statements