Spaces:
Sleeping
Sleeping
Commit History
-
Fix CI: make tests hermetic and harden hybrid_rank against attr-less chunks
Aissugur Kurganbekov +1: Claude Opus 4.8CI installs fastembed (requirements-dev -> requirements), which activated the dense retrieval path during tests and surfaced two issues: - hybrid_rank read chunk.embedding directly, crashing on the SimpleNamespace test stand-ins (and any chunk-like object without the attribute). Use getattr(c, embedding, None) so such a chunk simply stays lexical. - The suite would download the ~130 MB embedding model on every run (slow and flaky). conftest now disables embeddings, so tests are hermetic and deterministic; the TF-IDF+vector fusion is already unit-tested with mocked vectors in test_embeddings.py. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>03863fd
-
Add user accounts: registration, login (JWT + bcrypt), per-user documents
Aissugur Kurganbekov +1: Claude Opus 4.8Backend: - User model + nullable owner_id on Document (NULL = shared demo/eval docs). - security.py (bcrypt via passlib, PyJWT HS256) and auth.py (/auth/register, /auth/login, /auth/me + get_current_user). Generic 401 with a dummy-hash compare on miss (no user enumeration), 409 on duplicate, EmailStr validation. - /documents*, /ask, /history now require a Bearer token and are scoped to the user's own docs + shared demo docs; cross-user access returns 404 (never leaking ids). /health, /evaluate, /demo/seed stay public. AUTH_SECRET_KEY is env-driven (prod hard-fail, dev default + warning). - conftest authed-by-default so the 12 existing API tests are unchanged; new test_auth.py (register/login/me/protected/per-user isolation). 38 tests pass, live end-to-end verified. Frontend: - Split-layout AuthScreen (sign in / sign up toggle, validation, show/hide password, "Continue with the demo" guest path) in the light theme. - api.js routes every request through a Bearer wrapper …165a274
-
Recruiter-demo polish: curated demo questions, reset-db, PDF test, CORS
Aissugur Kurganbekov +1: Claude Opus 4.8 (1M context)- AskPanel: 3 curated demo questions (strong cite / multi-evidence / abstain), auto-selects the sample invoice for a deterministic 2-click demo - Add `python -m app.reset_db` + `make reset-db` for a clean slate - Add dependency-free PDF upload test (real pypdf parse path) -> 20 tests - CORS: allow any localhost/127.0.0.1 port (and Docker) via regex - README: reset-db command + no-make fallback Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>49eecdc -
FinanceFlow AI: source-grounded RAG Q&A over finance documents
Aissugur Kurganbekov +1: Claude Opus 4.8 (1M context)Full-stack MVP: FastAPI + SQLite backend, React/Vite frontend. - Upload PDF/TXT -> chunk -> TF-IDF retrieval -> focused extractive answer - Two abstention gates + citations for anti-hallucination - Golden-dataset evaluation (UI + CLI) with coverage/abstention/evidence metrics - One-click demo mode, sample-question chips, clean B2B dashboard - Logging, global exception handler, validated/typed API with Swagger docs - 19 pytest tests + GitHub Actions CI - Dockerfiles, docker-compose, Makefile Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>fc5156b