Commit graph

11 commits

Author SHA1 Message Date
JunghwanNA
5c3b95838d Respect maintainer preference against new PR test files
A collaborator explicitly asked that test files not be included on the PR. This follow-up keeps the file reindex safety fix intact while dropping the newly added repository test file, and relies on focused local verification outside the tracked diff instead.

Constraint: Keep the data-loss fix intact while removing the only PR artifact a reviewer objected to
Rejected: Leave the new test file in place and wait | direct reviewer feedback is already available and easy to satisfy
Confidence: medium
Scope-risk: narrow
Reversibility: clean
Directive: For this PR, preserve the reindex ordering fix but avoid re-adding a dedicated repository test file unless a maintainer explicitly asks for one
Tested: python3 -m py_compile backend/open_webui/routers/files.py backend/open_webui/utils/knowledge_collections.py; focused local harness for reindex_file_in_collection success/failure ordering
Not-tested: Repository pytest suite after dropping the tracked test file
2026-04-17 13:13:55 +09:00
JunghwanNA
b2fce411c8 Prevent silent KB vector loss when file reindexing fails
A file content update should not leave knowledge collections emptier than before. The previous flow deleted old vectors first and then attempted the rebuild, so any downstream processing failure could leave the KB without embeddings even though the route returned success.\n\nThis change rebuilds the file's knowledge entries first and only deletes the stale vector ids after the new insert succeeds. The fix is kept narrow to the file-update propagation path and adds a focused regression test for the helper that preserves old ids when reindexing raises.\n\nConstraint: Keep the fix scoped to one retrieval correctness bug without refactoring broader embedding flows\nRejected: Fail the route after deleting old vectors | still leaves the KB empty and does not preserve data\nRejected: Broad temporary-collection refactor | larger than needed for a first bugfix PR\nConfidence: high\nScope-risk: narrow\nReversibility: clean\nDirective: Preserve old vector ids until rebuild success remains observable in tests; do not revert to delete-first ordering\nTested: py_compile on modified modules; PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=backend pytest -q backend/open_webui/test/util/test_knowledge_collections.py; local source-faithful harness reproducing old failure mode\nNot-tested: Full application boot with live vector database backends
2026-04-16 21:20:34 +09:00
Timothy Jaeryang Baek
de3317e26b refac 2026-03-17 17:58:01 -05:00
Timothy Jaeryang Baek
6dd0f99b90 rm: outdated tests 2025-12-28 23:35:09 +04:00
Timothy Jaeryang Baek
c79fb7db74 refac 2025-12-28 22:40:28 +04:00
Sihyeon Jang
1b7ac7c739 chore: format, lint
Signed-off-by: Sihyeon Jang <sihyeon.jang@navercorp.com>
2025-07-16 15:23:18 +09:00
Sihyeon Jang
728c39eed7 chore: add tests with pytest-asyncio
Signed-off-by: Sihyeon Jang <sihyeon.jang@navercorp.com>
2025-07-16 15:23:18 +09:00
Timothy Jaeryang Baek
3bda1a8b88 wip 2024-12-11 18:36:59 -08:00
Timothy Jaeryang Baek
d3d161f723 wip 2024-12-10 00:54:13 -08:00
Timothy Jaeryang Baek
33099bf9e4 refac 2024-12-08 16:01:56 -08:00
Timothy J. Baek
03d5a670f6 refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00