Skip to content

fix: code quality and safety improvements - #836

Closed
saurabhhhcodes wants to merge 891 commits into
param20h:mainfrom
saurabhhhcodes:fix/PDF-Assistant-RAG-14929
Closed

saurabhhhcodes wants to merge 891 commits into
param20h:mainfrom
saurabhhhcodes:fix/PDF-Assistant-RAG-14929

Conversation

@saurabhhhcodes

Copy link
Copy Markdown
Contributor

No description provided.

suhaniiz and others added 30 commits June 8, 2026 13:03
- models.py: restore filename index=True + add upstream processing columns
  (processing_progress, processing_stage, retry_count, last_error_traceback,
  processing_started_at, completed_at, extracted_urls) alongside feature's
  keywords column
- agent.py: restore ChatHuggingFace + ExternalServiceException from upstream;
  keep feature's extract_keywords import and persist_document_keywords helper;
  restore chat_llm agent setup and proper error raising
- requirements.txt: restore google-auth-oauthlib to Auth section,
  unstructured[pdf] to Document Processing, redis>=4.6.0 at bottom;
  remove duplicate fastapi-mail
- tests/test_documents.py: fix assertion to use correct FastAPI detail key
  and matching substring 'not supported'
…action-tags

# Conflicts:
#	backend/app/models.py
#	backend/app/schemas.py
#	backend/app/services/document_ingestion.py
Signed-off-by: Garima Varshney <gungunvarshney00@gmail.com>
# Conflicts:
#	backend/app/routes/chat.py
#	backend/app/routes/documents.py
#	backend/requirements.txt
#	frontend/e2e/auth-and-chat.spec.ts
- Add dedicated FIELD_ENCRYPTION_KEY setting (separate from SECRET_KEY)
- Update EncryptedString to use FIELD_ENCRYPTION_KEY with key versioning
- Add JWT algorithm whitelist enforcement (HS256 only)
- Add production validation to reject default SECRET_KEY and empty
  FIELD_ENCRYPTION_KEY
- Add DOC_CLEANUP_INACTIVE_DAYS and DOC_CLEANUP_ENABLED settings

Closes #513
- Remove redundant asyncio-based document_cleanup_job() from main.py
- Add unified cleanup_inactive_active_documents() with batched pagination
- Add _hard_delete_document() helper with per-document error isolation
- Add advisory_lock() helper for PostgreSQL/SQLite coordinated cleanup
- Schedule inactive-active cleanup via APScheduler alongside existing jobs
- Use batched pagination (100 docs/batch) in all cleanup functions

Closes #514
- Remove dead root-level Flask files: app.py, models.py, config.py,
  make_admin.py, requirements.txt, start.sh
- Remove legacy static/ and instance/ directories
- Update README.md Tech Stack to reflect FastAPI/Next.js/ChromaDB/
  HuggingFace stack
- Consolidate .env.example to match backend/app/config.py settings
- Add FIELD_ENCRYPTION_KEY, DOC_CLEANUP_*, and workspace settings to
  .env.example

Closes #515
param20h and others added 21 commits June 25, 2026 14:53
…caling

fix: scale PDF-unit highlight rects by zoom level to prevent misalignment
feat(rag): add OCR fallback for image-based PDF pages
…page

fix: gracefully handle missing/invalid page metadata in SourceCard
Frontend is now hosted separately on Vercel.
Backend on Hugging Face serves only the FastAPI API.
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the param20h's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.