mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-03 16:51:29 +08:00
* fix(rag): classify invalid persisted index errors and include re-index steps Searching a knowledge base whose persisted vector store contains invalid vectors (issue #440) was misclassified: the ValueError raised at index load wraps a provider-facing "Details: ..." tail, so search_error_result matched the embedding-provider branch first and returned invalid_embedding_provider_response without needs_reindex, blaming the provider instead of the damaged index. Check the persisted-index diagnosis first, include the recorded failure reason (which store file, which vector) in the user-facing answer, and spell out recovery: run the knowledge base's 'Re-index' action; re-uploading documents reuses the damaged store and cannot repair it. * test(codebuddy): make credential fixture expiry relative to now test_load_credentials_parses_session wrote a hard-coded expiresAt of 1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is False. Once that instant passed the assertion flipped, so the test now fails on every Python version for every branch. Derive expiresAt / refreshExpiresAt from time.time() so the fixture always describes a live session, and assert against the value written. --------- Co-authored-by: XZH <cto@xzh.ai>