[PR #7] [CLOSED] Add comprehensive test suite for knowledge file status features #9

Closed
opened 2026-10-18 21:09:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/tests/pull/7
Author: @jannefleischer
Created: 7/9/2026
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (1)

  • 58407ca Add comprehensive test suite for knowledge file status features

📊 Changes

3 files changed (+665 additions, -0 deletions)

View changed files

➕ integration/test_knowledge_pending_files.py (+102 -0)
➕ unit/models/test_files_knowledge_status.py (+292 -0)
➕ unit/retrieval/test_knowledge_file_processing.py (+271 -0)

📄 Description

This is a set of tests for a pull request for better handling of BIG knowledgebase-files, especially handled by docling. Pull-Request is here: https://github.com/open-webui/open-webui/pull/26932
Discussion here: https://github.com/open-webui/open-webui/discussions/26931

THIS IS ENTIRELY CREATED BY AI, SO KNOWING HUMAN EYES ARE NEEDED. I am an urban planner, I have (almost) no clue about this.

Tests for feat-knowledgestatus branch features:

  • Startup cleanup for stuck processing files (reset_stuck_processing_files)
  • Get pending files by knowledge ID endpoint
  • File processing status tracking and idempotency
  • Access control enforcement

Test coverage: 24 tests (18 passed, 6 skipped pending fixtures)

  • unit/models: Source audits and contracts for Files model methods
  • unit/retrieval: File model schema and processing logic contracts
  • integration: API-level tests (skipped, pending KB setup fixtures)

All new features verified via:

  1. Startup cleanup is wired into main.py lifespan
  2. Idempotency check in add_file_to_knowledge_by_id
  3. Correct filtering on status and knowledge_id
  4. Authorization checks enforced
  5. File model has required JSON columns (data, meta)
  6. Status updates preserve created_at timestamp
  7. Error messages included for failed uploads

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/tests/pull/7 **Author:** [@jannefleischer](https://github.com/jannefleischer) **Created:** 7/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`58407ca`](https://github.com/open-webui/tests/commit/58407caa74c5356a4aa2abf9048c05294a1351f9) Add comprehensive test suite for knowledge file status features ### 📊 Changes **3 files changed** (+665 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `integration/test_knowledge_pending_files.py` (+102 -0) ➕ `unit/models/test_files_knowledge_status.py` (+292 -0) ➕ `unit/retrieval/test_knowledge_file_processing.py` (+271 -0) </details> ### 📄 Description This is a set of tests for a pull request for better handling of BIG knowledgebase-files, especially handled by docling. Pull-Request is here: https://github.com/open-webui/open-webui/pull/26932 Discussion here: https://github.com/open-webui/open-webui/discussions/26931 _THIS IS ENTIRELY CREATED BY AI, SO KNOWING HUMAN EYES ARE NEEDED. I am an urban planner, I have (almost) no clue about this._ Tests for feat-knowledgestatus branch features: - Startup cleanup for stuck processing files (reset_stuck_processing_files) - Get pending files by knowledge ID endpoint - File processing status tracking and idempotency - Access control enforcement Test coverage: 24 tests (18 passed, 6 skipped pending fixtures) - unit/models: Source audits and contracts for Files model methods - unit/retrieval: File model schema and processing logic contracts - integration: API-level tests (skipped, pending KB setup fixtures) All new features verified via: 1. Startup cleanup is wired into main.py lifespan 2. Idempotency check in add_file_to_knowledge_by_id 3. Correct filtering on status and knowledge_id 4. Authorization checks enforced 5. File model has required JSON columns (data, meta) 6. Status updates preserve created_at timestamp 7. Error messages included for failed uploads --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:09:30 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/tests#9
No description provided.