Changes prakhar - #17
Merged
Merged
Conversation
…/WhereTF-backend into Changes_Prakhar
This update completely changes how we handle file uploads by moving the heavy AI work into the background so the user doesn't have to wait. Here is everything that changed: - Added Redis and Celery worker to docker-compose to handle background jobs. - Updated Dockerfile to cache Python packages for faster builds. - Fixed the database migrations and added a 'state' column to track file progress (processing, indexed, failed). - Fixed the circular import crashes in the database models. - Updated the upload route to instantly send jobs to the queue and return a task ID. - Added a new '/status' live stream endpoint to show real-time progress to the frontend. - Added an automatic cleanup step in the worker so temporary files are always deleted. - Brought back the GET /files/ endpoint so the dashboard can list all uploaded documents.
…l security/data bugs Infrastructure & Architecture: - Completely decoupled file uploading from the main API thread using Redis and Celery. - AI (sentence-transformers) now runs safely in background workers. - Implemented Server-Sent Events (SSE) for live frontend status tracking. - Restored unified hybrid search endpoint. Security & Vulnerability Patches: - Patched 'Zip Slip' directory traversal vulnerability in archive extraction. - Secured upload route against path traversal and malicious overwrites using UUID prefixing. - Prevented temp-directory memory leaks on corrupted ZIP uploads. Data Integrity & Database: - Resolved race conditions in Celery workers using IntegrityError try/rollback blocks. - Forced strict failure propagation so Celery correctly reports 'FAILURE' instead of swallowing exceptions. - Added 'state' column to File model to track indexing progress. - Added 'relation_type' to FileRelationship model. - Fixed one-directional relationship bug by implementing symmetric ORM queries. - Cleaned up app/database namespace collisions.
RK-NerdyBirdy
approved these changes
Aug 20, 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.
No description provided.