Spaces:
Runtime error
Runtime error
Commit History
-
fix(server): cap list_recent days at 365
An unbounded days argument let one call dump the entire corpus; bound it the same way search_papers bounds limit.3ccdaee -
Potential fix for pull request finding
Unverified signatureCo-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>b47245a -
fix: harden corpus sync, remove request-time file races, reject blank queries
- Corpus.sync() now fetches+hard-resets instead of pull --ff-only, so a force-pushed corpus repo can't wedge the refresh loop forever, and git failures surface stderr instead of being swallowed by capture_output. - Paper.markdown is populated once in Corpus.load() (which already reads every file for the citation graph) so get_paper serves from the in-memory snapshot instead of re-reading disk mid-request, which could race the refresh thread's in-place git reset. - search_papers rejects blank/whitespace queries before they reach BM25/ embedding search, where they silently produced meaningless results. - lookup() takes the papers dict explicitly so get_paper and get_citations share one unknown-id error path instead of duplicating the message. - Add .dockerignore so COPY . . doesn't ingest dev-only directories.ede187b -
fix: read one corpus snapshot in get_citations to survive refresh swaps
lookup() and corpora[name].papers were two separate reads; a refresh-loop swap between them could resolve the paper and its cited titles from different corpus generations, turning a dropped id into a raw KeyError instead of the tool's clean ValueError. Resolve both from one dict reference. Also drop the inaccurate 'atomically' from the build_corpus docstring (it is two dict assignments).5f14188 -
feat: mount per-corpus MCP servers with search, read, citation, and recency tools
Wires the Corpus/SearchIndex layers into two FastMCP streamable-HTTP servers (lipsync, tts) mounted under one Starlette app via create_app(), each exposing search_papers/get_paper/get_citations/list_recent tools and refreshed on a background interval. Disables FastMCP's default DNS-rebinding Host-header check: it only ever allowlists 127.0.0.1/localhost, which would reject every request once this app is mounted (not run standalone) behind a real hostname. Adds tests/__init__.py so tests/test_server.py can import shared fixtures via `from tests.conftest import ...` as an ordinary package import.c88c4a7 -
feat: hybrid BM25 + embedding search with reciprocal rank fusion
008fd7e -
feat: load corpus metadata, markdown paths, and citation graph
d4bfc76 -
fix: satisfy ruff lint and format checks
Drop the unused csv import (Task 2 reintroduces it with load()) and apply ruff-format to the fixture call. The original pre-commit run skipped these files because they were untracked at the time.f1508cf -
feat: project scaffold and corpus git sync
f156d53