Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

2.8 KB
Raw Blame

Fetch-path log events in the modules whose log sites this change rewrites — the LangGraph fetch tool (advanced_search_system/tools/fetch), ContentFetcher (content_fetcher/fetcher.py), the research_library/downloaders/* downloaders (base, direct-PDF, generic, bioRxiv, Semantic Scholar, HTML/Crawl4AI/Playwright) and their shared extraction/pipeline.py, and SafeSession.send's redirect guard (security/safe_requests.py) — no longer leak URL credentials, page content, or exception detail into the log sinks (stderr, log file, encrypted DB, frontend progress stream). Callees reached from those paths keep their own logging and are unchanged here: the fetch tool's library resolver (tools/fetch/library_resolver.py), the extraction/*_extractor.py extractors, security/ssrf_validator.py and security/egress/policy.py still keep their own logging (logger.exception, or logger.debug(..., exc_info=True) for metadata_extractor.py and newspaper_extractor.py). Every URL-bearing log site on the fetch paths — ContentFetcher, the HTML/Crawl4AI/Playwright downloaders, the LangGraph fetch tool (including the local-library source=library resolution event), and the shared extraction pipeline's fetch_and_extract / batch_fetch_and_extract / specialized-downloader paths — now renders only the redacted scheme://host:port origin (RFC 3986 userinfo, path, query and fragment are dropped). Failure events use the explicit logger.opt(exception=False) form: no traceback is attached. Where the caught error is the only diagnostic left, its message is kept inline rather than dropped altogether, but only through scrub_error (with any credential in scope passed as a known literal): it rewrites credentials and query strings but leaves the path, so a caught network error can no longer re-embed a credential via its message, though a bare (non-credentialed) path can still surface that way. This applies at the session-close and PDF-extraction handlers in downloaders/base.py and the Semantic Scholar API handlers, matching the safe_msg shape the OpenAlex downloader already uses. The summary-fetch success event is bounded to mode, status, redacted origin and character counts — page body, focus, overall query, title and summary text are no longer logged. Two deliberate, visible side effects of the redaction, kept for safety: per-domain rate-limit engine keys on the downloader paths are now derived from the URL's own parsed authority through one shared helper, rate_limit_authority in downloaders/base.py (userinfo is dropped, so a userinfo-bearing URL and its bare-origin equivalent share one bucket, and a URL whose authority will not parse — or whose host carries whitespace — buckets as invalid_authority), and the [FETCH] diagnostic events remain f-string rendered (values are redacted before interpolation, not passed as structured kwargs).